Undefined reference to txn_abort/txn_begin/txn_commit

Toon van der Pas toon at hout.vanvergehaald.nl
Mon Jan 26 23:00:03 UTC 2004


On Sun, Jan 25, 2004 at 02:03:30PM -0800, Russ Allbery wrote:
> Toon van der Pas <toon at hout.vanvergehaald.nl> writes:
> 
> > I'm trying to build INN-2.4.1 with Berkeley DB, and keep getting the
> > error in $SUBJECT. Could someone please help me?  Thanks in advance.
> 
> Hm.  Well, this is the error that I fixed for Berkeley DB 4.1 and later in
> CURRENT, because 4.2 at least doesn't have the txn_abort etc. functions as
> separate functions (they're just attributes of transactions).  But I
> thought 4.0 and 4.1 still included the functions, and poking about with
> the older shared libraries that I have installed, this does appear to be
> the case.
> 
> Could you try the following patch and see if it fixes your problem?
> Please let me know if it does, and I'll add it to STABLE and the next
> patch release.  Although it really *shouldn't* based on the output that
> you showed, unless you somehow have 4.2 headers with your 4.0 library.

Well, it didn't make any difference. What I did was:

$ rm -rf inn-STABLE-20040118
$ tar -xzvf ../src/inn-STABLE-20040118.tar.gz
$ cd inn-STABLE-20040118
$ ./configure --enable-libtool --enable-uucp-rnews --enable-ipv6 --with-log-dir=/var/log/news --with-spool-dir=/var/spool/news --enable-largefiles --with-berkeleydb=/usr --with-openssl --with-sasl --with-perl
$ make > /tmp/make-before-patch.txt 2>&1

$ rm -rf inn-STABLE-20040118
$ tar -xzvf ../src/inn-STABLE-20040118.tar.gz
$ cd inn-STABLE-20040118
$ patch -p1 < allbery_patch
$ ./configure --enable-libtool --enable-uucp-rnews --enable-ipv6 --with-log-dir=/var/log/news --with-spool-dir=/var/spool/news --enable-largefiles --with-berkeleydb=/usr --with-openssl --with-sasl --with-perl
$ make > /tmp/make-after-patch.txt 2>&1

$ diff -u /tmp/make-before-patch.txt /tmp/make-after-patch.txt

The output of the two makes was completely the same.
No difference at all.

Then I decided to give Marco's hint a try,
so I added the three lines below to ovdb.c:

#define txn_begin __txn_begin_4000
#define txn_commit __txn_commit_4000
#define txn_abort __txn_abort_4000

This time the compile completed normally.
I'm going to bed now. Tomorrow I'll investigate further.

> The interesting bits are probably the compilation lines for ovdb.c.

There is nothing special to see. No warnings or anything.
Or did you wish see the lines themselves? Here they are:

../libtool --mode=compile gcc -g -O2 -I../include  -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I. -I/usr/include -c -o ovdb/ovdb.o ovdb/ovdb.c
mkdir ovdb/.libs
gcc -g -O2 -I../include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I. -I/usr/include -c ovdb/ovdb.c  -fPIC -DPIC -o ovdb/.libs/ovdb.lo
gcc -g -O2 -I../include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I. -I/usr/include -c ovdb/ovdb.c -o ovdb/ovdb.o >/dev/null 2>&1
mv -f ovdb/.libs/ovdb.lo ovdb/ovdb.lo 

> -- 
> Russ Allbery (rra at stanford.edu)             <http://www.eyrie.org/~eagle/>

Regards,
Toon.
-- 
"The more difficult a decision is to make,
 the less it matters what you decide."
                    -- Eugene Kleiner


More information about the inn-workers mailing list