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.
Thanks for the tips – I haven’t done the upgrade yet. Maybe I oughta.
December 11th, 2005 at 7:13 pmeh…*shrug* I’ve still got 3.23 running somewhere.
December 11th, 2005 at 8:14 pmNice detective work! Much cleaner than my hack.
December 13th, 2005 at 7:09 amHad the same problem, this fixed it. Cheers!
December 13th, 2005 at 3:36 pmFirst result on google, worked liked a charm. Thanks a lot!.
December 15th, 2005 at 1:06 pmWorks great, thanks for the clever sleuthing!
January 9th, 2006 at 2:53 pmThanks for tip. Perhaps I misunderstood but I had to unmerge libwww before I could emerge it again.
January 16th, 2006 at 2:06 pmThanks, this helped me out significantly today
January 16th, 2006 at 3:13 pmHelped me too. I wonder what causes the cross compile error message.
January 23rd, 2006 at 12:15 amEzNuke
[...] 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 [...]
January 23rd, 2006 at 11:34 pmHey Damon, thanks for sharing your solution. Saved me much time.
February 12th, 2006 at 2:13 pmCheers.
-steve
Thanks for the tip, I was totally stumped.
February 13th, 2006 at 5:46 pmThank you so much! This helped me greatly.
March 30th, 2006 at 9:06 pmDitto all of the above! You’re a great help!
April 3rd, 2006 at 12:10 am