Apache OpenOffice (AOO) Bugzilla – Issue 65407
Autoconf fails to detect working -ldb on Solaris
Last modified: 2013-07-30 02:41:37 UTC
In Solaris x86 and Sun Studio 10, Autoconf fails to detect -ldb using --with-system-db This is due to a recursive call of main inside of the conftest.cc that is not possible in Sun Studio 10. This is not a problem for GCC. And alternative way to detect a working db is needed for SS10 configure:10539: CC -o conftest -g conftest.cc >&5 configure:10542: $? = 0 configure:10544: ./conftest configure:10547: $? = 0 configure:10560: result: OK configure:10571: checking for main in -ldb configure:10595: CC -o conftest -g conftest.cc -ldb >&5 "conftest.cc", line 27: Error: Cannot have a recursive call of main(). 1 Error(s) detected. configure:10601: $? = 1 configure: failed program was: | /* confdefs.h. */ | | #define PACKAGE_NAME "" | #define PACKAGE_TARNAME "" | #define PACKAGE_VERSION "" | #define PACKAGE_STRING "" | #define PACKAGE_BUGREPORT "" | #define STDC_HEADERS 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_MEMORY_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_UNISTD_H 1 | #ifdef __cplusplus | extern "C" void exit (int); | #endif | /* end confdefs.h. */ | | | int | main () | { | main (); | ; | return 0; | } configure:10595: CC -o conftest -g conftest.cc -ldb >&5 "conftest.cc", line 27: Error: Cannot have a recursive call of main(). 1 Error(s) detected. configure:10601: $? = 1 ---
.
Hmm. Any idea? What is done here is that we check for libdb with AC_CHECK_LIBRARY (which checks for main()) instead of AC_CHECK_LIB (where you can specify the version, but it didn't work somehow..)
err, "specify the function" of course...
reassign. no idea why solaris doesn't like that, reassign back when you or any other solaris person has a solution
Reset assignee on issues not touched by assignee in more than 1000 days.