mod_auth_mysql für apache2.2.x kompilieren
Mal wieder: Wir brauchen mod_auth_mysql , haben den apache2.2.8 auf dem Server laufen, und kriegen diesen tollen Fehler:
# /server/service/www/apache2/bin/apxs -c -L/usr/lib/mysql -I/usr/include/mysql -lmysqlclient -lm -lz mod_auth_mysql.c
/server/service/www/apache2/build/libtool –silent –mode=compile gcc -prefer-pic -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -g -O2 -pthread -I/server/service/www/apache2/include -I/server/service/www/apache2/include -I/server/service/www/apache2/include -I/usr/include/mysql -c -o mod_auth_mysql.lo mod_auth_mysql.c && touch mod_auth_mysql.slo
mod_auth_mysql.c:591: error: expected expression before ‘mysql_auth_config_rec’
mod_auth_mysql.c:591: warning: cast to pointer from integer of different size
mod_auth_mysql.c:591: error: initializer element is not constant
mod_auth_mysql.c:591: error: (near initialization for ‘mysql_auth_cmds[0].cmd_data’)
mod_auth_mysql.c:595: error: expected expression before ‘mysql_auth_config_rec’
mod_auth_mysql.c:595: warning: cast to pointer from integer of different size
mod_auth_mysql.c:595: error: initializer element is not constant
mod_auth_mysql.c:595: error: (near initialization for ‘mysql_auth_cmds[1].cmd_data’)
mod_auth_mysql.c:599: error: expected expression before ‘mysql_auth_config_rec’
mod_auth_mysql.c:599: warning: cast to pointer from integer of different size
mod_auth_mysql.c:599: error: initializer element is not constant
mod_auth_mysql.c:599: error: (near initialization for ‘mysql_auth_cmds[2].cmd_data’)
mod_auth_mysql.c:603: error: expected expression before ‘mysql_auth_config_rec’
mod_auth_mysql.c:603: warning: cast to pointer from integer of different size
mod_auth_mysql.c:603: error: initializer element is not constant
mod_auth_mysql.c:603: error: (near initialization for ‘mysql_auth_cmds[3].cmd_data’)
mod_auth_mysql.c:607: error: expected expression before ‘mysql_auth_config_rec’
mod_auth_mysql.c:607: warning: cast to pointer from integer of different size
mod_auth_mysql.c:607: error: initializer element is not constant
mod_auth_mysql.c:607: error: (near initialization for ‘mysql_auth_cmds[4].cmd_data’)
mod_auth_mysql.c:611: error: expected expression before ‘mysql_auth_config_rec’
mod_auth_mysql.c:611: warning: cast to pointer from integer of different size
mod_auth_mysql.c:611: error: initializer element is not constant
mod_auth_mysql.c:611: error: (near initialization for ‘mysql_auth_cmds[5].cmd_data’)
mod_auth_mysql.c:615: error: expected expression before ‘mysql_auth_config_rec’
mod_auth_mysql.c:615: warning: cast to pointer from integer of different size
mod_auth_mysql.c:615: error: initializer element is not constant
mod_auth_mysql.c:615: error: (near initialization for ‘mysql_auth_cmds[6].cmd_data’)
mod_auth_mysql.c:619: error: expected expression before ‘mysql_auth_config_rec’
mod_auth_mysql.c:619: warning: cast to pointer from integer of different size
mod_auth_mysql.c:619: error: initializer element is not constant
mod_auth_mysql.c:619: error: (near initialization for ‘mysql_auth_cmds[7].cmd_data’)
mod_auth_mysql.c:623: error: expected expression before ‘mysql_auth_config_rec’
mod_auth_mysql.c:623: warning: cast to pointer from integer of different size
mod_auth_mysql.c:623: error: initializer element is not constant
mod_auth_mysql.c:623: error: (near initialization for ‘mysql_auth_cmds[8].cmd_data’)
mod_auth_mysql.c:627: error: expected expression before ‘mysql_auth_config_rec’
mod_auth_mysql.c:627: warning: cast to pointer from integer of different size
mod_auth_mysql.c:627: error: initializer element is not constant
mod_auth_mysql.c:627: error: (near initialization for ‘mysql_auth_cmds[9].cmd_data’)
mod_auth_mysql.c:631: error: expected expression before ‘mysql_auth_config_rec’
mod_auth_mysql.c:631: warning: cast to pointer from integer of different size
mod_auth_mysql.c:631: error: initializer element is not constant
mod_auth_mysql.c:631: error: (near initialization for ‘mysql_auth_cmds[10].cmd_data’)
mod_auth_mysql.c:635: error: expected expression before ‘mysql_auth_config_rec’
mod_auth_mysql.c:635: warning: cast to pointer from integer of different size
mod_auth_mysql.c:635: error: initializer element is not constant
mod_auth_mysql.c:635: error: (near initialization for ‘mysql_auth_cmds[11].cmd_data’)
mod_auth_mysql.c:639: error: expected expression before ‘mysql_auth_config_rec’
mod_auth_mysql.c:639: warning: cast to pointer from integer of different size
mod_auth_mysql.c:639: error: initializer element is not constant
mod_auth_mysql.c:639: error: (near initialization for ‘mysql_auth_cmds[12].cmd_data’)
mod_auth_mysql.c:643: error: expected expression before ‘mysql_auth_config_rec’
mod_auth_mysql.c:643: warning: cast to pointer from integer of different size
mod_auth_mysql.c:643: error: initializer element is not constant
mod_auth_mysql.c:643: error: (near initialization for ‘mysql_auth_cmds[13].cmd_data’)
mod_auth_mysql.c:651: error: expected expression before ‘mysql_auth_config_rec’
mod_auth_mysql.c:651: warning: cast to pointer from integer of different size
mod_auth_mysql.c:651: error: initializer element is not constant
mod_auth_mysql.c:651: error: (near initialization for ‘mysql_auth_cmds[14].cmd_data’)
mod_auth_mysql.c:655: error: expected expression before ‘mysql_auth_config_rec’
mod_auth_mysql.c:655: warning: cast to pointer from integer of different size
mod_auth_mysql.c:655: error: initializer element is not constant
mod_auth_mysql.c:655: error: (near initialization for ‘mysql_auth_cmds[15].cmd_data’)
mod_auth_mysql.c:659: error: expected expression before ‘mysql_auth_config_rec’
mod_auth_mysql.c:659: warning: cast to pointer from integer of different size
mod_auth_mysql.c:659: error: initializer element is not constant
mod_auth_mysql.c:659: error: (near initialization for ‘mysql_auth_cmds[16].cmd_data’)
mod_auth_mysql.c:663: error: expected expression before ‘mysql_auth_config_rec’
mod_auth_mysql.c:663: warning: cast to pointer from integer of different size
mod_auth_mysql.c:663: error: initializer element is not constant
mod_auth_mysql.c:663: error: (near initialization for ‘mysql_auth_cmds[17].cmd_data’)
mod_auth_mysql.c:667: error: expected expression before ‘mysql_auth_config_rec’
mod_auth_mysql.c:667: warning: cast to pointer from integer of different size
mod_auth_mysql.c:667: error: initializer element is not constant
mod_auth_mysql.c:667: error: (near initialization for ‘mysql_auth_cmds[18].cmd_data’)
mod_auth_mysql.c:671: error: expected expression before ‘mysql_auth_config_rec’
mod_auth_mysql.c:671: warning: cast to pointer from integer of different size
mod_auth_mysql.c:671: error: initializer element is not constant
mod_auth_mysql.c:671: error: (near initialization for ‘mysql_auth_cmds[19].cmd_data’)
mod_auth_mysql.c: In function ‘format_request’:
mod_auth_mysql.c:947: warning: pointer/integer type mismatch in conditional expression
apxs:Error: Command failed with rc=65536
Woran liegt’s? Zunächst: Keine Ahnung.
Irgendwann findet man aber raus, das man diesen Patch anwenden muss. Dann geht’s problemlos.
Das geht wie folgt:
- Am besten das mod_auth_mysql – Quellenverzeichnis nochmal löschen und das TAR neu entpacken.
- Wechsel in das Quellenverzeichnis mod_auth_mysql-3.0.0.
- Ausführen von “patch < ../mod_auth_mysql-3.0.0-apache-2.2.patch” (ich gehe davon aus, das der Patch ein Verzeichnis höher liegt; sonst bitte entsprechend anpassen).
Das sollte es gewesen sein. Als Resultat bekommt man:
patching file mod_auth_mysql.c
Anschließend sollte sich das Modul wie beschrieben per apxs kompilieren lassen.
Danke schön für Ihr patch : mein Problem ist gelöst !
Halleluja, nach stundenlangem Suchen auf dein Blog gestoßen und der Patch funktioniert 1a. DANKE für den Hinweis!
Vielen Dank, Herr Fox! Eine sehr ausgezeichnete Patch!
Excelent patch.
Very Thanks
[...] thought that no patch or solution is available to fix the problem. But luckily I was wrong, in this blog entry a patch is supplied so that the module was successful compiled under my linux installation. The [...]
Thank you, thank you, thank you!