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)
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 /libINSTALLROOT 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 -- 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???
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, > //mirabilosBut 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>