View previous topic :: View next topic |
Author |
Message |
placeholder Advocate

Joined: 07 Feb 2004 Posts: 2500
|
Posted: Thu Jul 29, 2004 1:59 pm Post subject: Trying to get PHP compiled with MySQL support |
|
|
I'm trying to install phpBB but I found out that I didn't have MySQL support in PHP. So I thought, "oh no problem, just add mysql to USE and remerge php". Well, that's what I thought until I got these errors:
Code: | /var/tmp/portage/php-4.3.8/work/php-4.3.8/ext/mysql/php_mysql.c: In function `zm_info_mysql':
/var/tmp/portage/php-4.3.8/work/php-4.3.8/ext/mysql/php_mysql.c:467: error: `PHP_MYSQL_TYPE' undeclared (first use in this function)
/var/tmp/portage/php-4.3.8/work/php-4.3.8/ext/mysql/php_mysql.c:467: error: (Each undeclared identifier is reported only once
/var/tmp/portage/php-4.3.8/work/php-4.3.8/ext/mysql/php_mysql.c:467: error: for each function it appears in.)
/var/tmp/portage/php-4.3.8/work/php-4.3.8/ext/mysql/php_mysql.c:469: error: `PHP_MYSQL_INCLUDE' undeclared (first use in this function)
/var/tmp/portage/php-4.3.8/work/php-4.3.8/ext/mysql/php_mysql.c:470: error: `PHP_MYSQL_LIBS' undeclared (first use in this function)
make: *** [ext/mysql/php_mysql.lo] Error 1
make: *** Waiting for unfinished jobs....
!!! ERROR: dev-php/php-4.3.8 failed.
!!! Function php-sapi_src_compile, Line 511, Exitcode 2
!!! compile problem |
It seems to me that there are either missing environment variables or #defines in the header files. Does anyone have any idea how to correct this? I can reproduce this error as long as mysql is in my USE flag and I'm emerging any version of PHP(tried 5.0 by hand and ebuild then 4.3.8 by ebuild and by hand). Well, any ideas? Cheers. |
|
Back to top |
|
 |
adaptr Watchman


Joined: 06 Oct 2002 Posts: 6730 Location: Rotterdam, Netherlands
|
Posted: Thu Jul 29, 2004 2:50 pm Post subject: |
|
|
And you do have mysql emerged alreqady ?
If not, try that before emerging php... _________________ >>> emerge (3 of 7) mcse/70-293 to /
Essential tools: gentoolkit eix profuse screen |
|
Back to top |
|
 |
placeholder Advocate

Joined: 07 Feb 2004 Posts: 2500
|
Posted: Thu Jul 29, 2004 4:03 pm Post subject: |
|
|
adaptr wrote: | And you do have mysql emerged alreqady ?
If not, try that before emerging php... |
I've already merged that then remerged it. Perhaps I should try unmerging it and remerging it then doing PHP? |
|
Back to top |
|
 |
placeholder Advocate

Joined: 07 Feb 2004 Posts: 2500
|
Posted: Thu Jul 29, 2004 4:41 pm Post subject: |
|
|
Same deal after doing this:
Code: |
# emerge -C mysql
# emerge php (it also installed mysql)
|
Any other ideas? |
|
Back to top |
|
 |
codemaker Guru


Joined: 03 Jun 2004 Posts: 398 Location: Lisboa, Portugal
|
Posted: Thu Jul 29, 2004 5:02 pm Post subject: |
|
|
All I can say is that I only did this:
emerge apache
emerge mysql
emerge php
vim <insert each config file here>
I don't have nothing in my use flags related to this packages and it's working.
 |
|
Back to top |
|
 |
placeholder Advocate

Joined: 07 Feb 2004 Posts: 2500
|
Posted: Thu Jul 29, 2004 5:07 pm Post subject: |
|
|
codemaker wrote: | All I can say is that I only did this:
emerge apache
emerge mysql
emerge php
vim <insert each config file here>
I don't have nothing in my use flags related to this packages and it's working.
 |
The problem is getting PHP to merge correctly. Also, there might be references in your /etc/make.profile/make.defaults file.  |
|
Back to top |
|
 |
kashani Advocate


Joined: 02 Sep 2002 Posts: 2032 Location: San Francisco
|
Posted: Thu Jul 29, 2004 5:36 pm Post subject: |
|
|
What is the output of emerge -pv php mod_php
Chances are it's one of the USE variables causing issues.
kashani _________________ Will personally fix your server in exchange for motorcycle related shop tools in good shape. |
|
Back to top |
|
 |
codemaker Guru


Joined: 03 Jun 2004 Posts: 398 Location: Lisboa, Portugal
|
Posted: Thu Jul 29, 2004 6:34 pm Post subject: |
|
|
Pwnz3r wrote: |
The problem is getting PHP to merge correctly. Also, there might be references in your /etc/make.profile/make.defaults file.  |
make.defaults should be the same for everyone because it gets updated when you sinc and it doesn't have any reference to mysql, php or apache. But mysql appears when I do emerge info thou. It's on my use.defaults file
As for compiling errors, I don't know anything about that. I had some problems compiling but I don't know what to do when that happens  |
|
Back to top |
|
 |
placeholder Advocate

Joined: 07 Feb 2004 Posts: 2500
|
Posted: Thu Jul 29, 2004 7:10 pm Post subject: |
|
|
kashani wrote: | What is the output of emerge -pv php mod_php
Chances are it's one of the USE variables causing issues.
kashani |
Code: | root@Fygor # emerge -pv php mod_php php-4.3.8
These are the packages that I would merge, in order:
Calculating dependencies ...done!
[ebuild UD] dev-php/php-4.3.8 [5.0.0] 16 kB
[ebuild N ] dev-php/mod_php-4.3.8 +X +apache2 +berkdb +crypt -curl -debug -debug -doc -fdftk -firebird -flash -freetds -gd -gd-external +gdbm -gmp -hardenedphp -imap -informix -ipv6 -java +jpeg -kerberos -ldap -mcal -memlimit -mssql +mysql +nls -oci8 -odbc +pam +pdflib +png -postgres -qt -snmp +spell +ssl +tiff +truetype +xml2 -yaz 16 kB
Total size of downloads: 33 kB |
I've been hacking through code with no avail. I might just b0rk the support in the end but we'll see.
EDIT: Gave up on hacking code. Any other ideas anyone? |
|
Back to top |
|
 |
intgr Apprentice


Joined: 23 Jun 2004 Posts: 225 Location: Earth, Sol, Milky Way
|
Posted: Thu Jul 29, 2004 8:53 pm Post subject: |
|
|
Pwnz3r wrote: | kashani wrote: | What is the output of emerge -pv php mod_php
Chances are it's one of the USE variables causing issues.
kashani |
Code: | root@Fygor # emerge -pv php mod_php php-4.3.8
These are the packages that I would merge, in order:
Calculating dependencies ...done!
[ebuild UD] dev-php/php-4.3.8 [5.0.0] 16 kB
[ebuild N ] dev-php/mod_php-4.3.8 +X +apache2 +berkdb +crypt -curl -debug -debug -doc -fdftk -firebird -flash -freetds -gd -gd-external +gdbm -gmp -hardenedphp -imap -informix -ipv6 -java +jpeg -kerberos -ldap -mcal -memlimit -mssql +mysql +nls -oci8 -odbc +pam +pdflib +png -postgres -qt -snmp +spell +ssl +tiff +truetype +xml2 -yaz 16 kB
Total size of downloads: 33 kB |
EDIT: Gave up on hacking code. Any other ideas anyone? |
You can try older versions of PHP (eg, 'emerge <dev-php/php-4.3.8 -pv')
The ebuild for php-4.3.8 seems to be borked, because it has no use flags (same thing for me, wtf?), although older versions of PHP had as much as mod_php-4.3.8
Also, if you're going to use PHP with Apache, you probably want to use mod_php anyway. |
|
Back to top |
|
 |
placeholder Advocate

Joined: 07 Feb 2004 Posts: 2500
|
Posted: Thu Jul 29, 2004 8:55 pm Post subject: |
|
|
I already had mod_php installed. It gives the same errors about MySQL. :\ |
|
Back to top |
|
 |
intgr Apprentice


Joined: 23 Jun 2004 Posts: 225 Location: Earth, Sol, Milky Way
|
Posted: Thu Jul 29, 2004 9:08 pm Post subject: |
|
|
Did you try older versions of php or mod_php? (mod_php-4.3.8 works for me though)
Playing around with the USE flags can also help. (use equery uses mod_php to find out what USE flags it has got) |
|
Back to top |
|
 |
placeholder Advocate

Joined: 07 Feb 2004 Posts: 2500
|
Posted: Thu Jul 29, 2004 9:21 pm Post subject: |
|
|
integor wrote: | Did you try older versions of php or mod_php? (mod_php-4.3.8 works for me though)
Playing around with the USE flags can also help. (use equery uses mod_php to find out what USE flags it has got) |
Could you do emerge -vp mod_php to let me see what USE flags you have on? |
|
Back to top |
|
 |
intgr Apprentice


Joined: 23 Jun 2004 Posts: 225 Location: Earth, Sol, Milky Way
|
Posted: Thu Jul 29, 2004 9:38 pm Post subject: |
|
|
Pwnz3r wrote: | Could you do emerge -vp mod_php to let me see what USE flags you have on? |
I've disabled as much options as I could to reduce the number of dependencies, because I don't really use PHP. But, if you insist:
Code: |
[ark ~]# emerge php mod_php -pv
[ebuild N ] dev-php/php-4.3.8 16 kB
[ebuild R ] dev-php/mod_php-4.3.8 -X +apache2 +berkdb +crypt -curl -debug -debug -doc -fdftk -firebird -flash -freetds -gd -gd-external +gdbm -gmp -hardenedphp -imap -informix +ipv6 -java -jpeg -kerberos -ldap -mcal -memlimit -mssql -mysql -nls -oci8 -odbc -pam -pdflib -png -postgres -qt -snmp -spell -ssl -tiff -truetype -xml2 -yaz 16 kB
|
It might also be because apache2. I think you should use Apache 2.0 unless you don't have any specific reasons not to. |
|
Back to top |
|
 |
placeholder Advocate

Joined: 07 Feb 2004 Posts: 2500
|
Posted: Thu Jul 29, 2004 9:41 pm Post subject: |
|
|
The problem is getting MySQL to go into it. As you can see in the orginial post, the stuff causing all the trouble is MySQL stuff. In yours, the mysql USE flag is set to off. |
|
Back to top |
|
 |
kashani Advocate


Joined: 02 Sep 2002 Posts: 2032 Location: San Francisco
|
Posted: Thu Jul 29, 2004 9:58 pm Post subject: |
|
|
Your use flags look pretty good, almost exactly what I'm using. The only odd one is ipv6 which I'd remove that on if you don't need it. It can cause strange problems in many case especially if you don't have any ipv6.
There was an odd portage issue that was causing php not to show it's USE flags which is why I had you do both php and mod_php. I think rebuilding portage fixes it, but you may want to search for that before doing anything rash.
kashani _________________ Will personally fix your server in exchange for motorcycle related shop tools in good shape. |
|
Back to top |
|
 |
placeholder Advocate

Joined: 07 Feb 2004 Posts: 2500
|
Posted: Thu Jul 29, 2004 10:35 pm Post subject: |
|
|
I got it. It seemed that I didn't have bash fully merged so I merged it and all works fine. Thanks for your replies though. |
|
Back to top |
|
 |
|