Issue 65407 - Autoconf fails to detect working -ldb on Solaris
Summary: Autoconf fails to detect working -ldb on Solaris
Status: CONFIRMED
Alias: None
Product: porting
Classification: Code
Component: code (show other issues)
Version: OOo 2.0.2
Hardware: PC Solaris
: P3 Trivial (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-15 19:08 UTC by it46
Modified: 2013-07-30 02:41 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description it46 2006-05-15 19:08:06 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
---
Comment 1 rene 2006-05-29 07:11:06 UTC
.
Comment 2 rene 2006-06-11 01:45:36 UTC
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..)
Comment 3 rene 2006-06-11 21:25:44 UTC
err, "specify the function" of course...
Comment 4 rene 2006-11-24 13:06:29 UTC
reassign. no idea why solaris doesn't like that, reassign back when you or any 
other solaris person has a solution
Comment 5 Rob Weir 2013-07-30 02:41:37 UTC
Reset assignee on issues not touched by assignee in more than 1000 days.