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:
It's not gcc, it's libc6 2.3.1-38; errno breaks quite a few packages at
anything newer than 2.3.1-5 (standard 8.0?).
Snapshot does not fix this, as this is a problem with the pre-packaged
MySQL binaries and not PHP.
Quick fix: grab the mysql 4.0.9 sources, patch using my patch at the
end of this message and build/install it somewhere; you can still use
their supplied binaries to run the actual mysql server, but you need a
proper libmysqlclient to link PHP against.
Then PHP 4.3.0 will build w/o incident.
configure mysql as such:
CFLAGS="-O2 -mcpu=pentiumpro" CXX=gcc CXXFLAGS="-O2 -mcpu=pentiumpro
-felide-constructors" ./configure
--prefix=/usr/src/mysql-4.0.9-gamma-libc6-2.3.1-6+
--with-extra-charsets=complex --enable-thread-safe-client
--enable-local-infile --enable-assembler --disable-shared
--with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static
--without-innodb
then use --with-mysql=../mysql-4.0.9-gamma-libc6-2.3.1-6+ for
configuring PHP
Patch:
--- mysql-4.0.9-gamma.vanilla/bdb/examples_c/ex_thread.c Thu Jan
9 04:35:18 2003
+++ mysql-4.0.9-gamma/bdb/examples_c/ex_thread.c Wed Jan 29
02:29:03 2003
@@ -99,7 +99,8 @@
char *argv[];
{
extern char *optarg;
- extern int errno, optind;
+/* extern int errno, optind; */
+ extern optind;
pthread_t *tids;
int ch, i, ret;
char *home;
--- mysql-4.0.9-gamma.vanilla/include/my_sys.h Thu Jan 9 04:35:22
2003
+++ mysql-4.0.9-gamma/include/my_sys.h Wed Jan 29 02:30:12 2003
@@ -192,11 +192,7 @@
#endif
#endif /* MSDOS */
-#ifdef HAVE_ERRNO_AS_DEFINE
#include <errno.h> /* errno is a define */
-#else
-extern int errno; /* declare errno */
-#endif
extern const char ** NEAR my_errmsg[];
extern char NEAR errbuff[NRERRBUFFS][ERRMSGSIZE];
extern char *home_dir; /* Home directory for user */
--- mysql-4.0.9-gamma.vanilla/readline/bind.c Thu Jan 9 04:35:21
2003
+++ mysql-4.0.9-gamma/readline/bind.c Wed Jan 29 02:31:37 2003
@@ -45,10 +45,6 @@
#include <signal.h>
#include <errno.h>
-#if !defined (errno)
-extern int errno;
-#endif /* !errno */
-
#include "posixstat.h"
/* System-specific feature definitions and include files. */
--- mysql-4.0.9-gamma.vanilla/readline/complete.c Thu Jan 9
04:35:22 2003
+++ mysql-4.0.9-gamma/readline/complete.c Wed Jan 29 02:31:06
2003
@@ -44,9 +44,6 @@
#include <stdio.h>
#include <errno.h>
-#if !defined (errno)
-extern int errno;
-#endif /* !errno */
#include <pwd.h>
#if !defined (HAVE_GETPW_DECLS)
--- mysql-4.0.9-gamma.vanilla/readline/histfile.c Thu Jan 9
04:35:17 2003
+++ mysql-4.0.9-gamma/readline/histfile.c Wed Jan 29 02:31:24
2003
@@ -65,9 +65,6 @@
#endif /* !__EMX__ */
#include <errno.h>
-#if !defined (errno)
-extern int errno;
-#endif /* !errno */
#include "history.h"
#include "histlib.h"
--- mysql-4.0.9-gamma.vanilla/readline/input.c Thu Jan 9 04:35:18
2003
+++ mysql-4.0.9-gamma/readline/input.c Wed Jan 29 02:31:50 2003
@@ -57,10 +57,6 @@
#include <stdio.h>
#include <errno.h>
-#if !defined (errno)
-extern int errno;
-#endif /* !errno */
-
/* System-specific feature definitions and include files. */
#include "rldefs.h"
--- mysql-4.0.9-gamma.vanilla/readline/rltty.c Thu Jan 9 04:35:17
2003
+++ mysql-4.0.9-gamma/readline/rltty.c Wed Jan 29 02:30:45 2003
@@ -44,10 +44,6 @@
#include "rltty.h"
#include "readline.h"
-#if !defined (errno)
-extern int errno;
-#endif /* !errno */
-
extern int readline_echoing_p;
extern int _rl_eof_char;
Previous Comments:
------------------------------------------------------------------------
[2003-01-28 00:22:01] [EMAIL PROTECTED]
Please try using this CVS snapshot:
http://snaps.php.net/php4-STABLE-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-STABLE-latest.zip
------------------------------------------------------------------------
[2003-01-23 14:37:13] [EMAIL PROTECTED]
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!
------------------------------------------------------------------------
[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
??
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/21831
--
Edit this bug report at http://bugs.php.net/?id=21831&edit=1