Package: python3.9
Version: 3.9.2-1
Severity: normal
Affects: brltty

Hello,

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

That can be seen in the brltty build log (as of current git version that
enables verbose log):

/tmp/brltty-6.3+dfsg$ dpkg-buildpackage
[...]
set -- --verbose build --build-temp .; \
[ "linux-gnu" != "mingw32" ] || set -- "${@}" --compiler mingw32; \
"/usr/bin/python3.9" ./setup.py "${@}"
running build
running build_ext
building 'brlapi' extension
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g 
-fwrapv -O2 -Wall -g 
-ffile-prefix-map=/build/python3.9-RNBry6/python3.9-3.9.2=. 
-fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g 
-ffile-prefix-map=/build/python3.9-RNBry6/python3.9-3.9.2=. 
-fstack-protector-strong -Wformat -Werror=format-security -Wdate-time 
-D_FORTIFY_SOURCE=2 -fPIC -I. -I../../../Bindings/Python -I../../Programs 
-I../../../Programs -I../../ -I../../../ -I/usr/include/python3.9 -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 -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g 
-fwrapv -O2 -Wall -g 
-ffile-prefix-map=/build/python3.9-RNBry6/python3.9-3.9.2=. 
-fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g 
-ffile-prefix-map=/build/python3.9-RNBry6/python3.9-3.9.2=. 
-fstack-protector-strong -Wformat -Werror=format-security -Wdate-time 
-D_FORTIFY_SOURCE=2 -fPIC -I. -I../../../Bindings/Python -I../../Programs 
-I../../../Programs -I../../ -I../../../ -I/usr/include/python3.9 -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-3.9
x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions 
-Wl,-z,relro -g -fwrapv -O2 -Wl,-z,relro -g -fwrapv -O2 -g 
-ffile-prefix-map=/build/python3.9-RNBry6/python3.9-3.9.2=. 
-fstack-protector-strong -Wformat -Werror=format-security -Wdate-time 
-D_FORTIFY_SOURCE=2 ./../../../Bindings/Python/bindings.o ./brlapi.auto.o 
-L./../../Programs -lbrlapi -lpthread -o 
build/lib.linux-x86_64-3.9/brlapi.cpython-39-x86_64-linux-gnu.so

I.e. distutils passes to gcc the flags it got during python3.9 build
(which included -ffile-prefix-map=/build/python3.9-RNBry6/python3.9-3.9.2=.)
but it does not include the flags it got from the environment (which
includes -ffile-prefix-map=/tmp/brltty-6.3+dfsg=.), and as a result the
generated .o and .so files include the build path /tmp/brltty-6.3+dfsg.


blhc also notices that LDFLAGS is not getting included:

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

2438:LDFLAGS missing (-Wl,-z,now): x86_64-linux-gnu-gcc -pthread -shared 
-Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fwrapv -O2 -Wl,-z,relro -g 
-fwrapv -O2 -g -ffile-prefix-map=/build/python3.9-RNBry6/python3.9-3.9.2=. 
-fstack-protector-strong -Wformat -Werror=format-security -Wdate-time 
-D_FORTIFY_SOURCE=2 ./../../../Bindings/Python/bindings.o ./brlapi.auto.o 
-L./../../Programs -lbrlapi -lpthread -o 
build/lib.linux-x86_64-3.9/brlapi.cpython-39-x86_64-linux-gnu.so

Samuel

-- System Information:
Debian Release: 11.0
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable-debug'), (500, 
'testing-debug'), (500, 'stable-debug'), (500, 'proposed-updates-debug'), (500, 
'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

Kernel: Linux 5.12.0 (SMP w/8 CPU threads)
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

Versions of packages python3.9 depends on:
ii  libpython3.9-stdlib  3.9.2-1
ii  media-types          4.0.0
ii  mime-support         3.66
ii  python3.9-minimal    3.9.2-1

python3.9 recommends no packages.

Versions of packages python3.9 suggests:
ii  binutils        2.35.2-2
pn  python3.9-doc   <none>
ii  python3.9-venv  3.9.2-1

-- no debconf information

-- 
Samuel
 Profitant de cette occasion, vous serait-il possible de rebooter 
 aussi Modérator et son petit copain qui gère les ressources de 
 download ?
 -+- OB in NPC : Apprendre à flasher son personnel -+-

Reply via email to