|
From: Oswald B. <osw...@gm...> - 2015-07-14 16:47:11
|
On Mon, Jul 13, 2015 at 11:27:09PM +0000, daniel szmulewicz wrote: > The config.log reveals: > > configure:4723: checking for Berkeley DB >= 4.1 > configure:4745: gcc -o conftest -g -O2 -pipe -W -Wall -Wshadow > -Wstrict-prototypes -ansi -pedantic -Wno-overlength-strings -D_GNU_SOURCE > -ldb conftest.c >&5 > conftest.c:34:1: warning: function declaration isn't a prototype > [-Wstrict-prototypes] > main () > ^ > /tmp/ccaGDsAw.o: In function `main': > /home/daniel/isync-isync/conftest.c:37: undefined reference to `db_create' > collect2: error: ld returned 1 exit status > > So the linker cannot find the required function. Interesting. > > If I had to guess, which I really shouldn't because I'm not a C programmer > at all, the problem is that recent versions of gcc require that you put the > object files and libraries in the order that they depend on each other. In > other words, conftest.c should be before -ldb. This is actually consistent > from what I observe elsewhere in the log, for example conftest.c precedes > -lsasl2, etc. > what happens if you use that command line with switched argument order to compile the test program manually? that's a rather easy test for your hypothesis. what does nm -D <whereever your libdb.so is> | grep db_create produce? |