Gentoo Wiki




We Gentoo geeks (and yes, begrudgingly, those SUSE, Mandriva, and Debian et al geeks) can have a native 64-bit operating system. Nowadays (Jan, 2008) AMD64 should be as stable and feature rich as x86.

Applications without 64-bit support

There is now a working 64-bit java plugin called icedtea.

Force building of unsupported applications

For some applications that have not yet been tested for the amd64 architecture, it might work to force building them by specifying the ~x86 keyword. If it works, please submit a bug on Gentoo's Bugzilla to make developers aware of it, so they can keyword the ebuilds adequately.

Most x86 stuff will compile and run with zero problems under amd64. The reason why the ebuilds take longer to get into stable AMD64 is because people do not report working ebuilds. So, please, do it.

Helpful Tips and Tricks

The solution is the noapic kernel option. After that the drivers are not loaded automatically, but you can at least modprobe.
This seems to be a problem with the kernel version of the LiveCD, because with my currently running system I don't need that option anymore.

multilib vs no-multilib profile

If you don't know what multilib is, read this first:

If your gentoo is a desktop, then probably you want multilib. See also the list of packages which need mulitilib. It includes acroread, mozilla-*-bin, ati-drivers, wine, and so on.

Howto switch to multilib

If you decided to use a no-multilib system and removed all multilib components from your system previously you can change back to a multilib system (e.g. you want to use wine or virtualbox now), even though the gentoo documentation says that you cannot switch from a no-multilib to a multilib-enabled profile (dunno who wrote that). Just follow these steps:

Code: Change your profile
rm /etc/make.profile
ln -s /usr/portage/profiles/default/linux/amd64/2008.0/desktop/ /etc/make.profile

You may use another profile of your choice of course.

Code: Install a multilib-enabled system on your computer and chroot into this system
mkdir /mnt/gentoo
cd /mnt/gentoo

Download stage3 from your nearest gentoo mirror into /mnt/gentoo; the file is called stage3-amd64-2008.0_beta2.tar.bz2 (or later)

tar xvjpf stage3-amd64-2008.0_beta2.tar.bz2
mount -t proc none /mnt/gentoo/proc
mount -o bind /dev /mnt/gentoo/dev
cp -r /usr/portage /mnt/gentoo/usr
chroot /mnt/gentoo /bin/bash
Code: Build a binary package for glibc and install it on your main system
quickpkg glibc
cp -r /mnt/gentoo/usr/portage/packages /usr/portage
emerge -K glibc

(Comment by PetoKraus: If you don't use stable GCC on your normal enviroment, quickpkging GCC is also a good idea, and, don't forget to gcc-config it to use it.)

Code: Cleanup and recompile glibc and gcc
umount /mnt/gentoo/dev
umount /mnt/gentoo/proc
rm -rf /mnt/gentoo
emerge -av gcc glibc

Make sure, that both ebuilds have multilib enabled (and your favorite useflags of course).

After you have finished compiling gcc and glibc, you may recompile your system with the new default useflags from your new profile. But look at the new packages and flags before installing them blindly, the new profile might introduce some stuff you don't like (just edit /etc/make.conf and correct your USE-flags).

Code: recompile packages with changed USE flags
emerge -av --newuse world

Kernel Support for 32-bit Applications

To allow a 64-bit system to run 32-bit applications, the kernel must have support for running 32-bit binaries. This is achieved by enabling the options shown below

Linux Kernel Configuration: 32-bit application support in a 64-bit kernel
 Executable file formats / Emulations
   [*] IA32 Emulation
   [*] IA32 a.out support

32-bit Libraries

If you find a 32-bit application isn't working on a 64-bit system, it may indicate that some of the required libraries are missing. The following is a list of packages which provide 32-bit libraries on a 64-bit system.

Obviously not all applications will require all libraries, so a bit of brain power may be needed to work out which is required. For a list of what libraries are included in which of these packages, see The app-emulation/emul-linux-x86-* packages

All the following packages can be found in the app-emulation category in portage. Generally portage should emerge these packages as required. If a missing dependency is found in a package in portage, please report it to Gentoo's Bugzilla.

Browser plugins

The following links are to instructions that will enable some popular plugins in web browsers such as Mozilla Firefox:

Troubleshooting: firefox-bin Starts 64-bit Mozilla Firefox

If you run firefox and then run firefox-bin without closing the first MOzilla Firefox, instead of starting an instance of the 32-bit Firefox, another copy of the 64-bit Mozilla Firefox will start instead. This also works the other way around.

The solution is to only use the 64-bit compiled version of Mozilla Firefox or only the 32-bit binary version of Mozilla Firefox. Alternatively, you can create different profiles by running firefox -ProfileManager and run firefox-bin -P 32bit instead of firefox-bin.

Setting up a 32-bit chroot environment

See the chroot subpage.

Reiser4 and AMD64

Reiser4 has been updated to work on AMD64 system, however a newer kernel is required. Patches for the vanilla kernel (from 2.6.20 to 2.6.26) are available from:

For a guide to recompiling you kernel and installing Reiser4, see:

For another guide to installing Gentoo with Reiser4, see the Unofficial CONRAD Gentoo Reiser4 Install LiveCD amd64

MPlayer and 32bit codecs

Note: The following should no longer be necessary. This author has mplayer working in 64 bit with zero issues with codecs.

Add the following entries to /etc/portage/package.keywords.

File: /etc/portage/package.keywords entries

Start the 32-bit mplayer with mplayer-bin or gmplayer-bin if you want a GUI. You may find that you get better results with gmplayer-bin mplayer-bin.

Win32 LoadLibrary failed to load: wmvdmod.dll /usr/lib/win32/wmvdmod.dll, /usr/local/lib/win32/wmvdmod.dll

or similar, make a link to lib32 directory: ln -s /usr/lib32/win32 /usr/lib/win32

Real Player

Emerge media-sound/alsa-driver with the oss USE flag:

echo "media-sound/alsa-driver oss" >> /etc/portage/package.use
emerge -av media-sound/alsa-driver
/etc/init.d/alsasound restart

Emerge media-video/realplayer:

emerge -av media-video/realplayer

Lauch Real Player:


If you have green picture, turn off XVideo: Tools » Preferences » Hardware » Use XVideo

If you have problems with choppy image, it can be because of the OSS drivers problems. Try to execute RealPlayer like this:

aoss32 realplay

Radeon 3D-acceleration in 32-bit programs

Getting 3D acceleration working with ATI Radeon requires proprietary drivers for some chips (in particular newer ones) and some 32-bit programs must be enabled with the correct GL-drivers setting.

Before you run your game, you should export the proper LIBGL_DRIVERS_PATH environment variable:

export LIBGL_DRIVERS_PATH=/usr/X11R6/lib32/modules/dri

or just run the game/program with the variable included in the command:

LIBGL_DRIVERS_PATH=/usr/X11R6/lib32/modules/dri enemy-territory
Retrieved from ""

Last modified: Sun, 05 Oct 2008 02:47:00 +0000 Hits: 216,798