Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 643742 - sys-libs/musl-1.1.18 doesn't build, configure does not detect compiler-rt correctly, requires /usr/lib/libcompiler_rt.a to be present
Summary: sys-libs/musl-1.1.18 doesn't build, configure does not detect compiler-rt cor...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Anthony Basile
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-06 22:23 UTC by Bjorn Pagen
Modified: 2019-03-04 20:35 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
beginning of configure (file_643742.txt,546 bytes, text/plain)
2018-01-06 22:25 UTC, Bjorn Pagen
Details
emerge --info (file_643742.txt,4.92 KB, text/plain)
2018-01-06 22:29 UTC, Bjorn Pagen
Details
full build.log (build.log,796.97 KB, text/x-log)
2018-01-06 22:32 UTC, Bjorn Pagen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bjorn Pagen 2018-01-06 22:23:02 UTC
During it's configure phase, musl's configure script checks if compiler_rt exists by checking if the library libcompiler_rt.a exists, which it doesn't.

The compiler_rt package installs only these packages:

###
partridge / # equery f compiler-rt
 * Searching for compiler-rt ...
 * Contents of sys-libs/compiler-rt-5.0.1:
/usr
/usr/lib
/usr/lib/clang
/usr/lib/clang/5.0.1
/usr/lib/clang/5.0.1/lib
/usr/lib/clang/5.0.1/lib/linux
/usr/lib/clang/5.0.1/lib/linux/libclang_rt.builtins-x86_64.a
/usr/share
/usr/share/doc
/usr/share/doc/compiler-rt-5.0.1
/usr/share/doc/compiler-rt-5.0.1/README.txt.bz2
###

I fixed the issue creating a symlink from /usr/lib/clang/5.0.1/lib/linux/libclang_rt.builtins-x86_64.a to /usr/lib/libcompiler_rt.a

I propose that the compiler-rt ebuild should do this automatically.
Comment 1 Bjorn Pagen 2018-01-06 22:25:50 UTC
Created attachment 513562 [details]
beginning of configure
Comment 2 Bjorn Pagen 2018-01-06 22:29:25 UTC
Created attachment 513564 [details]
emerge --info
Comment 3 Bjorn Pagen 2018-01-06 22:32:14 UTC
Created attachment 513566 [details]
full build.log
Comment 4 Bjorn Pagen 2018-01-07 15:09:07 UTC
Steps to Reproduce:
1. Uninstall gcc on musl
2. Install clang
3. Try to compile musl
Comment 5 Bjorn Pagen 2018-01-09 02:37:50 UTC
I am doing this with the compiler as clang, and gcc is uninstalled. /usr/bin/cc is a symlink to clang. 

This error does not occur under gcc, as musl links against libgcc_s if gcc is installed, alleviating the problem.
Comment 6 tt_1 2019-03-04 20:35:09 UTC
Seems this was discussed on llvm mailing list? 

http://lists.llvm.org/pipermail/llvm-dev/2016-December/108348.html