Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Aug 2001 08:35:35 -0400
From:      Brian T.Schellenberger <bts@babbleon.org>
To:        David Banning <david@skytrackercanada.com>
Cc:        questions@FreeBSD.ORG
Subject:   Re: question abot linux emulation in general
Message-ID:  <01082208353500.00669@i8k.babbleon.org>
In-Reply-To: <20010822015017.A7858@sympatico.ca>
References:  <200108162311.f7GNBN301933@d.tracker> <01082022413905.00565@i8k.babbleon.org> <20010822015017.A7858@sympatico.ca>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wednesday 22 August 2001 01:50, David Banning wrote:
> > See if there's a port.
>
> nope.

Bummer.  Those make it so much easier.

>
> > emulation.
> >
> > But if a program works broadly across Linux distributions and versions,
> > it'll almost always work under FreeBSD as well.  If it only works with
> > the xyzzy distribution version 3.14 with the RoseBud patches, then it
> > will almost certianly fail under FreeBSD's Linux emulation.
>
> This may be the case, but I am not certain.
>
> > Some software won't find FreeBSD's emluation compatible enough, but you
> > can install a *real* Linux distribution and point the compatibility
> > library to that.  On my old box I had a real Linux install and FreeBSD;
> > instead of using the usual /usr/compat/linux/lib directory, I ditched
> > that library and made it a symlink to the the actual /lib in my real
> > Linux partition.  This fixed up some things that failed under emulation.
>
> I'm not sure I fully understand this. If you create a /lib in another
> partition, doesn't the partition need a name?, and hence wouldn't that mean
> the linux libs are in /partitionname/lib ? if so i would still expect
> another error, as then linux is looking in an unusually named directory,
> like before.

That''s true; the linux lib was in /linux; actually, of course, I meant 
/usr/lib/, not /lib, so what I did was this:

# cd /usr/compat/linux/usr
# mv lib lib.orig
# ln -s /linux/usr/lib .

You should understand up-front that whenever a program running under Linux 
emulation looks for an absolute pathname, it *first* looks for the file in 
/usr/compat/linux/<path> and only if that's not found does it look in <path>. 
 This is one of the basic secrets of how the Linux emulation works.

So, normally, if a Linux program tries to find a library in /usr/lib, it 
finds it in /usr/compat/linux/usr/lib.  With the above link, though, it looks 
in /usr/compat/linux/usr/lib, just as it always did, but now that actually 
resolve to /linux/usr/lib.



>
> Thanks, Brian for your response.

-- 
Brian T. Schellenberger . . . . . . .   bts@wnt.sas.com (work)
Brian, the man from Babble-On . . . .   bts@babbleon.org (personal)

--------------------> Free Dmitry Sklyarov! <-------------------------

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?01082208353500.00669>