Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
PHP recompile: can't run test program while cross compiling
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
ox-steve
n00b
n00b


Joined: 24 Sep 2002
Posts: 6

PostPosted: Wed Jul 02, 2003 10:52 am    Post subject: PHP recompile: can't run test program while cross compiling Reply with quote

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:

....
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]
Back to top
View user's profile Send private message
ox-steve
n00b
n00b


Joined: 24 Sep 2002
Posts: 6

PostPosted: Thu Jul 03, 2003 9:04 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Forester
n00b
n00b


Joined: 10 May 2003
Posts: 8
Location: UK

PostPosted: Thu Jul 03, 2003 2:09 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Tiganu
Tux's lil' helper
Tux's lil' helper


Joined: 02 Oct 2002
Posts: 105
Location: Montreal

PostPosted: Thu Jul 03, 2003 4:28 pm    Post subject: Reply with quote

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:
Back to top
View user's profile Send private message
jawz
n00b
n00b


Joined: 30 Jun 2003
Posts: 9

PostPosted: Fri Jul 04, 2003 3:18 pm    Post subject: Reply with quote

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

Re-emerge libwww, then emerge mod_php.

Please try and confirm.
Back to top
View user's profile Send private message
beacher
n00b
n00b


Joined: 11 Mar 2003
Posts: 30
Location: Atlanta

PostPosted: Sun Jul 06, 2003 12:55 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
robbat2
Developer
Developer


Joined: 19 Feb 2003
Posts: 81

PostPosted: Tue Jul 08, 2003 8:36 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Peach
Advocate
Advocate


Joined: 08 Mar 2003
Posts: 3686
Location: London, UK

PostPosted: Mon Jul 14, 2003 1:11 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
NaiL
Apprentice
Apprentice


Joined: 13 Feb 2003
Posts: 228
Location: Spain/BCN

PostPosted: Mon Jul 14, 2003 1:22 pm    Post subject: Reply with quote

yes.. i got the same problem.. i think that 'revdep-rebuild' has to have another order of compiling :s
Back to top
View user's profile Send private message
Proteus
Guru
Guru


Joined: 14 Jul 2002
Posts: 346
Location: Hamburg, Germany

PostPosted: Mon Jul 14, 2003 2:50 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
paranode
l33t
l33t


Joined: 06 Mar 2003
Posts: 679
Location: Texas

PostPosted: Mon Jul 14, 2003 4:20 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Peach
Advocate
Advocate


Joined: 08 Mar 2003
Posts: 3686
Location: London, UK

PostPosted: Mon Jul 14, 2003 5:29 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
Proteus
Guru
Guru


Joined: 14 Jul 2002
Posts: 346
Location: Hamburg, Germany

PostPosted: Mon Jul 14, 2003 5:47 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
Tamerz
Apprentice
Apprentice


Joined: 29 Apr 2003
Posts: 232
Location: Chicago IL, USA

PostPosted: Mon Jul 14, 2003 6:53 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
smouge
n00b
n00b


Joined: 22 Jan 2003
Posts: 66
Location: Oosterhout, the Netherlands

PostPosted: Tue Jul 15, 2003 7:13 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
Brianetta
n00b
n00b


Joined: 15 Jul 2003
Posts: 1
Location: Newcastle upon Tyne, UK

PostPosted: Tue Jul 15, 2003 9:59 am    Post subject: Reply with quote

Good show. That also worked for me.
_________________
I didn't mean to hurt you, but you're pretty when you cry
Back to top
View user's profile Send private message
sh3rp4
n00b
n00b


Joined: 09 Dec 2002
Posts: 1

PostPosted: Fri Aug 29, 2003 9:24 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
schism39401
Tux's lil' helper
Tux's lil' helper


Joined: 13 Mar 2003
Posts: 130

PostPosted: Tue Sep 09, 2003 5:43 am    Post subject: Reply with quote

worked for me also...great post!!!!
Back to top
View user's profile Send private message
Forse
Apprentice
Apprentice


Joined: 26 Dec 2002
Posts: 260
Location: /dev/random

PostPosted: Tue Jan 20, 2004 6:37 am    Post subject: Reply with quote

Quote:
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
Back to top
View user's profile Send private message
bulazs
n00b
n00b


Joined: 18 Jan 2005
Posts: 19
Location: Hungary

PostPosted: Sat Jan 22, 2005 8:30 pm    Post subject: Reply with quote

Thank You all!! It just works! :)
_________________
Seeing is believing...
Back to top
View user's profile Send private message
Maedhros
Bodhisattva
Bodhisattva


Joined: 14 Apr 2004
Posts: 5511
Location: Durham, UK

PostPosted: Fri May 13, 2005 3:43 pm    Post subject: Reply with quote

There's a bug report here: https://bugs.gentoo.org/show_bug.cgi?id=23751
_________________
No-one's more important than the earthworm.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum