Linux compat library error: ELF file OS ABI invalid

Glyn Millington glyn at
Tue May 13 18:46:36 UTC 2008

Kris Kennaway <kris at> writes:

> Mel wrote:
>> On Tuesday 13 May 2008 15:48:58 Glyn Millington wrote:
>>> Mel <fbsd.questions at> writes:
>>>> On Tuesday 13 May 2008 14:05:43 Glyn Millington wrote:
>>>>>>>>> Trying to launch Linux Open Office 2.4 I get the following error
>>>>>>>>> message ,----
>>>>>>>>> | /usr/compat/linux/opt/openoffice.org2.4/program/soffice.bin:
>>>>>>>>> | error while loading shared libraries:
>>>>>>>>> | /usr/local/lib/ ELF file OS ABI invalid
>>>>>>>>> `----
>>>>> that include statement leads to /usr/X11R6
>>> Wow - can I just check that I have this right before I do it?!
>>>> Best fix:
>>>> rm /usr/X11R6
>>> get rid of /usr/X11R6, which on a system-wide basis is a link to /usr/local
>>>> touch /usr/X11R6
>>> Create an empty  *file* /usr/X11R6
>>>> chflags schg /usr/X11R6
>>> make it system-immutable
>>>> /sbin/ldconfig -m /usr/local/lib (just to force the linker to re-read the
>>>> dupes).
>>> Merge new stuf in the /usr/local/lib directory into the hints file
>>>> As a bonus, the old apps you still have pointing to /usr/X11R6
>>> But the app in question needs to get at
>>> /usr/compat/linux/usr/X11R6/
>> The app however looks for /usr/X11R6/lib/ If both exist
>> in base system and linux emulation, then the linker will hand it the
>> first one it finds, which because of the /usr/X11R6 symlink to
>> /usr/local will be the FreeBSD one.
> The lookup order for linux binaries is /compat/linux/foo first, then
> /foo if the former does not exist.  So if /compat/linux/usr/X11R6
> exists, then it is seen by linux binaries (similarly for files below
> this path).  As far as I know, this file should be a directory, not a
> symlink.  Moreover, the desired lives in that
> directory. It is a symlink pointing to another file in the same
> directory.  

Just to summarise :-)

So far this description above fits my situation exactly - everything is where
you say it should be, and everything worked until a couple of days
ago. Having done a  portupgrade -akOP recently things appear tio have
gone wrong with the results as described originally.

For some reason  /usr/compat/linux/opt/openoffice.org2.4/program/soffice.bin

can't find the linux library which is where you describe it, until I
make a symlink, linking  /compat/linux/usr/local to X11R6 - then soffice
works but other things break

> If neither exist (or exist but are corrupted), then the linux binary
> will fall back to the bogus FreeBSD one in another search path.

But doesn't the above suggest that

A. It exists and
B. It works when soffice.bin can find it.




More information about the freebsd-questions mailing list