[Samba] samba 3.2.6 link error

Michael Adam obnox at samba.org
Wed Dec 17 14:44:19 GMT 2008

Hi George,

George Sherwood wrote:
> No problems building samba 3.2.5, but having a link error with 3.2.6.
> Haven't been able to find a solution.
> Compiling nsswitch/wins.c
> Linking nsswitch/libnss_wins.so
> /tmp/ccvWgbGU.o: In function `main':
> mount.cifs.c:(.text+0x1f29): undefined reference to `unlock_mtab'
> mount.cifs.c:(.text+0x1f33): undefined reference to `lock_mtab'
> mount.cifs.c:(.text+0x1f7a): undefined reference to `unlock_mtab'
> mount.cifs.c:(.text+0x20c8): undefined reference to `unlock_mtab'
> collect2: ld returned 1 exit status

How do you compile/link mount.cifs?

When doing a fresh build (autogen / configure / make everything),
this should correctly create you bin/mount.cifs.

In 3.2.6, a new object has been added to mount.cifs, namely
client/mtab.o. So when you compile with a individual command
like "gcc -o mount.cifs client/mount.cifs.c", this will fail with
exactly the error message as specified above.

Cheers - Michael

Michael Adam <ma at sernet.de>  <obnox at samba.org>
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.SerNet.DE, mailto: Info @ SerNet.DE
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 206 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba/attachments/20081217/d4f5123e/attachment.bin

More information about the samba mailing list