Bug#984504: pkg-config: "pkg-config --cflags" incorrectly omits -I flags

2021-03-05 Thread Vincent Lefevre
Control: forwarded -1 
https://gitlab.freedesktop.org/pkg-config/pkg-config/-/issues/66

I've reported the bug upstream.

-- 
Vincent Lefèvre  - Web: 
100% accessible validated (X)HTML - Blog: 
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)



Bug#984504: pkg-config: "pkg-config --cflags" incorrectly omits -I flags

2021-03-04 Thread Vincent Lefevre
Package: pkg-config
Version: 0.29.2-1
Severity: important

"pkg-config --cflags" incorrectly omits -I flags, potentially
yielding errors, or even incorrect builds because a wrong .h file
could be included. This happens when a CPATH or C_INCLUDE_PATH
environment variable has the include dir.

Example:

zira% pkg-config --cflags fplll
-pthread -I/home/vinc17/opt/fplll/include
zira% CPATH=/home/vinc17/opt/fplll/include pkg-config --cflags fplll 
-pthread
zira% C_INCLUDE_PATH=/home/vinc17/opt/fplll/include pkg-config --cflags fplll
-pthread

At least with C_INCLUDE_PATH, this is incorrect because this
environment variable is ignored by g++.

Not sure about CPATH, but it would be safer to ignore it as well
in case it would be unset or it would not be taken into account
by some compiler (it is not specified by POSIX).

-- System Information:
Debian Release: bullseye/sid
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'stable-updates'), (500, 
'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 5.10.0-4-amd64 (SMP w/8 CPU threads)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, 
TAINT_UNSIGNED_MODULE
Locale: LANG=POSIX, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages pkg-config depends on:
ii  libc6 2.31-9
ii  libdpkg-perl  1.20.7.1
ii  libglib2.0-0  2.66.7-1

pkg-config recommends no packages.

Versions of packages pkg-config suggests:
ii  dpkg-dev  1.20.7.1

-- no debconf information

-- 
Vincent Lefèvre  - Web: 
100% accessible validated (X)HTML - Blog: 
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)