Tuesday, February 05, 2013

RPi Gentoo update doesn't update PATH

I posted recently on how I updated Gentoo  on the Pi.
I later wrote about some problems that resulted from, or during, the update here and here.

Today, I tried, for the first time since the update, to launch QupZilla (which up to now is the only browser --other than Lynx-- that works for me in Gentoo on the Pi).
However, it wouldn't launch.
From a terminal it gave me a error saying that libstdc++.so.6 was not available.

However, it was actually available in /usr/lib/gcc/armv6j-hardfloat-linux-gnueabi/4.6.3
So, why is it not being seen?
Let's check the PATH.
Yeah, that's it, the path still refers to gcc-4.5.4 and not to gcc-4.6.3.
So the PATH did not update during the overall update?

Let's fix that by going to /etc/env.d and checking each of the files.
Read all about this in the wiki.
Well, the only files in this directory that contain contributions to PATH are 00basic, 04gcc-armv6j-hardfloat-linux-gnueabi and 04rasberrypi-userland and none of these contains any reference to gcc-4.5.4 but 04gcc-armv6j-hardfloat-linux-gnueabi refers only to gcc-4.6.3.

So, lets update the PATH.
This just requires running the command

# env-update && source /etc/profile
To check that everything's fine, just run
$ echo $PATH
OK, that's perfect. All references to gcc-4.5.4 are gone and replaced by gcc-4.6.3

Now let's try launching QupZilla again.
The exact same error regarding libstdc++.so.6 not being available.
But it is available and the PATH points right to it.
What's going on?
A little googling brought me to this thread which (last post) suggests it's a bug that should have been fixed some time ago but seems to be still there on the RPi version of Gentoo, at least.

Well, the thread above suggests a fix which I tried by
$ cd /usr/lib/# ln -s /usr/lib/gcc/armv6j-hardfloat-linux-gnueabi/4.6.3/libstdc++.so.6 .

(don't overlook the '.' at the end of the soft-link command as this links libstdc++.so.6 to the current directory which is /usr/lib/)

And now ........ yes, QupZilla launches with no errors.

No comments:

Post a Comment