Hallo,
danke für die Antwort.
Ich habe heute Nacht also versucht, für mein PHP 4.3.8 ein Modul zu kompilieren, mit dem ich als Client die Version 4.1.7 nutzen kann.
Problem dabei ist, das laut der PHP Website (den genauen Link finde ich jetzt leider nicht mehr) die gewöhnliche MySQL Extension bei Versipn ab 4.1 nicht mehr funktioniert. Stattdessen soll man MySQL Improved (mysqli) verwenden.
Ich habe mir also aus dem aktuellen Release die mysqli-Dateien aus dem ext-Ordner geholt.
Bei Konfigurieren scheint es aber Konflikte mit der installierten libmysqlclient.so zu geben.
Folgende RPM's habe ich installiert:
MySQL-client-4.1.7-0.i386.rpm
MySQL-devel-4.1.7-0.i386.rpm
MySQL-server-4.1.7-0.i386.rpm
MySQL-shared-4.1.7-0.i386.rpm
Müsste also alles da sein. Ich habe es überprüft, es existieren keinerlei "alte" Dateien mehr, nur die aus dieses RPM's.
Ich habe mit der Kompilierung wie folgt begonnen:
Code: Select all
# export PHP_PREFIX="/usr"
# $PHP_PREFIX/bin/phpize
Das klappt soweit wunderbar. Dan wollte ich das "./configure" starten:
Code: Select all
./configure --without-mysql --with-mysqli=/usr/bin/mysql_config
Der Pfad zu "mysql_config" ist korrekt.
Ich habe mich dabei an das Manuel unter
http://de.php.net/manual/de/ref.mysqli.php gehalten.
Trotzdem trat leider ein Fehler auf, der mich in eine Sackgasse verfrachtet hat und zu dem ich im Internet keine Hilfen gefunden habe:
Code: Select all
configure:3476: error: wrong mysql library version or lib not found. Check config.log for more information.
Die Dateien sind da, das habe ich überprüft. Warum ist die Version falsch?? Er findet nur inkompatible libmysqlclient-Dateien.
Hier die config.log:
Code: Select all
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by configure, which was
generated by GNU Autoconf 2.59. Invocation command line was
$ ./configure --without-mysql --with-mysqli=/usr/bin/mysql_config
## --------- ##
## Platform. ##
## --------- ##
hostname = linux
uname -m = x86_64
uname -r = 2.6.8-24.3-default
uname -s = Linux
uname -v = #1 Tue Oct 26 14:40:54 UTC 2004
/usr/bin/uname -p = unknown
/bin/uname -X = unknown
/bin/arch = x86_64
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
hostinfo = unknown
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown
PATH: /sbin
PATH: /usr/sbin
PATH: /usr/local/sbin
PATH: /root/bin
PATH: /usr/local/bin
PATH: /usr/bin
PATH: /usr/X11R6/bin
PATH: /bin
PATH: /usr/games
PATH: /opt/gnome/bin
## ----------- ##
## Core tests. ##
## ----------- ##
configure:1527: checking build system type
configure:1545: result: x86_64-suse-linux
configure:1553: checking host system type
configure:1567: result: x86_64-suse-linux
configure:1658: checking for gcc
configure:1674: found /usr/bin/gcc
configure:1684: result: gcc
configure:1928: checking for C compiler version
configure:1931: gcc --version </dev/null >&5
gcc (GCC) 3.3.4 (pre 3.3.5 20040809)
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
configure:1934: $? = 0
configure:1936: gcc -v </dev/null >&5
Reading specs from /usr/lib64/gcc-lib/x86_64-suse-linux/3.3.4/specs
Configured with: ../configure --enable-threads=posix --prefix=/usr --with-local-prefix=/usr/local --infodir=/usr/share/info --mandir=/usr/share/man --enable-languages=c,c++,f77,objc,java,ada --disable-checking --libdir=/usr/lib64 --enable-libgcj --with-gxx-include-dir=/usr/include/g++ --with-slibdir=/lib64 --with-system-zlib --enable-shared --enable-__cxa_atexit x86_64-suse-linux
Thread model: posix
gcc version 3.3.4 (pre 3.3.5 20040809)
configure:1939: $? = 0
configure:1941: gcc -V </dev/null >&5
gcc: `-V' option must have argument
configure:1944: $? = 1
configure:1967: checking for C compiler default output file name
configure:1970: gcc conftest.c >&5
configure:1973: $? = 0
configure:2019: result: a.out
configure:2024: checking whether the C compiler works
configure:2030: ./a.out
configure:2033: $? = 0
configure:2050: result: yes
configure:2057: checking whether we are cross compiling
configure:2059: result: no
configure:2062: checking for suffix of executables
configure:2064: gcc -o conftest conftest.c >&5
configure:2067: $? = 0
configure:2092: result:
configure:2098: checking for suffix of object files
configure:2119: gcc -c conftest.c >&5
configure:2122: $? = 0
configure:2144: result: o
configure:2148: checking whether we are using the GNU C compiler
configure:2172: gcc -c conftest.c >&5
configure:2178: $? = 0
configure:2182: test -z
|| test ! -s conftest.err
configure:2185: $? = 0
configure:2188: test -s conftest.o
configure:2191: $? = 0
configure:2204: result: yes
configure:2210: checking whether gcc accepts -g
configure:2231: gcc -c -g conftest.c >&5
configure:2237: $? = 0
configure:2241: test -z
|| test ! -s conftest.err
configure:2244: $? = 0
configure:2247: test -s conftest.o
configure:2250: $? = 0
configure:2261: result: yes
configure:2278: checking for gcc option to accept ANSI C
configure:2348: gcc -c -g -O2 conftest.c >&5
configure:2354: $? = 0
configure:2358: test -z
|| test ! -s conftest.err
configure:2361: $? = 0
configure:2364: test -s conftest.o
configure:2367: $? = 0
configure:2385: result: none needed
configure:2403: gcc -c -g -O2 conftest.c >&5
conftest.c:2: error: parse error before "me"
configure:2409: $? = 1
configure: failed program was:
| #ifndef __cplusplus
| choke me
| #endif
configure:2543: checking whether gcc and cc understand -c and -o together
configure:2573: gcc -c conftest.c -o conftest.o >&5
configure:2576: $? = 0
configure:2578: gcc -c conftest.c -o conftest.o >&5
configure:2581: $? = 0
configure:2588: cc -c conftest.c >&5
configure:2591: $? = 0
configure:2594: cc -c conftest.c -o conftest.o >&5
configure:2597: $? = 0
configure:2599: cc -c conftest.c -o conftest.o >&5
configure:2602: $? = 0
configure:2620: result: yes
configure:2635: checking if compiler supports -R
configure:2659: gcc -o conftest -g -O2 conftest.c -R /usr/ >&5
gcc: unrecognized option `-R'
/usr/: file not recognized: Is a directory
collect2: ld returned 1 exit status
configure:2665: $? = 1
configure: failed program was:
| /* confdefs.h. */
|
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:2692: result: no
configure:2697: checking if compiler supports -Wl,-rpath,
configure:2721: gcc -o conftest -g -O2 conftest.c -Wl,-rpath,/usr/ >&5
configure:2727: $? = 0
configure:2731: test -z
|| test ! -s conftest.err
configure:2734: $? = 0
configure:2737: test -s conftest
configure:2740: $? = 0
configure:2754: result: yes
configure:2800: checking for PHP prefix
configure:2802: result: /usr
configure:2804: checking for PHP includes
configure:2806: result: -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/Zend -I/usr/include/php/TSRM
configure:2808: checking for PHP extension directory
configure:2810: result: /usr/lib64/php/extensions
configure:2852: checking for re2c
configure:2879: result: exit 0;
configure:2891: checking for gawk
configure:2907: found /usr/bin/gawk
configure:2917: result: gawk
configure:2931: checking for MySQLi support
configure:2974: result: yes, shared
configure:2982: checking whether to enable embedded MySQLi support
configure:2999: result: no
configure:3121: checking for mysql_set_server_option in -lmysqlclient
configure:3151: gcc -o conftest -g -O2 -Wl,-rpath,/usr/lib/mysql -L/usr/lib/mysql -lmysqlclient -lcrypt -lnsl -lm -lz -lnss_files -lnss_dns -lresolv -lnss_files -lnss_dns -lresolv conftest.c -lmysqlclient >&5
/usr/lib64/gcc-lib/x86_64-suse-linux/3.3.4/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/lib/mysql/libmysqlclient.a when searching for -lmysqlclient
/usr/lib64/gcc-lib/x86_64-suse-linux/3.3.4/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/lib/libmysqlclient.so when searching for -lmysqlclient
/usr/lib64/gcc-lib/x86_64-suse-linux/3.3.4/../../../../x86_64-suse-linux/bin/ld: cannot find -lmysqlclient
collect2: ld returned 1 exit status
configure:3157: $? = 1
configure: failed program was:
| /* confdefs.h. */
|
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| /* end confdefs.h. */
|
| /* Override any gcc2 internal prototype to avoid an error. */
| #ifdef __cplusplus
| extern "C"
| #endif
| /* We use char because int might match the return type of a gcc2
| builtin and then its argument prototype would still apply. */
| char mysql_set_server_option ();
| int
| main ()
| {
| mysql_set_server_option ();
| ;
| return 0;
| }
configure:3183: result: no
configure:3476: error: wrong mysql library version or lib not found. Check config.log for more information.
## ---------------- ##
## Cache variables. ##
## ---------------- ##
ac_cv_build=x86_64-suse-linux
ac_cv_build_alias=x86_64-suse-linux
ac_cv_c_compiler_gnu=yes
ac_cv_env_CC_set=
ac_cv_env_CC_value=
ac_cv_env_CFLAGS_set=
ac_cv_env_CFLAGS_value=
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_CXXCPP_set=
ac_cv_env_CXXCPP_value=
ac_cv_env_CXXFLAGS_set=
ac_cv_env_CXXFLAGS_value=
ac_cv_env_CXX_set=
ac_cv_env_CXX_value=
ac_cv_env_F77_set=
ac_cv_env_F77_value=
ac_cv_env_FFLAGS_set=
ac_cv_env_FFLAGS_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_exeext=
ac_cv_host=x86_64-suse-linux
ac_cv_host_alias=x86_64-suse-linux
ac_cv_lib_mysqlclient_mysql_set_server_option=no
ac_cv_objext=o
ac_cv_prog_AWK=gawk
ac_cv_prog_RE2C='exit 0;'
ac_cv_prog_ac_ct_CC=gcc
ac_cv_prog_cc_g=yes
ac_cv_prog_cc_gcc_c_o=yes
ac_cv_prog_cc_stdc=
php_cv_cc_dashr=no
php_cv_cc_rpath=yes
## ----------------- ##
## Output variables. ##
## ----------------- ##
AR=''
AWK='gawk'
CC='gcc'
CFLAGS='-g -O2'
CPP=''
CPPFLAGS=''
CXX=''
CXXCPP=''
CXXFLAGS=''
DEFS=''
ECHO='echo'
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP=''
EXEEXT=''
F77=''
FFLAGS=''
LDFLAGS=''
LIBOBJS=''
LIBS=''
LIBTOOL=''
LN_S=''
LTLIBOBJS=''
OBJEXT='o'
PACKAGE_BUGREPORT=''
PACKAGE_NAME=''
PACKAGE_STRING=''
PACKAGE_TARNAME=''
PACKAGE_VERSION=''
PATH_SEPARATOR=':'
RANLIB=''
RE2C='exit 0;'
SHELL='/bin/sh'
STRIP=''
ac_ct_AR=''
ac_ct_CC='gcc'
ac_ct_CXX=''
ac_ct_F77=''
ac_ct_RANLIB=''
ac_ct_STRIP=''
bindir='${exec_prefix}/bin'
build='x86_64-suse-linux'
build_alias=''
build_cpu='x86_64'
build_os='linux'
build_vendor='suse'
datadir='${prefix}/share'
exec_prefix='NONE'
host='x86_64-suse-linux'
host_alias=''
host_cpu='x86_64'
host_os='linux'
host_vendor='suse'
includedir='${prefix}/include'
infodir='${prefix}/info'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localstatedir='${prefix}/var'
mandir='${prefix}/man'
oldincludedir='/usr/include'
prefix='/usr'
program_transform_name='s,x,x,'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias=''
## ----------- ##
## confdefs.h. ##
## ----------- ##
#define PACKAGE_BUGREPORT ""
#define PACKAGE_NAME ""
#define PACKAGE_STRING ""
#define PACKAGE_TARNAME ""
#define PACKAGE_VERSION ""
configure: exit 1
Weiß jemand Rat?
Vielen Dank schon im Voraus!
MfG
Hermann