python3Packages.cffi: disable tests on FreeBSD#328776
python3Packages.cffi: disable tests on FreeBSD#328776rhelmot wants to merge 1 commit intoNixOS:masterfrom
Conversation
This test suite cannot work on FreeBSD under nix. It only works on linux because of hardcoded exceptions in the library loading logic which are not present for FreeBSD, requiring it to fall back to /sbin/ldconfig (does not work obviously).
|
Can it be patched? https://github.com/search?q=repo%3Apython-cffi%2Fcffi+%2Fldconfig%2F&type=code no results for |
|
Looks like I misremembered - it's cpython that has the fallbackless code, not cffi. https://github.com/python/cpython/blob/c4c7097e64b0c9cb0081de8872b90594865c892b/Lib/ctypes/util.py#L224 |
|
I was so wrong about the cause of this, it's worse than I thought. We actually patch out the code that would make this work in cpython (here, here) because it is usually useless and slows down startup. CPython on Linux has an extra case that invokes ld in order to do what could also have been done with gcc, in case the gcc case fails. I think this is why it works on Linux. Several questions remain:
|
|
This final fallback was not present when the nixpkgs patch was made to cpython originally. I did some tests and determined that the function being patched out is in fact never called during cpython 3.12 startup, even on importing uuid as mentioned in the code, so I'm going to pivot to try to remove that patch entirely from the cpython derivation. |
Description of changes
This test suite cannot work on FreeBSD under nix. It only works on linux because of hardcoded exceptions in cffi's library loading logic which are not present for FreeBSD, requiring it to fall back to /sbin/ldconfig (does not work obviously).
Disable the tests.
Things done
nix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)Add a 👍 reaction to pull requests you find important.