Linking libraries for compat_linux

Chris eagletree at
Sat Dec 20 19:32:36 UTC 2008

On Dec 20, 2008, at 6:05 AM, Boris Samorodov wrote:

> On Fri, 19 Dec 2008 09:46:03 -0800 Chris wrote:
> This question is may be better unswered at emulation@ ML.

Oops, I didn't ever notice that list as I've never needed Linux before.
I hate to trouble development lists with an operational issue but this
one is starting to look like an incompatibility that is beyond me.
The Linux and FreeBSD versions of gamin both fail on inotify_init.
Not having the source to the program I'm trying to run makes it
very difficult to fix even though the functionality is there (perhaps  
superior) on FreeBSD.

I ended up using the linux from the gamin distribution
for Fedora 9. Using it's server fails instantly, using the freebsd port
version, the server doesn't fail until the Linux client library attempts
to connect. Then it too gets "inotify_init not implemented". The
Fam list appears to be defunct and I've not yet tried the direct mail
contact to the gamin development page. I'm assuming the answer
would be that you use native FreeBSD on FreeBSD and
the linux version on Linux. I've no way to tell the Intuit daemon to
do that because of the ABI error and I presume there is an
underlying reason why a native library can't be used by a linux

I will try the other list if no one has run into a similar problem with
other Linux apps. I may be kicking a dead horse but it seems others
have talked about using FreeBSD in this manner and it makes it an
interesting challenge. The time I'm investing in this is probably not
any more time that it would take to configure and secure an openSUSE
or Fedora system (having never bothered with them before). Plus
it would mean not adding an additional server into my net just for
a trivial SMB/file monitoring application.

Thanks for the response.

>> 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:
>> => not found
>> => /lib/ (0x28072000)
>> => /usr/lib/ (0x28088000)
>> => /lib/ (0x28171000)
>> => /lib/ (0x28198000)
>> => /lib/ (0x281a4000)
>>         /lib/ (0x28054000)
>> I install fam to get rid of the not found, perform the following  
>> link:
>> 	ln /usr/local/lib/ /compat/linux/lib/
>> and then I get this:
>> ldd ./opt/qbes7/util/qbmonitord
>> ./opt/qbes7/util/qbmonitord:
>> ./opt/qbes7/util/qbmonitord: error while loading shared libraries: /
>> lib/ 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 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.

I also tried this but it appears that gamin is a more recent  
It also provides the

> -- 
> bsam
> _______________________________________________
> freebsd-questions at mailing list
> To unsubscribe, send any mail to "freebsd-questions- 
> unsubscribe at"

More information about the freebsd-questions mailing list