compiled from source with xlc 1.3.1 compiler root@aixbuildhost61: /usr/local/samba4/sbin # export LIBPATH=/usr/local/samba4/lib:/usr/local/samba4/lib/private root@aixbuildhost61: /usr/local/samba4/sbin # ldd smbd smbd needs: /usr/lib/libpthread.a(shr_xpg5_64.o) /usr/local/samba4/lib/libsamba-util.so /usr/local/samba4/lib/private/libsmbd-base-samba4.so /usr/local/samba4/lib/private/libtime-basic-samba4.so /usr/local/samba4/lib/private/libutil-setid-samba4.so /usr/local/samba4/lib/private/libsamba-debug-samba4.so /usr/local/samba4/lib/private/libgenrand-samba4.so /usr/local/samba4/lib/private/libtalloc.so /usr/local/samba4/lib/private/libreplace-samba4.so /usr/local/samba4/lib/private/libsocket-blocking-samba4.so /usr/local/samba4/lib/private/libtevent.so /usr/local/samba4/lib/private/libsmbregistry-samba4.so /usr/local/samba4/lib/private/libtalloc-report-samba4.so /usr/local/samba4/lib/private/libdfs-server-ad-samba4.so /usr/local/samba4/lib/private/libprinting-migrate-samba4.so /usr/local/samba4/lib/private/libgssapi-samba4.so /usr/local/samba4/lib/libtevent-util.so /usr/local/samba4/lib/private/libmessages-dgm-samba4.so /usr/local/samba4/lib/private/libndr-samba-samba4.so /usr/local/samba4/lib/libsamba-errors.so /usr/local/samba4/lib/private/libnet-keytab-samba4.so /usr/local/samba4/lib/private/libsamba-security-samba4.so /usr/local/samba4/lib/libnetapi.so /usr/local/samba4/lib/libsamdb.so /usr/local/samba4/lib/private/libsys-rw-samba4.so /usr/local/samba4/lib/private/libsmbd-conn-samba4.so /usr/local/samba4/lib/private/libsamba3-util-samba4.so /usr/local/samba4/lib/libsamba-passdb.so /usr/local/samba4/lib/private/libutil-tdb-samba4.so /usr/local/samba4/lib/private/libnpa-tstream-samba4.so /usr/local/samba4/lib/private/libcliauth-samba4.so /usr/local/samba4/lib/private/libinterfaces-samba4.so /usr/local/samba4/lib/private/libauth-sam-reply-samba4.so /usr/local/samba4/lib/private/libpopt-samba3-samba4.so /usr/local/samba4/lib/private/libtdb.so /usr/local/samba4/lib/private/libmessages-util-samba4.so /usr/local/samba4/lib/private/libauth-samba4.so /usr/local/samba4/lib/private/liblibsmb-samba4.so /usr/local/samba4/lib/private/libmsrpc3-samba4.so /usr/local/samba4/lib/private/libserver-id-db-samba4.so /usr/local/samba4/lib/private/libmsghdr-samba4.so /usr/local/samba4/lib/private/libdbwrap-samba4.so /usr/local/samba4/lib/private/libiov-buf-samba4.so /usr/local/samba4/lib/libsmbconf.so /usr/local/samba4/lib/private/libsamba-cluster-support-samba4.so /usr/local/samba4/lib/private/libkrb5samba-samba4.so /usr/local/samba4/lib/private/libdcerpc-samba-samba4.so /usr/local/samba4/lib/libndr-krb5pac.so /usr/local/samba4/lib/private/libsamba-sockets-samba4.so /usr/local/samba4/lib/libndr.so /usr/local/samba4/lib/private/libutil-reg-samba4.so /usr/local/samba4/lib/private/libsmbd-shim-samba4.so /usr/local/samba4/lib/private/libcli-spoolss-samba4.so /usr/local/samba4/lib/private/libkrb5-samba4.so /usr/local/samba4/lib/private/libroken-samba4.so /usr/local/samba4/lib/private/libasn1-samba4.so /usr/local/samba4/lib/private/libhcrypto-samba4.so /usr/local/samba4/lib/private/libcom_err-samba4.so /usr/local/samba4/lib/private/libwind-samba4.so /usr/local/samba4/lib/libndr-standard.so /usr/local/samba4/lib/private/libasn1util-samba4.so /usr/local/samba4/lib/libndr-nbt.so /usr/local/samba4/lib/private/libz-samba4.so /usr/local/samba4/lib/private/libads-samba4.so /usr/local/samba4/lib/private/liblibcli-netlogon3-samba4.so /usr/local/samba4/lib/private/libutil-cmdline-samba4.so /usr/local/samba4/lib/private/libldb.so /usr/local/samba4/lib/private/libsamdb-common-samba4.so /usr/local/samba4/lib/private/libcli-ldap-common-samba4.so /usr/local/samba4/lib/private/libauthkrb5-samba4.so /usr/local/samba4/lib/libsamba-hostconfig.so /usr/local/samba4/lib/private/libldbsamba-samba4.so /usr/local/samba4/lib/libsamba-credentials.so /usr/local/samba4/lib/libwbclient.so /usr/local/samba4/lib/private/libflag-mapping-samba4.so /usr/local/samba4/lib/libsmbldap.so /usr/local/samba4/lib/private/libsmbldaphelper-samba4.so /usr/local/samba4/lib/private/libsecrets3-samba4.so /usr/local/samba4/lib/private/libpopt-samba4.so /usr/local/samba4/lib/private/liblibcli-lsa3-samba4.so /usr/local/samba4/lib/private/libtrusts-util-samba4.so /usr/local/samba4/lib/private/libauth4-samba4.so /usr/local/samba4/lib/private/libgensec-samba4.so /usr/local/samba4/lib/private/libaddns-samba4.so /usr/local/samba4/lib/private/libcli-cldap-samba4.so /usr/local/samba4/lib/private/libcli-smb-common-samba4.so /usr/local/samba4/lib/private/libgse-samba4.so /usr/local/samba4/lib/libdcerpc-binding.so /usr/local/samba4/lib/private/libndr-samba4.so /usr/local/samba4/lib/private/libtdb-wrap-samba4.so /usr/local/samba4/lib/private/libCHARSET3-samba4.so /usr/local/samba4/lib/private/libevents-samba4.so /usr/local/samba4/lib/private/libheimbase-samba4.so /usr/local/samba4/lib/private/libhx509-samba4.so /usr/local/samba4/lib/private/libserver-role-samba4.so /usr/local/samba4/lib/private/libwinbind-client-samba4.so /usr/local/samba4/lib/private/libsamba-modules-samba4.so /usr/local/samba4/lib/private/libMESSAGING-samba4.so /usr/local/samba4/lib/private/libLIBWBCLIENT-OLD-samba4.so /usr/local/samba4/lib/private/libauth-unix-token-samba4.so /usr/local/samba4/lib/libdcerpc.so /usr/local/samba4/lib/private/libdcerpc-samba4.so /usr/local/samba4/lib/private/libcli-ldap-samba4.so /usr/local/samba4/lib/private/libsmb-transport-samba4.so /usr/local/samba4/lib/private/libcluster-samba4.so /usr/local/samba4/lib/private/libcli-nbt-samba4.so /usr/local/samba4/lib/private/libsmbclient-raw-samba4.so /usr/local/samba4/lib/private/libhttp-samba4.so /usr/local/samba4/lib/private/libnetif-samba4.so /opt/freeware/lib64/libcrypto.so /usr/lib/libnsl.a(shr_64.o) /usr/lib/libc.a(shr_64.o) /unix /usr/lib/libbsd.a(shr_64.o) /opt/freeware/lib/libiconv.a(libiconv.so.2) /opt/freeware/lib64/libldap.a(libldap-2.4.so.2) /usr/lib/libxdsm.a(shr_64.o) /opt/freeware/lib64/liblber.a(liblber-2.4.so.2) /usr/lib/libpam.a(shr_64.o) /opt/freeware/lib/libintl.a(libintl.so.8) /opt/freeware/lib/libgnutls.a(libgnutls.so.26) /opt/freeware/lib/libgcrypt.a(libgcrypt.so.20) /usr/lib/libpthreads.a(shr_xpg5_64.o) /usr/lib/libthread.a(shr_64.o) /usr/lib/libtli.a(shr_64.o) /usr/lib/libC.a(shr3_64.o) /usr/lib/libC.a(shr2_64.o) /usr/lib/libcrypt.a(shr_64.o) /usr/lib/libc.a(shr.o) /usr/lib/libs.a(shr.o) /opt/freeware/lib/liblber.a(liblber-2.4.so.2) /opt/freeware/lib/libcrypto.a(libcrypto.so.1.0.1) /opt/freeware/lib/libssl.a(libssl.so.1.0.1) /usr/lib/libmls.a(shr_64.o) /usr/lib/libpthread.a(shr_xpg5.o) /opt/freeware/lib/libtasn1.a(libtasn1.so.6) /opt/freeware/lib/libnettle.a(libnettle.so.2) /opt/freeware/lib/libhogweed.a(libhogweed.so.2) /opt/freeware/lib/libz.a(libz.so.1) /opt/freeware/lib/libintl.a(libintl.so.1) /opt/freeware/lib/libp11-kit.a(libp11-kit.so.0) /opt/freeware/lib/libgmp.a(libgmp.so.10) /opt/freeware/lib/libgpg-error.a(libgpg-error.so.0) /usr/lib/libpthreads.a(shr_xpg5.o) /usr/lib/libc.a(pse_64.o) /usr/lib/libC.a(shrcore_64.o) /usr/lib/libcrypt.a(shr.o) /usr/lib/libmlsenc.a(shr_64.o) /usr/lib/libodm.a(shr_64.o) /usr/lib/libpthreads.a(shr_comm.o) /opt/freeware/lib/libgmp.a(libgmp.so.3) /opt/freeware/lib/libiconv.a(shr4.o) /usr/lib/libC.a(ansicore_64.o) root@aixbuildhost61: /usr/local/samba4/sbin # ./smbd -D Illegal instruction
build script... export CC="xlc_r" export CXX="xlC_r" #export PATH="$APPATH/bin:$PATH" #export LIBPATH="/opt/freeware/lib64:/opt/freeware/lib:/usr/lib:/lib" #export LD_LIBRARY_PATH="/opt/freeware/lib64:/opt/freeware/lib:/usr/lib:/lib" export OBJECT_MODE=64 export CFLAGS="-q64 -qmaxmem=-1 -qlanglvl=extc99 -qarch=pwr7 -DNDEBUG -DSYSV -D_AIX -D_AIX64 -D_AIX53 -D_AIX61 -D_AIX71 -D_ALL_SOURCE -DFUNCPROTO=15 -O2 -I/opt/freeware/include" export CXXFLAGS=$CFLAGS #export LDFLAGS="-L/opt/freeware/lib64 -L/opt/freeware/lib -L/opt/freeware/lib64/python2.7 -Wl,-blibpath:/usr/local/samba4/lib:/usr/local/samba4/lib/private -Wl,-bexpfull -Wl,-b64 -Wl,-bnoipath -Wl,-bbigtoc" export LDFLAGS="-L/opt/freeware/lib64 -L/opt/freeware/lib" #./buildtools/bin/waf configure #gmake ./configure --prefix=/usr/local/samba4 --with-configdir=/etc --bundled-libraries=ALL
So what error does smbd return when you try to start it?
We also need an AIX Samba 4 (64bit) with ADS support to work with our AD integration software, so we compiled the SAMBA 4.6.5 sources with xlc 13.1.3 (AIX 7.1 TL03 SP03). After applying a few AIX patches which where documented at the SAMBA Bugzilla page, compilation was successful. But if you try to start any binary (for example: smbstatus), the binary generates an core dump: dbx /opt/samba/bin/smbstatus core ---------------------------------------------------------------------------------------------------------------------------------------------------------- Type 'help' for help. [using memory image in core] reading symbolic information ...warning: no source compiled with -g Illegal instruction (illegal opcode) in . at 0x0 ($t1) warning: Unable to access address 0x0 from core (dbx) where .() at 0x0 lp_ctdbd_socket() at 0x9000000034e7218 db_open(0x0, 0x110037e30, 0x0, 0x80100000801, 0x10200000102, 0x18000000180, 0x100000001, 0x0) at 0x900000002cc74ec smbXsrv_session_global_init(0x0) at 0x900000002d77988 smbXsrv_session_global_traverse(0x9001000a0ca8338, 0xffffffffffff420) at 0x900000002d7b3a8 sessionid_traverse_read(0x110000508, 0x110023e30) at 0x900000002d7758c main(0x100000001, 0xffffffffffff8d8) at 0x100000f48 (dbx) quit ----------------------------------------------------------------------------------------------------------------------------------------------------------
(In reply to Franz Pförtsch from comment #3) i dont know if this is of any help, but compiling nonshared/static fixed the core dumping binaries here. ./configure --prefix=/usr/local/samba4 --with-static-modules=ALL --nonshared-binary=ALL --builtin-libraries=ALL
After beating my head against the wall for a day or two, I finally figured out my problem. I'm hoping to spare others the same two+ days (since I had messed with this before and ran out of time), comparing output from lslpp -Lc and rpm -qa, recompiling with different options, googling, etc. I'm probably not the only genius out there who has done this, but I see that the original poster had specified "-qarch=pwr7" in his CFLAGS. I had specified "-qarch=pwr8" (since that's what I have), but when I started comparing partition settings in my HMC (this worked on every other LPAR), I noticed that my "Processor compatibility mode:" setting was not set to default, but to POWER7. Hence, the illegal instruction. Now, I did try to specify 'pwr7' and still got the same issue. Powered off the LPAR, made sure the processor compatibility was set to default in the LPAR's profile on the HMC, powered it back on, Samba is happy. Hope this helps!
i assume the last comment solved the miracle then.