Summary: | dev-lang/python: ctypes.util.find_library is broken on pure clang system (dev-util/pkgcheck-0.10.14: NameError: name 'parser' is not defined (ctypes can't find libraries on musl systems)) | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | yemou |
Component: | Current packages | Assignee: | Python Gentoo Team <python> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | arthurzam, llvm, mgorny, musl, sam |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: |
https://github.com/python/cpython/pull/18380 https://github.com/gentoo/musl/issues/158 https://bugs.gentoo.org/show_bug.cgi?id=860831 https://bugs.gentoo.org/show_bug.cgi?id=872110 https://bugs.gentoo.org/show_bug.cgi?id=872416 |
||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 430702 | ||
Attachments: | emerge --info |
Description
yemou
2022-09-17 00:54:41 UTC
Created attachment 806764 [details]
emerge --info
The solution will be different but just noting that in bug 860831, we also saw the same error message -- we should really make pkgcheck catch it and give a more informative message. Hmm, I thought find_library() didn't work on libraries that didn't have SONAME but libtree-sitter-bash seems to have one. (In reply to Michał Górny from comment #3) > Hmm, I thought find_library() didn't work on libraries that didn't have > SONAME but libtree-sitter-bash seems to have one. Yeah, I've just installed pkgcheck in my musl chroot and it just works. This is probably just an issue on musl/clang installs that don't have gcc and binutils installed. After installing gcc and binutils, pkgcheck worked just fine. An alternative solution is to symlink clang -> cc and llvm-objdump -> objdump This is actually not a musl-specific problem but a problem on systems without gcc/binutils, and IMO it's our fault. ctypes.util.find_library() needs "cc" and "objdump" to work. Our pure clang stages are missing both. Not sure about objdump but I'd consider a base system without "cc" and "c++" symlinks broken. I suppose I could have llvm/clang install some useful symlinks into /usr/lib/llvm/*/bin that would naturally work on non-gcc/binutils systems where there are no matching symlinks in /usr/bin without causing collisions. However, it probably won't help on migrated systems where we'd probably end up with dangling symlinks in /usr/bin. commit 3ac93781eb20dd9cd6c90cff860fcbf51a81086a Author: Michał Górny <mgorny@gentoo.org> Date: Tue Sep 20 13:15:47 2022 +0200 sys-devel/clang: Add symlinks PDEP to 15.x Signed-off-by: Michał Górny <mgorny@gentoo.org> commit d9b80be87be912f0ed7cf46acff1882a477812b7 Author: Michał Górny <mgorny@gentoo.org> Date: Tue Sep 20 13:15:21 2022 +0200 sys-devel/lld: Add symlinks PDEP to 15.x Signed-off-by: Michał Górny <mgorny@gentoo.org> commit bdf39f35ac968c1f5656096b9c9667a3101f4f2d Author: Michał Górny <mgorny@gentoo.org> Date: Tue Sep 20 13:14:50 2022 +0200 sys-devel/llvm: Add symlinks PDEP to 15.x Signed-off-by: Michał Górny <mgorny@gentoo.org> commit 7d393c02475dc00b57390a451e42446fe85c99d4 Author: Michał Górny <mgorny@gentoo.org> Date: Tue Sep 20 13:14:09 2022 +0200 sys-devel/clang-toolchain-symlinks: Add for LLVM 15.x Signed-off-by: Michał Górny <mgorny@gentoo.org> commit 3d47ca4f047bc0ded5dc9f624beef421e5e0e678 Author: Michał Górny <mgorny@gentoo.org> Date: Tue Sep 20 13:13:37 2022 +0200 sys-devel/lld-toolchain-symlinks: Add for LLVM 15.x Signed-off-by: Michał Górny <mgorny@gentoo.org> commit 7d2ba3742b95819ff57590238544a7574c66596b Author: Michał Górny <mgorny@gentoo.org> Date: Tue Sep 20 13:13:06 2022 +0200 sys-devel/llvm-toolchain-symlinks: Add for LLVM 15.x Signed-off-by: Michał Górny <mgorny@gentoo.org> With that, I think this is essentially fixed, even though it _should_ function without cc and friends. The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/gcc-config.git/commit/?id=1ff1ed38697ed3b376db5c5157fcec24df67aa91 commit 1ff1ed38697ed3b376db5c5157fcec24df67aa91 Author: Sam James <sam@gentoo.org> AuthorDate: 2022-09-22 23:41:28 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2022-09-22 23:45:43 +0000 gcc-config: create ${CTARGET}-cc symlink We need this because configure scripts may look for ${CTARGET}-cc first, and while this wasn't a problem in the past, LLVM installs fallback symlinks in /usr/lib/llvm/${SLOT}/bin for the benefit of llvm-only profiles, and configure has started finding these rather than falling back to say, ${CTARGET}-gcc like it has been all this time. Bug: https://bugs.gentoo.org/870577 Bug: https://bugs.gentoo.org/872416 Signed-off-by: Sam James <sam@gentoo.org> gcc-config | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cc6a27ec99c1e08ac51c69ff0ab4c2b8a5578e2e commit cc6a27ec99c1e08ac51c69ff0ab4c2b8a5578e2e Author: Sam James <sam@gentoo.org> AuthorDate: 2022-09-22 23:46:57 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2022-09-22 23:47:27 +0000 sys-devel/gcc-config: add 2.6 Creates ${CTARGET}-cc symlink. We need this because configure scripts may look for ${CTARGET}-cc first, and while this wasn't a problem in the past, LLVM installs fallback symlinks in /usr/lib/llvm/${SLOT}/bin for the benefit of llvm-only profiles, and configure has started finding these rather than falling back to say, ${CTARGET}-gcc like it has been all this time. Bug: https://bugs.gentoo.org/870577 Bug: https://bugs.gentoo.org/872416 Signed-off-by: Sam James <sam@gentoo.org> sys-devel/gcc-config/Manifest | 1 + sys-devel/gcc-config/gcc-config-2.6.ebuild | 60 +++++++++++++++++++++++++++++ sys-devel/gcc-config/gcc-config-9999.ebuild | 6 +-- 3 files changed, 64 insertions(+), 3 deletions(-) |