chicken-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-hackers] compiling Chicken 4.7.0 with musl instead of glibc


From: Sergey
Subject: Re: [Chicken-hackers] compiling Chicken 4.7.0 with musl instead of glibc
Date: Sun, 5 Feb 2012 18:33:40 -0800

> On Sun, 05 Feb 2012 11:09:38 +0100 (CET), address@hidden wrote:
>
> Hello!
>
>
> Thanks a lot for this information. I will try to build chicken with
> musl, but perhaps you can help me getting started. I was able to build
> and install musl without problems, but what must
> "/etc/ld-musl-ARCH.path" contain to link and execute compiled code
> properly? I have not created that file, yet, and linking a trivial
> program gives me:
>
> /home/felix/opt/musl/lib/libc.so: undefined reference to
> `__stack_chk_fail_local'

Actually, I never touched "/etc/ld-musl-ARCH.path" at all.

The way I got musl to work was:

1 - Edited musl's config.mak file to look like this:

    http://paste.pocoo.org/show/546543/

2 - Compiled and installed musl
3 - export PATH=/usr/local/stow/musl/bin:$PATH
3 - export LD_LIBRARY_PATH=/usr/local/stow/musl/lib:$LD_LIBRARY_PATH

From then on, I just used musl-gcc as per the musl FAQ (see the build log below 
for an example).

With #chicken's sjamaan leading the charge, we ripped out a lot of the chicken 
code that was bothering musl, and got quite a bit further in the compile.  The 
below log contains, first, "git diff" of all the changes we made against 
chicken-core, and, second, the compile log as we tried to build chicken:

    http://paste.pocoo.org/show/546219/

As you can see on lines 346+, the compile ended with a complaint about not 
being compiled with -fPIC, and a "bad value" in musl's "crt1.o".

One last thing we tried was to invoke by hand the same musl-gcc command as on 
lines 344 and 345 of the above log, but with -fPIC appended (since, apparently, 
that was the only musl-gcc line in the log that didn't have it for some 
reason), and we got the same error.  Here's teh log of that attempt:

    http://paste.pocoo.org/show/546228/

So we are stuck, for the moment, until we can figure out a way around this 
error, or at least figure out what's causing it.

  --Sergey

____________________________________________________________
TRY FREE IM TOOLPACK at http://www.imtoolpack.com/default.aspx?rc=if5
Capture screenshots, upload images, edit and send them to your friends
through IMs, post on Twitter®, Facebook®, MySpace™, LinkedIn® – FAST!





reply via email to

[Prev in Thread] Current Thread [Next in Thread]