Cannot execute binary file

Hello,

I got an error when executing a binary file on FreeBSD 12. Can anyone help?
Code:
$ ./linux.run
ELF binary type "3" not known.
-bash: ./linux.run: cannot execute binary file: Exec format error

$ file linux.run
linux.run: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), statically linked, stripped

$ uname -m
amd64
 
Thank you for the link.

I followed the instruction and got an error. Can you help?
Code:
$ ./linux

libXext.so.6: cannot open shared object file: No such file or directory


$ locate libXext.so.6

/usr/local/lib/libXext.so.6

/usr/local/lib/libXext.so.6.4.0


$ sudo cp /usr/local/lib/libXext.so.6.4.0 /compat/linux/usr/lib64

$ sudo ln -s /compat/linux/usr/lib64/libXext.so.6.4.0 /compat/linux/usr/lib64/libXext.so.6


$ ./linux

libXext.so.6: ELF file OS ABI invalid
 
What does this ./linux do? Give us some more details about the program you are trying to execute.
It obviously needs some shared object but the last error message means that the binary format does not match. This is usually the case when there is a mismatch - an executable uses a library and they do not match binarily because they have not been compiled against each other (for example, with different compiler options like calling convention or int size). If you provide more details about your application it would be easier to track down what's happening.
 
From https://wiki.freebsd.org/FreeBSD_Xilinx#line-326:
Starting from 9.2i Alpha release, Xilinx ISE brings native userspace, libusb-based driver for their cables.

it has been proven to be possible to get it to work in FreeBSD 9-CURRENT. We simply compile our libusb on Linux and install it in the Linuxolator. It had to be modified to use our ioctl() commands, but conflict within command space exists. There's an ongoing work related with investigating, what's the best way to bring support for Linux USB in the FreeBSD

Must be linux_libusb. I should try that with my Steam Controller…
 
By the way:
Code:
% pkg which /compat/linux/usr/lib64/libXext.so.6.4.0
/compat/linux/usr/lib64/libXext.so.6.4.0 was installed by package linux-c7-xorg-libs-7.7_6
 
Back
Top