linux and linux64 on amd64

Jan Beich jbeich at vfemail.net
Fri Dec 4 02:29:56 UTC 2015


Andriy Gapon <avg at FreeBSD.org> writes:

> Can I have support for both 32-bit and 64-bit Linux binaries on an amd64 system?

You can but not using ports. emulators/linux_base-c6 is currently limited to
either i686 or x86_64 but not both: pkg-plist.* have conflicting entries.
This is partially documented in r393817. And consumer ports are all 32bit e.g.,
linux-c6-flashplugin11 has i386 distfile in distinfo.x86_64.

Alternatively, setting up a jail via sysutils/debootstrap or sysutils/rinse
for x86_64 then enabling multilib support should be easy. To use apps
outside of jail the dependencies must be under /compat/linux due to the way
path translation works (and hardcoded). It's also possible to build apps in
a mixed environment e.g.,

  $ (export PATH=/compat/linux/bin:$PATH CFLAGS=-m32; cmake; gmake)
  $ ./my_linux_app

Note1, in some cases you may need to bump compat.linux.osrelease sysctl.
Note2, to make 64bit OpenGL apps work with nvidia-driver you need to
       patch linux64 ioctl handler and remove nvidia-modprobe.
Note3, 64bit CUDA apps may not work which also means no OpenCL or NVENC.

> Do I have to load both linux and linux64 modules for that?

Yes.

--
My 0.02 of imaginary currency of biased opinion.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 602 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-emulation/attachments/20151204/79a3aa66/attachment.bin>


More information about the freebsd-emulation mailing list