Subject: prayer from pkgsrc failing
To: None <netbsd-help@netbsd.org>
From: Johan A.van Zanten <johan@giantfoo.org>
List: netbsd-help
Date: 01/09/2004 02:02:10
Greetings.  I'm attempting to compile prayer from pkgsrc/mail for the
first time.  (I've built earlier versions from my own source tree, but
that was about a year ago.)

 It seems to be failing when linking some of the DB calls:

sarasvati:/usr/pkgsrc/mail/prayer $ make
===> Checking for vulnerabilities in prayer-1.0.8nb1
===> Building for prayer-1.0.8nb1
(cd files; gmake all)
gmake[1]: Entering directory `/local/NetBSD/pkg-build/mail/prayer/work.alpha/prayer-1.0.8/files'
gmake[1]: Nothing to be done for `all'.
gmake[1]: Leaving directory `/local/NetBSD/pkg-build/mail/prayer/work.alpha/prayer-1.0.8/files'
(cd prayer; gmake all)
gmake[1]: Entering directory `/local/NetBSD/pkg-build/mail/prayer/work.alpha/prayer-1.0.8/prayer'
gcc  -L/usr/pkg/lib -Wl,-R/usr/pkg/lib  -o prayer pool.o list.o assoc.o memblock.o buffer.o string.o config.o user_agent.o iostream.o request.o response.o gzip.o html_common.o setproctitle.o ipaddr.o log.o os.o prayer.o prayer_ssl.o mydb_db3.o mydb.o prayer_login.o prayer_server.o prayer_main.o -lcrypt -lz -lssl -lcrypto -L/usr/pkg/lib -ldb4
mydb_db3.o: In function `gettid':
mydb_db3.o(.text+0xc64): undefined reference to `txn_begin'
mydb_db3.o(.text+0xc68): undefined reference to `txn_begin'
mydb_db3.o: In function `mystore':
mydb_db3.o(.text+0x1620): undefined reference to `txn_begin'
mydb_db3.o(.text+0x1624): undefined reference to `txn_begin'
mydb_db3.o(.text+0x16f4): undefined reference to `txn_abort'
mydb_db3.o(.text+0x16f8): undefined reference to `txn_abort'
mydb_db3.o(.text+0x1788): undefined reference to `txn_commit'
mydb_db3.o(.text+0x178c): undefined reference to `txn_commit'
mydb_db3.o: In function `mydelete':
mydb_db3.o(.text+0x1a38): undefined reference to `txn_begin'
mydb_db3.o(.text+0x1a3c): undefined reference to `txn_begin'
mydb_db3.o(.text+0x1b00): undefined reference to `txn_abort'
mydb_db3.o(.text+0x1b04): undefined reference to `txn_abort'
mydb_db3.o(.text+0x1b98): undefined reference to `txn_commit'
mydb_db3.o(.text+0x1b9c): undefined reference to `txn_commit'
mydb_db3.o: In function `mycommit':
mydb_db3.o(.text+0x1d94): undefined reference to `txn_commit'
mydb_db3.o(.text+0x1d98): undefined reference to `txn_commit'
mydb_db3.o: In function `abort_txn':
mydb_db3.o(.text+0x1f28): undefined reference to `txn_abort'
mydb_db3.o(.text+0x1f2c): undefined reference to `txn_abort'
collect2: ld returned 1 exit status
gmake[1]: *** [prayer] Error 1
gmake[1]: Leaving directory `/local/NetBSD/pkg-build/mail/prayer/work.alpha/prayer-1.0.8/prayer'
gmake: *** [all] Error 2
*** Error code 2

Stop.
make: stopped in /local/src/NetBSD/packages/pkgsrc/mail/prayer
*** Error code 1

Stop.
make: stopped in /usr/pkgsrc/mail/prayer



  What's weird is seemingly that the requisite libraries are installed:

sarasvati:/usr/pkg/lib # ll -ut libdb*
-rwxr-xr-x  1 root  wheel  1248420 Jan  9 01:57 libdb4-4.2.so.2.52

 If i rename that .so file to something else, the build reads libdb4.a
 instead, but fails with the same errors.


 Nm seems to show that the symbols are in the library:

sarasvati:/usr/pkg/lib # nm libdb4-4.2.so.2.52 | grep txn_abort
0000000000086fc0 T __db_txn_abort_4002
000000000008ef00 T __dbcl_txn_abort
0000000000094520 T __dbcl_txn_abort_ret
00000000000f5660 T __txn_abort
00000000000f55c0 t __txn_abort_pp
00000000000898e0 T xdr___txn_abort_msg
0000000000089920 T xdr___txn_abort_reply


 Anyone have any ideas?  I'm building on 1.6.1_STABLE. Identical errors on
 a Sparc and Alpha.

 Johan van Zanten		   \ "And so once again we find that the evil
System Wrangler			    \  of the past seeps into the present,
Tumbleweed Electron Wranglers, Inc.  \  like salad dressing through
				      \  cheap waxed paper." - The Tick