[klibc] Build problems: klibc with Linux 3.10.7

Thorsten Glaser tg at mirbsd.de
Thu Aug 22 05:36:08 PDT 2013

leroy christophe dixit:

> So the only way I have found to be able to install klibc in /opt/klibc on the
> development host and let it run properly from /lib on the target is with the
> attached patch.

And, again, your patch is wrong because this _seems_ to be by design,
unless it’s by accident.

> 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.

If Harry Potter gets a splitting headache in his scar
when he’s near Tom Riddle (aka Voldemort),
does Tom get pain in the arse when Harry is near him?
	-- me, wondering why it’s not Jerry Potter………

More information about the klibc mailing list