* dynamic compile issue
@ 2014-12-18 16:04 stephen Turner
2014-12-18 18:43 ` Isaac Dunham
0 siblings, 1 reply; 5+ messages in thread
From: stephen Turner @ 2014-12-18 16:04 UTC (permalink / raw)
To: musl
[-- Attachment #1: Type: text/plain, Size: 747 bytes --]
I have no reason to believe this is a musl issue but seeing that your in
the business of building a libc i was hoping someone could give me a
pointer or something to assist.
I have a pure musl libc chroot and when compiling static it links/works
fine. im now on my 2nd-3rd gen applications being compiled in the chroot
alone. when i go to do a dynamic compile however it always wants to link to
ld-linux.so.2. I do not have any kind of scripts or anything running in
the chroot yet and im sure that this is caused by me but i just dont know
where or what to look for? there is no ldconfig installed or running which
was mentioned as a possible issue referring to the wrong libs.
I greatly appreciate any help you can provide.
thanks,
stephen
[-- Attachment #2: Type: text/html, Size: 853 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: dynamic compile issue
2014-12-18 16:04 dynamic compile issue stephen Turner
@ 2014-12-18 18:43 ` Isaac Dunham
2014-12-18 18:47 ` stephen Turner
0 siblings, 1 reply; 5+ messages in thread
From: Isaac Dunham @ 2014-12-18 18:43 UTC (permalink / raw)
To: musl
On Thu, Dec 18, 2014 at 11:04:16AM -0500, stephen Turner wrote:
> I have no reason to believe this is a musl issue but seeing that your in
> the business of building a libc i was hoping someone could give me a
> pointer or something to assist.
>
> I have a pure musl libc chroot and when compiling static it links/works
> fine. im now on my 2nd-3rd gen applications being compiled in the chroot
> alone. when i go to do a dynamic compile however it always wants to link to
> ld-linux.so.2. I do not have any kind of scripts or anything running in
You failed to patch GCC or configured it for glibc inadvertently.
(ld-linux.so.2 is the glibc dynamic linker.)
The patch and build options should be documented in bootstrap-linux or
musl-cross, whichever has the patches you're using at the moment.
(Check that you applied the patches *and* used the target that the
scripts use.)
HTH,
Isaac Dunham
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: dynamic compile issue
2014-12-18 18:43 ` Isaac Dunham
@ 2014-12-18 18:47 ` stephen Turner
2014-12-18 19:14 ` Rich Felker
0 siblings, 1 reply; 5+ messages in thread
From: stephen Turner @ 2014-12-18 18:47 UTC (permalink / raw)
To: musl
[-- Attachment #1: Type: text/plain, Size: 1373 bytes --]
im using PCC as my compiler. it was initially built with gcc but since has
recompiled itself several times. 2 at least in the chroot musl only
environment alone. would this advice still apply? If i understood the pcc
group correctly it should not be responsible for this but i cant help but
think it is. regardless i will look into any advice/leads provided.
On Thu, Dec 18, 2014 at 1:43 PM, Isaac Dunham <ibid.ag@gmail.com> wrote:
> On Thu, Dec 18, 2014 at 11:04:16AM -0500, stephen Turner wrote:
> > I have no reason to believe this is a musl issue but seeing that your in
> > the business of building a libc i was hoping someone could give me a
> > pointer or something to assist.
> >
> > I have a pure musl libc chroot and when compiling static it links/works
> > fine. im now on my 2nd-3rd gen applications being compiled in the chroot
> > alone. when i go to do a dynamic compile however it always wants to link
> to
> > ld-linux.so.2. I do not have any kind of scripts or anything running in
>
> You failed to patch GCC or configured it for glibc inadvertently.
> (ld-linux.so.2 is the glibc dynamic linker.)
> The patch and build options should be documented in bootstrap-linux or
> musl-cross, whichever has the patches you're using at the moment.
> (Check that you applied the patches *and* used the target that the
> scripts use.)
>
> HTH,
> Isaac Dunham
>
>
[-- Attachment #2: Type: text/html, Size: 1775 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: dynamic compile issue
2014-12-18 18:47 ` stephen Turner
@ 2014-12-18 19:14 ` Rich Felker
2014-12-18 20:13 ` stephen Turner
0 siblings, 1 reply; 5+ messages in thread
From: Rich Felker @ 2014-12-18 19:14 UTC (permalink / raw)
To: musl
On Thu, Dec 18, 2014 at 01:47:49PM -0500, stephen Turner wrote:
> im using PCC as my compiler. it was initially built with gcc but since has
> recompiled itself several times. 2 at least in the chroot musl only
> environment alone. would this advice still apply? If i understood the pcc
> group correctly it should not be responsible for this but i cant help but
> think it is. regardless i will look into any advice/leads provided.
PCC probably just has /lib/ld-linux.so.2 hard-coded for the "linux"
target. You just need to change this when building it for a musl-based
system or pass -Wl,-dynamic-linker,/lib/ld-musl-i386.so.1 (or whatever
your arch is) on the command line.
Rich
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: dynamic compile issue
2014-12-18 19:14 ` Rich Felker
@ 2014-12-18 20:13 ` stephen Turner
0 siblings, 0 replies; 5+ messages in thread
From: stephen Turner @ 2014-12-18 20:13 UTC (permalink / raw)
To: musl
[-- Attachment #1: Type: text/plain, Size: 1133 bytes --]
On Thu, Dec 18, 2014 at 2:14 PM, Rich Felker <dalias@libc.org> wrote:
> On Thu, Dec 18, 2014 at 01:47:49PM -0500, stephen Turner wrote:
> > im using PCC as my compiler. it was initially built with gcc but since
> has
> > recompiled itself several times. 2 at least in the chroot musl only
> > environment alone. would this advice still apply? If i understood the pcc
> > group correctly it should not be responsible for this but i cant help but
> > think it is. regardless i will look into any advice/leads provided.
>
> PCC probably just has /lib/ld-linux.so.2 hard-coded for the "linux"
>
this was my assumption as well. I only found ref of the ld-linux.so.2 in a
header however and correcting the header code (adding a relevant entry for
musl) didn't seem to change the outcome.
target. You just need to change this when building it for a musl-based
> system or pass -Wl,-dynamic-linker,/lib/ld-musl-i386.so.1 (or whatever
> your arch is) on the command line.
>
> Rich
>
Thanks again rich, im going to give this a run and if it resolves the
issue, see what the PCC community says is responsible linker-vs-pcc.
thanks
stephen
[-- Attachment #2: Type: text/html, Size: 1883 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-12-18 20:13 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-18 16:04 dynamic compile issue stephen Turner
2014-12-18 18:43 ` Isaac Dunham
2014-12-18 18:47 ` stephen Turner
2014-12-18 19:14 ` Rich Felker
2014-12-18 20:13 ` stephen Turner
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).