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 Any ideas? George -- George Sherwood Source Mage GNU/Linux Lead Developer http://www.sourcemage.org -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 197 bytes Desc: not available Url : http://lists.samba.org/archive/samba/attachments/20081215/43cfea8f/signature.bin
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 statusHow 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@sernet.de> <obnox@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
On Wed, 17 Dec 2008 15:44:19 +0100 Michael Adam <obnox@samba.org> wrote:> Hi George,> 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. >Michael, Thanks for the pointer. That was exactly the problem. Not sure why, but out distro was building mount.cifs.c separately for some reason. I took that part out and added the option for --with-cifsmount and everything seems to be working now. George -- George Sherwood Source Mage GNU/Linux Lead Developer http://www.sourcemage.org -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 197 bytes Desc: not available Url : http://lists.samba.org/archive/samba/attachments/20081217/8d20c035/signature.bin
George Sherwood wrote:> On Wed, 17 Dec 2008 15:44:19 +0100 > Michael Adam <obnox@samba.org> wrote: > > 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. > > > > Michael, > Thanks for the pointer. That was exactly the problem. Not sure > why, but out distro was building mount.cifs.c separately for some > reason. I took that part out and added the option for > --with-cifsmount and everything seems to be working now.We encountered the same problem when packaging. The reason is this: Originally, mount.cifs was not built by make all or make everything. It did not even have a make target at some point. That is why there was a separate compile call to build mount.cifs. Now there has been a make target for some time. So the separate compile call was redundant but did not harm. But now in 3.2.6, a new object has been added to the mount.cifs target, so the old "gcc -o mount.cifs mount.cifs.c" is simply wrong now. I hope this makes it clear. Cheers - Michael -- Michael Adam <ma@sernet.de> <obnox@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/20081218/aa560543/attachment.bin