Welcome to the most active Linux Forum on the web.
Go Back > Forums > Other *NIX Forums > *BSD
User Name
*BSD This forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.


  Search this Thread
Old 08-03-2004, 11:57 PM   #1
LQ Newbie
Registered: Jul 2004
Posts: 6

Rep: Reputation: 0
Linux Emulation problem "ELF file OS ABI invalid Error"

Hello Sir,

I am really searching hard for solution on " ELF file OS ABI invalid" error.

I am running Simple Jni example (to test jni. I am getting same error in my project)
on FreeBSD 4.10 but I am getting following error

while executing my java Program


%java Sample1

Exception in thread "main" java.lang.UnsatisfiedLinkError:
/usr/home/smgusr/mangesh/ /usr/home/smgusr/mangesh/
ELF file OS ABI invalid
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(
at java.lang.ClassLoader.loadLibrary(
at java.lang.Runtime.load0(
at java.lang.System.load(
at Sample1.main(

if I use ldd command it refer like this

%ldd /usr/home/smgusr/mangesh/
/usr/home/smgusr/mangesh/ => /usr/lib/ (0x2806a000)
I have made following way:

gcc -o2 -fPIC -g -I/usr/local/linux-sun-jdk1.4.2/include
-I/usr/local/linux-sun-jdk1.4.2/include/linux -c Sample1.c -o Sample1.o
for linking and making shared library

gcc -o2 -shared -fPIC -pthread -Wl -I/usr/local/linux-sun-jdk1.4.2/include
-I/usr/local/linux-sun-jdk1.4.2/include/linux -soname,
-o Sample1.o -L/usr/compat/linux/lib -L/usr/lib
-L/usr/home/smgusr/mangesh -lc

Even though I try to load standard shared library from /usr/lib the error persist

what is going wrong is it Linux emulator problem??????????? or my shared lirary problem????

We have installed linux_base to set linux environment

set linux_base="yes" (/etc/rc.conf)
set kern.fallback_brand=3 (/etc/sysctl.conf)

Running kldstat is giving following result

Id Refs Address Size Name
1 4 0xc0100000 44fbf8 kernel
2 1 0xc33e3000 7000 linprocfs.ko
3 1 0xc3455000 15000 linux.ko
4 1 0xc3646000 3000 snp.ko

Running following command to check linux binary compatibility layer is loaded:

%kldstat -v | grep linuxelf
219 linuxelf

I am getting above output (that means layer is loaded )

Running following command to check layer is compiled into the kernel or
loaded as a module:

% kldstat | grep linux.ko

3 1 0xc3455000 15000 linux.ko

I am getting the above output
(ref link:

Does it means it needs some more settings???????like setting options compat_linux in kernel config)

is There any issue related to configuring files on FreeBSD???

linprocfs is mounted and showing entry in the (/etc/fstab) and kldstat command

How can I check the linprocfs is working properly??

I used the brandelf -t Linux but same error

Is it referring to java executables cause they are (SYSV) type??
any other file to chnage the binaries??

I am awaiting yours valuable suggestions.

configuration is :


I am using following packages
java.vm.version: "1.4.2_04-b05"
linux-sun-jdk- Sun Java Development Kit 1.4 for Linux
linux_base-8-8.0_4 Base set of packages needed in Linux mode (only for i386)
linux_devtools-8.0_1 Packages needed for doing development in Linux mode
libtool-1.3.5_1 Generic shared library support script
gmake-3.80_1 GNU version of 'make' utility
automake-1.4.5_9 GNU Standards-compliant Makefile generator (legacy version
GCC 2.95.4
gdb 4.18
ld 2.12.1 supported emulation elf_i386



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
kino gives "invalid file specified" when i try to open an *.mpg file lefty.crupps Linux - Software 1 10-31-2005 03:20 AM
"invalid Elf header" after kernel upgrade Goo Slackware 7 10-09-2004 08:32 AM
ELF file OS ABI invalid man26 Linux - General 0 07-29-2004 05:54 AM
Partition problem windows not booting "Invalid disk error" julian_s Linux - Newbie 1 04-02-2004 09:26 PM
HELP! What does "/elf/start.S: No such file" mean?? registering Programming 3 08-08-2003 12:18 PM > Forums > Other *NIX Forums > *BSD

All times are GMT -5. The time now is 02:56 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration