ekohl / samba4

Gentoo overlay with samba4 (related) ebuilds
5 stars 2 forks source link

Linking fails: undefined smb_set_close_on_exec #9

Closed neclimdul closed 11 years ago

neclimdul commented 12 years ago

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?

ekohl commented 12 years ago

You are using the git version since alpha 17 doesn't use any bundled libraries. I'm mostly surprised it now works without bundling tevent since I thought it needed the git version. Was there an update or did you do something special?

neclimdul commented 12 years ago

Been having this error for a long time building from git. I'll gist some build info I guess and see if its compiler versions or something.

vladonv commented 12 years ago

A similar bug:

[2723/3213] Linking default/source4/dsdb/samdb/ldb_modules/libldb-samba3sam.so
[2724/3213] Linking default/source3/libsmbregistry.so
[2725/3213] Linking default/lib/libsamba-sockets.so
[2726/3213] Linking default/librpc/libndr-standard.so
default/source4/lib/socket/socket_ip_5.o: In function `ipv6_init':
socket_ip.c:(.text+0x124a): undefined reference to `smb_set_close_on_exec'
default/source4/lib/socket/socket_ip_5.o: In function `ipv4_init':
socket_ip.c:(.text+0x12ea): undefined reference to `smb_set_close_on_exec'
default/source4/lib/socket/socket_unix_6.o: In function `unixdom_accept':
socket_unix.c:(.text+0x502): undefined reference to `smb_set_close_on_exec'
default/source4/lib/socket/socket_unix_6.o: In function `unixdom_init':
socket_unix.c:(.text+0x6ad): undefined reference to `smb_set_close_on_exec'
collect2: ld returned 1 exit status
Waf: Leaving directory `/var/tmp/portage/net-fs/samba-4.9999/work/samba-4.9999/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}
neclimdul commented 12 years ago

emerge --info finally http://pastebin.com/5wdtZmUa

ekohl commented 12 years ago

Right now I can't build from git at all with some error about libreplace. I'm not sure if I want to keep the git ebuild since it breaks a lot and I have no time to maintain it.

So in short I now consider it a "patches welcome"-ebuild.

ekohl commented 11 years ago

Code is in the main tree so closing.