This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Frederik Rietdijk
Recipients Frederik Rietdijk
Date 2020-05-23.07:41:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1590219687.71.0.404083343675.issue40739@roundup.psfhosted.org>
In-reply-to
Content
With binutils 2.34 Python 3 (any version) the following returns None

    python3 -c 'import ctypes.util; print((ctypes.util.find_library("c")))'

instead of the requested library which we think may be caused by https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=727a29badd95a68d08b86fec0b98702ce756c660
which is included in binutils 2.32 and up.


With binutils at 2.31 we got

# recent unstable
$ nix-shell --pure -p hello --run 'ld -t -o /dev/null -lc'
/nix/store/a57856fs4m8ir6vlv14h3gq3sv9aq2lb-binutils-2.31.1/bin/ld: mode elf_x86_64
/nix/store/nwsn18fysga1n5s0bj4jp4wfwvlbx8b1-glibc-2.30/lib/libc.so.6
/nix/store/nwsn18fysga1n5s0bj4jp4wfwvlbx8b1-glibc-2.30/lib/ld-linux-x86-64.so.2
/nix/store/nwsn18fysga1n5s0bj4jp4wfwvlbx8b1-glibc-2.30/lib/ld-linux-x86-64.so.2
/nix/store/a57856fs4m8ir6vlv14h3gq3sv9aq2lb-binutils-2.31.1/bin/ld: warning: cannot find entry symbol _start; not setting start address

however with 2.34 we get

# current staging
$ nix-shell --pure -p hello --run 'ld -t -o /dev/null -lc'
/nix/store/j1l6ds4mhm97nqw965w9sg07i9fric4d-glibc-2.30/lib/libc.so
/nix/store/j1l6ds4mhm97nqw965w9sg07i9fric4d-glibc-2.30/lib/libc.so.6
/nix/store/j1l6ds4mhm97nqw965w9sg07i9fric4d-glibc-2.30/lib/libc_nonshared.a
/nix/store/j1l6ds4mhm97nqw965w9sg07i9fric4d-glibc-2.30/lib/ld-linux-x86-64.so.2
/nix/store/j1l6ds4mhm97nqw965w9sg07i9fric4d-glibc-2.30/lib/libc_nonshared.a
/nix/store/j1l6ds4mhm97nqw965w9sg07i9fric4d-glibc-2.30/lib/ld-linux-x86-64.so.2
/nix/store/j284mk8hdv9ccxfdlhcdk1lg2jml4fhk-binutils-2.34/bin/ld: warning: cannot find entry symbol _start; not setting start address

The text-file libc.so is present which find_library cannot handle.

I suppose the regex needs to be fixed to exclude these references or otherwise handle them. It may be a bit late for binutils to revert their change.

Note this issue was discovered with the CFFI test suite https://foss.heptapod.net/pypy/cffi/blob/2aa5775ffdd6a911e9f40e3c2f5ba766155349c5/c/test_c.py#L60

Nixpkgs issue: https://github.com/NixOS/nixpkgs/pull/86954#issuecomment-632985576
History
Date User Action Args
2020-05-23 07:41:27Frederik Rietdijksetrecipients: + Frederik Rietdijk
2020-05-23 07:41:27Frederik Rietdijksetmessageid: <1590219687.71.0.404083343675.issue40739@roundup.psfhosted.org>
2020-05-23 07:41:27Frederik Rietdijklinkissue40739 messages
2020-05-23 07:41:27Frederik Rietdijkcreate