ekohl/samba4 — Issue #9: Linking fails: undefined smb_set_close_on_exec 
Author: neclimdul
Created: 2012-01-09 23:07:24+00:00
State: open

So I've been looking at this error for a while toward the end of my builds.

[2769/3265] Linking default/lib/libsamba-sockets.so
default/source4/lib/socket/socket_ip_5.o: In function `ipv4_init':
/usr/src/samba/bin/../source4/lib/socket/socket_ip.c:53: undefined reference to `smb_set_close_on_exec'
default/source4/lib/socket/socket_ip_5.o: In function `ipv6_init':
/usr/src/samba/bin/../source4/lib/socket/socket_ip.c:615: undefined reference to `smb_set_close_on_exec'
default/source4/lib/socket/socket_unix_6.o: In function `unixdom_init':
/usr/src/samba/bin/../source4/lib/socket/socket_unix.c:62: undefined reference to `smb_set_close_on_exec'
default/source4/lib/socket/socket_unix_6.o: In function `unixdom_accept':
/usr/src/samba/bin/../source4/lib/socket/socket_unix.c:203: undefined reference to `smb_set_close_on_exec'
collect2: ld returned 1 exit status
Waf: Leaving directory `/usr/src/samba/bin'
Build failed: -> task failed (err #1):
{task: cc_link composite_4.o,socket_7.o,access_7.o,connect_multi_7.o,connect_7.o,socket_ip_5.o,tsocket_1.o,tsocket_helpers_1.o,tsocket_bsd_1.o,socket_unix_6.o,resolve_12.o -> libsamba-sockets.so}

After some fiddling and manual building I've narrowed it down to our "--bundled-libraries=NONE,tevent,ldb,pyldb-util". With is the build fails, without it it succeeds. So logically we want to have some control over the bundled-libraries built so removing it isn't the right option but is there maybe one we're missing?