[klibc] Build problems: klibc with Linux 3.10.7

leroy christophe christophe.leroy at c-s.fr
Thu Aug 22 05:24:21 PDT 2013


Le 22/08/2013 07:43, leroy christophe a écrit :
> Le 22/08/2013 00:59, Thorsten Glaser a écrit :
>> leroy christophe dixit:
>>
>>> Also you can see that it does try to create /lib instead of
>>> /tmp/klibc-install/lib hence my second patch.
>> That actually seems to be by design. I always set
>> SHLIBDIR on the make command line, so it overrides that.
>>
>> bye,
>> //mirabilos
> Yes, indeed I found out that instead of doing 'make install 
> prefix=/tmp/klibc-install', I shall do 'make install 
> INSTALLROOT=/tmp/klibc-install prefix=/'
>
In fact no, it doesn't work.

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

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.
-------------- next part --------------
--- a/scripts/Kbuild.install	2013-08-22 04:18:11.000000000 +0200
+++ b/scripts/Kbuild.install	2013-08-22 04:18:30.000000000 +0200
@@ -89,7 +89,7 @@
 	$(Q)echo "  INSTALL headers + man pages to $(INSTALLROOT)$(INSTALLDIR)"
 	$(Q)mkdir -p $(INSTALLROOT)$(bindir)
 	$(Q)mkdir -p $(INSTALLROOT)$(mandir)/man1
-	$(Q)mkdir -p $(INSTALLROOT)$(SHLIBDIR)
+	$(Q)mkdir -p $(INSTALLROOT)$(INSTALLDIR)/$(SHLIBDIR)
 	$(Q)mkdir -p $(INSTALLROOT)$(INSTALLDIR)
 	$(Q)-rm -rf $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include
 	$(Q)mkdir -p $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include
--- a/usr/klibc/Kbuild	2011-08-22 22:16:56.000000000 +0200
+++ b/usr/klibc/Kbuild	2012-04-27 10:03:04.000000000 +0200
@@ -178,4 +178,4 @@
 	$(Q)$(install-lib) $(obj)/klibc-$(SOLIBHASH).so \
 	                      $(INSTALLROOT)$(INSTALLDIR)/$(KLIBCCROSS)lib
 	$(Q)$(install-lib) $(obj)/klibc-$(SOLIBHASH).so \
-	                      $(INSTALLROOT)$(SHLIBDIR)
+	                      $(INSTALLROOT)$(INSTALLDIR)/$(SHLIBDIR)


More information about the klibc mailing list