[Date Prev] [Date Next] [Thread Prev] [Thread Next] Date Index Thread Index Search archive:
Date:18 Jan 2004 11:13:19 -0000 
Subject:Poplog on FreeBSD 
From:john duncan 
Volume-ID:1040118.01 

# kldload ext2fs
# kldstat ( This will show if linux and ext2fs modules are loaded )

My main Debian partition is the third primary partition on this IDE 
disk. I always use ext2fs so that I can share data with the BSD's. The 
newer file systems are not supported.

# mkdir /mnt/linux
# mount_ext2fs /dev/ad0s3 /mnt/linux
# cd /mnt/linux/usr/local ( look for poplog to make sure )
# cp -pR /mnt/linux/usr/local/poplog /usr/local
# cd /usr/local ( check for poplog )
# umount /mnt/linux

I don't use any fancy environments so

# cd /usr/local/bin
# ln -s /usr/local/poplog/local/setup/bin/poplog /usr/local/bin/poplog

Now install linux-openmotif-2.1.30 which will bring in linux_base-7.1_5
What makes FreeBSD different is that you can brand a binary as Linux for 
the kernel to see.

# brandelf -t Linux yourbinary

But I prefer the broader approach available with sysctl variables

# sysctl kern.fallback_elf_brand=3 ( this needs to be redone after a 
reboot )

Now try to run Poplog

$ poplog pop11 %x

;;; Warning: can't open shared object /usr/X11R6/lib/libX11.so ( 
Inappropiate ioctl for device )
Repeated for libXm.so, libXt.so,libXext.so
Though it would start up in console mode and work.

I took this to mean that Poplog couldn't find the Linux libraries and 
was trying to open the FreeBSD libraries.

# cd /compat/linux/usr/X11R6/lib ( look at these library versions )

USE FULL PATH NAMES IN THESE DIRECTORIES

# ln -s /compat/linux/usr/X11R6/lib/libXm.so.2.1 
/compat/linux/usr/X11R6/lib/libXm.so

# ln -s /compat/linux/usr/X11R6/lib/libXt.so.6.0 
/compat/linux/usr/X11R6/lib/libXt.so

# ln -s /compat/linux/usr/X11R6/lib/libXext.so.6.4 
/compat/linux/usr/X11R6/lib/libXext.so

# ln -s /compat/linux/usr/X11R6/lib/libX11.so.6.2 
/compat/linux/usr/X11R6/lib/libX11.so

Then run the Linux ldconfig

# /compat/linux/sbin/ldconfig

For good measure

# cd /compat/linux/usr/lib
# /compat/linux/sbin/ldconfig

Now give it another go

$ poplog pop11 %x

Up it comes with everything working. I have tried what I know ; which 
isn't much since everything I want to do in pop11 seems to lead me to C 
which consumes my time.

The only hitch seems to be that it hangs a bit when you try to exit 
Poplog, but another Linux program that needs linux-openmotif also does 
the same. It exits well in console mode.

                                         Hope this helps,
                                             John Duncan