in libjvm.so wrong ELF class ELFCLASS64 - linux

I have installed java-1.7.0-openjdk-1.7.0.65-2.5.1.2.el6_5.x86_64 on Cent OS 6.6. When i am trying to run my software it is thorwing error in "libjvm.so wrong ELF class ELFCLASS64". while I ran java -version output is-->
java version 1.7.0_15
java SE runtime environment (build 1.7.0_15)
Java Hotspot 64Bit Server VM (build 23.7-b01, mixed mode)
JRE version on machine
Jre – 1.7.0_15-fcs.x86_84
JDK version
java-1.7.0-openjdk-1.7.0.65-2.5.1.2.el6_5.x86_64

Your software is a 32-bit ELF file but libjvm.so is only available as a 64-bit ELF library. The runtime linker therefor cannot link the library.
You either need to compile your program in 64-bit mode or get a 32-bit JVM.

Related

Run 32-bit executable directly on 64-bit linux system

After migrating a Debian 7.6 system from i368 to amd64 I encountered the problem to use some older ELF 32-bit LSB executables. Of course, there is the possibility to setup a secondary 32-bit system (in fact I could use my old one) and to apply chroot(8) or schroot(1). But I do not like the additional admin effort, the performance loss by a wrapper program and a different command sequence.
I am wondering whether there is really no way to run a 32-bit application directly on the x86_64 architecture (as possible, e.g., for HP-UX 11.0)? Both
$ /home/alf/prog32
and
$ /usr/bin/linux32 /home/alf/prog32
just lead to the failure message /home/alf/prog32: file or directory not found. This behavior is observed for all ELF 32-bit LSB executables (Debian i386, downloaded, self-written and compiled C-programs).

ELF file OS ABI invalid

I am recently doing some experiment on building a cluster system for computing tasks. My server is Suse Linux Enterprise 11, and one of the client is Redhat Enterprise Linux 5. I compiled openmpi on Suse, and it runs fine alone. Then I shared /usr/local(where the openmpi was installed) to my Redhat client, and tried to do mpirun, the following error popped up: error while loading shared libraries: /usr/local/openmpi/lib/libopen-rte.so.0: ELF file OS ABI invalid. Does this mean that I have to compile openmpi on redhat separately? Thanks!

Xuggler 3.4.1012 for windows with JVM 64bit

i installed xuggler for jvm 32bit from here http://www.liferay.com/community/wiki/-/wiki/Main/Preview+Generation, it worked perfectly, but now i need this for 64bit jvm, can anyone help?
thanks
You can have Liferay download the version for you: Go to ControlPanel/Server/Server Administration/External Services (at least on tomcat this is the easiest way, I'm not sure about other platforms)
The platforms there explicitly list win64 and you can be reasonably sure to get the supported version.
Update: I found this in portal.properties. You can construct the URL from this:
#
# Set the properties used to install Xuggler at runtime.
#
xuggler.jar.file[32-linux]=xuggle-xuggler-arch-i686-pc-linux-gnu.jar
xuggler.jar.file[32-mac]=xuggle-xuggler-arch-i386-xuggle-darwin11.jar
xuggler.jar.file[32-win]=xuggle-xuggler-arch-i686-w64-mingw32.jar
xuggler.jar.file[64-linux]=xuggle-xuggler-arch-x86_64-pc-linux-gnu.jar
xuggler.jar.file[64-mac]=xuggle-xuggler-arch-x86_64-xuggle-darwin11.jar
xuggler.jar.file[64-win]=xuggle-xuggler-arch-x86_64-w64-mingw32.jar
xuggler.jar.name[32-linux]=Linux 32-bit JVM (with GNU libc v6)
xuggler.jar.name[32-mac]=Mac OS X 10.7 32-bit JVM
xuggler.jar.name[32-win]=Windows 32-bit JVM
xuggler.jar.name[64-linux]=Linux 64-bit JVM (with GNU libc v6)
xuggler.jar.name[64-mac]=Mac OS X 10.7 64-bit JVM
xuggler.jar.name[64-win]=Windows 64-bit JVM
xuggler.jar.options=32-linux,32-mac,32-win,64-linux,64-mac,64-win
xuggler.jar.url=http://xuggle.googlecode.com/svn/trunk/repo/share/java/xuggle/xuggle-xuggler/5.4/

Linking with 32bit libraries under linux 64bit

Let me explain.
I'm using webots in combination with aldebaran SDK. My operating system is Debian Squeeze amd64. Webots (64bit) will not work with aldebaran SDK because their libraries are compiled for 32bit. I do not have the source of the libs to recompile in 64bit.
While trying to compile the default nao controller under webots, i get the following error:
g++ -o naoqi_for_webots
naoqi_for_webots.o naoproxy.o
-L"/usr/local/webots/lib" -lController -L"/home/alex/naoqi-sdk-1.10.44-linux/lib"
-lnaoqiclient /usr/bin/ld: skipping incompatible
/home/vor73x/naoqi-sdk-1.10.44-linux/lib/libnaoqiclient.so
when searching for -lnaoqiclient
/usr/bin/ld: cannot find -lnaoqiclient
doing a
file libnaqoqiclient.so
tells me:
libnaoqiclient.so: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, not stripped
The default project in webots has a Makefile which among other things has:
additional libraries:
LIBRARIES=-L"$(AL_DIR)/lib" -lnaoqiclient
I have downloaded and installed the 32bit version of webots, which links fine with the libnaoqiclient.so but will not link with other webots libraries (libController.so) where again, ld complains about incompatible type.
Can I link using webots 64bit with the 32bit aldebaran sdk ?
Can I link using webots 32bit with the 32bit aldebaran ? (I should, but I still get errors).
How can I specify to ld (or through Makefile even better) that the library is 32bits ?
Or in the case of using webots 32bit how can I specify that I want a 32bit binary ?
I do not care if my binary is 32 or 64bit, I do not care if I use the 32 or 64bit version of webots, all I want is to be able to compile the controllers.
Well, you can't mix and match 32-bit and 64-bit code. If you compile all your code using -m32 (to make it build as 32-bit), you may be able to get your application to link if you have 32-bit versions of all your libraries available.

Will a program complied in 64-bit work on 32-bit machine?

As title said, I have C program complied and created a binary in 64-bit machine.Will this binary work under 32-bit ?
64-bit binaries cannot run on a 32-bit OS. If file reports ELF 64-bit, you have a 64-bit binary.
In order to build 32-bit binaries on a 64-bit Linux, you need pass -m32 to gcc. You also need to have 32-bit libraries installed (sudo apt-get install libc6-dev-i386).
The compiling machine does not matter. What matters is: is the code generated 32 bits (answer: yes) or 64 bits (answer: no).
Will it work on a 32-bit machine? One with a CPU which doesn't support 64-bit mode? No.
Will it work on a 64-bit VM on a 32-bit native OS? Yes, in my experience.
A surprising result is that 64-bit VMs CAN be run under a 32-bit host OS, provided the CPU is capable and you don't want to allocate too much ram (>2G or thereabouts) to the guest.

Resources