Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1376537383.2737.30@driftwood>
Date: Wed, 14 Aug 2013 22:29:43 -0500
From: Rob Landley <rob@...dley.net>
To: musl@...ts.openwall.com
Cc: Jens <jensl@...s.mine.nu>
Subject: Re: problems with dynamic linking since 0.9.1

On 08/13/2013 05:39:52 AM, Jens wrote:
> 
> Hello!
> 
> Dynamic linking with musl has stopped working for me since musl 0.9.1.
> I havent tested all versions but 0.9.6 and 0.9.12 does not work.
> 
> Im still using that strange uclibc environment where gcc is itself a
> wrapper that calls rawgcc.

That would be aboriginal linux, and it worked for me last I checked...

(x86_64:1) /home # wget  
http://www.musl-libc.org/releases/musl-0.9.12.tar.gz
Connecting to www.musl-libc.org (216.12.86.13:80)
(x86_64:1) /home # tar xzf musl-0.9.12.tar.gz
(x86_64:1) /home # cd musl-0.9.12
(x86_64:1) /home/musl-0.9.12 # ./configure --prefix=/home/musl
checking for C compiler... gcc
checking whether compiler is gcc... yes
...
(x86_64:1) /home/musl-0.9.12 # make
...
(x86_64:1) /home/musl-0.9.12 # make install
...
(x86_64:1) /home/musl-0.9.12 # cd /home/musl/bin
(x86_64:1) /home/musl/bin # ./musl-gcc /usr/src/thread-hello2.c  
-lpthread
(x86_64:1) /home/musl/bin # ./a.out
Hello world!
(x86_64:1) /home/musl/bin # ldd a.out
	libpthread.so.0 => /lib/libpthread.so.0 (0x00000000)
	libc.so.0 => /lib/libc.so.0 (0x00000000)
	ld-uClibc.so.0 => /lib/ld-uClibc.so.0 (0x00000000)
	not a dynamic executable

Hmmm, looks like my wrapper is overriding the musl one. Actually that  
makes sense, mine is designed to be a Very Large Hammer. Let's see...

# REALGCC=/usr/tools/bin/rawcc ./musl-gcc /usr/src/thread-hello2.c  
-lpthread

Nope, then it can't find cc1.

# PATH=$PATH:/usr/tools/bin REALGCC=rawcc ./musl-gcc  
/usr/src/thread-hello2.c -lpthread
ld: crtbegin.o: No such file: No such file or directory

Sigh. There's a _reason_ I'm rewriting my wrapper to be musl-aware...

Jens: lemme get back to you this weekend, ok?

Alas, gcc wrappers are _hard_...

Rob

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.