Pccom Frank
2013-Nov-29 01:49 UTC
[Samba] Samba4 git pull of today (11/28/2013) link error on FreeBSD 9.2 RELEASE
./configure --bundled-libraries && make ............ [3638/3880] Linking default/source4/lib/policy/py-policy.so [3639/3880] Linking default/source4/auth/ntlm/libauth4.so [3640/3880] Linking default/source4/ntvfs/libntvfs.so default/source4/ntvfs/sysdep/inotify_1.o: In function `inotify_setup': inotify.c:(.text+0x503): undefined reference to `inotify_init' default/source4/ntvfs/sysdep/inotify_1.o: In function `watch_destructor': inotify.c:(.text+0x883): undefined reference to `inotify_rm_watch' default/source4/ntvfs/sysdep/inotify_1.o: In function `inotify_watch': inotify.c:(.text+0x956): undefined reference to `inotify_add_watch' inotify.c:(.text+0x9ba): undefined reference to `inotify_rm_watch' inotify.c:(.text+0xa47): undefined reference to `inotify_rm_watch' Waf: Leaving directory `/usr/local/samba-master/bin' Build failed: -> task failed (err #1): {task: cc_link inotify_1.o,vfs_smb2_6.o,vfs_ipc_12.o,ipc_rap_12.o,rap_server_12.o,pvfs_acl_1.o,pvfs_acl_xattr_3.o,vfs_cifs_5.o,vfs_simple_7.o,svfs_util_7.o,vfs_unixuid_1.o,sys_lease_3.o,sys_notify_2.o,ntvfs_base_1.o,ntvfs_generic_1.o,ntvfs_interface_1.o,ntvfs_util_1.o,pvfs_acl_nfs4_4.o,server_info_1.o,share_info_1.o,vfs_print_11.o,vfs_cifs_posix_9.o,svfs_util_9.o,vfs_posix_5.o,pvfs_util_5.o,pvfs_search_5.o,pvfs_dirlist_5.o,pvfs_fileinfo_5.o,pvfs_unlink_5.o,pvfs_mkdir_5.o,pvfs_open_5.o,pvfs_read_5.o,pvfs_flush_5.o,pvfs_write_5.o,pvfs_fsinfo_5.o,pvfs_qfileinfo_5.o,pvfs_setfileinfo_5.o,pvfs_rename_5.o,pvfs_resolve_5.o,pvfs_shortname_5.o,pvfs_lock_5.o,pvfs_oplock_5.o,pvfs_wait_5.o,pvfs_seek_5.o,pvfs_ioctl_5.o,pvfs_xattr_5.o,pvfs_streams_5.o,pvfs_notify_5.o,pvfs_sys_5.o,xattr_system_5.o,vfs_nbench_14.o,init_1.o,brlock_1.o,brlock_tdb_1.o,opendb_1.o,opendb_tdb_1.o,notify_1.o -> libntvfs.so} *** [all] Error code 1 Stop in /usr/local/samba-master. root at t60:/usr/local/samba-master # root at t60:/var/log/samba4 # uname -a FreeBSD t60.localpccom.localca 9.2-RELEASE FreeBSD 9.2-RELEASE #0 r255898: Fri Sep 27 03:52:52 UTC 2013 root at bake.isc.freebsd.org:/usr/obj/usr/src/sys/GENERIC i386 root at t60:/var/log/samba4 # The same thing happened on another computer amd64 ...... [3577/3880] Linking default/source4/librpc/python-epmapper.so [3578/3880] Linking default/source4/libnet/python-net.so [3579/3880] Linking default/source4/ntvfs/libntvfs.so default/source4/ntvfs/sysdep/inotify_1.o: In function `inotify_setup': inotify.c:(.text+0x508): undefined reference to `inotify_init' default/source4/ntvfs/sysdep/inotify_1.o: In function `watch_destructor': inotify.c:(.text+0x8d4): undefined reference to `inotify_rm_watch' default/source4/ntvfs/sysdep/inotify_1.o: In function `inotify_watch': inotify.c:(.text+0x9ad): undefined reference to `inotify_add_watch' inotify.c:(.text+0xa06): undefined reference to `inotify_rm_watch' inotify.c:(.text+0xaa5): undefined reference to `inotify_rm_watch' Waf: Leaving directory `/usr/local/samba-master/bin' Build failed: -> task failed (err #1): {task: cc_link inotify_1.o,vfs_smb2_6.o,vfs_ipc_12.o,ipc_rap_12.o,rap_server_12.o,pvfs_acl_1.o,pvfs_acl_xattr_3.o,vfs_cifs_5.o,vfs_simple_7.o,svfs_util_7.o,vfs_unixuid_1.o,sys_lease_3.o,sys_notify_2.o,ntvfs_base_1.o,ntvfs_generic_1.o,ntvfs_interface_1.o,ntvfs_util_1.o,pvfs_acl_nfs4_4.o,server_info_1.o,share_info_1.o,vfs_print_11.o,vfs_cifs_posix_9.o,svfs_util_9.o,vfs_posix_5.o,pvfs_util_5.o,pvfs_search_5.o,pvfs_dirlist_5.o,pvfs_fileinfo_5.o,pvfs_unlink_5.o,pvfs_mkdir_5.o,pvfs_open_5.o,pvfs_read_5.o,pvfs_flush_5.o,pvfs_write_5.o,pvfs_fsinfo_5.o,pvfs_qfileinfo_5.o,pvfs_setfileinfo_5.o,pvfs_rename_5.o,pvfs_resolve_5.o,pvfs_shortname_5.o,pvfs_lock_5.o,pvfs_oplock_5.o,pvfs_wait_5.o,pvfs_seek_5.o,pvfs_ioctl_5.o,pvfs_xattr_5.o,pvfs_streams_5.o,pvfs_notify_5.o,pvfs_sys_5.o,xattr_system_5.o,vfs_nbench_14.o,init_1.o,brlock_1.o,brlock_tdb_1.o,opendb_1.o,opendb_tdb_1.o,notify_1.o -> libntvfs.so} *** [all] Error code 1 Stop in /usr/local/samba-master. root at hq:/usr/local/samba-master # uname -a FreeBSD hq.pccom.ca 9.2-STABLE FreeBSD 9.2-STABLE #7: Fri Oct 4 19:00:49 EDT 2013 root at pccom.ca:/usr/obj/usr/src/sys/frank amd64 root at hq:/usr/local/samba-master # root at hq:/usr/ports/devel/libinotify # pkg_info | grep libinotify libinotify-20110829 Kevent based inotify compatible library
Volker Lendecke
2013-Dec-18 20:06 UTC
[Samba] Samba4 git pull of today (11/28/2013) link error on FreeBSD 9.2 RELEASE
Hi! On Thu, Nov 28, 2013 at 08:49:06PM -0500, Pccom Frank wrote:> ./configure --bundled-libraries && make > ............ > [3638/3880] Linking default/source4/lib/policy/py-policy.so > [3639/3880] Linking default/source4/auth/ntlm/libauth4.so > [3640/3880] Linking default/source4/ntvfs/libntvfs.so > default/source4/ntvfs/sysdep/inotify_1.o: In function `inotify_setup': > inotify.c:(.text+0x503): undefined reference to `inotify_init' > default/source4/ntvfs/sysdep/inotify_1.o: In function `watch_destructor': > inotify.c:(.text+0x883): undefined reference to `inotify_rm_watch' > default/source4/ntvfs/sysdep/inotify_1.o: In function `inotify_watch': > inotify.c:(.text+0x956): undefined reference to `inotify_add_watch' > inotify.c:(.text+0x9ba): undefined reference to `inotify_rm_watch' > inotify.c:(.text+0xa47): undefined reference to `inotify_rm_watch'The attached patch fixes it for me. Can you give it a try? Thanks, Volker -- 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:kontakt at sernet.de -------------- next part -------------->From c451ba9b828c44b8df1f61b2b17e833624eee4a9 Mon Sep 17 00:00:00 2001From: Volker Lendecke <vl at samba.org> Date: Tue, 17 Dec 2013 15:32:01 +0100 Subject: [PATCH] waf: Fix the FreeBSD build with libinotify Signed-off-by: Volker Lendecke <vl at samba.org> Pair-Programmed-With: Stefan Metzmacher <metze at samba.org> --- lib/replace/wscript | 6 +++++- source3/wscript_build | 1 + source4/ntvfs/sysdep/wscript_build | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/replace/wscript b/lib/replace/wscript index b6fb10b..a316032 100644 --- a/lib/replace/wscript +++ b/lib/replace/wscript @@ -91,7 +91,11 @@ struct foo bar = { .y = 'X', .x = 1 }; conf.CHECK_HEADERS('windows.h winsock2.h ws2tcpip.h') conf.CHECK_HEADERS('errno.h') conf.CHECK_HEADERS('gcrypt.h getopt.h iconv.h') - conf.CHECK_HEADERS('sys/inotify.h memory.h nss.h sasl/sasl.h') + conf.CHECK_HEADERS('memory.h nss.h sasl/sasl.h') + + conf.CHECK_FUNCS_IN('inotify_init', 'inotify', checklibc=True, + headers='sys/inotify.h') + conf.CHECK_HEADERS('security/pam_appl.h zlib.h asm/unistd.h') conf.CHECK_HEADERS('aio.h sys/unistd.h rpc/rpc.h rpc/nettype.h alloca.h float.h') diff --git a/source3/wscript_build b/source3/wscript_build index d3eed3c..6bc7b47 100755 --- a/source3/wscript_build +++ b/source3/wscript_build @@ -578,6 +578,7 @@ bld.SAMBA3_LIBRARY('smbd_base', vfs vfs_default vfs_posixacl + inotify popt_samba3 samba3core smbd_conn diff --git a/source4/ntvfs/sysdep/wscript_build b/source4/ntvfs/sysdep/wscript_build index d8d5b55..bfb4e55 100644 --- a/source4/ntvfs/sysdep/wscript_build +++ b/source4/ntvfs/sysdep/wscript_build @@ -4,7 +4,7 @@ bld.SAMBA_MODULE('sys_notify_inotify', source='inotify.c', subsystem='sys_notify', init_function='sys_notify_inotify_init', - deps='events', + deps='events inotify', enabled = bld.CONFIG_SET('HAVE_LINUX_INOTIFY') ) -- 1.7.9.5