Bug 10840 - AIX 7.1 with xlc: make install does not install all libs
AIX 7.1 with xlc: make install does not install all libs
Status: REOPENED
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Build
4.1.12
PPC AIX
: P5 normal
: ---
Assigned To: Björn Jacke
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-09-25 13:08 UTC by Noël Köthe
Modified: 2015-05-12 13:19 UTC (History)
2 users (show)

See Also:


Attachments
Symlink .so -> .so.<vnum> (765 bytes, patch)
2015-05-12 13:19 UTC, The Written Word
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Noël Köthe 2014-09-25 13:08:39 UTC
Hello,

because building samba 4.1.12 with gcc doesn't work (see #10828) we tried building with the IBM xlc compiler (13.1.0.0) which works.:)

make install
worked but in lib/private/ the following links were not created.

libasn1-samba4.so
libcom_err-samba4.so
libgssapi-samba4.so
libhcrypto-samba4.so
libhdb-samba4.so
libheimbase-samba4.so
libheimntlm-samba4.so
libhx509-samba4.so
libkdc-samba4.so
libkrb5-samba4.so
libldb.so
libntdb.so
libpyldb-util.so
libpytalloc-util.so
libroken-samba4.so
libtalloc.so
libtdb.so
libtevent.so
libwind-samba4.so

The files with the numbers were copied but the links were missing.

We linked them manuall:

ls | grep -E "so\.[0-9\.]+$" | while read line
do
echo $line | sed 's/\(.*.so\).*/\1/g' |read changed
[[ -e $changed ]] && echo "$changed exists" || echo "$changed DOES NOT exist"
ln -s $line $changed
done

I have access to AIX 7 7100-02-04-1341 for some time so if I can help somehow to get the link problem fixed please tell me.
Comment 1 Björn Jacke 2014-09-26 07:31:13 UTC
thanks for your report bug this is not a AIX specific problem actually. The .so links are not created on other systems either. We don't need the .so files for our private shared libary files.
Comment 2 Noël Köthe 2014-09-26 09:54:47 UTC
Hello Björn,

thanks for your answer. On Linux I see it the same way you described it but on the AIX machine it looks different:

> export  LIBPATH=/appl/samba/lib:/appl/samba/lib/private
> /appl/samba/bin/smbclient -L localhost
exec(): 0509-036 Cannot load program /appl/samba/bin/smbclient because of the following errors:
        0509-150   Dependent module libtevent.so could not be loaded.
        0509-022 Cannot load module libtevent.so.
        0509-026 System error: A file or directory in the path name does not exist.
> ls -l /appl/samba/lib/private/libtevent*
lrwxrwxrwx    1 root     system           19 Sep 26 11:36 /appl/samba/lib/private/libtevent.so.0 -> libtevent.so.0.9.18
-rwxr-xr-x    1 root     system        91761 Sep 26 11:22 /appl/samba/lib/private/libtevent.so.0.9.18

Thats why we added the for us missing links and the binaries are working.

> ldd  /appl/samba/bin/smbclient
/appl/samba/bin/smbclient needs:
         /usr/lib/libpthread.a(shr_xpg5.o)
         /appl/samba/lib/private/libpopt_samba3.so
         /appl/samba/lib/libsamba-util.so
         /appl/samba/lib/private/libinterfaces.so
         /appl/samba/lib/libtevent-util.so
         /appl/samba/lib/private/liblibsmb.so
         /appl/samba/lib/private/libmsrpc3.so
         /appl/samba/lib/private/libccan.so
Cannot find libtevent.so
         /appl/samba/lib/private/libreplace.so
         /appl/samba/lib/private/libdbwrap.so
         /appl/samba/lib/private/libsamba-security.so
         /appl/samba/lib/private/liberrors.so
         /appl/samba/lib/libsmbconf.so
         /appl/samba/lib/private/libcli_smb_common.so
Cannot find libtalloc.so
         /appl/samba/lib/private/libsamba3-util.so
         /appl/samba/lib/private/libutil_tdb.so
         /appl/samba/lib/private/libdcerpc-samba.so
         /appl/samba/lib/libndr-standard.so
         /appl/samba/lib/private/libsamba-sockets.so
         /appl/samba/lib/libndr.so
         /appl/samba/lib/private/libpopt.so
         /appl/samba/lib/private/libutil_cmdline.so
         /appl/samba/lib/private/libutil_setid.so
Cannot find libkrb5-samba4.so
         /appl/samba/lib/private/libaddns.so
         /appl/samba/lib/libwbclient.so
Cannot find libgssapi-samba4.so
         /appl/samba/lib/private/libcli-ldap-common.so
         /appl/samba/lib/libsamba-credentials.so
         /appl/samba/lib/private/libndr-samba.so
         /appl/samba/lib/private/libcli_cldap.so
         /appl/samba/lib/private/libcliauth.so
         /appl/samba/lib/private/libkrb5samba.so
         /appl/samba/lib/private/libgse.so
         /appl/samba/lib/libgensec.so
         /appl/samba/lib/libdcerpc-binding.so
         /appl/samba/lib/private/libtdb-wrap.so
Cannot find libtdb.so
         /appl/samba/lib/private/libutil_ntdb.so
         /appl/samba/lib/private/libsmbregistry.so
         /appl/samba/lib/private/libCHARSET3.so
         /appl/samba/lib/private/libutil_reg.so
         /appl/samba/lib/private/libsmb_transport.so
         /appl/samba/lib/libndr-nbt.so
Cannot find libroken-samba4.so
         /appl/samba/lib/private/libevents.so
         /appl/samba/lib/private/libsecrets3.so
Cannot find libheimbase-samba4.so
Cannot find libcom_err-samba4.so
Cannot find libasn1-samba4.so
Cannot find libhx509-samba4.so
Cannot find libhcrypto-samba4.so
Cannot find libwind-samba4.so
         /appl/samba/lib/private/libwinbind-client.so
Cannot find libldb.so
         /appl/samba/lib/private/libasn1util.so
         /appl/samba/lib/private/libsamdb-common.so
         /appl/samba/lib/libsamba-hostconfig.so
         /appl/samba/lib/private/libldbsamba.so
         /appl/samba/lib/private/libauthkrb5.so
         /appl/samba/lib/libndr-krb5pac.so
         /appl/samba/lib/private/libcli-ldap.so
         /appl/samba/lib/private/libsamba-modules.so
         /appl/samba/lib/libsamdb.so
Cannot find libntdb.so
         /appl/samba/lib/private/libsmbd_shim.so
         /appl/samba/lib/private/libflag_mapping.so
         /appl/samba/lib/private/libserver-role.so
Cannot find libpyldb-util.so
         /appl/samba/lib/private/libauth_sam_reply.so
         /appl/samba/lib/private/libcli-nbt.so
         /appl/samba/lib/private/libnetif.so
         /opt/freeware/lib/libpython2.7.so
         /usr/lib/libnsl.a(shr.o)
         /usr/lib/libbsd.a(shr.o)
         /usr/lib/libc.a(shr.o)
         /usr/lib/librtl.a(shr.o)
         /unix
         /usr/lib/libpthreads.a(shr_comm.o)
Cannot find libtevent.so
Cannot find libtalloc.so
Cannot find libtdb.so
Cannot find libroken-samba4.so
Cannot find libntdb.so
Cannot find libkrb5-samba4.so
Cannot find libcom_err-samba4.so
Cannot find libgssapi-samba4.so
Cannot find libasn1-samba4.so
Cannot find libldb.so
Cannot find libheimbase-samba4.so
Cannot find libhx509-samba4.so
Cannot find libhcrypto-samba4.so
Cannot find libwind-samba4.so
Cannot find libpyldb-util.so
Cannot find libtevent.so
Cannot find libtalloc.so
Cannot find libtevent.so
Cannot find libtalloc.so
Cannot find libtevent.so
Cannot find libtalloc.so
Cannot find libkrb5-samba4.so
Cannot find libgssapi-samba4.so
Cannot find libtevent.so
Cannot find libtalloc.so
Cannot find libheimbase-samba4.so
Cannot find libcom_err-samba4.so
Cannot find libasn1-samba4.so
Cannot find libhx509-samba4.so
Cannot find libhcrypto-samba4.so
Cannot find libroken-samba4.so
Cannot find libwind-samba4.so
Cannot find libldb.so
Cannot find libtdb.so
Cannot find libpyldb-util.so
Cannot find libntdb.so
Cannot find libtevent.so
Cannot find libtalloc.so
Cannot find libkrb5-samba4.so
Cannot find libgssapi-samba4.so
Cannot find libldb.so
Cannot find libcom_err-samba4.so
Cannot find libroken-samba4.so
Cannot find libheimbase-samba4.so
Cannot find libasn1-samba4.so
Cannot find libhx509-samba4.so
Cannot find libhcrypto-samba4.so
Cannot find libwind-samba4.so
Cannot find libtdb.so
Cannot find libpyldb-util.so
Cannot find libntdb.so
Cannot find libtdb.so
Cannot find libtevent.so
Cannot find libtalloc.so
Cannot find libntdb.so
Cannot find libtalloc.so
Cannot find libtevent.so
Cannot find libtalloc.so
Cannot find libtevent.so
Cannot find libtevent.so
Cannot find libtalloc.so
Cannot find libtdb.so
Cannot find libroken-samba4.so
Cannot find libntdb.so
Cannot find libkrb5-samba4.so
Cannot find libcom_err-samba4.so
Cannot find libgssapi-samba4.so
Cannot find libasn1-samba4.so
Cannot find libldb.so
Cannot find libheimbase-samba4.so
Cannot find libhx509-samba4.so
Cannot find libhcrypto-samba4.so
Cannot find libwind-samba4.so
Cannot find libpyldb-util.so
Cannot find libtalloc.so
Cannot find libtevent.so
Cannot find libkrb5-samba4.so
Cannot find libcom_err-samba4.so
Cannot find libgssapi-samba4.so
Cannot find libasn1-samba4.so
Cannot find libldb.so
Cannot find libheimbase-samba4.so
Cannot find libhx509-samba4.so
Cannot find libhcrypto-samba4.so
Cannot find libroken-samba4.so
Cannot find libwind-samba4.so
Cannot find libtdb.so
Cannot find libpyldb-util.so
Cannot find libntdb.so
Cannot find libtalloc.so
Cannot find libtevent.so
Cannot find libtdb.so
Cannot find libtalloc.so
Cannot find libtevent.so
Cannot find libtalloc.so
Cannot find libtevent.so
         /appl/samba/lib/private/libz.so
Cannot find libroken-samba4.so
Cannot find libtalloc.so
Cannot find libtevent.so
Cannot find libroken-samba4.so
Cannot find libtalloc.so
Cannot find libtevent.so
Cannot find libtalloc.so
Cannot find libtevent.so
Cannot find libtevent.so
Cannot find libtalloc.so
Cannot find libtdb.so
Cannot find libroken-samba4.so
Cannot find libntdb.so
Cannot find libkrb5-samba4.so
Cannot find libcom_err-samba4.so
Cannot find libgssapi-samba4.so
Cannot find libasn1-samba4.so
Cannot find libldb.so
Cannot find libheimbase-samba4.so
Cannot find libhx509-samba4.so
Cannot find libhcrypto-samba4.so
Cannot find libwind-samba4.so
Cannot find libpyldb-util.so
Cannot find libgssapi-samba4.so
Cannot find libtevent.so
Cannot find libtalloc.so
Cannot find libkrb5-samba4.so
Cannot find libroken-samba4.so
Cannot find libasn1-samba4.so
Cannot find libhcrypto-samba4.so
Cannot find libcom_err-samba4.so
Cannot find libwind-samba4.so
Cannot find libheimbase-samba4.so
Cannot find libhx509-samba4.so
Cannot find libldb.so
Cannot find libtalloc.so
Cannot find libtevent.so
Cannot find libtdb.so
Cannot find libldb.so
Cannot find libcom_err-samba4.so
Cannot find libgssapi-samba4.so
Cannot find libtalloc.so
Cannot find libtevent.so
Cannot find libtdb.so
Cannot find libroken-samba4.so
Cannot find libkrb5-samba4.so
Cannot find libasn1-samba4.so
Cannot find libhcrypto-samba4.so
Cannot find libwind-samba4.so
Cannot find libpyldb-util.so
Cannot find libheimbase-samba4.so
Cannot find libhx509-samba4.so
Cannot find libntdb.so
Cannot find libtalloc.so
Cannot find libtevent.so
Cannot find libldb.so
Cannot find libtevent.so
Cannot find libtalloc.so
Cannot find libtdb.so
Cannot find libroken-samba4.so
Cannot find libgssapi-samba4.so
Cannot find libcom_err-samba4.so
Cannot find libkrb5-samba4.so
Cannot find libasn1-samba4.so
Cannot find libhcrypto-samba4.so
Cannot find libwind-samba4.so
Cannot find libheimbase-samba4.so
Cannot find libhx509-samba4.so
Cannot find libpyldb-util.so
Cannot find libntdb.so
Cannot find libtalloc.so
Cannot find libtdb.so
Cannot find libkrb5-samba4.so
Cannot find libcom_err-samba4.so
Cannot find libgssapi-samba4.so
Cannot find libasn1-samba4.so
Cannot find libtevent.so
Cannot find libheimbase-samba4.so
Cannot find libhx509-samba4.so
Cannot find libhcrypto-samba4.so
Cannot find libroken-samba4.so
Cannot find libwind-samba4.so
Cannot find libntdb.so
Cannot find libkrb5-samba4.so
Cannot find libcom_err-samba4.so
Cannot find libgssapi-samba4.so
Cannot find libasn1-samba4.so
Cannot find libtalloc.so
Cannot find libheimbase-samba4.so
Cannot find libhx509-samba4.so
Cannot find libhcrypto-samba4.so
Cannot find libroken-samba4.so
Cannot find libwind-samba4.so
Cannot find libtevent.so
Cannot find libkrb5-samba4.so
Cannot find libgssapi-samba4.so
Cannot find libtevent.so
Cannot find libtalloc.so
Cannot find libheimbase-samba4.so
Cannot find libcom_err-samba4.so
Cannot find libasn1-samba4.so
Cannot find libhx509-samba4.so
Cannot find libhcrypto-samba4.so
Cannot find libroken-samba4.so
Cannot find libwind-samba4.so
Cannot find libldb.so
Cannot find libtdb.so
Cannot find libntdb.so
Cannot find libpyldb-util.so
Cannot find libcom_err-samba4.so
Cannot find libldb.so
Cannot find libgssapi-samba4.so
Cannot find libtevent.so
Cannot find libtalloc.so
Cannot find libroken-samba4.so
Cannot find libtdb.so
Cannot find libkrb5-samba4.so
Cannot find libasn1-samba4.so
Cannot find libhcrypto-samba4.so
Cannot find libwind-samba4.so
Cannot find libheimbase-samba4.so
Cannot find libhx509-samba4.so
Cannot find libpyldb-util.so
Cannot find libntdb.so
Cannot find libtevent.so
Cannot find libtalloc.so
Cannot find libroken-samba4.so
Cannot find libtdb.so
Cannot find libtalloc.so
Cannot find libtevent.so
Cannot find libtalloc.so
Cannot find libntdb.so
Cannot find libtevent.so
Cannot find libtalloc.so
Cannot find libtevent.so
Cannot find libtdb.so
Cannot find libntdb.so
Cannot find libtalloc.so
Cannot find libtevent.so
Cannot find libtalloc.so
Cannot find libtevent.so
Cannot find libtalloc.so
Cannot find libtevent.so
Cannot find libtalloc.so
Cannot find libtevent.so
Cannot find libtevent.so
Cannot find libtalloc.so
Cannot find libtevent.so
Cannot find libtalloc.so
Cannot find libtdb.so
Cannot find libroken-samba4.so
Cannot find libntdb.so
Cannot find libkrb5-samba4.so
Cannot find libcom_err-samba4.so
Cannot find libgssapi-samba4.so
Cannot find libasn1-samba4.so
Cannot find libldb.so
Cannot find libheimbase-samba4.so
Cannot find libhx509-samba4.so
Cannot find libhcrypto-samba4.so
Cannot find libwind-samba4.so
Cannot find libpyldb-util.so
Cannot find libtalloc.so
Cannot find libtevent.so
Cannot find libldb.so
Cannot find libtdb.so
Cannot find libtevent.so
Cannot find libtalloc.so
Cannot find libroken-samba4.so
Cannot find libkrb5-samba4.so
Cannot find libcom_err-samba4.so
Cannot find libgssapi-samba4.so
Cannot find libasn1-samba4.so
Cannot find libheimbase-samba4.so
Cannot find libhx509-samba4.so
Cannot find libhcrypto-samba4.so
Cannot find libwind-samba4.so
Cannot find libntdb.so
Cannot find libtalloc.so
Cannot find libtevent.so
Cannot find libldb.so
Cannot find libtdb.so
Cannot find libpyldb-util.so
Cannot find libtevent.so
Cannot find libtalloc.so
Cannot find libroken-samba4.so
Cannot find libkrb5-samba4.so
Cannot find libcom_err-samba4.so
Cannot find libgssapi-samba4.so
Cannot find libasn1-samba4.so
Cannot find libheimbase-samba4.so
Cannot find libhx509-samba4.so
Cannot find libhcrypto-samba4.so
Cannot find libwind-samba4.so
Cannot find libntdb.so
Cannot find libldb.so
Cannot find libroken-samba4.so
Cannot find libgssapi-samba4.so
Cannot find libtalloc.so
Cannot find libtevent.so
Cannot find libasn1-samba4.so
Cannot find libtdb.so
Cannot find libkrb5-samba4.so
Cannot find libhcrypto-samba4.so
Cannot find libcom_err-samba4.so
Cannot find libwind-samba4.so
Cannot find libheimbase-samba4.so
Cannot find libhx509-samba4.so
Cannot find libtalloc.so
Cannot find libtevent.so
Cannot find libtevent.so
Cannot find libtalloc.so
Cannot find libgssapi-samba4.so
Cannot find libldb.so
Cannot find libroken-samba4.so
Cannot find libcom_err-samba4.so
Cannot find libkrb5-samba4.so
Cannot find libasn1-samba4.so
Cannot find libhcrypto-samba4.so
Cannot find libwind-samba4.so
Cannot find libtdb.so
Cannot find libheimbase-samba4.so
Cannot find libhx509-samba4.so
Cannot find libpyldb-util.so
Cannot find libntdb.so
Cannot find libtevent.so
Cannot find libtalloc.so
Cannot find libkrb5-samba4.so
Cannot find libcom_err-samba4.so
Cannot find libldb.so
Cannot find libtevent.so
Cannot find libheimbase-samba4.so
Cannot find libasn1-samba4.so
Cannot find libhx509-samba4.so
Cannot find libhcrypto-samba4.so
Cannot find libroken-samba4.so
Cannot find libwind-samba4.so
Cannot find libtalloc.so
Cannot find libtdb.so
Cannot find libgssapi-samba4.so
Cannot find libpyldb-util.so
Cannot find libntdb.so
Cannot find libtalloc.so
Cannot find libtalloc.so
Cannot find libtevent.so
Cannot find libtevent.so
Cannot find libtalloc.so
Cannot find libtalloc.so
Cannot find libtevent.so
Cannot find libtalloc.so
Cannot find libtevent.so
Cannot find libroken-samba4.so
Cannot find libtevent.so
Cannot find libtalloc.so
         /usr/lib/libpthreads.a(shr_xpg5.o)
         /usr/lib/libthread.a(shr.o)
         /usr/lib/libpthreads_compat.a(shr.o)
         /usr/lib/libtli.a(shr.o)
         /usr/lib/libcrypt.a(shr.o)
         /usr/lib/libpthreads.a(shr.o)
         /usr/lib/libc.a(pse.o)
>
Comment 3 Joost van Baal-Ilić 2015-02-26 23:40:14 UTC
FWIW: some extra info when working with slightly different Samba, AIX and xlc
versions.  Hope this is usefull to somebody...


for samba 4.1.16 on AIX 6.1 on PowerPC, compiled with IBM/xlC/13.1.0 i had
to run:

 # cd /path/to/samba/lib/private
 # ls | grep "so\.[0-9]$" | while read f; do ln -s $f ${f%.?}; done
 # ls | grep "so\.[0-9][0-9]$" | while read f; do ln -s $f ${f%.??}; done

for some reason the script Noël posted didn't work for me.  I've verified:
these symlinks are _really_ needed: If the symlinks (like e.g.

 libwind-samba4.so -> libwind-samba4.so.0

) do not exist, one will get:

 # export LIBPATH=/appl/samba/lib:/appl/samba/lib/private
 # /appl/samba/bin/smbclient -L localhost
 Cannot load module libtevent.so.

After that one is created, one gets e.g.

 cannot load module libkrb5-samba4.so

.

Thanks for making Samba available!

Kind Regards, Joost
Comment 4 The Written Word 2015-05-12 12:46:49 UTC
(In reply to Björn Jacke from comment #1)
You need the .so libs for private shared library when SONAME_ST is empty. If the system does not allow SONAME's in shared libraries, then a dependency to the .so is created in the binary. But, because you don't symlink .so -> .so.<num>, the binary cannot find the library. ATM, Samba is only linking .so.# -> .so.<num> because systems with SONAME's in shared libraries depend on .so.#, not .so. Not so on AIX, hence the failure.
Comment 5 The Written Word 2015-05-12 13:19:13 UTC
Created attachment 11046 [details]
Symlink .so -> .so.<vnum>

Haven't fully tested this yet but this should lead us in the right direction.