Hello, I tried to build Samba today (using an automatic Debian package builder called "pdebuild"). However this resulted in a compiler error. Building plugin bin/recycle.so gcc -Wall -pipe -fomit-frame-pointer -O2 -march=i686 -O -D_SAMBA_BUILD_=3 -shared -Wl,-Bsymbolic -Wl,-z,relro -Wl,-z,defs -L./bin -o bin/recycle.so -Wl,-soname=`basename bin/recycle.so` modules/vfs_recycle.o make[1]: Leaving directory `/tmp/buildd/samba-3.3.2/source' modules/vfs_recycle.o: In function `init_samba_module': vfs_recycle.c:(.text+0xc2): undefined reference to `smb_register_vfs' vfs_recycle.c:(.text+0xe2): undefined reference to `debug_add_class' vfs_recycle.c:(.text+0x103): undefined reference to `DEBUGLEVEL_CLASS' vfs_recycle.c:(.text+0x116): undefined reference to `DEBUGLEVEL_CLASS_ISSET' vfs_recycle.c:(.text+0x164): undefined reference to `dbghdr' vfs_recycle.c:(.text+0x17a): undefined reference to `dbgtext' vfs_recycle.c:(.text+0x182): undefined reference to `DEBUGLEVEL_CLASS' vfs_recycle.c:(.text+0x195): undefined reference to `DEBUGLEVEL_CLASS_ISSET' vfs_recycle.c:(.text+0x1db): undefined reference to `dbghdr' vfs_recycle.c:(.text+0x1f7): undefined reference to `dbgtext' modules/vfs_recycle.o: In function `recycle_connect': vfs_recycle.c:(.text+0x243): undefined reference to `DEBUGLEVEL_CLASS' vfs_recycle.c:(.text+0x256): undefined reference to `DEBUGLEVEL_CLASS_ISSET' vfs_recycle.c:(.text+0x29c): undefined reference to `dbghdr' vfs_recycle.c:(.text+0x2be): undefined reference to `dbgtext' modules/vfs_recycle.o: In function `recycle_disconnect': vfs_recycle.c:(.text+0x31c): undefined reference to `DEBUGLEVEL_CLASS' vfs_recycle.c:(.text+0x32f): undefined reference to `DEBUGLEVEL_CLASS_ISSET' vfs_recycle.c:(.text+0x375): undefined reference to `dbghdr' vfs_recycle.c:(.text+0x395): undefined reference to `lp_servicename' vfs_recycle.c:(.text+0x3a7): undefined reference to `dbgtext' ... vfs_recycle.c:(.text+0x295a): undefined reference to `dbghdr' vfs_recycle.c:(.text+0x2987): undefined reference to `dbgtext' vfs_recycle.c:(.text+0x29e9): undefined reference to `talloc_free' vfs_recycle.c:(.text+0x29f9): undefined reference to `DEBUGLEVEL_CLASS' collect2: ld returned 1 exit status make[1]: *** [bin/recycle.so] Error 1 make: *** [build-stamp] Error 2 pbuilder: Failed autobuilding of package It took me quite a while to figure out what caused the problem. The problem was that I explicitly specified the linker flags (LDFLAGS) as "-Wl,-z,defs" (which is the default for this package builder). No specifying the flags "solved" the problem although I think that there shouldn't be any undefined references in the source, should they? Regards
that's normal for a vfs module. It wouldn't be normal for a library however :-)