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.

Continue reading » · Written on: 12-10-05 · 14 Comments »

14 Responses to “MySQL 4.1 Upgrade on Gentoo”

  1. Bad Andy wrote:

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

    December 11th, 2005 at 7:13 pm
  2. Damon wrote:

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

    December 11th, 2005 at 8:14 pm
  3. Bob wrote:

    Nice detective work! Much cleaner than my hack.

    December 13th, 2005 at 7:09 am
  4. Wiboi wrote:

    Had the same problem, this fixed it. Cheers!

    December 13th, 2005 at 3:36 pm
  5. Joel wrote:

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

    December 15th, 2005 at 1:06 pm
  6. Will wrote:

    Works great, thanks for the clever sleuthing!

    January 9th, 2006 at 2:53 pm
  7. Kevin wrote:

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

    January 16th, 2006 at 2:06 pm
  8. Jeff wrote:

    Thanks, this helped me out significantly today :)

    January 16th, 2006 at 3:13 pm
  9. Nick wrote:

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

    January 23rd, 2006 at 12:15 am
  10. rejon.org : The Jon Phillips Portal wrote:

    [...] 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 pm
  11. steve wrote:

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

    February 12th, 2006 at 2:13 pm
  12. Dave wrote:

    Thanks for the tip, I was totally stumped.

    February 13th, 2006 at 5:46 pm
  13. Jesse wrote:

    Thank you so much! This helped me greatly.

    March 30th, 2006 at 9:06 pm
  14. Richard wrote:

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

    April 3rd, 2006 at 12:10 am

Leave a Reply