#1 problems in compiling tdb-1.0.6

open
nobody
None
5
2004-07-02
2004-07-02
No

Hello,

I´m having problems when trying to compile tdb-
1.0.6.tar.gz in a Windows 2K with Cygwin installed.

The first, I could solve. The function help() in tdbtool.c
uses a printf function like this:

printf ("some
statment
here
");

The gcc complained a lot in Cygwin about a missing
doble quote ("). I changed the statment to this:

static void help(void)
{
printf("tdbtool:\n");
printf("create dbname : create a database\n");
printf("open dbname : open an existing
database\n");
printf("erase : erase the database\n");
printf("dump dumpname : dump the database as
strings\n");
printf("insert key data : insert a record\n");
printf("store key data : store a record (replace)\n");
printf("show key : show a record by key\n");
printf("delete key : delete a record by key\n");
printf("list : print the database hash table
and freelist\n");
printf("free : print the database freelist\n");
printf("1 | first : print the first record\n");
printf("n | next : print the next record\n");
printf("q | quit : terminate\n");
printf("\\n : repeat 'next' command\n");
}

And it worked fine. After that, I got some complains
about missing GDBM functions:

/usr/local/tdb-1.0.6/tdbtest.c:80: undefined reference
to `_gdbm_firstkey'
tdbtest.o(.text+0x18e):/usr/local/tdb-
1.0.6/tdbtest.c:82: undefined reference to
`_gdbm_fetch'
tdbtest.o(.text+0x20b):/usr/local/tdb-
1.0.6/tdbtest.c:94: undefined reference to
`_gdbm_nextkey
tdbtest.o(.text+0x2b5):/usr/local/tdb-
1.0.6/tdbtest.c:65: undefined reference to
`_gdbm_fetch'
tdbtest.o(.text+0x683): In function `addrec_gdbm':
/usr/local/tdb-1.0.6/tdbtest.c:167: undefined reference
to `_gdbm_delete'
tdbtest.o(.text+0x6f4):/usr/local/tdb-
1.0.6/tdbtest.c:169: undefined reference to
`_gdbm_store'
tdbtest.o(.text+0x727):/usr/local/tdb-
1.0.6/tdbtest.c:173: undefined reference to
`_gdbm_fetch'
tdbtest.o(.text+0x9ab): In function `main':
/usr/local/tdb-1.0.6/tdbtest.c:231: undefined reference
to `_gdbm_open'
tdbtest.o(.text+0xaf4):/usr/local/tdb-
1.0.6/tdbtest.c:260: undefined reference to
`_gdbm_close'

AFAIK, I´m using the lastest version of GDBM in Cygwin.
I could not find any of these functions in the gdbm.h.

There is any other dependency to install TDB? I tried to
find information at the website and in the Internet, but
could not find any tip about it.

Thanks!

Regards,
Alceu

Discussion

  • Erik Aronesty
    Erik Aronesty
    2005-08-05

    Logged In: YES
    user_id=293915

    tdbtest is not necessary anyway... just remove it from the
    Makefile. It tries to compare tdb to gdb. If you don't have gdb
    however - this test isn't very useful. Run your own tests. We
    probably should add a test that doesn't rely on having another
    database. I'm thinking something that pipes a long sequence
    of commands to tdbtool and compares it to known output.