Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Portage & Programming
  • Search

PHP recompile: can't run test program while cross compiling

Problems with emerge or ebuilds? Have a basic programming question about C, PHP, Perl, BASH or something else?
Post Reply
Advanced search
21 posts • Page 1 of 1
Author
Message
ox-steve
n00b
n00b
Posts: 6
Joined: Tue Sep 24, 2002 1:04 pm

PHP recompile: can't run test program while cross compiling

  • Quote

Post by ox-steve » Wed Jul 02, 2003 10:52 am

Morning,

I upgraded mysql to v4 on one of my servers since some software I want to test requires it. All went fine (other than that everything seems to want to downgrade it) but noticed afterwards that php no longer works - it seems to be linked against libmysqlclient.so.10 rather than the .12 that's now there.
Fair enough, recompile php and mod_php should do it.
But when I emerge [mod_]php-4.3.2 (the version I already had), I get:

Code: Select all

....
checking for sys/utsname.h... yes
checking for sys/ipc.h... yes
checking for fopencookie... yes
configure: error: can not run test program while cross compiling

!!! ERROR: dev-php/php-4.3.2 failed.
!!! Function econf, Line 304, Exitcode 1
!!! econf failed
Any ideas? As far as I'm aware, I'm not cross compiling, so it's either something to do with updating mysql, or it's some other change to the base system since I last compiled php.

Anyone know what needs tweaking?

Ta,
Steve.
[Edit: temporarily fixed php by symlinking libmysqlclient.10 to point at .12 which works kludgily but still curious what's broken with the compile]
[Re-edit: nope, php runs but the script makes it segfault so I guess I do need to recompile]
Top
ox-steve
n00b
n00b
Posts: 6
Joined: Tue Sep 24, 2002 1:04 pm

  • Quote

Post by ox-steve » Thu Jul 03, 2003 9:04 am

OK, I've kind of solved it, although I don't for the life of me know why.
I previously tried symlinking libmysqlclient.so.10 to ..so.12 but that didn't work. If I leave that symlink in place and then compile, it works. No 'cross compiling' errors - which according to the configure script only seem to happen if it detected gcc was a cross-compiler.
Why symlinking the old, uninstalled, version of a library to the current one would make it work is a mystery, but so's why it won't just discover the correct version of the library...

Steve.
Top
Forester
n00b
n00b
Posts: 8
Joined: Sat May 10, 2003 6:24 pm
Location: UK

  • Quote

Post by Forester » Thu Jul 03, 2003 2:09 pm

Thanks for posting the solution, I've too just encountered the very same problem and the symlink helped get over the problem. :D
Never test a mains lead with your tongue.
Top
Tiganu
Tux's lil' helper
Tux's lil' helper
Posts: 105
Joined: Wed Oct 02, 2002 10:02 pm
Location: Montreal

  • Quote

Post by Tiganu » Thu Jul 03, 2003 4:28 pm

I'm having the same problem, but I'haven't upgraded to mysql 4.x yet, I'm just trying to go to mod_php-4.3.2 from mod_php-4.3.1

I'll try your symlink fix for the recompile & see what happens.

[Edit] yay ... compilation started :twisted:
[Edit2] finished & started ... looks good, thanks a milion :wink:
Top
jawz
n00b
n00b
Posts: 9
Joined: Mon Jun 30, 2003 2:15 am
Contact:
Contact jawz
Website

  • Quote

Post by jawz » Fri Jul 04, 2003 3:18 pm

I already got the same problem and if I remember one solution :

Re-emerge libwww, then emerge mod_php.

Please try and confirm.
Top
beacher
n00b
n00b
User avatar
Posts: 30
Joined: Tue Mar 11, 2003 1:53 am
Location: Atlanta
Contact:
Contact beacher
Website

  • Quote

Post by beacher » Sun Jul 06, 2003 12:55 pm

jawz wrote:I already got the same problem and if I remember one solution :

Re-emerge libwww, then emerge mod_php.

Please try and confirm.
YOU RULE!! Thanks!

Todd
Top
robbat2
Developer
Developer
User avatar
Posts: 82
Joined: Wed Feb 19, 2003 8:24 am

  • Quote

Post by robbat2 » Tue Jul 08, 2003 8:36 pm

For everybody here.
There is a large warning message when you upgrade MySQL to v4, saying that you need to recompile everything that was linked against it.
It provides you with a script to do that as well!

However, the functionality of the script has been merged in 'revdep-rebuild' of gentoolkit now, so merely emerging gentoolkit and running 'revdep-rebuild' will ensure that the libraries and linking on your systems are sane.
Top
Peach
Advocate
Advocate
User avatar
Posts: 3686
Joined: Sat Mar 08, 2003 9:00 pm
Location: London, UK
Contact:
Contact Peach
Website

  • Quote

Post by Peach » Mon Jul 14, 2003 1:11 pm

robbat2 wrote:For everybody here.
There is a large warning message when you upgrade MySQL to v4, saying that you need to recompile everything that was linked against it.
It provides you with a script to do that as well!

However, the functionality of the script has been merged in 'revdep-rebuild' of gentoolkit now, so merely emerging gentoolkit and running 'revdep-rebuild' will ensure that the libraries and linking on your systems are sane.
seems revdev-rebuild works great but at the very first step while trying to reemerge mod-php it exits again saying that it can't run test program while cross compiling as ox-steve said in the first post.
Gentoo user since 2004.
"It's all fun and games, until someone loses an eye" - mom
Top
NaiL
Apprentice
Apprentice
User avatar
Posts: 228
Joined: Thu Feb 13, 2003 2:28 pm
Location: Spain/BCN

  • Quote

Post by NaiL » Mon Jul 14, 2003 1:22 pm

yes.. i got the same problem.. i think that 'revdep-rebuild' has to have another order of compiling :s
Top
Proteus
Guru
Guru
User avatar
Posts: 346
Joined: Sun Jul 14, 2002 12:43 pm
Location: Hamburg, Germany

  • Quote

Post by Proteus » Mon Jul 14, 2003 2:50 pm

Do an "emerge libwww" first and then use "revdep-rebuild mysql".
This way around it works.

Revdep-rebuild only fails because it wants to compile mod_php before libwww - that of course does not help.

Maybe "revdep-rebuild mod_php" and then "revdep-rebuild mysql" works - but I have not tested that.
Greetings,
Proteus
Top
paranode
l33t
l33t
User avatar
Posts: 679
Joined: Thu Mar 06, 2003 12:18 am
Location: Texas

  • Quote

Post by paranode » Mon Jul 14, 2003 4:20 pm

jawz wrote:I already got the same problem and if I remember one solution :

Re-emerge libwww, then emerge mod_php.

Please try and confirm.
This worked fine for me also.
Meh.
Top
Peach
Advocate
Advocate
User avatar
Posts: 3686
Joined: Sat Mar 08, 2003 9:00 pm
Location: London, UK
Contact:
Contact Peach
Website

  • Quote

Post by Peach » Mon Jul 14, 2003 5:29 pm

Proteus wrote:Do an "emerge libwww" first and then use "revdep-rebuild mysql".
This way around it works.
yeah 8) it worked for me... but I just did an emerge mod_php
Proteus wrote:Maybe "revdep-rebuild mod_php" and then "revdep-rebuild mysql" works - but I have not tested that.
won't work... maybe a "revdep-rebuild libwww" first if it'll run "emerge libwww"... but this is a nonsense just reemerge libwww will fix it all
Gentoo user since 2004.
"It's all fun and games, until someone loses an eye" - mom
Top
Proteus
Guru
Guru
User avatar
Posts: 346
Joined: Sun Jul 14, 2002 12:43 pm
Location: Hamburg, Germany

  • Quote

Post by Proteus » Mon Jul 14, 2003 5:47 pm

That's true. I think it should be included in the mod_php ebuild that libwww is always (re)emerged before mod_php. This would save a lot of pain and time.

I don't really understand the revdep utility. It seems it is useless for what it should be used (like you can witness here) and adding "--deep" to an "emerge -u world" should have the same result... (I am always using that command - it just seems better.)

Maybe someone can enlighten me?
Greetings,
Proteus
Top
Tamerz
Apprentice
Apprentice
Posts: 232
Joined: Tue Apr 29, 2003 1:55 am
Location: Chicago IL, USA
Contact:
Contact Tamerz
Website

  • Quote

Post by Tamerz » Mon Jul 14, 2003 6:53 pm

jawz wrote:I already got the same problem and if I remember one solution :

Re-emerge libwww, then emerge mod_php.

Please try and confirm.
This worked for me as well. Thank you.
Top
smouge
n00b
n00b
User avatar
Posts: 66
Joined: Wed Jan 22, 2003 8:26 am
Location: Oosterhout, the Netherlands

  • Quote

Post by smouge » Tue Jul 15, 2003 7:13 am

Thanks for the info. I got stuck with this problem as well, but the trick with re-emerging libwww was the solution .

On our systems that still have mysql 3 where I want to do a full update I do the following:

In case you did some checking with revdep-rebuild already:

# rm /root/.revdep-rebuild.*

elsewise continue as follow

# emerge resync
# emerge gentoolkit
# emerge mysql
# emerge libwww
# emerge -uD world
# emerge unmerge php
# revdep-rebuild
# emerge php

(check once more...)

# revdep-rebuild


For some reason I had to unmerge php before doing the revdep-rebuild elsewise revdep-rebuild wanted to recompile the php but did not succeed.

After having solved the above with libwww and php the revdep-rebuild script works very nice, even found some other broken links
Last edited by smouge on Tue Jul 15, 2003 3:11 pm, edited 3 times in total.
Top
Brianetta
n00b
n00b
Posts: 1
Joined: Tue Jul 15, 2003 9:54 am
Location: Newcastle upon Tyne, UK
Contact:
Contact Brianetta
Website

  • Quote

Post by Brianetta » Tue Jul 15, 2003 9:59 am

Good show. That also worked for me.
I didn't mean to hurt you, but you're pretty when you cry
Top
sh3rp4
n00b
n00b
Posts: 1
Joined: Mon Dec 09, 2002 11:08 pm

  • Quote

Post by sh3rp4 » Fri Aug 29, 2003 9:24 pm

i just did a fresh intall using the GRPs (emerge -k option) and got this error. unmerged libwww then `emerge libwww` to let the system compile it.

then emerge mod_php worked just fine. could it be complaining that libwww and mod_php are being compiled with different versions of gcc
Top
schism39401
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 130
Joined: Thu Mar 13, 2003 11:08 pm

  • Quote

Post by schism39401 » Tue Sep 09, 2003 5:43 am

worked for me also...great post!!!!
Top
Forse
Apprentice
Apprentice
User avatar
Posts: 260
Joined: Thu Dec 26, 2002 3:30 pm
Location: /dev/random

  • Quote

Post by Forse » Tue Jan 20, 2004 6:37 am

If you link dynamically (without -static), the result is 13% slower on Linux.
So I recompiled mySQL with static, but then php/mod_php emerge failed the same way it did for rest of you. Simply running revdep-rebuild helped.

P.S. thnx a lot for the tip
Top
bulazs
n00b
n00b
User avatar
Posts: 19
Joined: Tue Jan 18, 2005 5:47 pm
Location: Hungary

  • Quote

Post by bulazs » Sat Jan 22, 2005 8:30 pm

Thank You all!! It just works! :)
Seeing is believing...
Top
Maedhros
Bodhisattva
Bodhisattva
User avatar
Posts: 5511
Joined: Wed Apr 14, 2004 8:10 pm
Location: Durham, UK

  • Quote

Post by Maedhros » Fri May 13, 2005 3:43 pm

There's a bug report here: http://bugs.gentoo.org/show_bug.cgi?id=23751
No-one's more important than the earthworm.
Top
Post Reply

21 posts • Page 1 of 1

Return to “Portage & Programming”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic