From owner-freebsd-questions@FreeBSD.ORG Sat Dec 20 14:05:13 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7B2BD1065678 for ; Sat, 20 Dec 2008 14:05:13 +0000 (UTC) (envelope-from bsam@ipt.ru) Received: from services.ipt.ru (services.ipt.ru [194.62.233.110]) by mx1.freebsd.org (Postfix) with ESMTP id 34B2E8FC1E for ; Sat, 20 Dec 2008 14:05:13 +0000 (UTC) (envelope-from bsam@ipt.ru) Received: from [85.173.16.211] (helo=moosa) by services.ipt.ru with esmtpa (Exim 4.54 (FreeBSD)) id 1LE2S7-000PLX-IF; Sat, 20 Dec 2008 17:05:11 +0300 To: Chris References: <34058EDE-BC14-4DCC-AF3C-100F77DEE486@hughes.net> From: Boris Samorodov Date: Sat, 20 Dec 2008 17:05:09 +0300 In-Reply-To: <34058EDE-BC14-4DCC-AF3C-100F77DEE486@hughes.net> (Chris's message of "Fri\, 19 Dec 2008 09\:46\:03 -0800") Message-ID: <03393450@ipt.ru> User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: FreeBSD-Questions Questions Subject: Re: Linking libraries for compat_linux X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Dec 2008 14:05:13 -0000 On Fri, 19 Dec 2008 09:46:03 -0800 Chris wrote: This question is may be better unswered at emulation@ ML. > I've bumped into a library I can't resolve and I must have a disconnect > in how the linux_compat works because I can't see how it could be > solved. > I have the following: > * compat_linux enabled in the kernel, > * /usr/ports/emulators/linux_base_fc7 > * sysctl kern.fallback_elf_brand=3 > * rpm2cpio to alter rpms > * cpio to create the directories and place the files where they > belong in /compat/linux. > I have a program that now has all it's libraries resolved but one in > preparation to attempt to run the Linux Quickbooks install on FreeBSD. > The ldd output, prior to installing /usr/ports/devel/fam (a required > shared > library) looks like this. > ldd ./opt/qbes7/util/qbmonitord > ./opt/qbes7/util/qbmonitord: > libfam.so.0 => not found > libpthread.so.0 => /lib/libpthread.so.0 (0x28072000) > libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x28088000) > libm.so.6 => /lib/libm.so.6 (0x28171000) > libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x28198000) > libc.so.6 => /lib/libc.so.6 (0x281a4000) > /lib/ld-linux.so.2 (0x28054000) > I install fam to get rid of the not found, perform the following link: > ln /usr/local/lib/libfam.so.0 /compat/linux/lib/libfam.so.0 > and then I get this: > ldd ./opt/qbes7/util/qbmonitord > ./opt/qbes7/util/qbmonitord: > ./opt/qbes7/util/qbmonitord: error while loading shared libraries: / > lib/libfam.so.0: ELF file OS ABI invalid > ./opt/qbes7/util/qbmonitord: exit status 127 > which kind of makes sense since this library is not a linux library. > I'd read > that I don't need to brandelf -t linux a library but I tried that > anyway, > realizing it was likely meaningless (or harmful). It didn't help of > course. > My next thought was to try and get a libfam.so.0 binary from a linux > distro > but stopped when it occurred to me that it would be illogical since > fam uses > kqueue on FreeBSD rather than something called imon. imon is not > available > for FreeBSD so a linux version shouldn't be able to function if it > expects that. On > FreeBSD, fam configures itself to not use imon. > What is the appropriate course of action to get a linux flavor shared > library > for fam (or anything which runs into such conflicts) that will work > on FreeBSD > yet be recognized as suitable for linux under the compat mode? Try to create and use linux-fam port. WBR -- bsam