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:

  1. Am besten das mod_auth_mysql – Quellenverzeichnis nochmal löschen und das TAR neu entpacken.
  2. Wechsel in das Quellenverzeichnis mod_auth_mysql-3.0.0.
  3. 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.


9 Comments

  1. Scorpjc Juli 2, 2008 11:05 am  Antworten

    Danke schön für Ihr patch : mein Problem ist gelöst !

  2. MrChick Juli 27, 2008 2:06 pm  Antworten

    Halleluja, nach stundenlangem Suchen auf dein Blog gestoßen und der Patch funktioniert 1a. DANKE für den Hinweis!

  3. Jimd1981 August 11, 2008 2:19 pm  Antworten

    Vielen Dank, Herr Fox! Eine sehr ausgezeichnete Patch!

  4. Huskynarr Juli 26, 2012 2:20 pm  Antworten

    Schon das 3. mal diesen Monat, das ich auf deine Seite stoße und das sie mir gleich hilft. 🙂
    Ein großes Danke schön an dich. 🙂

    • ww Juli 26, 2012 3:22 pm  Antworten

      Dafür betreibe ich das Blog! 🙂
      Schön das es Dir geholfen hat!

Leave a comment

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.