Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#17 cannot build shared object

open
nobody
Testing (2)
5
2010-08-03
2010-08-03
G H
No

Ran with ./configure --enable-shared and got an error:
....
make[2]: Entering directory `/root/librsync-0.9.7/testsuite'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/root/librsync-0.9.7/testsuite'
make[2]: Entering directory `/root/librsync-0.9.7'
/bin/sh ./libtool --mode=link gcc -Wall -Wshadow -Wundef -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wpointer-arith -Wcast-qual -Wcast-align -g -O2 -o rdiff rdiff.o isprefix.o librsync.la -lpopt
gcc -Wall -Wshadow -Wundef -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wpointer-arith -Wcast-qual -Wcast-align -g -O2 -o .libs/rdiff rdiff.o isprefix.o ./.libs/librsync.so -lpopt
./.libs/librsync.so: undefined reference to `RollsumUpdate'

This was fixed by manually running:
/bin/sh ./libtool --mode=link gcc -Wall -Wshadow -Wundef -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wpointer-arith -Wcast-qual -Wcast-align -g -O2 -o rdiff rdiff.o rollsum.o isprefix.o librsync.la -lpopt

*** I added rollsum.o to the librsync.la file *** and was then able to compile it, but any programs linked to it were failing to execute as they could not find RollsumUpdate

Your makefile is configured incorrectly, somewhere, for a .so build

Discussion