AIX 6.1, fresh build specifically for development XL C 12.1 Python-2.7.3 The build system says that 'make' is successful. The build system also says that 'make install' is successful. Binaries are being installed into /opt/samba-4.0.0. The resultant binaries will not run, however, as the following .so's are not copied into /opt/samba-4.0.0/lib: libtalloc.so libgssapi-samba4.so libtdb.so libtevent.so libkrb5-samba4.so libroken-samba4.so libasn1-samba4.so libhcrypto-samba4.so libcom_err-samba4.so libwind-samba4.so libldb.so libheimbase-samba4.so libhx509-samba4.so libpyldb-util.so If those items are manually copied, and LD_LIBRARY_PATH set, the smbd binary will produce the following output: bash-3.2# /opt/samba-4.0.0/sbin/smbd -b exec(): 0509-036 Cannot load program /opt/samba-4.0.0/sbin/smbd because of the following errors: rtld: 0712-001 Symbol aixacl_to_smbacl was referenced from module /opt/samba-4.0.0/lib/private/libsmbd_base.so(), but a runtime definition of the symbol was not found. rtld: 0712-001 Symbol aixacl_smb_to_aixacl was referenced from module /opt/samba-4.0.0/lib/private/libsmbd_base.so(), but a runtime definition of the symbol was not found. bash-3.2# So the following symbols are missing: aixacl_to_smbacl aixacl_smb_to_aixacl I'm opening this bug as these should be copied, and vfs_aixacl should be compiled statically on AIX. As it is, the 4.0.0 stable does not run successfully when build on AIX.
This bug is also present in 4.0.1 and 4.0.2.
This seems to be a problem with xlc (or the way the Samba build system uses it). I can reproduce this on my AIX 6.1 machine, but I have to figure out how this is supposed to work with xlc. The binaries are not properly linked (actually they are not linked to any of the Samba private libraries at all). Using gcc however should work, as this is what is used in our buildfarm.
> Using gcc however should work, as this is what is used in our buildfarm. In this case though we can not just fall back to GCC on AIX. I hope we can determine a resolution that does not require Samba to be built under GCC only. Please let me know if I can assist or provide additional information.
Created attachment 8674 [details] patch from master to fix missing symbols Here is the patch from master that makes smbd run (but does not solve the library issue)
I am still behind the problem with the libraries. To me, the issue seems to be that AIX does not support the style of library versioning that the waf build expects. from make install * installing bin/default/lib/talloc/libtalloc.so as /data/prefix/v4-0-stable/lib/private/libtalloc.so.2.0.7 * symlink /data/prefix/v4-0-stable/lib/private/libtalloc.so.2 (-> libtalloc.so.2.0.7) So we finally have (under $PREFIX) bash-4.2# ls -al lib/private/libtalloc* lrwxrwxrwx 1 root system 18 Mar 18 17:06 lib/private/libtalloc.so.2 -> libtalloc.so.2.0.7 -rwxr-xr-x 1 root system 44522 Mar 18 16:34 lib/private/libtalloc.so.2.0.7 while the binaries are linked to libtalloc.so: # ldd sbin/smbd 2>&1 |grep talloc Cannot find libtalloc.so AIX does not identify libtalloc.so.2 to be libtalloc.so So it seems the waf build would either 1. need to install the libraries without version number or 2. link the binaries to the libs including the version number Not sure if AIX is the only platform that is affected by this.
Comment on attachment 8674 [details] patch from master to fix missing symbols Looks good
Karolin, please pick the patch and reassign to ambi for the remaining issue.
Pushed to autobuild-v4-0-test.
Pushed to v4-0-test. Closing out bug report. Thanks!
Reopen for the 2nd problem
I tried to compile Samba 4.1.0 on AIX with gcc so I could compare the library search path in the resulting binaries with what I'm getting in xlc, but that fails for me as well. I opened bug https://bugzilla.samba.org/show_bug.cgi?id=10270 for that issue. One part of the problem seems to be that waf is trying to detect rpath support via the -rpath option to the linker on AIX, but I can't find any version of ld on AIX that supports that. I modified buildtools/wafadmin/Tools/xlc.py to use "-Wl,-bsvr4,-R%s" for the RPATH option and the rpath configure check is ok and I get working binaries in my install path. However I don't get working binaries in the build tree so I suspect this isn't the right way to fix it. Also for this testing I modified buildtools/wafsamba/samba_install.py:install_lib to create the dev symlink for private libraries if the platform is aix. I could spend some more time on this to help but I would need some pointers on the right places to look.
*** Bug 10432 has been marked as a duplicate of this bug. ***
AIX Version: 7100-03-05-1524 XLC Version: 13.01.0003.0000 Samba Version: 4.3.5 Same problem. Fixed with by always "generating the dev link for non-bundled libs" (see patch). $PREFIX/samba/lib and $PREFIX/samba/lib/private must be in LIBPATH. Bug 10840 is probably a dup.
Created attachment 11867 [details] Proposed patch
*** Bug 10840 has been marked as a duplicate of this bug. ***
fixed in master with 42e96696a097c3c73230c7be8d107e444de1c8c7 now
Please port this fix in master branch to 4.10 (and 4.9?) branch.