Linux executable in 'compatability' mode

All,
Under FreeBSD 11.1-Release I'm trying to run an ELF Linux executable. Originally, "readelf -e" reports an OS/ABI of 'NONE' on the executable; I performed a "brandelf -t Linux" and then it reports an OS/ABI of 'GNU'.
I installed "linux_base-c6-6.9.5" using the "pkg install" command and also made sure to update /etc/rc.conf with linux_enable="YES". After rebooting I verified the "linux.ko," "linux64.ko," and "linux_common.ko" were present with kldstat.
Supposedly, I now should be good to go.

When I run the branded linux executable I receive the error 'no suitable JavaVMs found.' I also noticed a log file and in there was the message that "libc.so.6" could not be found. When I search for this, it is actually present in /compat/linux/usr/lib64/libc.so.6 and "/compat/linux/usr/lib/libc.so.6."

As I understand it, the execve call mechanism performs some re-pointing when FreeBSD sees that the ELF executable is Linux, i.e. it should point at the compatibility libraries instead of the native "/usr/lib" and "usr/lib32" libraries.

I would appreciate some insight to what might be going wrong here; it is as if the re-pointing mechanism is not working. One thing I note is that after branding the ELF as Linux it records "GNU" and not "Linux" - this may be a red-herring.

Many thanks ...
 
When I run the branded linux executable I receive the error 'no suitable JavaVMs found.'
Do you have a JRE installed on your system? I use java/linux-oracle-jre18. That's a Linux binary, so it should work for both native and Linux emulation modes.
I also noticed a log file and in there was the message that "libc.so.6" could not be found. When I search for this, it is actually present in /compat/linux/usr/lib64/libc.so.6 and "/compat/linux/usr/lib/libc.so.6."
This may or may not be an actual error. Let's sort out the JRE first.
 
Back
Top