[suse 8.0] php 4.2.x mit mysql-devel support kompilieren -> suse mysql-devel.rpm defekt?
Hallo, Ich möchte PHP 4.2.x unter 8.0 kompilieren. Alle devel rpm's sind installiert, aber ich erhalte immer noch: ./configure --with-mysql=/usr [...] checking for int8... no checking base type of last arg to accept... socklen_t checking return type of qsort... void 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. Was ist denn los hier ? Ist mysql-devel defekt ? Ich würde es vermuten, da wenn ich einen eigenen mysql installiere (aus sources), klappt es mit PHP kompilation auch sofort. Würde aber schon gern das "original" suse mysql verwenden, sonst habe ich bei upgrades probleme. Kennt jemand eine lösung? Gemäss google groups usw. bin ich nicht der einzige mit dieses problem, aber leider habe ich noch nirgens eine lösung gelesen. Bugfix von Suse wäre gut... :) Unter 7.3 klappt es gut... Grüsse, Olivier PS: gibt es irgendwo searchable-archive von suse ML's ? wäre noch praktisch... :) hier ende von config.log: [...] configure:39811: checking base type of last arg to accept configure:39839: g++ -c conftest.C 1>&5 configure:39888: checking return type of qsort configure:39905: gcc -c -g -O2 conftest.c 1>&5 configure:39895: warning: garbage at end of `#ifdef' argument configure:39971: checking for mysql_close in -lmysqlclient configure:39990: gcc -o conftest -g -O2 -L/usr/lib conftest.c -lmysqlclient -lldap -llber -lgd -lttf -lpng -lz -lz -lcrypt -lresolv -lm -ldl -lnsl -lresolv -lcrypt 1>&5 /usr/i486-suse-linux/bin/ld: cannot find -lmysqlclient collect2: ld returned 1 exit status configure: failed program was: #line 39979 "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:40115: checking for mysql_error in -lmysqlclient configure:40134: gcc -o conftest -g -O2 -L/usr/lib -L/usr/lib conftest.c -lmysqlclient -lldap -llber -lgd -lttf -lpng -lz -lz -lcrypt -lresolv -lm -ldl -lnsl -lresolv -lcrypt 1>&5 /usr/i486-suse-linux/bin/ld: cannot find -lmysqlclient collect2: ld returned 1 exit status configure: failed program was: #line 40123 "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; }
Hallo, On Wed, 14 Aug 2002, Olivier M. wrote:
Ich möchte PHP 4.2.x unter 8.0 kompilieren. Alle devel rpm's sind installiert, aber ich erhalte immer noch:
./configure --with-mysql=/usr [...] checking for int8... no checking base type of last arg to accept... socklen_t checking return type of qsort... void 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.
Versuch's mal mit './configure --with-mysql=/usr/lib/mysql'. Falls das auch nicht klappt muesste man sich mal configure[.in] anschauen (und ich hab hier kein PHP4.x). -dnh -- Leben bedeutet vor allem zwei Dinge: Verstehen und Verstanden werden. Avber das verstehen viele so wie so nicht. Deswegen werden die die es verstehen auch nicht verstanden. [WoKo in dag°]
Salut David, Danke für das Feedback! On Wed, Aug 14, 2002 at 09:47:52PM +0200, David Haller wrote:
checking for mysql_error in -lmysqlclient... no configure: error: mysql configure failed. Please check config.log for more information.
Versuch's mal mit './configure --with-mysql=/usr/lib/mysql'.
Falls das auch nicht klappt muesste man sich mal configure[.in] anschauen (und ich hab hier kein PHP4.x).
sieht ein wenig anders aus: es endet nun auf: checking base type of last arg to accept... socklen_t checking return type of qsort... void configure: error: Cannot find header files under /usr/lib/mysql ltk2:/usr/local/src/php-4.2.2 # (also 2 zeilen vor dem -lmysqlclient fehler). Grüsse, Olivier
Am Donnerstag, 15. August 2002 00:12 schrieb Olivier M.:
checking base type of last arg to accept... socklen_t checking return type of qsort... void configure: error: Cannot find header files under /usr/lib/mysql
Hallo Oliver schau mal unter http://www.suse.m-st.net/. Dort findest du das passende RPM MfG Michael PS: Versuchs mal mit --with-mysql=/usr/mysql. PS2: irgend was stimmt nicht mit deiner E-Mail Adresse nicht. linux:/ # ping orion.orion.insign.ch ping: unknown host: orion.orion.insign.ch -- Nur ein Kleingeist hält Ordnung !! Ein Genie überlebt das Chaos !! [:-)]
Salut Michael, On Thu, Aug 15, 2002 at 12:42:08AM +0200, Michael Steffen wrote:
Am Donnerstag, 15. August 2002 00:12 schrieb Olivier M.:
checking base type of last arg to accept... socklen_t checking return type of qsort... void configure: error: Cannot find header files under /usr/lib/mysql
schau mal unter http://www.suse.m-st.net/. Dort findest du das passende RPM
danke: sind aber leider veraltet (4.2.1!), und mein Ziel ist schon PHP selber zu kompilieren (mit einige spez. optionen). Das ist immer gegangen (suse 6.x, 7.x): wieso denn nicht mit 8.0?
PS: Versuchs mal mit --with-mysql=/usr/mysql.
ls: /usr/mysql: No such file or directory ist also auch nicht das... gemäss suse.m-st.net sollte es schon "--with-mysql=/usr" sein. das geht aber nicht....
PS2: irgend was stimmt nicht mit deiner E-Mail Adresse nicht. linux:/ # ping orion.orion.insign.ch ping: unknown host: orion.orion.insign.ch
danke! komisch, 1x "orion" wäre richtig, aber nicht 2x... Müsste nun ok sein (muttrc angepasst). Grüsse, Olivier
Hallo Oliver, wo sind denn die Headerfiles von Mysql wirklich gespeichert? find / -name mysql.h -print Und kopiere die Dateien entweder nach /usr/include, mach nen Link oder gebe dieses Verzeichnis beim ./configure-Aufruf von PHP an. Gruß Sebastian
Ursache gefunden! :) On Wed, Aug 14, 2002 at 09:08:35PM +0200, Olivier M. wrote:
Was ist denn los hier ? Ist mysql-devel defekt ? Ich würde es vermuten, da wenn ich einen eigenen mysql installiere (aus sources), klappt es mit PHP kompilation auch sofort.
auf dem "suse-standard" 8.0 system sieht es so aus: ltk2:/usr/lib/mysql # ls -la /usr/lib/mysql/ total 528 drwxr-xr-x 2 root root 4096 Aug 14 18:25 . drwxr-xr-x 79 root root 20480 Aug 14 18:23 .. -rw-r--r-- 1 root root 282752 Mar 23 20:26 libmysqlclient.a -rw-r--r-- 1 root root 709 Mar 23 20:11 libmysqlclient.la lrwxrwxrwx 1 root root 23 Aug 14 18:25 libmysqlclient.so -> ../libmysqlclient.so.10 lrwxrwxrwx 1 root root 23 Aug 14 18:25 libmysqlclient.so.10 -> ../libmysqlclient.so.10 lrwxrwxrwx 1 root root 27 Aug 14 18:25 libmysqlclient.so.10.0.0 -> ../libmysqlclient.so.10.0.0 -rw-r--r-- 1 root root 214237 Mar 23 20:26 mysqld.sym ==> libmysqlclient.so ist also einen link auf einen link der auf sich selbst zeigt... aber wo ist dann das richtige .so file ? :) ltk2:/usr/lib/mysql # rpm -qf libmysqlclient.so mysql-devel-3.23.48-19 ltk2:/usr/lib/mysql # rpm -qf libmysqlclient.so.10 mysql-devel-3.23.48-19 ltk2:/usr/lib/mysql # rpm -qf libmysqlclient.so.10.0.0 mysql-devel-3.23.48-19 mysql-devel.rpm ist also wirklich buggy.... So sieht es aus aus einen "richtigen" system (mit mysql compiliert "von hand"): polaris:/usr/local/lib/mysql # ls -la /usr/local/lib/mysql/ total 1012 drwxr-xr-x 2 root root 4096 May 17 10:02 . drwxr-xr-x 5 root root 4096 May 17 12:05 .. -rw-r--r-- 1 root root 11906 May 17 10:02 libdbug.a -rw-r--r-- 1 root root 34858 May 17 10:02 libheap.a -rw-r--r-- 1 root root 15290 May 17 10:02 libmerge.a -rw-r--r-- 1 root root 234578 May 17 10:02 libmyisam.a -rw-r--r-- 1 root root 23042 May 17 10:02 libmyisammrg.a -rw-r--r-- 1 root root 193406 May 17 10:02 libmysqlclient.a -rwxr-xr-x 1 root root 715 May 17 10:02 libmysqlclient.la lrwxrwxrwx 1 root root 24 May 17 10:02 libmysqlclient.so -> libmysqlclient.so.10.0.0 lrwxrwxrwx 1 root root 24 May 17 10:02 libmysqlclient.so.10 -> libmysqlclient.so.10.0.0 -rwxr-xr-x 1 root root 141511 May 17 10:02 libmysqlclient.so.10.0.0 -rw-r--r-- 1 root root 31504 May 17 10:02 libmystrings.a -rw-r--r-- 1 root root 199954 May 17 10:02 libmysys.a -rw-r--r-- 1 root root 102232 May 17 10:02 libnisam.a Wäre schon wenn SuSE eine korrigierte version rauslassen könnte... :) Grüsse, Olivier Müller
On Thu, Aug 15, 2002 at 01:48:58AM +0200, Olivier M. wrote:
Ursache gefunden! :) -rw-r--r-- 1 root root 709 Mar 23 20:11 libmysqlclient.la lrwxrwxrwx 1 root root 23 Aug 14 18:25 libmysqlclient.so -> ../libmysqlclient.so.10 lrwxrwxrwx 1 root root 23 Aug 14 18:25 libmysqlclient.so.10 -> ../libmysqlclient.so.10 lrwxrwxrwx 1 root root 27 Aug 14 18:25 libmysqlclient.so.10.0.0 -> ../libmysqlclient.so.10.0.0 -rw-r--r-- 1 root root 214237 Mar 23 20:26 mysqld.sym
ooops, sorry... "../" habe ich übersehen... bitte meine letzten 2 posts ignorieren! libmysqlclient.so.10.0.0 ist doch da, aber aus mysql-shared. Mmm, um 2uhr morgens sollte ich eher schlafen als versuchen nicht existierende bugs zu finden :) PHP 4.2.2 würde ich aber immer noch gern kompilieren können... Olivier
On Thu, Aug 15, 2002 at 02:03:35AM +0200, Olivier M. wrote:
bugs zu finden :) PHP 4.2.2 würde ich aber immer noch gern kompilieren können...
ist nun *ENDLICH* gegangen, nach diese änderung: ltk2:/ # cd /usr/lib ltk2:/usr/lib # ln -s mysql/libmysqlclient.a . ltk2:/usr/lib # ln -s mysql/libmysqlclient.la . ltk2:/usr/lib # ln -s mysql/libmysqlclient.so . ltk2:/usr/lib # dir | grep mysql lrwxrwxrwx 1 root root 22 Aug 15 01:09 libmysqlclient.a -> mysql/libmysqlclient.a lrwxrwxrwx 1 root root 23 Aug 15 01:09 libmysqlclient.la -> mysql/libmysqlclient.la lrwxrwxrwx 1 root root 23 Aug 15 01:09 libmysqlclient.so -> mysql/libmysqlclient.so lrwxrwxrwx 1 root root 24 Aug 14 17:16 libmysqlclient.so.10 -> libmysqlclient.so.10.0.0 -rwxr-xr-x 1 root root 223010 Mar 23 20:26 libmysqlclient.so.10.0.0 drwxr-xr-x 2 root root 4096 Aug 14 18:25 mysql MfG, Olivier
"Olivier M."
Bugfix von Suse wäre gut... :)
Nicht nötig, der Bug in php 4.2.2 ist bekannt :)
conftest.c -lmysqlclient -lldap -llber -lgd -lttf -lpng -lz -lz -lcrypt -lresolv -lm -ldl -lnsl -lresolv -lcrypt 1>&5
Wenn du mal ein 'rpm -ql mysql-devel' machst, dann siehst du, dass die libmysqlclient in /usr/lib/mysql liegt, configure aber -L/usr/lib verwendet, weswegen libmysqlclient.so nicht gefunden wird. Der Fehler liegt also in php4 und nicht in unserem mysql-devel Paket. Ein php4 Paket für SuLi 8.0 gibt es nun mal nicht und für die kommende Version ist der Bug beseitigt worden. Versuch mal den folgenden Patch: ---------------------------- cut ------------------------ --- ext/mysql/config.m4 +++ ext/mysql/config.m4 @@ -8,13 +8,10 @@ sinclude(libmysql/mysql.m4) AC_DEFUN(MYSQL_LIB_CHK,[ - str="$MYSQL_DIR/$1/libmysqlclient.*" - for j in `echo $str`; do - if test -r $j; then - MYSQL_LIB_DIR=$MYSQL_DIR/$1 - break 2 - fi - done + if test -r "$MYSQL_DIR/$1/libmysqlclient.so"; then + MYSQL_LIB_DIR=$MYSQL_DIR/$1 + break + fi ]) AC_DEFUN(PHP_MYSQL_SOCK,[ @@ -79,7 +76,7 @@ MYSQL_MODULE_TYPE=external - for i in lib lib/mysql; do + for i in lib64 lib64/mysql lib lib/mysql; do MYSQL_LIB_CHK($i) done ---------------------- cut ------------------------- Die eleganteste Methode wäre ja, mysql_config aufzurufen, um alles nötige zu erfahren, aber der Aufwand war mir jetzt zu gross. Ach ja, und configure musst du '--with-mysql=/usr' übergeben. Philipp -- Philipp Thomas work: pthomas@suse.de Entwicklung, SuSE Linux AG private: philippt@t-online.de
Salut Philipp, On Thu, Aug 15, 2002 at 01:50:21AM +0200, Philipp Thomas wrote:
"Olivier M."
[20020814 21:08]: Bugfix von Suse wäre gut... :)
Nicht nötig, der Bug in php 4.2.2 ist bekannt :)
mmm, sicher ? :) php-4.2.2 + mysql "home-made" (ohne optionen) läuft aber perfekt... Das finde ich einfach komisch...: (mit mysql-devel) lrwxrwxrwx 1 root root 23 Aug 14 18:25 libmysqlclient.so -> ../libmysqlclient.so.10 lrwxrwxrwx 1 root root 23 Aug 14 18:25 libmysqlclient.so.10 -> ../libmysqlclient.so.10 lrwxrwxrwx 1 root root 27 Aug 14 18:25 libmysqlclient.so.10.0.0 -> ../libmysqlclient.so.10.0.0
conftest.c -lmysqlclient -lldap -llber -lgd -lttf -lpng -lz -lz -lcrypt -lresolv -lm -ldl -lnsl -lresolv -lcrypt 1>&5
Wenn du mal ein 'rpm -ql mysql-devel' machst, dann siehst du, dass die libmysqlclient in /usr/lib/mysql liegt, configure aber -L/usr/lib verwendet, weswegen libmysqlclient.so nicht gefunden wird. Der Fehler liegt also in php4 und nicht in unserem mysql-devel Paket. Ein php4 Paket für SuLi 8.0 gibt es nun mal nicht und für die kommende Version ist der Bug beseitigt worden.
interessant...
Versuch mal den folgenden Patch:
---------------------------- cut ------------------------ --- ext/mysql/config.m4 +++ ext/mysql/config.m4 ... ---------------------- cut -------------------------
ltk2:/usr/local/src/php-4.2.2 # patch -p0 < patch patching file ext/mysql/config.m4 Hunk #1 FAILED at 8. Hunk #2 FAILED at 76. 2 out of 2 hunks FAILED -- saving rejects to file ext/mysql/config.m4.rej
Die eleganteste Methode wäre ja, mysql_config aufzurufen, um alles nötige zu erfahren, aber der Aufwand war mir jetzt zu gross. Ach ja, und configure musst du '--with-mysql=/usr' übergeben.
danke für die bestätigung :) Grüsse, Olivier
"Olivier M."
ltk2:/usr/local/src/php-4.2.2 # patch -p0 < patch patching file ext/mysql/config.m4 Hunk #1 FAILED at 8. Hunk #2 FAILED at 76. 2 out of 2 hunks FAILED -- saving rejects to file ext/mysql/config.m4.rej
Versuchs mal mit 'patch -p0 -l < patch'. Wahrscheinlich mal wieder cut&paste Fehler.
Ach ja, und configure musst du '--with-mysql=/usr' übergeben. ^nach dem Patch
Philipp -- Philipp Thomas work: pthomas@suse.de Entwicklung, SuSE Linux AG private: philippt@t-online.de
participants (6)
-
David Haller
-
Michael Steffen
-
Olivier M.
-
Olivier M.
-
Philipp Thomas
-
Sebastian Wolfgarten