From: Rob Landley <rob@landley.net>
To: musl@lists.openwall.com
Cc: Jens <jensl@laas.mine.nu>
Subject: Re: problems with dynamic linking since 0.9.1
Date: Wed, 14 Aug 2013 22:29:43 -0500 [thread overview]
Message-ID: <1376537383.2737.30@driftwood> (raw)
In-Reply-To: <alpine.LNX.2.10.1308131112290.7612@laas.mine.nu> (from jensl@laas.mine.nu on Tue Aug 13 05:39:52 2013)
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
next prev parent reply other threads:[~2013-08-15 3:29 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-13 10:39 Jens
2013-08-13 11:07 ` Szabolcs Nagy
2013-08-13 11:18 ` Jens
2013-08-13 14:53 ` Szabolcs Nagy
2013-08-13 16:00 ` Rich Felker
2013-08-15 3:14 ` Rob Landley
2013-08-13 17:14 ` Jens
2013-08-13 18:03 ` Rich Felker
2013-08-14 9:06 ` Jens
2013-08-14 14:27 ` Rich Felker
2013-08-14 14:49 ` Szabolcs Nagy
2013-08-14 14:51 ` Rich Felker
2013-08-14 20:47 ` Jens
2013-08-14 20:58 ` Rich Felker
2013-08-15 21:19 ` Rob Landley
2013-08-14 14:51 ` Jens
2013-08-15 3:43 ` Rob Landley
2013-08-15 9:05 ` Jens
2013-08-16 8:28 ` Rob Landley
2013-08-15 2:17 ` Rob Landley
2013-08-15 3:29 ` Rob Landley [this message]
2013-08-14 22:26 writeonce
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1376537383.2737.30@driftwood \
--to=rob@landley.net \
--cc=jensl@laas.mine.nu \
--cc=musl@lists.openwall.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).