*BSD News Article 60535


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.bhp.com.au!mel.dit.csiro.au!munnari.OZ.AU!spool.mu.edu!howland.reston.ans.net!EU.net!sun4nl!fwi.uva.nl!not-for-mail
From: frank@fwi.uva.nl (Frank van der Linden)
Newsgroups: comp.unix.bsd.netbsd.misc
Subject: Re: NetBSD 1.1 Linux binary compatibility...
Date: 26 Jan 1996 12:20:51 +0100
Organization: FWI, University of Amsterdam
Lines: 28
Distribution: world
Message-ID: <4eadej$17k@atlas.fwi.uva.nl>
References: <4eaan3$co2@nntp5.u.washington.edu>
NNTP-Posting-Host: atlas.fwi.uva.nl

"Zachary N. Fine" <czyz@u.washington.edu> writes:

>options         COMPAT_LINUX    # binary compatibility with Linux

>uncommented, but have yet to successfully run a Linux binary.  A class I'm
>taking distributes the assignments as header files and objects compiled under
>Linux, which I'm then supposed to use to test my source.  I'm having trouble
>linking and also unable to run the provided sample executable file

It looks like you are trying to link Linux object files with the NetBSD
linker? This won't work (and it's not the objective of the compat mode
to make this work). The sample executable probably doesn't work because
it is dynamically linked, and you have not copied the Linux shared libs
to your system.

First, make sure that you have all the shared libraries needed for
the emulation environment (see compat_linux(8) for an explanation).
Then, if you want to be able to create Linux binaries on your NetBSD
system as well, you'll just have to copy over the compiler from a Linux
system, and use that. This is a little bit more work; you'll need all
of /usr/include from the Linux system too and install it in /emul/linux, etc.

- Frank
-- 
                  Frank van der Linden, frank@fwi.uva.nl
	       Use NetBSD, it's Unix, it's free and works on:
    i386+, Mac, Amiga, HP300, Sun3, Sun4c, PC532, DEC Alpha, DEC MIPS, Atari
              Work in progress: Vax, Sun4m and a host of others