Underlinking error in Samba 4 Alpha 16.

Zombie Ryushu zombie_ryushu at yahoo.com
Sat Jul 2 11:55:32 MDT 2011


Mandriva Linux 2011 RC1

--- On Sat, 7/2/11, Andrew Bartlett <abartlet at samba.org> wrote:

From: Andrew Bartlett <abartlet at samba.org>
Subject: Re: Underlinking error in Samba 4 Alpha 16.
To: "Zombie Ryushu" <zombie_ryushu at yahoo.com>
Cc: samba-technical at samba.org
Date: Saturday, July 2, 2011, 11:21 AM

On Sat, 2011-07-02 at 00:34 -0700, Zombie Ryushu wrote:
> I have a confirmed underlinking error in Samba 4.0 Alpha 16.
> 
> [2952/3272] Linking default/source3/modules/libvfs-linux-xfs-sgid.so
> default/source3/modules/vfs_linux_xfs_sgid_58.o: In function `linux_xfs_sgid_mkdir':
> vfs_linux_xfs_sgid.c:(.text+0xa3): undefined reference to `smb_vfs_call_mkdir'
> vfs_linux_xfs_sgid.c:(.text+0xbf): undefined reference to `parent_dirname'
> vfs_linux_xfs_sgid.c:(.text+0x17f): undefined reference to `smb_vfs_call_stat'
> vfs_linux_xfs_sgid.c:(.text+0x253): undefined reference to `smb_vfs_call_stat'
> vfs_linux_xfs_sgid.c:(.text+0x2bf): undefined reference to `become_root'
> vfs_linux_xfs_sgid.c:(.text+0x2ce): undefined reference to `smb_vfs_call_chmod'
> vfs_linux_xfs_sgid.c:(.text+0x2d5): undefined reference to `unbecome_root'
> default/source3/modules/vfs_linux_xfs_sgid_58.o: In function `init_samba_module':
> vfs_linux_xfs_sgid.c:(.text+0x3d8): undefined reference to `smb_register_vfs'
> collect2: ld returned 1 exit status
> Waf: Leaving directory `/home/ryushu/svn/samba4/BUILD/samba-4.0.0alpha16/bin'
> Build failed:  -> task failed (err #1): 
>         {task: cc_link vfs_linux_xfs_sgid_58.o -> libvfs-linux-xfs-sgid.so}
> make: *** [all] Error 1
> 
> Not quite sure what makes this happen.

What is your platform?

The correct fix is to link each module to the libraries that provide the
symbols it needs, just as (almost) all libraries do.  However,
particular care needs to be taken to avoid duplicate symbols.  

The Samba3 modules are linked by the waf build with options to permit
undefined symbols (just as the autoconf build does).  This may not
operate correctly on your platform however. 

Andrew Bartlett

-- 
Andrew Bartlett                                http://samba.org/~abartlet/
Authentication Developer, Samba Team           http://samba.org




More information about the samba-technical mailing list