tdbbackup compilation problem

Shapiro, David david.shapiro at
Tue Oct 7 13:29:13 GMT 2003

If I added snprintf.o and tdbback.o to the tdb's Makefile and cp
lib/snprintf.o into the tdb directory tdbbackup compiles:

tdbbackup: tdbbackup.o $(TDB_OBJ)
        $(CC) $(CFLAGS) -o tdbbackup snprintf.o tdbbackup.o tdbback.o

I guess you could make a variable $(SNPRINTF) defined to the snprintf.o
location instead.

-----Original Message-----
From: Jeremy Allison [mailto:jra at]
Sent: Monday, October 06, 2003 5:28 PM
To: Shapiro, David
Cc: 'samba-technical at'
Subject: Re: tdbbackup compilation problem

On Mon, Oct 06, 2003 at 05:02:15PM -0400, Shapiro, David wrote:
> Hello,
> tdbbackup is not compiling on the latests cvs build:
> cc -DSTANDALONE -DTDB_DEBUG -g -DHAVE_MMAP=1  -c  tdbbackup.c
> gcc -DSTANDALONE -DTDB_DEBUG -g -DHAVE_MMAP=1 -o tdbbackup tdbbackup.o
> spinlock.o
> tdbbackup.o(.text+0x27c): In function `main':
> /usr/local/samba/source/tdb/tdbbackup.c:132: undefined reference to
> `add_suffix'
> tdbbackup.o(.text+0x2a4):/usr/local/samba/source/tdb/tdbbackup.c:135:
> undefined reference to `verify_tdb'
> tdbbackup.o(.text+0x2f4):/usr/local/samba/source/tdb/tdbbackup.c:139:
> undefined reference to `backup_tdb'
> collect2: ld returned 1 exit status
> *** Error code 1
> make: Fatal error: Command failed for target `tdbbackup'
> I am not sure why it thinks these 3 things are not defined.  I see them in
> tdbback.h and tdback.c.

Yeah, and you're not including tdbback.o in your link line.... :-).


More information about the samba-technical mailing list