I just reinstalled some of my servers with my beloved combo : gentoo & XFS <3

When I was trying to upgrade my gcc version from 7.3 to 8.2 I got the following error :

<pre class="wp-block-code">```
checking for uintptr_t...  * /var/tmp/portage/sys-apps/sandbox-2.13/work/sandbox-2.13/libsandbox/libsandbox.c:check_syscall():968: failure (Value too large for defined data type):
 * ISE: fopen_wr(conftest.val)
        abs_path: (null)
        res_path: /var/tmp/portage/sys-devel/gcc-8.2.0-r6/work/build/x86_64-pc-linux-gnu/32/libatomic/conftest.val
configure: error: Could not determine word size.

I finally found in that very old gentoo forum post and bug report that XFS is the rootcause. So I decided to move my ‘/var/tmp/portage’ from XFS to tmpfs by adding the following to /etc/fstab. Size may be adapted but 2G is not enough to compile GCC successfully.

<pre class="wp-block-preformatted">tmpfs /var/tmp/portage tmpfs size=4G,uid=portage,gid=portage,mode=775,noatime        0 0

Then I resumed the compilation, it worked like a charm and I was able to set my new GCC version as default one.

$ emerge --resume
$ gcc-config -l
[1] x86_64-pc-linux-gnu-7.3.0 *
[2] x86_64-pc-linux-gnu-8.2.0 
$ gcc-config 2

Again, gentoo documentation and resources was awesome 🙂