[ug-bosug] Copying .so files into chroot environment (Was: BeleniX Remastering Toolkit)

Eric Boutilier Eric.Boutilier at Sun.COM
Thu Aug 24 10:52:00 PDT 2006


On Thu, 24 Aug 2006, Moinak Ghosh wrote:
> Eric Boutilier wrote:
>> [...]
>> http://www.genunix.org/distributions/belenix_site/BeleniX-Remaster-HOWTO.html#AddSW
>>
>>
>> ... and experiment with adding SFW packages for a custom LiveCD.
>>
>> I have no problems getting the 0.9.7 libs to work in the main root
>> environment. To do that, I simply got copies from a Solaris Express box
>> and put them in /usr/sfw/lib and re-do the symlinks. But when I do the
>> exact same thing in /space/livecd_proto/usr/sfw/lib, and then chroot to
>> /space/livecd_proto, applications that link to libssl/libcrypto still act
>> as if the 0.9.7 versions aren't there. Here's a cut-n-paste from my
>> terminal session showing the problem:
>>
>> -bash-3.00# chroot /space/livecd_proto /usr/bin/bash
>> Must be attached to terminal for 'am I' option
>> ()# pkgadd
>> ld.so.1: pkgadd: fatal: libssl.so.0.9.7: open failed: No such file or
>> directory
>> Killed
>> ()#
>   Question: Are you doing the symlink before chroot ? If so then try
> symlinking
>   after doing a chroot.


I couldn't remember if I did the copy and symlink before or
after chroot'ing, so I just went and deleted the files and
links and re-did them after doing a chroot, but pkgadd still
fails with the same error.

>
>   An output of ldd on pkgadd in the chrooted environment should give more
>   clues.

I thought of that too (which pretty much is the limit of my
linker troubleshooting ability, unfortunately), but only saw
what I expected to see; namely, "file not found" for those
two libraries.

Here's the output (ldd /usr/sbin/pkgadd in chroot env):

         /usr/foss/lib/libiconv_plug.so
         libpkg.so.1 =>   /usr/lib/libpkg.so.1
         libadm.so.1 =>   /lib/libadm.so.1
         libnsl.so.1 =>   /lib/libnsl.so.1
         libsocket.so.1 =>        /lib/libsocket.so.1
         libelf.so.1 =>   /lib/libelf.so.1
         libwanboot.so.1 =>       /usr/lib/libwanboot.so.1
         libssl.so.0.9.7 =>       (file not found)
         libcrypto.so.0.9.7 =>    (file not found)
         libmd5.so.1 =>   /lib/libmd5.so.1
         libzonecfg.so.1 =>       /usr/lib/libzonecfg.so.1
         libcontract.so.1 =>      /lib/libcontract.so.1
         libc.so.1 =>     /lib/libc.so.1
         libgcc_s.so.1 =>         /usr/foss/lib/libgcc_s.so.1
         libgendb.so.1 =>         /usr/lib/libgendb.so.1
         libmp.so.2 =>    /lib/libmp.so.2
         libmd.so.1 =>    /lib/libmd.so.1
         libscf.so.1 =>   /lib/libscf.so.1
         libnvpair.so.1 =>        /lib/libnvpair.so.1
         libresolv.so.2 =>        /lib/libresolv.so.2
         libdevinfo.so.1 =>       /lib/libdevinfo.so.1
         libdhcputil.so.1 =>      /lib/libdhcputil.so.1
         libinetutil.so.1 =>      /lib/libinetutil.so.1
         libcrypto.so.0.9.8 =>    /usr/sfw/lib/libcrypto.so.0.9.8
         libssl.so.0.9.8 =>       /usr/sfw/lib/libssl.so.0.9.8
         libuuid.so.1 =>  /lib/libuuid.so.1
         libsysevent.so.1 =>      /lib/libsysevent.so.1
         libsec.so.1 =>   /lib/libsec.so.1
         libxml2.so.2 =>  /usr/foss/lib/libxml2.so.2
         libxml2.so.2 (SUNW_1.4) =>       (version not found)
         libpkgdb.so.1 =>         /usr/lib/libpkgdb.so.1
         libuutil.so.1 =>         /lib/libuutil.so.1
         libgen.so.1 =>   /lib/libgen.so.1
         libavl.so.1 =>   /lib/libavl.so.1
         libdl.so.1 =>    /lib/libdl.so.1
         libpthread.so.1 =>       /lib/libpthread.so.1
         libz.so =>       /usr/lib/libz.so
         libm.so =>       /lib/libm.so
         libcrypto_extra.so.0.9.8 =>      /usr/sfw/lib/libcrypto_extra.so.0.9.8
         libssl_extra.so.0.9.8 =>         /usr/sfw/lib/libssl_extra.so.0.9.8



More information about the ug-bosug mailing list