Project:Prefix/FAQ

This guide covers questions frequently asked by users of Gentoo Prefix

How can I contribute?
Due to the depth of the Gentoo Prefix project, we really like to have users become involved. It helps us immensely. Here are some possibilities:
 * Report bugs! Unreported bugs are very bad for the health of the project, please do report bugs
 * Fix bugs! Most of the bugs result from EPREFIX not being respected.
 * Report working packages that you may have imported
 * Test packages - We cannot make sure that every package on every arch works by ourselves.
 * Bootstrapping must always work, rebootstrapping often and reporting issues would benefit all and you might learn something as well.

I made a fix, what is the best way to report this?
The absolute best way to report fixes is through Gentoo's Bugzilla. Use the "Gentoo/Alt" Product with the "Prefix Support" component, or click here. The second best way is to report them on the gentoo-alt mailing list, however, items may get forgotten or overlooked on the mailing list. Finally, you may report items in irc, but be sure you are speaking to a Gentoo Prefix developer, otherwise it is likely to not be noticed.

XXX ebuild works for me, now what?
Please report it! See above and also see here.

I want to run Gentoo Prefix within my company, am I allowed to do so?
Of course, see above for support ;) Also, you must obey whichever license as applies.

How mature is Gentoo Prefix?
Many of us use Gentoo Prefix everyday and it has been in existance since 2004. Keep in mind that you are riding the tip of the portage code and the latest packages as they exist in the gentoo-x86 tree. Gentoo Prefix is believed to have a reasonable maturity. However, as always, our software comes without warranty.

What is the "gentoo-x86 tree" ?
gentoo-x86 (sometimes simply referred to as gx86) is what Gentoo Linux calls their tree that contains all the ebuilds. See here.

On which platforms does Gentoo Prefix run on?
Many platforms, including but not limited to: GNU/Linux, AIX, Solaris, Mac OS X, Cygwin.

What is the best way to contact a Gentoo Prefix developer?
Please do not send us private mail. We prefer to receive list mail. See above for info on the gentoo-alt mailing list.

I want to import an ebuild, how do I go about that?
You don't import an ebuild any more, you just fix it in gentoo-x86. (Or provide a patch with bug.)

I want to uninstall Gentoo Prefix from my system, how?
Uninstalling Gentoo Prefix is a simple as removing the directory:

A fix was committed, but I don't have it, how come?
Gentoo Prefix users no longer are using a git snapshot as their portage tree. This means a commit made by a developer is not directly accessible to users. Instead, users are using an rsync version of the portage tree that is amongst others enriched with metadata for improved performance. This tree is generated twice an hour, at 01 and 31. The generation usually takes about 5 minutes, but may take up to 25 minutes when lots of changes have been committed. From the moment the generation is done, the rsync slaves have to pick up the updated copy from the main generation server. The slaves will sync with the main server in the last 5 minutes, thus from 25th till 30th minute.

In short this means that you can only safely sync to get the fix 60 minutes after the commit has taken place.

My PATH does not include the Prefix directories after I ran ./startprefix
You probably override PATH in your, , , or (or what else is your shell initialization file).

What should I do when the bootstrap script fails?
There are infinite way the bootstrap could fail. But more of them fall into some common senarios. Here are some tips:


 * 1) Inspect, make a case-insensitive search for the first occurence of "Error", search the fine web for that message and the file name.
 * 2) Seek help on IRC (wait 24h for answers), mailing list or report to  under "Gentoo alt" product "prefix support" with with  attached or uploaded to a pastebin.
 * 3) For a specific bug in a package,  and  will contain useful information, too.
 * 4) If  is too big, upload only the last 1000 lines.
 * 5) If a fix is to be tested, modify a ebuild file or mask a package under EPREFIX. Then rerun bootstrap-prefix.sh with the same $EPREFIX. If it again fails, it is recommended to restart bootstrap-prefix.sh in an empty  before submitting bugs.

Can other users on the same host use the Gentoo Prefix?
Yes, but they cannot use eselect or gcc-config to switch between versions of the many tools. They can call or directly. Only the user who has write permissions to Gentoo Prefix installation can adjust the'system-wide defaults.

Username becomes invalid inside Prefix
On Linux, Gentoo Prefix can use its own glibc, which performs independent name service from the host. The uid to username mapping is managed by nss within glibc. A new install of glibc requires a new set of mappings.

The bootstrap script first tries to generate passwd and group from getent and links host /etc/{passwd,group} as fallback:

If usernames are provided by LDAP, sometimes the system is configured such that a normal user cannot query the entire passwd or group by getent; in such a case portage breaks, portage will not be able to resolve the username and group. A quick fix is to show yourself to Prefix by specifying who you are:

But other users on the host cannot be resolved. To get a fair sample of all users on the system, enumerate the /home directory:

The files maybe get a bit outdated over the time as new users are added to the host's passwd/group files. The above id mapping needs to be regenerated.

Another solution is to use host nss_ldap library. (nss is part of glibc, which resolves uid/gid.)

Then set nsswitch to query ldap.

Compile inside memory
On a cluster node with large memory and shared network filesystem, compiling in a memory tmpfs can be significantly faster. is mounted as tmpfs by many distributions. For example:

During bootstrap, can be changed with:

On systemd/RedHat systems tmpfs (shm) is mounted by default on, doesn't exist any more there.

Add an en_US.UTF-8 locale
If Prefix uses it's own libc, the locales should be generated in the Prefix. Add an entry to EPREFIX/etc/locale.gen

Then generate the locale by running:

For more details, refer to the handbook.

Use a nearby mirror during bootstrap
The bootstrap script needs to download quite a bit. It can be accelerated by using a Gentoo mirror nearby. To use a mirror, GENTOO_MIRRORS should be set both in the environment

And :

Replace http://mirrors.tuna.tsinghua.edu.cn/gentoo with a favorite mirror.

For more details, refer to the GENTOO_MIRRORS article.

The rsync mirror is set in repos.conf:

Replace rsync://mirrors.tuna.tsinghua.edu.cn/gentoo-portage with your favorite mirror. Refer to repos.conf for details.

Similarly, you can set the GNU mirror via GNU_URL variable during stage 1 of the bootstrap.

What is Gentoo Prefix not good for?
Java binaries, even the Oracle jre/jdk packages contain some binary code which needs glib-2.17. If the host glibc is older, getting some key parts of java environment installed on Gentoo Prefix will not work.

Can Gentoo Prefix execute 32bit and 64bit binaries (aka having multilib support)?
In principle, multilib can be supported out of box. But in practice to keep it simple, the profile used is are no-multilib variants. Bootstrapping a multilib Prefix requires the host to support multilib as a starting point, which is universally true.

If 32bit application is really needed, it is straight-forward to bootstrap another 32bit Prefix on an 64bit host.

Any pressing issue with Gentoo Prefix?
Respection of EPREFIX in overlays! Many perl-based packages do not install because of 'Aborting due to QA concerns: double prefix files installed' (sci-biology/TransDecoder-2.1.0::science and many other). For example,.

Can I switch from an rpath profile to a glibc one?
No. Although it is possible, bootstrapping a new one costs far less time and effort. The bootstrap script will detect portage of Gentoo:Prefix in your PATH and take a shortcut.

Can I move binaries to another host?
The binaries with rpath may not work on another system unless LD_LIBRARY_PATH redirects the paths. If the dynamic loader is prefixified, it should be found at runtime.

Install elfutils on the hosting operating system. See for example:

I don't understand something in this FAQ!
Please join #gentoo-prefix on irc.gentoo.org or utilize the gentoo-alt mailing list.