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.
By Bad Andyon 12.11.05 7:13 pm
eh…*shrug* I’ve still got 3.23 running somewhere.
By Damonon 12.11.05 8:14 pm
Nice detective work! Much cleaner than my hack.
By Bobon 12.13.05 7:09 am
Had the same problem, this fixed it. Cheers!
By Wiboion 12.13.05 3:36 pm
First result on google, worked liked a charm. Thanks a lot!.
By Joelon 12.15.05 1:06 pm
Works great, thanks for the clever sleuthing!
By Willon 01.09.06 2:53 pm
Thanks for tip. Perhaps I misunderstood but I had to unmerge libwww before I could emerge it again.
By Kevinon 01.16.06 2:06 pm
Thanks, this helped me out significantly today
By Jeffon 01.16.06 3:13 pm
Helped me too. I wonder what causes the cross compile error message.
EzNuke
By Nickon 01.23.06 12:15 am
[...] 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 [...]
By rejon.org : The Jon Phillips Portalon 01.23.06 11:34 pm
Hey Damon, thanks for sharing your solution. Saved me much time.
Cheers.
-steve
By steveon 02.12.06 2:13 pm
Thanks for the tip, I was totally stumped.
By Daveon 02.13.06 5:46 pm
Thank you so much! This helped me greatly.
By Jesseon 03.30.06 9:06 pm
Ditto all of the above! You’re a great help!
By Richardon 04.03.06 12:10 am
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>