Source: setuptools
Version: 65.6.3-1
Severity: normal

Hello,

The brltty package build is currently unreproducible because the build
path leaks into its Python bindings because setuptools does not take
CFLAGS (and not LDFLAGS either) from the environment.

That can be seen in the brltty build log:

https://buildd.debian.org/status/fetch.php?pkg=brltty&arch=amd64&ver=6.5-6&stamp=1670366082&raw=0

[...]
set -- --verbose build --build-temp .; \
[ "linux-gnu" != "mingw32" ] || set -- "${@}" --compiler mingw32; \
"/usr/bin/python3.11" ./setup.py "${@}"
running build
running build_ext
building 'brlapi' extension
x86_64-linux-gnu-gcc -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g 
-fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC 
-I. -I../../../Bindings/Python -I../../Programs -I../../../Programs -I../../ 
-I../../../ -I/usr/include/python3.11 -c ../../../Bindings/Python/bindings.c -o 
./../../../Bindings/Python/bindings.o -Wno-parentheses -Wno-unused 
-fno-strict-aliasing -U_POSIX_C_SOURCE -U_XOPEN_SOURCE
x86_64-linux-gnu-gcc -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g 
-fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC 
-I. -I../../../Bindings/Python -I../../Programs -I../../../Programs -I../../ 
-I../../../ -I/usr/include/python3.11 -c brlapi.auto.c -o ./brlapi.auto.o 
-Wno-parentheses -Wno-unused -fno-strict-aliasing -U_POSIX_C_SOURCE 
-U_XOPEN_SOURCE
creating build
creating build/lib.linux-x86_64-cpython-311
x86_64-linux-gnu-gcc -shared -Wl,-O1 -Wl,-Bsymbolic-functions -g -fwrapv -O2 
./../../../Bindings/Python/bindings.o ./brlapi.auto.o -L./../../Programs 
-L/usr/lib/x86_64-linux-gnu -lbrlapi -lpthread -o 
build/lib.linux-x86_64-cpython-311/brlapi.cpython-311-x86_64-linux-gnu.so

I.e. setuptools passes to gcc the flags it got during python3.11
build but it does not include the flags it got from the environment
(which includes -ffile-prefix-map=/<<PKGBUILDDIR>>/build-brltty=.),
and as a result the generated .o and .so files include the build path
/<<PKGBUILDDIR>>/build-brltty

blhc also notices that LDFLAGS is not getting included:

https://salsa.debian.org/a11y-team/brltty/-/jobs/3623088

3717:LDFLAGS missing (-Wl,-z,relro -Wl,-z,now): x86_64-linux-gnu-gcc -shared 
-Wl,-O1 -Wl,-Bsymbolic-functions -g -fwrapv -O2 
./../../../Bindings/Python/bindings.o ./brlapi.auto.o -L./../../Programs 
-L/usr/lib/x86_64-linux-gnu -lbrlapi -lpthread -o 
build/lib.linux-x86_64-cpython-311/brlapi.cpython-311-x86_64-linux-gnu.so

Samuel

-- System Information:
Debian Release: bookworm/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable-debug'), (500, 
'testing-debug'), (500, 'stable-security'), (500, 'stable-debug'), (500, 
'proposed-updates-debug'), (500, 'proposed-updates'), (500, 
'oldstable-proposed-updates'), (500, 'oldoldstable'), (500, 'buildd-unstable'), 
(500, 'unstable'), (500, 'stable'), (500, 'oldstable'), (1, 
'experimental-debug'), (1, 'buildd-experimental'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386, arm64

Kernel: Linux 6.1.0 (SMP w/8 CPU threads; PREEMPT)
Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

-- 
Samuel
---
Pour une évaluation indépendante, transparente et rigoureuse !
Je soutiens la Commission d'Évaluation de l'Inria.

Reply via email to