Zum Inhalt

Monat: Januar 2019

Workaround of the month: Fix broken n32 o32 virtalenv on Gentoo mips when emerging spidermonkey-52.9.1pre1

Virtualenv ist utterly broken when you run Gentoo on MIPS using n32.

This will lead to spidermonkey-52.9.1pre1 failing to emerge, because of „ImportError: No module named pkgutil“ or the like. Here’s how to fix it:

Step 1: as root, create a user patch directory and download my patch for virtualenv into it, so emerge applies it to the source as soon as you re-emerge the package

mkdir -p /etc/portage/patches/dev-python/virtualenv-16.0.0
wget -O /etc/portage/patches/dev-python/virtualenv-16.0.0/virtualenv-16.0.0-multilib.patch https://rephlex.de/blog/wp-content/uploads/2019/01/virtualenv-16.0.0-multilib.patch.txt

Step 2: and download multiarch.patch into the directory we just created

Step 3: as root, test if the patch executes:

cd /usr/portage/dev-python/virtualenv
ebuild virtualenc-16.0.0.ebuild clean prepare

Step 4: re-emerge dev-lang/python-exec and dev-python/virtualenv

emerge dev-lang/python-exec dev-python/virtualenv

Step 5: Create a necessary symlink

ln -s /usr/lib32/python2.7 /usr/lib/python2.7

You’re done!

Leave a Comment