Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 544306

Summary: sys-libs/musl-1.1.7 needs cross compile logic for /usr/bin/ldd
Product: Gentoo Linux Reporter: David Flogeras <dflogeras2>
Component: [OLD] Core systemAssignee: Anthony Basile <blueness>
Status: RESOLVED FIXED    
Severity: normal CC: lu_zero, toolchain
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 430702    
Attachments: Files listing of installed crossdev build musl-1.17-r1
patch against musl-1.1.7-r2

Description David Flogeras 2015-03-24 10:54:42 UTC
I'm building from a crossdev generated package, and musl's /usr/bin/ldd is colliding with the system's version.

Reproducible: Always
Comment 1 Felix Janda 2015-03-24 14:22:33 UTC
Duplicate of https://bugs.gentoo.org/show_bug.cgi?id=544128

Could you test my patch?
Comment 2 David Flogeras 2015-03-25 01:11:45 UTC
Patch seems to alleviate the ldd collision, but it installs /lib/ld-musl-armhf.so.1, and the following warning is emitted:

/sbin/ldconfig: /lib64/ld-musl-armhf.so.1 is for unknown machine 40.

/sbin/ldconfig: /lib64/ld-musl-armhf.so.1 is for unknown machine 40.
Comment 3 Anthony Basile gentoo-dev 2015-03-27 23:22:04 UTC
musl-1.1.7-r1 should be in the Felix's patch.  

(In reply to David Flogeras from comment #2)
> Patch seems to alleviate the ldd collision, but it installs
> /lib/ld-musl-armhf.so.1, and the following warning is emitted:
> 
> /sbin/ldconfig: /lib64/ld-musl-armhf.so.1 is for unknown machine 40.
> 
> /sbin/ldconfig: /lib64/ld-musl-armhf.so.1 is for unknown machine 40.

I need more context here.  First of all, why is this lib64?  Where is that file installed exactly.  Also musl doesn't use ldconfig so the message is spurious, but I'm still worried about where /lib64/ld-musl-armhf.so.1 lives.
Comment 4 David Flogeras 2015-03-28 11:29:47 UTC
OK I tried again with the now in-tree 1.1.7-r1 and don't get the previous warnings, but now I get this:

QA Notice: Symbolic link /usr/armv6j-hardfloat-linux-musleabi/usr/bin/ldd points to /lib/ld-musl-* which does not exist.

I'll attach a listing of all installed files in cross build musl-1.1.7-r1.

Note as we previously discussed, I have to do the following when crossbuilding:

CFLAGS="-O2 -pipe -march=armv6j -mfpu=vfp -mfloat-abi=hard -fomit-frame-pointer" emerge -1 cross-armv6j-hardfloat-linux-musleabi/musl
Comment 5 David Flogeras 2015-03-28 11:31:35 UTC
Created attachment 399942 [details]
Files listing of installed crossdev build musl-1.17-r1
Comment 6 Felix Janda 2015-03-28 12:40:30 UTC
Please try the patch against -r1 of

https://bugs.gentoo.org/show_bug.cgi?id=544128

This should fix it and is supposed to be musl-1.1.7-r2.
Comment 7 David Flogeras 2015-03-28 13:38:28 UTC
Sorry my local mirror didn't have -r2 yet.

Tried again with -r2, same QA notice.
Comment 8 Felix Janda 2015-03-28 15:11:43 UTC
Created attachment 399952 [details, diff]
patch against musl-1.1.7-r2

Sorry for messing it up repeatedly.

Could you try this patch against musl-1.1.7-r2?
Comment 9 Anthony Basile gentoo-dev 2015-03-28 16:26:15 UTC
(In reply to Felix Janda from comment #8)
> Created attachment 399952 [details, diff] [details, diff]
> patch against musl-1.1.7-r2
> 
> Sorry for messing it up repeatedly.
> 
> Could you try this patch against musl-1.1.7-r2?

Actually I'm pretty sure that's correct so I committed 1.1.7-r3.  The point is that both the sym link and the target are in sysroot.  For native sysroot is unset and it works out.

Test it out guys and let me know.
Comment 10 David Flogeras 2015-03-28 16:27:29 UTC
heh you _just_ beat me to the punch.  The proposed patch works as I'd expect.
Comment 11 David Flogeras 2015-03-28 16:32:24 UTC
(In reply to Felix Janda from comment #8)
> Created attachment 399952 [details, diff] [details, diff]
> patch against musl-1.1.7-r2
> 
> Sorry for messing it up repeatedly.
> 
> Could you try this patch against musl-1.1.7-r2?

No need to apologize, thanks for the patches :)
Comment 12 Anthony Basile gentoo-dev 2015-03-28 16:41:02 UTC
reopen if there are still issues.