On Thu, Dec 20, 2012 at 09:21:38PM -0500, we recorded a bogon-computron collision of the <[email protected]> flavor, containing: > On Thu, Dec 20, 2012 at 3:19 PM, Tom Russo <[email protected]> wrote: > >> > >> How odd. I can't see how Xastir's configure would find that. > >> > >> Look at your config.log --- when it reports that it found a BDB, does it > >> say it is using -ldb5.1 or something like it (search down for where it > >> is probing for berkeley db, and it should say first: > >> > >> checking for a library containing db_create > > >From config.log > > configure:12049: checking for a library containing db_create > configure:12065: gcc -o conftest -g -O2 -pipe -W -Wall -Wpointer-arith > -Wstrict-prototypes -Wno-unused-parameter -pthread > -I/usr/local/include -I/usr/include/geotiff -L/usr/local/lib > conftest.c -lrt -lXm -lXt -lXp -lXext -lm -lSM -lICE -lX11 -lcurl > -lproj -lshp -lpcre -ltiff -lgeotiff -lax25 -ldb-4.9 >&5 > conftest.c:170:1: warning: function declaration isn't a prototype > [-Wstrict-prototypes] > /usr/bin/ld: cannot find -ldb-4.9 > collect2: error: ld returned 1 exit status > configure:12065: $? = 1 > configure: failed program was: > | /* confdefs.h */ > > >> > >> and much later something like: > >> > >> result: -ldbXXX > > The log just shows > configure:12079: result: -ldb
Well, there it is. Apparently the db-5.1 package has installed the library as libdb.so with no version number adorning it. > >> The only question in my mind is whether maybe you ALSO have a 4.x version > >> installed and it's finding that. "Help->About" doesn't actually report the > >> db version it found, only whether it found a usable one (in which case it > >> reports "map_caching" as a "library used" which is misleading). > > I searched with synaptic, and I could not find any 4.x versions > available from the repositories - only 5.1 and 5.3. > > > > > It gets worse than xastir's configure not just probing for 5.x versions. > > The > > map_cache.c code actually will NOT do anything right with version 5.x. > > It contains an ifdef set-up like this: > > > ------ snip ---- > > > > Thus, if DB_VERSION_MAJOR is less than 4, fail, if equal to 4, then do > > some set-up based on minor version number (because 4.0 and 4.1 had slightly > > different APIs), and if version is greater than 4, do absolutely nothing. > > > > This pattern is followed *EVERYWHERE* that the "open" function of the db > > library is called. So if you're actually linking db5.1 in, then map caching > > is NOT working, because it is never opening the database. I can't see what > > the code would actually do --- it looks like when it gets a pointer to > > the database structure it tries to call "get" and "put" on things, and may > > silently pass through and do nothing (not even output) if those fail. One > > has to turn on debug level 512 to see some output in case that get and put > > are > > called and fail. > > > > If you have map caching working, then it's because you also have a 4.x > > db installed. If you're linked against 5.1 (and I can't see how you could > > be) > > then map caching isn't working. > > Currently it's hard to see how I do. Configure didn't seem to find a > 4.x version unless I missed something in the log. I did have 4.8 > installed prior to upgrading from 12.04 to 12.10. > > Here's the beginning of the output of sudo ldd /usr/bin/xastir > > linux-gate.so.1 => (0xb7786000) > libXm.so.2 => /usr/lib/libXm.so.2 (0xb762e000) > libXt.so.6 => /usr/lib/i386-linux-gnu/libXt.so.6 (0xb75d2000) > libX11.so.6 => /usr/lib/i386-linux-gnu/libX11.so.6 (0xb749b000) > libGraphicsMagick.so.3 => /usr/lib/libGraphicsMagick.so.3 (0xb7178000) > libtiff.so.5 => /usr/lib/i386-linux-gnu/libtiff.so.5 (0xb7105000) > libm.so.6 => /lib/i386-linux-gnu/libm.so.6 (0xb70d9000) > libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xb70be000) > libdb-5.1.so => /usr/lib/i386-linux-gnu/libdb-5.1.so (0xb6f36000) > libcurl.so.4 => /usr/lib/i386-linux-gnu/libcurl.so.4 (0xb6ed3000) > libshp.so.1 => /usr/lib/i386-linux-gnu/libshp.so.1 (0xb6ec8000) > libpcre.so.3 => /lib/i386-linux-gnu/libpcre.so.3 (0xb6e88000) > libgeotiff.so.2 => /usr/lib/libgeotiff.so.2 (0xb6e60000) > libax25.so.0 => /usr/lib/libax25.so.0 (0xb6e54000) > > A reference to libdb5.1 is there, hmm. Your configure results show how this must have happened. There must be a symlink of some kind linking libdb.so to libdb-5.1.so (check /usr/lib, bet you'll find a symlink there), and configure is picking it up (since it *DOES* check -ldb when it searches for libraries with db_create in them). Then the question remains "does caching actually *WORK*?" Have you tried it? Betcha it DOESN'T, thanks to that broken set of ifdefs that only call dbp->open if the major version number of BDB (from its header files) is 4. If the db_open function of version 5.x has the same API as the 4.1+ version, then one need only change #elif (DB_VERSION_MAJOR==4 && DB_VERSION_MINOR>=1 ) to #elif ((DB_VERSION_MAJOR==4 && DB_VERSION_MINOR>=1) || DB_VERSION_MAJOR>4) and it should work. But as it stands, if DB_VERSION_MAJOR=5, the database that contains the map cache is not getting opened. -- Tom Russo KM5VY SAR502 DM64ux http://www.swcp.com/~russo/ Tijeras, NM QRPL#1592 K2#398 SOC#236 http://kevan.org/brain.cgi?DDTNM echo "prpv_a'rfg_cnf_har_cvcr" | sed -e 's/_/ /g' | tr [a-m][n-z] [n-z][a-m] _______________________________________________ Xastir mailing list [email protected] http://lists.xastir.org/cgi-bin/mailman/listinfo/xastir
