English Portuguese (Brazil)
Part II. Common Tasks
Chapter 10. Linux® Binary Compatibility
Linux(R) Binary Compatibility
Support for 64-bit binary compatibility with Linux(R) was added in FreeBSD 10.3.
How to enable Linux(R) binary compatibility on a FreeBSD system.
How to install additional Linux(R) shared libraries.
How to install Linux(R) applications on a FreeBSD system.
The implementation details of Linux(R) compatibility in FreeBSD.
Know how to install crossref:ports[ports,additional third-party software].
Configuring Linux(R) Binary Compatibility
Before attempting to build the port, load the Linux(R) kernel module, otherwise the build will fail:
# kldload linux
# kldload linux64
% kldstat
Id Refs Address Size Name
1 2 0xc0100000 16bdb8 kernel
7 1 0xc24db000 d000 linux.ko
# pkg install emulators/linux_base-c7
For Linux(R) compatibility to be enabled at boot time, add this line to [.filename]#/etc/rc.conf#:
Since the Linux(R) binary compatibility layer has gained support for running both 32- and 64-bit Linux(R) binaries (on 64-bit x86 hosts), it is no longer possible to link the emulation functionality statically into a custom kernel.
If a Linux(R) application complains about missing shared libraries after configuring Linux(R) binary compatibility, determine which shared libraries the Linux(R) binary needs and install them manually.
% ldd linuxdoom
libXt.so.3 (DLL Jump 3.1) => /usr/X11/lib/libXt.so.3.1.0
libX11.so.3 (DLL Jump 3.1) => /usr/X11/lib/libX11.so.3.1.0
libc.so.4 (DLL Jump 4.5pl26) => /lib/libc.so.4.6.29
/compat/linux/usr/X11/lib/libXt.so.3 -> libXt.so.3.1.0
/compat/linux/usr/X11/lib/libX11.so.3 -> libX11.so.3.1.0
/compat/linux/lib/libc.so.4 -> libc.so.4.6.29