[klibc] Build problems: klibc with Linux 3.10.7

leroy christophe christophe.leroy at c-s.fr
Thu Aug 22 09:39:04 PDT 2013

Le 22/08/2013 14:36, Thorsten Glaser a écrit :
> leroy christophe dixit:
>> If I set prefix to / and INSTALLROOT to /opt/klibc, klcc is not able to find
>> the include files
>> If I set prefix to /opt/klibc and SHLIBDIR to /opt/klibc/lib, it is the target
>> that tries to load klibc.so from /tmp/klibc-install/lib instead of /lib
> INSTALLROOT is some sort of DESTDIR: it’s a præfix only present
> at *file installation* time but n̲o̲t̲ at runtime.
> klibc assumes that, even if you want to install it under /opt/klibc/lib/
> that its dynamic loader should still be in /lib (which is what I assume
> is by design). If you don’t want that, you must just override *both*
> prefix=/opt/klibc *and* SHLIBDIR=/opt/klibc/lib (even during compilation
> mind you!), which is then correct.
> bye,
> //mirabilos
But I'm building a klibc/klcc for cross-compilation, and I don't need 
(and don't want) a powerpc klibc.so in /lib in the middle of all other 
i386 libs.

As I say above your answer, when I set prefix to /opt/klibc and SHLIBDIR 
to /opt/klibc/lib, the target tried to load klibc.so from /opt/klibc/lib 
instead of /lib

But ok, I found the way to achieve what I need. I need to do in two steps:
1) make prefix=/opt/klibc
2) make INSTALLROOT=/opt/klibc prefix=/ install

This way, I was able to get a working klcc in /opt/klibc and working 
apps on my target.
It is not obvious from the Documentation that it is the way to do.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.zytor.com/pipermail/klibc/attachments/20130822/7b6c3f4b/attachment-0001.html>

More information about the klibc mailing list