Hennie Rautenbach writes:
Sam Varshavchik wrote:
I believe that your C compiler installation is corrupted or bad. The
fact that you appear to be invoking the compiler as /opt/fsw/bin/gcc
tells me that you're not using your system's native compiler, but
something that was installed ex-post-facto.
The most likely explanation is that your add-on compiler was either
not installed or configured properly, and it's reading the native
system compiler's header files, instead of its own header files, so
you have a mismatch between your compiler and your header files.
Review the documentation for installing your add-on compiler, perhaps
you missed a step or two.
I removed the GCC 2.9.2. and installed the latest 3.4 version of GCC.
Compilation passed the point where it bombed earlier but now halts at
the following error:
Compiling testbdb.C
g++ -g -O2 -o testbdb testbdb.o libbdbobj.a -ldb
Undefined first referenced
symbol in file
db_create libbdbobj.a(bdbobj.o)
ld: fatal: Symbol referencing errors. No output written to testbdb
collect2: ld returned 1 exit status
gmake[2]: *** [testbdb] Error 1
gmake[2]: Leaving directory `/usr/local/src/courier-imap-3.0.3/bdbobj'
gmake[1]: *** [all] Error 2
gmake[1]: Leaving directory `/usr/local/src/courier-imap-3.0.3/bdbobj'
gmake: *** [all-recursive] Error 1
My search continues !
The error message indicates that the linker was unable to find the function
db_create(). This is a DB library function, from libdb.so, linked via -ldb.
The linker is not complaining that libdb.so is missing. The library is
present, but it does not define the function.
The DB library is notorious for changing its API with every major release.
This function is present in DB 3.x and DB 4.x libraries. The configure
script checks the installed DB library header files to determine which
version of the DB library is present, and the appropriate code gets
compiled.
Therefore, it looks like that your header files are from one version of the
DB library, and the actual DB library file is from a different version.
You will need to do whatever you need to do to get a consistent set of
headers and library files.