Hi
This is a first time i try to build kerberos and mod_auth_krb from the source.
Using RH Linux platform 5.4 (the only unused server we had).
The server already had apache 2.2 / rpm krb5. 1.6.
Now I had apache 2.4.12 setup from source. The binaries located in /usr/local/apache2.4.12.
I also built and succesfully compiled latest krb5 1.16 located /usr/local .
By following the INSTALL guide, i used below steps to setup mod_auth_kerb-5.4
[root@demo mod_auth_kerb-5.4] ./configure --without-krb4 --with-krb5=/usr/local --with-apache=/usr/local/apache2.4.12
Configure look fine no errors
[root@demo mod_auth_kerb-5.4]# make
./apxs.sh "-I. -Ispnegokrb5 -I/usr/local/include " "-L/usr/local/lib -Wl,--enable-new-dtags -Wl,-rpath -Wl,/usr/local/lib -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lresolv" "" "/usr/local/apache2.4.12/bin/apxs" "-c" "src/mod_auth_kerb.c"
/usr/local/apache2.4.12/build/libtool --silent --mode=compile gcc -std=gnu99 -prefer-pic -DLINUX -D_REENTRANT -D_GNU_SOURCE -g -O2 -pthread -I/usr/local/apache2.4.12/include -I/usr/local/apache2.4.12/include -I/usr/local/apache2.4.12/include -I/usr/bin/include -I. -Ispnegokrb5 -I/usr/local/include -c -o src/mod_auth_kerb.lo src/mod_auth_kerb.c && touch src/mod_auth_kerb.slo
src/mod_auth_kerb.c: In function 'log_rerror':
src/mod_auth_kerb.c:363: error: request for member 'log' in something not a structure or union
:
:
src/mod_auth_kerb.c: In function 'have_rcache_type':
src/mod_auth_kerb.c:1737: warning: implicit declaration of function 'krb5_rc_resolve_full'
src/mod_auth_kerb.c:1741: warning: implicit declaration of function 'krb5_rc_destroy'
apxs:Error: Command failed with rc=65536
.
make: *** [src/mod_auth_kerb.so] Error 1
By referring to config.log , the error start at this line:-
configure:2841: checking how to run the C preprocessor
configure:2881: gcc -E conftest.c
configure:2888: $? = 0
configure:2919: gcc -E conftest.c
conftest.c:8:28: error: ac_nonexistent.h: No such file or directory
configure:2926: $? = 1
configure: failed program was:
| / confdefs.h. /
| #define PACKAGE_NAME "mod_auth_kerb"
| #define PACKAGE_TARNAME "mod_auth_kerb"
| #define PACKAGE_VERSION "5.4"
| #define PACKAGE_STRING "mod_auth_kerb 5.4"
| #define PACKAGE_BUGREPORT "modauthkerb-developers@lists.sourceforge.net"
| / end confdefs.h. /
| #include <ac_nonexistent.h>
configure:2959: result: gcc -E
configure:2988: gcc -E conftest.c
configure:2995: $? = 0
configure:3026: gcc -E conftest.c
conftest.c:8:28: error: ac_nonexistent.h: No such file or directory
configure:3033: $? = 1
configure: failed program was:
Need an expert advise if something that I had wrongly did.
Hello,
I guess the package isn't maintained anymore. I've the same problems compiling mod_auth_kerb inside a Alpine Docker image. The Alpine projects seem to maintain the package by their own and you can find the patches here: https://git.alpinelinux.org/aports/tree/main/apache-mod-auth-kerb?id=ae380974c20d60217bedada8747089dbc1409609
Maybe you can find the same files for Debian/Ubuntu too.
Problem is that macro APLOG_MARK in apache < 2.3.9 expands to two values: file and line.
But in newer versions it expands to three values: file, line and module index.
To solve this problem change signature of mod_auth_kerb.c:log_rerror() to:
And change call of ap_log_rerror() to:
Last edit: Adrian Wijas 2023-04-05