id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc 3083,configure: geos_c not found because C is used instead of C++,fgenolini,chaitanya,"GEOS fails to be enabled in gdal configure because geos_c test compiled with C instead of C++ compiler Linux hostname 2.6.28-13-generic #45-Ubuntu SMP Tue Jun 30 19:49:51 UTC 2009 i686 GNU/Linux Ubuntu 9.04 gdal obtained from SVN trunk on Tuesday 28th July 2009 VERSION 1.7.0 Running configure with the following parameters: ./configure --verbose --prefix=/usr/local --with-swig --with-python --with-geos=yes --with-threads --with-perl issue (config.log output): {{{ configure:27063: checking for GEOSversion in -lgeos_c configure:27099: gcc -o conftest -I/usr/local/include conftest.c -lgeos_c -L/usr/local/lib -lgeos_c >&5 /usr/local/lib/libgeos_c.so: undefined reference to `std::basic_ostream >& std::__ostream_insert >(std::basic_ostream >&, char const*, int)@GLIBCXX_3.4.9' /usr/local/lib/libgeos-3.1.1.so: undefined reference to `std::basic_ostream >& std::basic_ostream >::_M_insert(long double)@GLIBCXX_3.4.9' /usr/local/lib/libgeos-3.1.1.so: undefined reference to `std::basic_ostream >& std::basic_ostream >::_M_insert(void const*)@GLIBCXX_3.4.9' /usr/local/lib/libgeos-3.1.1.so: undefined reference to `std::basic_ostream >& std::basic_ostream >::_M_insert(unsigned long)@GLIBCXX_3.4.9' /usr/local/lib/libgeos-3.1.1.so: undefined reference to `std::basic_ostream >& std::basic_ostream >::_M_insert(double)@GLIBCXX_3.4.9' collect2: ld returned 1 exit status configure:27105: $? = 1 configure: failed program was: | /* confdefs.h. */ | #define PACKAGE_NAME """" [... lots of lines removed for clarity] | #define HAVE_JPEGLIB_H 1 | /* end confdefs.h. */ | | /* Override any GCC internal prototype to avoid an error. | Use char because int might match the return type of a GCC | builtin and then its argument prototype would still apply. */ | #ifdef __cplusplus | extern ""C"" | #endif | char GEOSversion (); | int | main () | { | return GEOSversion (); | ; | return 0; | } configure:27123: result: no }}} kludge (not proper fix): modify configure at line 27059 and make the test run with C++ instead of C by changing the test compiler to CXX and the parser to CXXPP {{{ ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' }}} this runs the test as C++ and the test now passes and GEOS is now enabled in gdal ",defect,closed,normal,1.7.0,ConfigBuild,svn-trunk,normal,fixed,geos,warmerdam