From owner-freebsd-questions Mon Dec 4 1:20:50 2000 From owner-freebsd-questions@FreeBSD.ORG Mon Dec 4 01:20:47 2000 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from guru.mired.org (okc-65-26-235-186.mmcable.com [65.26.235.186]) by hub.freebsd.org (Postfix) with SMTP id 0AAA637B400 for ; Mon, 4 Dec 2000 01:20:47 -0800 (PST) Received: (qmail 20250 invoked by uid 100); 4 Dec 2000 09:20:46 -0000 From: Mike Meyer MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <14891.25069.811982.587547@guru.mired.org> Date: Mon, 4 Dec 2000 03:20:45 -0600 (CST) To: Matthew Peacock Cc: questions@freebsd.org Subject: Re: Please help with linux compatibility In-Reply-To: <49710961@toto.iv> X-Mailer: VM 6.75 under 21.1 (patch 10) "Capitol Reef" XEmacs Lucid X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`;h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ X-Message: You should get a better mailer. Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Matthew Peacock types: > * When Installing FreeBSD I said "Yes" to the question "Would you like > to have linux compatibility". This then installed some compatibility > libraries which I assume are all the librararies that are needed. Ok, I don't know what asking for Linux compatability at install time does. You need to do two things, though: 1) enable the kernel API support for Linux, and install the linux_base port. > * After installation I checked the /usr/compat/linux/ shadow > directories and saw that there wer lots of directories that were ther. I > looked in /usr/compat/linux/lib and saw that there were lots of linux > libraries there. That would indicate that the linux_base port was installed. You might verify that /compat is a symlink to /usr/compat, or /compat/linux is a symlink to /usr/compat/linux. > * Next I edited the /etc/defaults/rc.conf file and added > LINUX_ENABLE="YES". I thought that this was a bit strange that it said no to > start with because I had asked for linux compatibility during install. You should *never* touch anything in /etc/defaults/. Those files hold default values for things you set in files in /etc. In this case, /etc/rc.conf - which should have had LINUX_ENABLE="yes" added by the install process. > * I rebooted and did "kldstat". I expected to see the linux module but > I did not. I am running a recent version of FreeBSD (dated About June this > year and purchased as FreeBSD Toolkit v5). I am thinking that maybe the > linux compatibility module is now statically linked to the kernel. Is this > correct? I wasnt sure so I tried typing "linux" as the handbook advised but > it said that this module was unknown. It doesn't look like the Linux module is statically linked. You should try loading it by hand, though. Try running "/sbin/kldload linux", then check the console error messages. If Linux is already already loaded, it will say "module linux already present" or words to that effect. If it's wasn't loaded, and the module exists, that will load it for you. If you can't get it loaded, you won't be able to get them to run. Care to provide the exact text of the message you got from running "linux"? There are a number of things that can be interpreted as saying the module was unknown, but don't mean that. > * Anyway, after assuming that the linux compatibility is statically > linked, I then tried to install a few linux apps to see what would happen. I > got StarOffice3.1 to install and I got Wingz (spreadsheet) to install. When > I tried to execute these programs they both gave me the results > "/lib/libname not found" (I cant remember the exact name of the library but > it did exist in the linux shadow library directory). I realised that the > program was still looking for where linux keeps its modules. I therefore > created a /lib directory and copied the linux modules from the > /usr/compat/linux/lib directory and then tried to run the app. I got > "segmentation fault core dumped". Um - if you have the linux module loaded, it will check /compat/linux/lib before it checks /lib. If you managed to overwrite FreeBSD libraries with their Linux version, your system is going to be *very* flaky. > * I then consulted the manual again and it said that I should put the > binaries (Wingz and swriter etc) into the /usr/compat/linux/lib directory > and run them from there. This did not work - it just said "/lib/libname not > found". Binaries? In a lib directory? Where in the manual does it say that? http://www.mired.org/home/mwm/ Independent WWW/Unix/FreeBSD consultant, email for more information. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message