I'm trying to build a patch to mod_auth_cas to allow regular expression 
matching in Apache Require directives. The code works, but I can't get the 
tests to compile. When I run "make check" I get errors that there's undefined 
references to ap_regcomp and ap_regexec. Could anyone let me know where I've 
gone wrong and point me in the right direction? This is a 64-bit RHEL6 system.

[jgoguen@fortran:~/mod_auth_cas]$ ./configure --prefix=/usr 
--with-apxs=/usr/sbin/apxs --with-check
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for library containing strerror... none required
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking whether gcc and cc understand -c and -o together... yes
checking whether C compiler accepts -Wall... yes
checking whether C compiler accepts -Wextra... yes
checking whether C compiler accepts -Wdeclaration-after-statement... yes
checking whether C compiler accepts -Wformat... yes
checking whether C compiler accepts -Wformat-security... yes
checking whether C compiler accepts -Wmissing-declarations... yes
checking whether C compiler accepts -Wno-unused-parameter... yes
checking whether C compiler accepts -Wpointer-arith... yes
checking whether C compiler accepts -Wstrict-prototypes... yes
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1966080
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-unknown-linux-gnu file names to 
x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain 
format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for mt... no
checking if : is a manifest tool... no
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared 
libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for shl_load... no
checking for shl_load in -ldld... no
checking for dlopen... no
checking for dlopen in -ldl... yes
checking whether a program can dlopen itself... yes
checking whether a statically linked program can dlopen itself... yes
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for Apache apxs... /usr/sbin/apxs
checking for apxs... /usr/sbin/apxs
configure: apxs found at /usr/sbin/apxs
checking for Apache apr... /usr/bin/apr-1-config
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for CHECK... yes
checking for --with-openssl... no
checking for CRYPTO_new_ex_data in -lcrypto... yes
checking for SSL_library_init in -lssl... yes
checking openssl/crypto.h usability... yes
checking openssl/crypto.h presence... yes
checking for openssl/crypto.h... yes
checking openssl/x509.h usability... yes
checking openssl/x509.h presence... yes
checking for openssl/x509.h... yes
checking openssl/pem.h usability... yes
checking openssl/pem.h presence... yes
checking for openssl/pem.h... yes
checking openssl/ssl.h usability... yes
checking openssl/ssl.h presence... yes
checking for openssl/ssl.h... yes
checking openssl/err.h usability... yes
checking openssl/err.h presence... yes
checking for openssl/err.h... yes
checking for gawk... (cached) gawk
checking for curl-config... /usr/bin/curl-config
checking for the version of libcurl... 7.19.7
checking whether libcurl is usable... yes
checking for curl_free... yes
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking stddef.h usability... yes
checking stddef.h presence... yes
checking for stddef.h... yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking for unistd.h... (cached) yes
checking for size_t... yes
checking for gethostbyname... yes
checking for memset... yes
checking for socket... yes
checking for strcasecmp... yes
checking for strchr... yes
checking for strncasecmp... yes
checking for strstr... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating tests/Makefile
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands
[jgoguen@fortran:~/mod_auth_cas]$ make
make  all-recursive
make[1]: Entering directory `/home/jgoguen/mod_auth_cas'
Making all in src
make[2]: Entering directory `/home/jgoguen/mod_auth_cas/src'
/usr/sbin/apxs -c -lssl -lcrypto  -Wc," -D_LARGEFILE64_SOURCE -g -O2 -Wall 
-Wextra -Wdeclaration-after-statement -Wformat -Wformat-security 
-Wmissing-declarations -Wno-unused-parameter -Wpointer-arith 
-Wstrict-prototypes -fprofile-arcs -ftest-coverage " -Wl,"  -lcurl   -lssl 
-lcrypto " mod_auth_cas.c cas_saml_attr.c
/usr/lib64/apr-1/build/libtool --silent --mode=compile gcc -prefer-pic -O2 -g 
-pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector 
--param=ssp-buffer-size=4 -m64 -mtune=generic -Wformat-security 
-fno-strict-aliasing  -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -pthread 
-I/usr/include/httpd  -I/usr/include/apr-1   -I/usr/include/apr-1   
-D_LARGEFILE64_SOURCE -g -O2 -Wall -Wextra -Wdeclaration-after-statement 
-Wformat -Wformat-security -Wmissing-declarations -Wno-unused-parameter 
-Wpointer-arith -Wstrict-prototypes -fprofile-arcs -ftest-coverage   -c -o 
mod_auth_cas.lo mod_auth_cas.c && touch mod_auth_cas.slo
/usr/lib64/apr-1/build/libtool --silent --mode=compile gcc -prefer-pic -O2 -g 
-pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector 
--param=ssp-buffer-size=4 -m64 -mtune=generic -Wformat-security 
-fno-strict-aliasing  -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -pthread 
-I/usr/include/httpd  -I/usr/include/apr-1   -I/usr/include/apr-1   
-D_LARGEFILE64_SOURCE -g -O2 -Wall -Wextra -Wdeclaration-after-statement 
-Wformat -Wformat-security -Wmissing-declarations -Wno-unused-parameter 
-Wpointer-arith -Wstrict-prototypes -fprofile-arcs -ftest-coverage   -c -o 
cas_saml_attr.lo cas_saml_attr.c && touch cas_saml_attr.slo
/usr/lib64/apr-1/build/libtool --silent --mode=link gcc -o mod_auth_cas.la   
-lcurl   -lssl -lcrypto   -lssl -lcrypto -rpath /usr/lib64/httpd/modules 
-module -avoid-version    cas_saml_attr.lo mod_auth_cas.lo
make[2]: Leaving directory `/home/jgoguen/mod_auth_cas/src'
Making all in tests
make[2]: Entering directory `/home/jgoguen/mod_auth_cas/tests'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/jgoguen/mod_auth_cas/tests'
make[2]: Entering directory `/home/jgoguen/mod_auth_cas'
make[2]: Leaving directory `/home/jgoguen/mod_auth_cas'
make[1]: Leaving directory `/home/jgoguen/mod_auth_cas'
[jgoguen@fortran:~/mod_auth_cas]$ make check
Making check in src
make[1]: Entering directory `/home/jgoguen/mod_auth_cas/src'
make[1]: Nothing to be done for `check'.
make[1]: Leaving directory `/home/jgoguen/mod_auth_cas/src'
Making check in tests
make[1]: Entering directory `/home/jgoguen/mod_auth_cas/tests'
make  check_mac
make[2]: Entering directory `/home/jgoguen/mod_auth_cas/tests'
gcc -DHAVE_CONFIG_H -I. -I..  -D_LARGEFILE64_SOURCE -O2 -g -pipe -Wall 
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector 
--param=ssp-buffer-size=4 -m64 -mtune=generic -Wformat-security 
-fno-strict-aliasing -I/usr/include/httpd  -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE 
 -I/usr/include/apr-1 -I/usr/include/httpd  -fprofile-arcs -ftest-coverage  -g 
-O2 -Wall -Wextra -Wdeclaration-after-statement -Wformat -Wformat-security 
-Wmissing-declarations -Wno-unused-parameter -Wpointer-arith 
-Wstrict-prototypes -MT check_mac-ap_stubs.o -MD -MP -MF 
.deps/check_mac-ap_stubs.Tpo -c -o check_mac-ap_stubs.o `test -f 'ap_stubs.c' 
|| echo './'`ap_stubs.c
ap_stubs.c:211: warning: no previous declaration for ‘ap_note_auth_failure’
mv -f .deps/check_mac-ap_stubs.Tpo .deps/check_mac-ap_stubs.Po
gcc -DHAVE_CONFIG_H -I. -I..  -D_LARGEFILE64_SOURCE -O2 -g -pipe -Wall 
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector 
--param=ssp-buffer-size=4 -m64 -mtune=generic -Wformat-security 
-fno-strict-aliasing -I/usr/include/httpd  -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE 
 -I/usr/include/apr-1 -I/usr/include/httpd  -fprofile-arcs -ftest-coverage  -g 
-O2 -Wall -Wextra -Wdeclaration-after-statement -Wformat -Wformat-security 
-Wmissing-declarations -Wno-unused-parameter -Wpointer-arith 
-Wstrict-prototypes -MT check_mac-curl_stubs.o -MD -MP -MF 
.deps/check_mac-curl_stubs.Tpo -c -o check_mac-curl_stubs.o `test -f 
'curl_stubs.c' || echo './'`curl_stubs.c
mv -f .deps/check_mac-curl_stubs.Tpo .deps/check_mac-curl_stubs.Po
gcc -DHAVE_CONFIG_H -I. -I..  -D_LARGEFILE64_SOURCE -O2 -g -pipe -Wall 
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector 
--param=ssp-buffer-size=4 -m64 -mtune=generic -Wformat-security 
-fno-strict-aliasing -I/usr/include/httpd  -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE 
 -I/usr/include/apr-1 -I/usr/include/httpd  -fprofile-arcs -ftest-coverage  -g 
-O2 -Wall -Wextra -Wdeclaration-after-statement -Wformat -Wformat-security 
-Wmissing-declarations -Wno-unused-parameter -Wpointer-arith 
-Wstrict-prototypes -MT check_mac-openssl_stubs.o -MD -MP -MF 
.deps/check_mac-openssl_stubs.Tpo -c -o check_mac-openssl_stubs.o `test -f 
'openssl_stubs.c' || echo './'`openssl_stubs.c
mv -f .deps/check_mac-openssl_stubs.Tpo .deps/check_mac-openssl_stubs.Po
gcc -DHAVE_CONFIG_H -I. -I..  -D_LARGEFILE64_SOURCE -O2 -g -pipe -Wall 
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector 
--param=ssp-buffer-size=4 -m64 -mtune=generic -Wformat-security 
-fno-strict-aliasing -I/usr/include/httpd  -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE 
 -I/usr/include/apr-1 -I/usr/include/httpd  -fprofile-arcs -ftest-coverage  -g 
-O2 -Wall -Wextra -Wdeclaration-after-statement -Wformat -Wformat-security 
-Wmissing-declarations -Wno-unused-parameter -Wpointer-arith 
-Wstrict-prototypes -MT check_mac-mod_auth_cas.o -MD -MP -MF 
.deps/check_mac-mod_auth_cas.Tpo -c -o check_mac-mod_auth_cas.o `test -f 
'../src/mod_auth_cas.c' || echo './'`../src/mod_auth_cas.c
mv -f .deps/check_mac-mod_auth_cas.Tpo .deps/check_mac-mod_auth_cas.Po
gcc -DHAVE_CONFIG_H -I. -I..  -D_LARGEFILE64_SOURCE -O2 -g -pipe -Wall 
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector 
--param=ssp-buffer-size=4 -m64 -mtune=generic -Wformat-security 
-fno-strict-aliasing -I/usr/include/httpd  -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE 
 -I/usr/include/apr-1 -I/usr/include/httpd  -fprofile-arcs -ftest-coverage  -g 
-O2 -Wall -Wextra -Wdeclaration-after-statement -Wformat -Wformat-security 
-Wmissing-declarations -Wno-unused-parameter -Wpointer-arith 
-Wstrict-prototypes -MT check_mac-mod_auth_cas_test.o -MD -MP -MF 
.deps/check_mac-mod_auth_cas_test.Tpo -c -o check_mac-mod_auth_cas_test.o `test 
-f 'mod_auth_cas_test.c' || echo './'`mod_auth_cas_test.c
mv -f .deps/check_mac-mod_auth_cas_test.Tpo .deps/check_mac-mod_auth_cas_test.Po
gcc -DHAVE_CONFIG_H -I. -I..  -D_LARGEFILE64_SOURCE -O2 -g -pipe -Wall 
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector 
--param=ssp-buffer-size=4 -m64 -mtune=generic -Wformat-security 
-fno-strict-aliasing -I/usr/include/httpd  -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE 
 -I/usr/include/apr-1 -I/usr/include/httpd  -fprofile-arcs -ftest-coverage  -g 
-O2 -Wall -Wextra -Wdeclaration-after-statement -Wformat -Wformat-security 
-Wmissing-declarations -Wno-unused-parameter -Wpointer-arith 
-Wstrict-prototypes -MT check_mac-cas_saml_attr.o -MD -MP -MF 
.deps/check_mac-cas_saml_attr.Tpo -c -o check_mac-cas_saml_attr.o `test -f 
'../src/cas_saml_attr.c' || echo './'`../src/cas_saml_attr.c
mv -f .deps/check_mac-cas_saml_attr.Tpo .deps/check_mac-cas_saml_attr.Po
gcc -DHAVE_CONFIG_H -I. -I..  -D_LARGEFILE64_SOURCE -O2 -g -pipe -Wall 
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector 
--param=ssp-buffer-size=4 -m64 -mtune=generic -Wformat-security 
-fno-strict-aliasing -I/usr/include/httpd  -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE 
 -I/usr/include/apr-1 -I/usr/include/httpd  -fprofile-arcs -ftest-coverage  -g 
-O2 -Wall -Wextra -Wdeclaration-after-statement -Wformat -Wformat-security 
-Wmissing-declarations -Wno-unused-parameter -Wpointer-arith 
-Wstrict-prototypes -MT check_mac-cas_saml_attr_test.o -MD -MP -MF 
.deps/check_mac-cas_saml_attr_test.Tpo -c -o check_mac-cas_saml_attr_test.o 
`test -f 'cas_saml_attr_test.c' || echo './'`cas_saml_attr_test.c
mv -f .deps/check_mac-cas_saml_attr_test.Tpo 
.deps/check_mac-cas_saml_attr_test.Po
/bin/sh ../libtool  --tag=CC   --mode=link gcc -fprofile-arcs -ftest-coverage  
-g -O2 -Wall -Wextra -Wdeclaration-after-statement -Wformat -Wformat-security 
-Wmissing-declarations -Wno-unused-parameter -Wpointer-arith 
-Wstrict-prototypes /usr/lib64/libapr-1.la  -lpthread  -o check_mac 
check_mac-ap_stubs.o check_mac-curl_stubs.o check_mac-openssl_stubs.o 
check_mac-mod_auth_cas.o check_mac-mod_auth_cas_test.o 
check_mac-cas_saml_attr.o check_mac-cas_saml_attr_test.o -lcheck -lapr-1 
-laprutil-1 -lssl -lcrypto
libtool: link: gcc -fprofile-arcs -ftest-coverage -g -O2 -Wall -Wextra 
-Wdeclaration-after-statement -Wformat -Wformat-security -Wmissing-declarations 
-Wno-unused-parameter -Wpointer-arith -Wstrict-prototypes -o check_mac 
check_mac-ap_stubs.o check_mac-curl_stubs.o check_mac-openssl_stubs.o 
check_mac-mod_auth_cas.o check_mac-mod_auth_cas_test.o 
check_mac-cas_saml_attr.o check_mac-cas_saml_attr_test.o  -lpthread -lcheck 
/usr/lib64/libapr-1.so /usr/lib64/libaprutil-1.so -lssl -lcrypto -pthread 
-Wl,-rpath -Wl,/usr/lib64 -Wl,-rpath -Wl,/usr/lib64
check_mac-mod_auth_cas.o: In function `cas_match_attribute':
/home/jgoguen/mod_auth_cas/tests/../src/mod_auth_cas.c:2189: undefined 
reference to `ap_regcomp'
/home/jgoguen/mod_auth_cas/tests/../src/mod_auth_cas.c:2201: undefined 
reference to `ap_regexec'
/home/jgoguen/mod_auth_cas/tests/../src/mod_auth_cas.c:2202: undefined 
reference to `ap_regfree'
/home/jgoguen/mod_auth_cas/tests/../src/mod_auth_cas.c:2207: undefined 
reference to `ap_regfree'
collect2: ld returned 1 exit status
make[2]: *** [check_mac] Error 1
make[2]: Leaving directory `/home/jgoguen/mod_auth_cas/tests'
make[1]: *** [check-am] Error 2
make[1]: Leaving directory `/home/jgoguen/mod_auth_cas/tests'
make: *** [check-recursive] Error 1

--
Joel Goguen
Developer / System Administrator
Enterprise Solutions
Information Technology Services
University of New Brunswick
E-mail: [email protected]<mailto:[email protected]>
Phone: (506) 453-4872
Fax: (506) 453-3590


-- 
You are currently subscribed to [email protected] as: 
[email protected]
To unsubscribe, change settings or access archives, see 
http://www.ja-sig.org/wiki/display/JSG/cas-dev

Reply via email to