|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
ELF file OS ABI invalid
Hello Sir,
I am new to FreeBSD and JNI I am running Simple Jni example on FreeBSD but I am getting following error while exicuting my java Program %java Sample1 Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/home/smgusr/mangesh/libSample1.so.1.0.1: /usr/home/smgusr/mangesh/libSample1.so.1.0.1: ELF file OS ABI invalid at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1456) at java.lang.Runtime.load0(Runtime.java:737) at java.lang.System.load(System.java:811) at Sample1.main(Sample1.java:10) if I use ldd command it refers like this %ldd /usr/home/smgusr/mangesh/libSample1.so.1.0.1 /usr/home/smgusr/mangesh/libSample1.so.1.0.1: libc.so.4 => /usr/lib/libc.so.4 (0x2806a000) I have made libSample1.so.1.0.1 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 makking 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,libSample1.so.1 -o libSample1.so.1.0.1 Sample1.o -L/usr/compat/linux/lib -L/usr/lib -L/usr/home/smgusr/mangesh -lc configuration is FreeBSD 4.10-BETA (GENERIC) I am using following packages linux-sun-jdk-1.4.2.04 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 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???? Regards Man479 |
|
#2
|
|||
|
|||
|
Anyone ever answer this? I am having the same problem.
Thanks, Quote:
|
|
#3
|
||||
|
||||
|
You're running JDK under Linux emulation, but it looks like libSample1.so.1.0.1 might be a native FreeBSD library. The Linux JDK can't work with a native FreeBSD library. Mixing and matching binaries and libraries like this is plainly a bad idea.
Solutions: 1. Install a freebsd native jdk 2. Install a linux port version of libSample1.so.1.0.1 This way, all the binaries and libraries will match what they were originally compiled for.
__________________
Up the Irons What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home. "Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest Down with Sharon Osbourne Puzzle of the Month solved by sizeablegrin, etienne141 and L7Sqr, superior C/C++ programmers of the month |
![]() |
| Viewing: Dev Shed Forums > Operating Systems > BSD Help > ELF file OS ABI invalid |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|