ID: 21831
Comment by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Status: Feedback
Bug Type: MySQL related
Operating System: Linux/Redhat 8.0.92
PHP Version: 4.3.0
New Comment:
The MySQL is MySQL 4.0.9. This configuration (GCC 3.2 + Apache 2.0.44
+ MySQL 4.0.9 + PHP 4.3.0) seems to compile and run fine on Redhat 8.0.
RH8 ships with GCC 3.2 not 3.2.1 however. I guess I'm just trying to
get a feel for this being a PHP thing or a RedHat thing. As I said
before, I've compiled all sorts of other things on 8.0.92 and hadn't
run into any compatability problems. Thanks!
Previous Comments:
------------------------------------------------------------------------
[2003-01-23 10:16:41] [EMAIL PROTECTED]
Was mysql compiled with the same compiler?
And WHAT version of mysql is it?
------------------------------------------------------------------------
[2003-01-23 06:19:40] [EMAIL PROTECTED]
No, that didn't work. I've done that before but tried again just to
make sure I wasn't crazy. I'm using GCC 3.2.1 which is the
default package on RH 8.0.92
------------------------------------------------------------------------
[2003-01-22 21:51:46] [EMAIL PROTECTED]
What gcc version?
And does this work:
# rm config.cache
# make clean
# ./configure
# make
??
------------------------------------------------------------------------
[2003-01-22 21:40:55] [EMAIL PROTECTED]
Had marked in configuration as opposed to compile by accident.
------------------------------------------------------------------------
[2003-01-22 21:37:07] [EMAIL PROTECTED]
Not sure if this is a problem of my own making or not, but something
I've been profoundly frustrated with. I'm running Redhat 8.0.92
(Phoebe - Beta) with Apache 2.0.44 (tried .43 as well) and MySQL. I
run into what appears to be the same error whether I use
--with-mysql=/path/to/mysql or leave it built with the internal MySQL
access libraries.
When using the following build string:
./configure --with-apxs2=/opt/apache/bin/apxs --with-mysql=/opt/mysql/
--with-gettext --with-zlib --enable-track-vars
--enable-force-cgi-redirect
I get the following results:
checking for mysql_close in -lmysqlclient... no
checking for mysql_error in -lmysqlclient... no
configure: error: mysql configure failed. Please check config.log for
more information.
Inside config.log I see:
configure:47975: gcc -o conftest -g -O2
-L/opt/mysql//lib
conftest.c -lmysqlclient -lz -lcrypt -lresolv -lm -ldl -lnsl
-lcrypt 1>&5
/opt/mysql//lib/libmysqlclient.a(my_malloc.o)(.text+0x28): In function
`my_mallo
c':
: undefined reference to `errno'
/opt/mysql//lib/libmysqlclient.a(my_realloc.o)(.text+0x65): In function
`my_real
loc':
: undefined reference to `errno'
/opt/mysql//lib/libmysqlclient.a(my_lib.o)(.text+0x2e1): In function
`my_dir':
: undefined reference to `errno'
/opt/mysql//lib/libmysqlclient.a(my_lib.o)(.text+0x3d1): In function
`my_stat':
: undefined reference to `errno'
/opt/mysql//lib/libmysqlclient.a(my_getwd.o)(.text+0x44): In function
`my_getwd'
:
: undefined reference to `errno'
/opt/mysql//lib/libmysqlclient.a(my_getwd.o)(.text+0xce): more
undefined referen
ces to `errno' follow
collect2: ld returned 1 exit status
configure: failed program was:
#line 47964 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char mysql_close();
int main() {
mysql_close()
; return 0; }
configure:48102: checking for mysql_error in -lmysqlclient
configure:48121: gcc -o conftest -g -O2
-L/usr/lib -L/opt/mysql//lib
-Wl,-rpath,/usr -L/usr conftest.c -lmysqlclient -lz -lz
-lcrypt -lresol
v -lm -ldl -lnsl -lcrypt 1>&5
/opt/mysql//lib/libmysqlclient.a(my_malloc.o)(.text+0x28): In function
`my_mallo
c':
: undefined reference to `errno'
/opt/mysql//lib/libmysqlclient.a(my_realloc.o)(.text+0x65): In function
`my_real
loc':
: undefined reference to `errno'
/opt/mysql//lib/libmysqlclient.a(my_lib.o)(.text+0x2e1): In function
`my_dir':
: undefined reference to `errno'
/opt/mysql//lib/libmysqlclient.a(my_lib.o)(.text+0x3d1): In function
`my_stat':
: undefined reference to `errno'
/opt/mysql//lib/libmysqlclient.a(my_getwd.o)(.text+0x44): In function
`my_getwd'
:
: undefined reference to `errno'
/opt/mysql//lib/libmysqlclient.a(my_getwd.o)(.text+0xce): more
undefined referen
ces to `errno' follow
collect2: ld returned 1 exit status
configure: failed program was:
#line 48110 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char mysql_error();
int main() {
mysql_error()
; return 0; }
If I build without the --with-mysql=/opt/mysql, the configure script
completes correctly but during 'make' I get the following error:
ext/mysql/libmysql/my_tempnam.lo(.text+0x4c): In function
`my_tempnam':
/home/downloads/web/php-4.3.0/ext/mysql/libmysql/my_tempnam.c:103: the
use of `tempnam' is dangerous, better use `mkstemp'
ext/mysql/libmysql/my_lib.lo(.text+0x3d1): In function `my_dir':
/home/downloads/web/php-4.3.0/ext/mysql/libmysql/my_lib.c:169:
undefined reference to `errno'
ext/mysql/libmysql/my_lib.lo(.text+0x5ef): In function `my_stat':
/home/downloads/web/php-4.3.0/ext/mysql/libmysql/my_lib.c:588:
undefined reference to `errno'
ext/mysql/libmysql/my_malloc.lo(.text+0xde): In function `my_malloc':
/home/downloads/web/php-4.3.0/ext/mysql/libmysql/my_malloc.c:24:
undefined reference to `errno'
ext/mysql/libmysql/my_realloc.lo(.text+0xd5): In function
`my_realloc':
/home/downloads/web/php-4.3.0/ext/mysql/libmysql/my_realloc.c:44:
undefined reference to `errno'
ext/mysql/libmysql/my_delete.lo(.text+0x86): In function `my_delete':
/home/downloads/web/php-4.3.0/ext/mysql/libmysql/my_delete.c:16:
undefined reference to `errno'
ext/mysql/libmysql/my_tempnam.lo(.text+0x89):/home/downloads/web/php-4.3.0/ext/mysql/libmysql/my_tempnam.c:108:
more undefined references to `errno' follow
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1
As I said, I'm not sure if this isn't a problem with RH 8.0.92 but I've
complied many other things succesfully. Please let me know if I can be
of any help testing.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=21831&edit=1