It can be done...

Michael Felt michael at felt.demon.nl
Tue Aug 1 11:43:35 UTC 2017


On 01/08/2017 12:48, Michael Felt via samba-technical wrote:
> FYI: the nice news first --
>
> 'build' finished successfully (....)
> root at x064:[/data/prj/samba/samba-4.4.15]
>
> But to get here I had to refer to a few known issues re: AIX and using 
> xlc as a compiler. Also, a few 'comments' about the configure process.
>
> a) cannot build "out of tree"
>
> Otherwise get error:
> python: can't open file './buildtools/bin/waf': [Errno 2] No such file 
> or directory
>
> b) re: https://bugzilla.samba.org/show_bug.cgi?id=11417 - cannot find 
> python development headers
>
> I occasionally get this message - not because the python headers are 
> not available, but because the ABI aka OBJECT_MODE is not correct. If 
> python is 64-bit - messages like this occur during configure/make when 
> OBJECT_MODE is unset, or set to 32.
>
> This is hint I would have added to bugzilla - but no account yet.
>
> c) Bug 11621 time.c - needed (iirc is applied to samba-4.7)
>
> d) Bug 11746 tdbtool.c - the patch works, do not see that it has been 
> accepted yet.
>
> e) (new) bug: "source4/dsdb/samdb/ldb_modules/tombstone_reanimate.c" : 
> xlc (v11) does not know __PRETTY_FUNCTION__
>
> The hack here is not a proper patch suggestion. Needs to be tied to 
> the compiler used, not the OS.
>
>   337  #ifndef _AIX
>   338  /* actually needs to be something to identify if GCC, or not */
>   339          ldb_debug(ldb, LDB_DEBUG_TRACE, "%s\n", 
> __PRETTY_FUNCTION__);
>   340  #else
>   341          ldb_debug(ldb, LDB_DEBUG_TRACE, "%s\n", __FUNCTION__);
>   342  #endif
>   343
> "source4/dsdb/samdb/ldb_modules/tombstone_reanimate.c"
>
> f) Bug 11748: ../source4/torture/smb2/lock.c", line 2897.35: 1506-196 
> (S) Initialization between types "unsigned long" and "struct 
> smb2_handle" is not allowed.
>
> This patch works, but will not be mainstream. Just noting here that it 
> occurred, and also in file source4/torture/smb2/replay.c (I expect 
> changes since the original bug).
> Sadly for me, a patch for xlc v13 may never find it's into xlc v11 
> (which is what I have).
>
> g) Bug 12822: O_NOFOLLOW - eventually, it may come to AIX, but 
> unlikely it will be on current levels of AIX - and packaging will be 
> difficult.
>
> A "patch" such as:
> #ifdef O_NOFOLLOW
> /* code using O_NOFOLLOW */
> #endif
> worked for me to build.
>
> After these, the build completed (as mentioned above).
>
> Footnote: initially, no LDAP support. And, as waf configure takes some 
> time - I would have greatly appreciated more caching of the previous 
> results, rather than have to repeat it so many times to establish 
> SAMBA dependancies.
>
> All in all - impressed.
>
> Michael
>
> p.s. I am hoping the build process accepts something like make 
> DESTDIR=/some/where/else install - if not, instructions greatly 
> appreciated!
>
That part works - but now that I have packaged, and installed on a test 
server I see that a lot of "linking" information is not complete.

As an example: ldd /usr/local/samba/sbin/smbd returns, among many others:
Cannot find libtdb.so

Unfortunately, this library - rather with this name, was never created:

root at x069:[/data/prj/samba/samba-4.4.15]find /usr/local | grep tdb
/usr/local/samba/bin/tdbbackup
/usr/local/samba/bin/tdbdump
/usr/local/samba/bin/tdbrestore
/usr/local/samba/bin/tdbtool
/usr/local/samba/lib/idmap/tdb2.so
/usr/local/samba/lib/ldb/secrets_tdb_sync.so
/usr/local/samba/lib/ldb/tdb.so
/usr/local/samba/lib/private/libtdb-wrap-samba4.so
/usr/local/samba/lib/private/libtdb.so.1
/usr/local/samba/lib/private/libtdb.so.1.3.8
/usr/local/samba/lib/private/libutil-tdb-samba4.so
/usr/local/samba/lib/private/libxattr-tdb-samba4.so
/usr/local/samba/lib/python2.7/site-packages/_tdb_text.py
/usr/local/samba/lib/python2.7/site-packages/samba/tdb_util.py
/usr/local/samba/lib/python2.7/site-packages/samba/xattr_tdb.so
/usr/local/samba/lib/python2.7/site-packages/tdb.so
/usr/local/samba/lib/vfs/acl_tdb.so
/usr/local/samba/lib/vfs/xattr_tdb.so

In /usr/local/samba/lib/private/ I see libtbb.so.1 and libtbd.so.1.3.8 
but not lintdb.so - something the link part skipped, or is it the 
install part?

because in the build area I see:
root at x069:[/data/prj/samba/samba-4.4.15]find . | grep libtdb
./bin/shared/private/libtdb.so.1
./bin/shared/private/libtdb-wrap-samba4.so
./bin/default/lib/tdb/libtdb.so
./bin/default/lib/tdb_wrap/libtdb-wrap-samba4.so

Sigh!

FYI: the blibpath on the smbd is: EXTENSIVE and inaccurate (relative)

0 
default/source4/lib/socket:default/source4/lib/http:default/source4/libcli:default/libcli/nbt:default/source4/cluster:default/source4/libcli/ldap:default/source4/auth:default/source4/libcli/wbclient:default/source4/lib/messaging:default/nsswitch:default/source4/lib/events:default/lib/tdb_wrap:default/source4/librpc:default/libcli/smb:default/libcli/cldap:default/lib/addns:default/auth/gensec:default/source4/auth/ntlm:default/third_party/popt:default/libds/common:default/nsswitch/libwbclient:default/auth/credentials:default/lib/ldb-samba:default/lib/param:default/source4/auth/kerberos:default/libcli/ldap:default/lib/ldb:default/libcli/registry:default/lib:default/lib/krb5_wrap:default/lib/dbwrap:default/source3/auth:default/lib/tdb:default/auth:default/lib/socket:default/libcli/auth:default/libcli/named_pipe_auth:default/source4/dsdb:default/libcli/security:default/libcli/util:default/librpc:default/source4/heimdal_build:default/dfs_server:default/lib/tevent:default/lib/replace:default/lib/talloc:default/source3:default/lib/util:/usr/local/lib:/opt/lib:/usr/vac/lib:/usr/lib:/lib
1                                    libpthread.a shr_xpg5_64.o
2                                    libsamba-util.so
3                                    libsmbd-base-samba4.so
...
103                                  libcli-nbt-samba4.so
104                                  libsmbclient-raw-samba4.so
105                                  libhttp-samba4.so
106                                  libnetif-samba4.so
107                                  libnsl.a            shr_64.o
108                                  libc.a              shr_64.o

I would hope there is a better way to install shared libraries!






More information about the samba-technical mailing list