NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: [netbsd-5] SHLIBDIR and SHLINKDIR behavior change?



On Fri, Feb 06, 2009 at 04:47:26PM -0500, Brian A. Seklecki wrote:
> 
> All:
> 
> Has the behavior of these macros in the build system changed?  I used to
> inject:
> 
>  SHLINKDIR=     /libexec
>  SHLIBDIR=       /lib
> 
> Into src/usr.bin/gzip/Makefile and src/usr.bin/bzip/Makefile to order to
> link against /lib/libc.so, /lib/libbz2.so.1.1 and /lib/libz.so.1.0 (the
> later two I place manually)
> 
> These changes are important to make the bootstrap part of my embedded
> environment function.
> 
> I'm building for the first time on netbsd-5 (RC1).  For some reason, I am
> recieving:
> 
> # chroot /home/fsimages/rd_root /bin/gzip
> Shared object "libc.so.12" not found
> 
> However:
> 
> # file rd_root/bin/gzip
>   rd_root/bin/gzip: ELF 32-bit LSB executable, Intel 80386, version 1
>   (SYSV), dynamically linked (uses shared libs), for NetBSD 5.0, not
>   stripped
> 
> rd_root/bin/gzip:
>         -lc.12 => /lib/libc.so.12
>         -lz.1 => /lib/libz.so.1
>         -lbz2.1 => /lib/libbz2.so.1

That's not really surprising outside the chroot.

If you do "readelf -d rd_root/bin/gzip" I suspect it won't list /lib in
the RPATH, which would then be your issue.  Now, why wasn't the binary
linked properly I don't know, but at least you'll know more about where
to look.

-- 
Quentin Garnier - cube%cubidou.net@localhost - cube%NetBSD.org@localhost
"See the look on my face from staying too long in one place
[...] every time the morning breaks I know I'm closer to falling"
KT Tunstall, Saving My Face, Drastic Fantastic, 2007.

Attachment: pgptmopR2k2H3.pgp
Description: PGP signature



Home | Main Index | Thread Index | Old Index