[issue32647] Undefined references when compiling ctypes on binutils 2.29.1 with gcc -Wl, -z, undefs (Fedora 28)

2018-02-26 Thread Charalampos Stratakis
Charalampos Stratakis added the comment: Tested the fix and ctypes is linked successfully with libdl when utilizing the strict symbol check. -- stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue32647] Undefined references when compiling ctypes on binutils 2.29.1 with gcc -Wl, -z, undefs (Fedora 28)

2018-02-25 Thread Christian Heimes
Christian Heimes added the comment: New changeset 4cb373359d5ff29b222b10207516d294f3a54ad8 by Christian Heimes (Miss Islington (bot)) in branch '3.7': [3.7] bpo-32647: Link ctypes extension with libdl. (GH-5550) (#5874)

[issue32647] Undefined references when compiling ctypes on binutils 2.29.1 with gcc -Wl, -z, undefs (Fedora 28)

2018-02-25 Thread Christian Heimes
Christian Heimes added the comment: New changeset 192bff4e2d196b8933829923ca1db77d8dee67e2 by Christian Heimes (Miss Islington (bot)) in branch '3.6': [3.6] bpo-32647: Link ctypes extension with libdl. (GH-5550) (#5875)

[issue32647] Undefined references when compiling ctypes on binutils 2.29.1 with gcc -Wl, -z, undefs (Fedora 28)

2018-02-25 Thread Christian Heimes
Christian Heimes added the comment: New changeset 4bb9b9aea04b1a96632da1b30a58fb31cbe6ec92 by Christian Heimes in branch '2.7': [2.7] bpo-32647: Link ctypes extension with libdl. (GH-5550) (#5877)

[issue32647] Undefined references when compiling ctypes on binutils 2.29.1 with gcc -Wl, -z, undefs (Fedora 28)

2018-02-25 Thread Christian Heimes
Change by Christian Heimes : -- pull_requests: +5650 ___ Python tracker ___ ___

[issue32647] Undefined references when compiling ctypes on binutils 2.29.1 with gcc -Wl, -z, undefs (Fedora 28)

2018-02-25 Thread miss-islington
Change by miss-islington : -- pull_requests: +5648 ___ Python tracker ___

[issue32647] Undefined references when compiling ctypes on binutils 2.29.1 with gcc -Wl, -z, undefs (Fedora 28)

2018-02-25 Thread miss-islington
Change by miss-islington : -- pull_requests: +5647 ___ Python tracker ___

[issue32647] Undefined references when compiling ctypes on binutils 2.29.1 with gcc -Wl, -z, undefs (Fedora 28)

2018-02-25 Thread Christian Heimes
Christian Heimes added the comment: New changeset 5bb9692575f10f4a7c7f1c2c0c70956baf6d5c23 by Christian Heimes in branch 'master': bpo-32647: Link ctypes extension with libdl. (#5550) https://github.com/python/cpython/commit/5bb9692575f10f4a7c7f1c2c0c70956baf6d5c23

[issue32647] Undefined references when compiling ctypes on binutils 2.29.1 with gcc -Wl, -z, undefs (Fedora 28)

2018-02-06 Thread Charalampos Stratakis
Charalampos Stratakis added the comment: Attaching the build log from python2. Near the end you can see the undefined references errors. -- Added file: https://bugs.python.org/file47426/py2buildlog ___ Python tracker

[issue32647] Undefined references when compiling ctypes on binutils 2.29.1 with gcc -Wl, -z, undefs (Fedora 28)

2018-02-06 Thread Charalampos Stratakis
Charalampos Stratakis added the comment: Just tested it for python3 on a rawhide system with the flag enabled and it works, ctypes is compiled successfully. python2 is not affected the same way though, various modules fail there with different undefined references issues

[issue32647] Undefined references when compiling ctypes on binutils 2.29.1 with gcc -Wl, -z, undefs (Fedora 28)

2018-02-06 Thread Charalampos Stratakis
Charalampos Stratakis added the comment: @Stephane, Currently the flag has been disabled on rawhide due to too many breakages but the bug is still there if you add '-z defs' to the linker flags. More info:

[issue32647] Undefined references when compiling ctypes on binutils 2.29.1 with gcc -Wl, -z, undefs (Fedora 28)

2018-02-05 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: maybe I miss something but I have downloaded the last fedora:rawhide with docker, just update it via dnf update and install all the dependencies for git and python docker --rm -it fedora:rawhide /bin/bash dnf update dnf install git-core

[issue32647] Undefined references when compiling ctypes on binutils 2.29.1 with gcc -Wl, -z, undefs (Fedora 28)

2018-02-05 Thread Christian Heimes
Christian Heimes added the comment: Stéphane, the issue is only reproducible with latest Fedora rawhide. -- ___ Python tracker ___

[issue32647] Undefined references when compiling ctypes on binutils 2.29.1 with gcc -Wl, -z, undefs (Fedora 28)

2018-02-05 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: I use Fedora 27, Please, could you give the instructions for your build, I could test locally and check if the patch fixes the issue. Thank you -- nosy: +matrixise ___ Python tracker

[issue32647] Undefined references when compiling ctypes on binutils 2.29.1 with gcc -Wl, -z, undefs (Fedora 28)

2018-02-05 Thread Christian Heimes
Christian Heimes added the comment: configure.ac already contains the check: AC_CHECK_LIB(dl, dlopen) It should be enough to add: if sysconfig.get_config_var('HAVE_LIBDL'): libs.append('dl') to ctypes. -- type: -> compile error versions: +Python

[issue32647] Undefined references when compiling ctypes on binutils 2.29.1 with gcc -Wl, -z, undefs (Fedora 28)

2018-02-05 Thread Christian Heimes
Change by Christian Heimes : -- keywords: +patch pull_requests: +5375 stage: -> patch review ___ Python tracker ___

[issue32647] Undefined references when compiling ctypes on binutils 2.29.1 with gcc -Wl, -z, undefs (Fedora 28)

2018-02-05 Thread Charalampos Stratakis
Charalampos Stratakis added the comment: So what would be the best way to proceed from here? Add a check or just link to dl unconditionally? -- ___ Python tracker

[issue32647] Undefined references when compiling ctypes on binutils 2.29.1 with gcc -Wl, -z, undefs (Fedora 28)

2018-01-24 Thread STINNER Victor
STINNER Victor added the comment: > We can't just add dl unconditionally. dlopen() is not used on Windows nor macOS older than 10.3. On old macOS, functions like NSCreateObjectFileImageFromFile() are used. I don't think that the master branch still supports macOS

[issue32647] Undefined references when compiling ctypes on binutils 2.29.1 with gcc -Wl, -z, undefs (Fedora 28)

2018-01-24 Thread Christian Heimes
Christian Heimes added the comment: -ldl is the correct fix here. https://fedoraproject.org/wiki/UnderstandingDSOLinkChange explains the problem. tl;dr linking with dl is required because the linker no longer adds indirect dependencies. We can't just add dl

[issue32647] Undefined references when compiling ctypes on binutils 2.29.1 with gcc -Wl, -z, undefs (Fedora 28)

2018-01-24 Thread STINNER Victor
STINNER Victor added the comment: I'm unable to reproduce the issue on Fedora 27 (binutils-2.29-6.fc27.src.rpm, gcc-7.2.1-2.fc27.src.rpm). _ctypes.cpython-37dm-x86_64-linux-gnu.so is generated whereas it's not linked to libdl.so (as expected). The flag seems to be