Category Archives: Gentoo

Anything related to Gentoo GNU/Linux.

“Broken sem_open function (bug 496328)” error when compiling python_2.7:

I have installed Gentoo on a Thinkpad T42 laptop. I have problem setting up wireless network but that is for another day. This blog is related to problem I faced during my system upgrade.

When I tried to do system upgrade, python emerge failed with following error message: ‘”Broken sem_open function (bug 496328)” error when compiling python_2.7:’. There were instructions to –rbind /dev from live media. But I had done it. There were instructions to remount /dev/shm on tmpfs and with mode=1777 permission. But trying to mount failed with no such file/directory error. Then I noticed something.

Since, network is not working (currently) on my Gentoo installation, I chroot from linuxmint on this office laptop and do all installtion/upgradation. Mint has /dev/shm pointing to /run/shm which was empty i.e., there is nothing under /run.

I removed /dev/shm link, created a directory /dev/shm and mounted as tmpfs with 777 permission. After this, python emerge went smoothly.

(chroot) mint-t42 / # rm /dev/shm
(chroot) mint-t42 / # mkdir /dev/shm
(chroot) mint-t42 / # mount -t tmpfs -o rw,mode=1777 shm /dev/shm
(chroot) mint-t42 / # ls -l /dev/ | grep -i shm
drwxrwxrwt 2 root root 40 May 25 11:26 shm
(chroot) mint-t42 / # df -h
df: '/sys/fs/cgroup/openrc': No such file or directory
df: '/sys/fs/cgroup/cpuset': No such file or directory
df: '/sys/fs/cgroup/cpu': No such file or directory
df: '/sys/fs/cgroup/cpuacct': No such file or directory
df: '/sys/fs/cgroup/freezer': No such file or directory
Filesystem Size Used Avail Use% Mounted on
/dev/sda5 21G 4.8G 15G 25% /
tmpfs 21G 4.8G 15G 25% /run
udev 10M 0 10M 0% /dev
cgroup_root 4.0K 0 4.0K 0% /sys/fs/cgroup
shm 759M 0 759M 0% /dev/shm
(chroot) mint-t42 / # mount | grep -i shm
shm on /dev/shm type tmpfs (rw,mode=1777)
(chroot) mint-t42 / #

I don’t know how clean the method is but what I tried worked for me. Once I get network working in Gentoo, I don’t have to chroot anyway.


It’s Gentoo season…

I don’t know why, but suddenly I have fallen (madly) in love with Gentoo/Linux. I just completed the process of replacing existing linux on all my computers with Gentoo, except the one used by family. So, most of my next blog entries will be related to my experiences with Gentoo.

All but one of them are running OpenRC. I am running systemd on one, just so I am aware of the technology. So far, both systems are running smoothly. Once I’m more experienced, I will switch to testing branch.

I’m not new to Gentoo but it never stayed for long on a distro-hopper’s computer. Till the season changes again…he we go…or…may be we will end up being pair for life…who knows?! 🙂