When linking with -Wl,--no-undefined -Wl,--as-needed, cifs.upcall will not be linked successfully, reporting undefined references. Linking bin/cifs.upcall ../librpc/ndr/ndr_compression.o: In function `ndr_push_compression_end': ndr_compression.c:(.text+0x30f): undefined reference to `deflateInit2_' ndr_compression.c:(.text+0x31c): undefined reference to `zError' ndr_compression.c:(.text+0x34f): undefined reference to `deflate' ndr_compression.c:(.text+0x361): undefined reference to `zError' ndr_compression.c:(.text+0x3bf): undefined reference to `deflateReset' ndr_compression.c:(.text+0x3cc): undefined reference to `zError' ndr_compression.c:(.text+0x400): undefined reference to `deflateSetDictionary' ndr_compression.c:(.text+0x40d): undefined reference to `zError' This seems to be due to incorrect linking order (see http://wiki.mandriva.com/en/Overlinking#Wrong_linking_order) The same error message is reported for libnetapi, but due to -lz being missing (underlinked breaking --as-needed), See http://wiki.mandriva.com/en/Underlinking. Linking shared library bin/libnetapi.so.0 ../librpc/ndr/ndr_compression.o: In function `ndr_push_compression_end': ndr_compression.c:(.text+0x30f): undefined reference to `deflateInit2_' ndr_compression.c:(.text+0x31c): undefined reference to `zError' ndr_compression.c:(.text+0x34f): undefined reference to `deflate' ndr_compression.c:(.text+0x361): undefined reference to `zError' ndr_compression.c:(.text+0x3bf): undefined reference to `deflateReset' ndr_compression.c:(.text+0x3cc): undefined reference to `zError' ndr_compression.c:(.text+0x400): undefined reference to `deflateSetDictionary' ndr_compression.c:(.text+0x40d): undefined reference to `zError' ../librpc/ndr/ndr_compression.o: In function `ndr_pull_compression_start': ndr_compression.c:(.text+0x8f1): undefined reference to `inflateInit2_' ndr_compression.c:(.text+0x8fe): undefined reference to `zError' ndr_compression.c:(.text+0x936): undefined reference to `inflate' ndr_compression.c:(.text+0x948): undefined reference to `zError' ndr_compression.c:(.text+0x9f2): undefined reference to `inflateReset' ndr_compression.c:(.text+0xa00): undefined reference to `zError' ndr_compression.c:(.text+0xa32): undefined reference to `inflateSetDictionary' ndr_compression.c:(.text+0xa40): undefined reference to `zError' libwbclient also has the wrong linking order (objects should precede libraries): Linking shared library bin/libwbclient.so.0 utils/smbfilter.c: In function ‘filter_request’: utils/smbfilter.c:115: warning: ignoring return value of ‘system’, declared with attribute warn_unused_result ../nsswitch/libwbclient/wbclient.o: In function `wbcLibraryDetails': wbclient.c:(.text+0xf7): undefined reference to `talloc_named_const' wbclient.c:(.text+0x119): undefined reference to `talloc_strdup' wbclient.c:(.text+0x13f): undefined reference to `talloc_free' ../nsswitch/libwbclient/wbclient.o: In function `wbcFreeMemory': wbclient.c:(.text+0x17b): undefined reference to `talloc_free' Patches to follow.
Created attachment 4816 [details] Patch fixing link order for cifs.upcall Patch from http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/cooker/samba/current/SOURCES/samba-3.4.1-fix-cifsupcall-linkorder.patch
Created attachment 4817 [details] Patch fixing link order for libwbclient, and underlinking in libnetapi Patch from http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/cooker/samba/current/SOURCES/samba-3.4-link-order.patch
patch from #1 looks good, but for the first hunk which looks superfluous. The second hunk from patch in #1 was already fixed in master, and should go into 3.4, indeed. Full ack from me for patch from #2 for 3.4. I just checked in the required fix for master (first hunk only). Karolin, do you want to take over? :-)
Pushed to v3-4-test. Will be included in the next bug fix release. Closing out bug report. Thanks!