December 10, 2005

MySQL 4.1 Upgrade on Gentoo

Like a few others, I had a problem upgrading MySQL to 4.1 on Gentoo. I was faithfully following the upgrade guide and got to the revdep-rebuild part of step 3. Revdep-rebuild said it was going to take the following actions:

emerge –oneshot –nodeps -pv =dev-php/mod_php-4.4.0-r9 =dev-php/php-4.4.0 =net-libs/libwww-5.4.0-r3

However, I got the following error during the first part of revdep-rebuild when it was trying to compile mod_php:

can not run test program while cross compiling

Well that’s definitely odd as I wasn’t attempting to cross-compile. I googled around quickly and found several people with a similar problem (with quite a few in German…) and a couple solutions. I tried re-emerging gentoolkit, but that didn’t help. I then came across Bob Rasey who was having the same problem. Looking through my config.log, it did appear that something was trying to link against libmysqlclient.so.12, which I didn’t have…but I didn’t like his solution of adding a symlink as that seemed somewhat hackish. Gentoo is already sensitive enough, and I didn’t want to take any chances.

Going back through the config.log, I noticed that the test compile mentioned in this thread was failing with the following error:

libmysqlclient.so.12, needed by /usr/lib/libxmlparse.so, not found

A quick equery belongs /usr/lib/libxmlparse.so revealed that the file actually belongs to libwww. Ah-ha! This is beginning to make more sense now.

mod_php links to libxmlparse, which requires libmysqlclient.so.12. But that’s not there anymore since I upgraded MySQL. libxmlparse is part of libwww, though, which is also slated to be rebuilt, but not until after mod_php. And that is where the problem lies. Re-emerging libwww by itself to get libxmlparse.so to link to the proper libraries and then continuing with the revdep-rebuild solved the problem.

14 Comments so far
Leave a comment

Thanks for the tips - I haven’t done the upgrade yet. Maybe I oughta.

eh…*shrug* I’ve still got 3.23 running somewhere. :)

Nice detective work! Much cleaner than my hack.

Had the same problem, this fixed it. Cheers!

First result on google, worked liked a charm. Thanks a lot!.

Works great, thanks for the clever sleuthing!

Thanks for tip. Perhaps I misunderstood but I had to unmerge libwww before I could emerge it again.

Thanks, this helped me out significantly today :)

Helped me too. I wonder what causes the cross compile error message.
EzNuke

[...] Hopefully by posting this I will help someone else…I eventually found the bug in another person’s blog post. Posted by jon @ 00:34:11 2006.01.24 [...]

Hey Damon, thanks for sharing your solution. Saved me much time.
Cheers.
-steve

Thanks for the tip, I was totally stumped.

Thank you so much! This helped me greatly.

Ditto all of the above! You’re a great help!



Leave a comment
Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>