Subject: Re: How do I emulate linux to run a binary that's not in pkgsrc?
To: John Baber <jbaber@math.jhu.edu>
From: Courtney R. Spencer <cspencer@mindspring.com>
List: netbsd-help
Date: 06/03/2005 14:30:04
On Fri Jun 03, 2005 at 09:28:20AM -0500, John Baber wrote:
> 
> 1. Downloaded mricrox.tar.gz into /emul/linux/usr/local/bin
> 2. untar it
> 3. type ./startmricro, get
> 
> /usr/local/bin/mricro/mribin: error while loading shared libraries: 
> /usr/local/bin/mricro/mribin: undefined symbol: initPAnsiStrings

Ok I followed the same steps and the program runs fine .

Try running /emul/linux/usr/bin/ldd against /usr/local/bin/mricro/mribin.
It may be finding a shared library that does not have the necessary 
functions.  

FYI, I'm using the 9.1 versions of the suse pkgs and this is my output:

% /emul/linux/usr/bin/ldd mricro/mribin       

        /lib/libNoVersion.so.1 => /lib/libNoVersion.so.1 (0xbdbe9000)
        libz.so.1 => /lib/libz.so.1 (0xbdbd4000)
        libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0xbdad8000)
        libpthread.so.0 => /lib/libpthread.so.0 (0xbda85000)
        libdl.so.2 => /lib/libdl.so.2 (0xbda82000)
        libc.so.6 => /lib/libc.so.6 (0xbd96d000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0xbdbec000)

Of course, the root path for these is /usr/pkg/emul/linux

> 
> 4. type ./startmricro2 get
> 
> ./startmricro2: /home/jbaber/bin/mricro/mribin: not found

startmricro2 is a shell script which appears to set the $HOME/bin path
in case you installed this as a normal user in that location.  

startmricro2 is another shell script that wants to do "export GCONV_PATH=/usr/lib32/gconv"

ls: /emul/linux/usr/lib32/gconv: No such file or directory

To be sure about the necessary libriares you may want to issue ldd for all the
binaries and library:

/emul/linux/usr/bin/ldd ./mricro/libborqt-6.9-qt2.3.so ./mricro/mribin ./startmricro

-- 
Courtney R. Spencer