I'm trying to build mod_cplusplus on a RH9 system, but one with a fresh copy of apache2 installed in /usr/local/apache2 , and encountering problems at the make step. I have used --with-httpd=/usr/local/apache2 but to no avail. The errors look like:
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 ANSI C... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for a sed that does not truncate output... /bin/sed
checking for egrep... grep -E
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognise dependent libraries... pass_all
checking how to run the C preprocessor... gcc -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 dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking how to run the C++ preprocessor... g++ -E
checking for g77... g77
checking whether we are using the GNU Fortran 77 compiler... yes
checking whether g77 accepts -g... yes
checking the maximum length of command line arguments... 32768
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if gcc static flag works... yes
checking if gcc supports -fno-rtti -fno-exceptions... yes
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc supports -c -o file.o... yes
checking whether the gcc linker (/usr/bin/ld) 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 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
configure: creating libtool
appending configuration tag "CXX" to libtool
checking for ld used by g++... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC
checking if g++ PIC flag -fPIC works... yes
checking if g++ supports -c -o file.o... yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
appending configuration tag "F77" to libtool
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for g77 option to produce PIC... -fPIC
checking if g77 PIC flag -fPIC works... yes
checking if g77 supports -c -o file.o... yes
checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking what the shared library extension is... so
checking for httpd... checking for standard packaging... found /usr/local/apache2/include/httpd.h
checking for apr.h... found /usr/local/apache2
checking for __gxx_personality_v0 in -lstdc++... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating example/Makefile
config.status: creating example/handler/Makefile
config.status: creating example/input_filter/Makefile
config.status: creating example/output_filter/Makefile
config.status: creating example/protocol/Makefile
config.status: creating test/Makefile
config.status: creating test/t/conf/extra.conf
config.status: creating docs/Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
[root@lilah mod_cplusplus]# make
make all-recursive
make[1]: Entering directory `/usr/local/src/mod_cplusplus'
Making all in src
make[2]: Entering directory `/usr/local/src/mod_cplusplus/src'
if /bin/sh ../libtool --mode=compile --tag=CXX g++ -DHAVE_CONFIG_H -I. -I. -I.. -DAP_HAVE_DESIGNATED_INITIALIZER -I/usr/local/apache2/include -g -I/usr/local/src/mod_cplusplus/include -g -O2 -MT apache_handler.lo -MD -MP -MF ".deps/apache_handler.Tpo" -c -o apache_handler.lo apache_handler.cpp; \
then mv -f ".deps/apache_handler.Tpo" ".deps/apache_handler.Plo"; else rm -f ".deps/apache_handler.Tpo"; exit 1; fi
g++ -DHAVE_CONFIG_H -I. -I. -I.. -DAP_HAVE_DESIGNATED_INITIALIZER -I/usr/local/apache2/include -g -I/usr/local/src/mod_cplusplus/include -g -O2 -MT apache_handler.lo -MD -MP -MF .deps/apache_handler.Tpo -c apache_handler.cpp -fPIC -DPIC -o .libs/apache_handler.o
apache_handler.cpp: In function `apr_status_t delete_input_filter(void*)':
apache_handler.cpp:105: `filter' has incomplete type
/usr/local/src/mod_cplusplus/include/apache_handler.h:17: forward declaration
of `struct ApacheInputFilter'
apache_handler.cpp: In function `apr_status_t delete_output_filter(void*)':
apache_handler.cpp:111: `filter' has incomplete type
/usr/local/src/mod_cplusplus/include/apache_handler.h:18: forward declaration
of `struct ApacheOutputFilter'
make[2]: *** [apache_handler.lo] Error 1
make[2]: Leaving directory `/usr/local/src/mod_cplusplus/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/src/mod_cplusplus'
make: *** [all] Error 2
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Can you tell me which version of mod_cplusplus you pulled down? Some compilers (e.g. RH9-x86) were being a little more anal than others about forward declarations. Once I know which version it should be an easy fix (which I believe is at least applied in cvs). If thats the case, I'll release a new version with that fix included.
Thanks -
John
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yes, this made things better :) THANKS!
make install is getting a little confused about here the httpd.lives, so i'll add the LoadModule command manually for now. I'll see about getting a new copy from cvs so I can test that later today.
regards!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
it appears that the install: target in the makefile greps one file and then echos to a different file. in this case, greps /home/www/apache-2.0/conf/http.conf (which doesnt exist on my box) and then conditionally echos to /usr/www/conf/httpd.conf (which does exist) ..
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm trying to build mod_cplusplus on a RH9 system, but one with a fresh copy of apache2 installed in /usr/local/apache2 , and encountering problems at the make step. I have used --with-httpd=/usr/local/apache2 but to no avail. The errors look like:
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 ANSI C... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for a sed that does not truncate output... /bin/sed
checking for egrep... grep -E
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognise dependent libraries... pass_all
checking how to run the C preprocessor... gcc -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 dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking how to run the C++ preprocessor... g++ -E
checking for g77... g77
checking whether we are using the GNU Fortran 77 compiler... yes
checking whether g77 accepts -g... yes
checking the maximum length of command line arguments... 32768
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if gcc static flag works... yes
checking if gcc supports -fno-rtti -fno-exceptions... yes
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc supports -c -o file.o... yes
checking whether the gcc linker (/usr/bin/ld) 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 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
configure: creating libtool
appending configuration tag "CXX" to libtool
checking for ld used by g++... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC
checking if g++ PIC flag -fPIC works... yes
checking if g++ supports -c -o file.o... yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
appending configuration tag "F77" to libtool
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for g77 option to produce PIC... -fPIC
checking if g77 PIC flag -fPIC works... yes
checking if g77 supports -c -o file.o... yes
checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking what the shared library extension is... so
checking for httpd... checking for standard packaging... found /usr/local/apache2/include/httpd.h
checking for apr.h... found /usr/local/apache2
checking for __gxx_personality_v0 in -lstdc++... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating example/Makefile
config.status: creating example/handler/Makefile
config.status: creating example/input_filter/Makefile
config.status: creating example/output_filter/Makefile
config.status: creating example/protocol/Makefile
config.status: creating test/Makefile
config.status: creating test/t/conf/extra.conf
config.status: creating docs/Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
[root@lilah mod_cplusplus]# make
make all-recursive
make[1]: Entering directory `/usr/local/src/mod_cplusplus'
Making all in src
make[2]: Entering directory `/usr/local/src/mod_cplusplus/src'
if /bin/sh ../libtool --mode=compile --tag=CXX g++ -DHAVE_CONFIG_H -I. -I. -I.. -DAP_HAVE_DESIGNATED_INITIALIZER -I/usr/local/apache2/include -g -I/usr/local/src/mod_cplusplus/include -g -O2 -MT apache_handler.lo -MD -MP -MF ".deps/apache_handler.Tpo" -c -o apache_handler.lo apache_handler.cpp; \ then mv -f ".deps/apache_handler.Tpo" ".deps/apache_handler.Plo"; else rm -f ".deps/apache_handler.Tpo"; exit 1; fi
g++ -DHAVE_CONFIG_H -I. -I. -I.. -DAP_HAVE_DESIGNATED_INITIALIZER -I/usr/local/apache2/include -g -I/usr/local/src/mod_cplusplus/include -g -O2 -MT apache_handler.lo -MD -MP -MF .deps/apache_handler.Tpo -c apache_handler.cpp -fPIC -DPIC -o .libs/apache_handler.o
apache_handler.cpp: In function `apr_status_t delete_input_filter(void*)':
apache_handler.cpp:105: `filter' has incomplete type
/usr/local/src/mod_cplusplus/include/apache_handler.h:17: forward declaration
of `struct ApacheInputFilter'
apache_handler.cpp: In function `apr_status_t delete_output_filter(void*)':
apache_handler.cpp:111: `filter' has incomplete type
/usr/local/src/mod_cplusplus/include/apache_handler.h:18: forward declaration
of `struct ApacheOutputFilter'
make[2]: *** [apache_handler.lo] Error 1
make[2]: Leaving directory `/usr/local/src/mod_cplusplus/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/src/mod_cplusplus'
make: *** [all] Error 2
Hi -
Can you tell me which version of mod_cplusplus you pulled down? Some compilers (e.g. RH9-x86) were being a little more anal than others about forward declarations. Once I know which version it should be an easy fix (which I believe is at least applied in cvs). If thats the case, I'll release a new version with that fix included.
Thanks -
John
yup -
this is fixed in cvs, but not in the latest release. I'll bundle a new release later today with the fix. In the mean time, I think adding
#include "apache_filters.h"
to src/apache_handler.cpp will fix it temporarily.
Yes, this made things better :) THANKS!
make install is getting a little confused about here the httpd.lives, so i'll add the LoadModule command manually for now. I'll see about getting a new copy from cvs so I can test that later today.
regards!
Hmm,
I haven't tried make install in a while - I'll take a peak at that tonight. Expect a new tarball rolled tonight with these things fixed.
it appears that the install: target in the makefile greps one file and then echos to a different file. in this case, greps /home/www/apache-2.0/conf/http.conf (which doesnt exist on my box) and then conditionally echos to /usr/www/conf/httpd.conf (which does exist) ..
Eek. Good catch. I'll queue it up to be fixed. Thanks!