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>
leroy christophe dixit:> 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.Of course you don?t. You?re just needing to set SHLIBDIR explicitly for this specific use case.> 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 /libThat?s correct of course, except?> 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? ah. Like that. So you want klibc to be installed in /opt/klibc on both host and target *except* the shared library which you want in /lib on target only? How perverted is that? What kind of magic do you expect here? Common setup would be to either expect the shlib in /opt/klibc/lib on the target either or to install into a DESTDIR. I suggest that, unless you can change your requirements: if d=$(mktemp -d /opt/klibc.XXXXXXXXXX); then set -e make prefix=/opt/klibc make INSTALLROOT="$d" prefix=/opt/klibc install mkdir -p /opt/klibc/lib mv "$d"/lib/klibc-*.so /opt/klibc/lib/ mv "$d"/opt/klibc/* /opt/klibc/* rm -rf "$d" set +e else echo >&2 'E: Cannot create temporary directory!' fi bye, //mirabilos -- 17:08??Vutral? fr?her gabs keine packenden smartphones und so 17:08??Vutral? heute gibts frauen die sind facebooks?chtig 17:10??Vutral? aber auch traurig; fr?her warst du als nerd voll am arsch 17:10??Vutral? heute bist du als nerd der einzige der wirklich damit klarkommt
On Thu, Aug 22, 2013 at 06:39:04PM +0200, leroy christophe wrote:> > 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.the docs are outdated, waiting for hpa to be back for a quick review, then i'll push the build patch and updates to the docs. thank you all! -- maks
Le 22/08/2013 20:30, Thorsten Glaser a ?crit :> leroy christophe dixit: > >> 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. > Of course you don?t. You?re just needing to set SHLIBDIR explicitly > for this specific use case.Yes, SHLIBDIR must be /lib for the link, then something different for the installation on the host.> >> 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 > That?s correct of course, except? > >> 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 > ? ah. Like that. > > So you want klibc to be installed in /opt/klibc on both host and target > *except* the shared library which you want in /lib on target only? How > perverted is that? What kind of magic do you expect here?Euh... I only do a "make install" on the host. Then when I prepare the initramfs for the target, the only thing I do is to copy /opt/klibc/lib/klibc/bin/* to /bin and /opt/klibc/lib/klibc/lib/klibc-*.so to /lib Indeed I don't even need this klibc-.so installed to SHLIBDIR as it is also present in /opt/klibc/lib/klibc/lib/