BSD Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOperating SystemsBSD Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old July 30th, 2004, 12:43 AM
Man479 Man479 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2004
Posts: 36 Man479 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 h 23 m 57 sec
Reputation Power: 4
Help me O FreeBSD Masters!!!!!

hi all,

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 but I am getting following error

while executing 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 refer 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

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



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

%kldstat
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:http://www.merlinobbs.net/modules.php?name=News&file=article&sid=483
Does it means it needs some more settings???????like setting options compat_linux in kernel config)



is There any issue related to configuring ld.so files on FreeBSD???

linprocfs is mounted and showing entry in the (/etc/fstab) and kldstat command
ur valuable suggestions are welcomed




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


regards
man479

Reply With Quote
  #2  
Old July 30th, 2004, 03:42 AM
c444l c444l is offline
contains a pressurised widget
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Location: NC USA
Posts: 401 c444l User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 39 m 41 sec
Reputation Power: 5
Send a message via AIM to c444l Send a message via Yahoo to c444l
I noticed your multiple posts on this problem..
have you tried the FreeBSD mailing lists? I think you'll find they are generally very helpful people.

Reply With Quote
  #3  
Old July 30th, 2004, 04:21 AM
Man479 Man479 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2004
Posts: 36 Man479 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 h 23 m 57 sec
Reputation Power: 4
Thanks I will try this option

Reply With Quote
  #4  
Old August 2nd, 2004, 05:47 AM
Man479 Man479 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2004
Posts: 36 Man479 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 h 23 m 57 sec
Reputation Power: 4
Linux emulation & linprocfs checking

Hi all,

How can i check linux binaries are working properly or not on FreeBSD??
One more thing we have mounted linprocfs, now there are proc and linprocfs entry in the fstab file is it correct??
how can i check linprocfs is working or not ??(need to make entry "linprocfs_load=yes" in loader.conf file ??)

I am working on the error
Code:
ELF file os ABI invalid  error


I have detailed my error in previous posts.

I have posted three mails one is titling "help me o freeBSD masters!!!"

regards
Man479

Reply With Quote
Reply

Viewing: Dev Shed ForumsOperating SystemsBSD Help > Help me O FreeBSD Masters!!!!!


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway