It can be done...

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

It can be done...

Samba - samba-technical mailing list
FYI: the nice news first --

'build' finished successfully (....)
root@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!


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: It can be done...

Samba - samba-technical mailing list
On 01/08/2017 12:48, Michael Felt via samba-technical wrote:

> FYI: the nice news first --
>
> 'build' finished successfully (....)
> root@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@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@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!




Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: It can be done...

Samba - samba-technical mailing list
On 01/08/2017 13:43, Michael Felt via samba-technical wrote:

> 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@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?
Seems this has been reported on earlier:
https://lists.samba.org/archive/samba-technical/2016-March/112583.html
and also related to what I am trying now...
https://lists.samba.org/archive/samba-technical/2016-March/112583.html
and I cannot access https://bugzilla.samba.org/show_bug.cgi?id=11765 -
so I guess it is time to stop until I get a hint from someone.

In advance: Thanks for your time!

>
> because in the build area I see:
> root@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!
>
>
>
>
>



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: It can be done...

Samba - samba-technical mailing list
On 01/08/2017 17:25, Michael Felt via samba-technical wrote:

>
> 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!

Ok, reran config and changed prefix to /opt

What I had not noticed before is that not only is the installed LIBPATH
(behind the 0) long and relative, the directories do not exist in the
installed area.

After

LIBPATH=/opt/lib:/opt/lib/auth:/opt/lib/bind9:/opt/lib/gensec:/opt/lib/idmap:/opt/lib/ldb:/opt/lib/nss_info:/opt/lib/private:/opt/lib/process_model:/opt/lib/python2.7/site-packages/samba:/opt/lib/security:/opt/lib/service:/opt/lib/vfs

export LIBPATH

Now I get:

root@x069:[/data/prj/samba/samba-4.4.15]ldd /opt/sbin/samba
/opt/sbin/samba needs:
          /usr/lib/libpthread.a(shr_xpg5_64.o)
Cannot find libldb.so
          /opt/lib/libsamba-hostconfig.so
          /opt/lib/private/libcluster-samba4.so
          /opt/lib/libsamba-credentials.so
          /opt/lib/private/libpopt-samba4.so
          /opt/lib/private/libldbsamba-samba4.so
          /opt/lib/private/libcliauth-samba4.so
          /opt/lib/private/libservice-samba4.so
          /opt/lib/private/libshares-samba4.so
          /opt/lib/private/libutil-tdb-samba4.so
          /opt/lib/private/libsamba-security-samba4.so
          /opt/lib/private/libevents-samba4.so
          /opt/lib/private/libgensec-samba4.so
          /opt/lib/libsamba-util.so
          /opt/lib/private/libregistry-samba4.so
Cannot find libtevent.so
          /opt/lib/private/libtdb-wrap-samba4.so
Cannot find libtalloc.so
          /opt/lib/private/libauth4-samba4.so
          /opt/lib/libndr.so
          /opt/lib/private/libprocess-model-samba4.so
Cannot find libtdb.so
          /opt/lib/private/libreplace-samba4.so
          /opt/lib/private/libserver-role-samba4.so
          /opt/lib/private/libdbwrap-samba4.so
          /opt/lib/private/libsamdb-common-samba4.so
Cannot find libcom_err-samba4.so
Cannot find libgssapi-samba4.so
          /opt/lib/private/libkrb5samba-samba4.so
          /opt/lib/libsamba-errors.so
          /opt/lib/private/libauthkrb5-samba4.so
          /opt/lib/private/libndr-samba-samba4.so
          /opt/lib/private/libasn1util-samba4.so
          /opt/lib/libndr-nbt.so
          /opt/lib/private/libndr-samba4.so
          /opt/lib/libtevent-util.so
          /opt/lib/private/libMESSAGING-samba4.so
          /opt/lib/private/libnpa-tstream-samba4.so
          /opt/lib/libdcerpc.so
          /opt/lib/private/libsamba-sockets-samba4.so
          /opt/lib/libsamdb.so
          /opt/lib/private/libsamba-modules-samba4.so
          /opt/lib/libwbclient.so
          /opt/lib/private/libsamba-debug-samba4.so
          /opt/lib/private/libtime-basic-samba4.so
          /opt/lib/private/libutil-setid-samba4.so
          /opt/lib/private/libgenrand-samba4.so
          /opt/lib/private/libsocket-blocking-samba4.so
          /opt/lib/private/libutil-reg-samba4.so
          /opt/lib/private/libdcerpc-samba-samba4.so
          /opt/lib/private/libLIBWBCLIENT-OLD-samba4.so
          /opt/lib/private/libauth-unix-token-samba4.so
          /opt/lib/private/libdcerpc-samba4.so
          /opt/lib/private/libflag-mapping-samba4.so
          /opt/lib/private/libcli-ldap-common-samba4.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
          /opt/lib/libndr-krb5pac.so
          /opt/lib/private/libauth-sam-reply-samba4.so
          /opt/lib/libndr-standard.so
          /opt/lib/private/libmessages-util-samba4.so
          /opt/lib/private/libtalloc-report-samba4.so
          /opt/lib/private/libserver-id-db-samba4.so
          /opt/lib/private/libaddns-samba4.so
          /opt/lib/private/libcli-nbt-samba4.so
          /opt/lib/private/libsmbclient-raw-samba4.so
          /opt/lib/libdcerpc-binding.so
          /opt/lib/private/libhttp-samba4.so
          /opt/lib/private/libcli-cldap-samba4.so
          /opt/lib/private/libnetif-samba4.so
          /opt/lib/private/libcli-smb-common-samba4.so
          /opt/lib/private/libiov-buf-samba4.so
          /opt/lib/private/libwinbind-client-samba4.so
          /opt/lib/private/libsys-rw-samba4.so
Cannot find libheimbase-samba4.so
Cannot find libhx509-samba4.so
          /opt/lib/private/libmessages-dgm-samba4.so
          /opt/lib/libsmbconf.so
          /opt/lib/private/libsamba-cluster-support-samba4.so
          /opt/lib/private/libsamba3-util-samba4.so
          /opt/lib/private/libmsghdr-samba4.so
          /opt/lib/private/libinterfaces-samba4.so
          /opt/lib/private/libcli-ldap-samba4.so
          /opt/lib/private/libsmb-transport-samba4.so
          /opt/lib/private/libCHARSET3-samba4.so
          /opt/lib/private/libsmbregistry-samba4.so
          /opt/lib/private/libsmbd-shim-samba4.so
          /usr/lib/libnsl.a(shr_64.o)
          /usr/lib/libc.a(shr_64.o)
          /unix

The reminder seems to loop - at best, just go on forever.

Cannot find libtdb.so
Cannot find libtalloc.so
Cannot find libtevent.so
Cannot find libtalloc.so
Cannot find libtdb.so
Cannot find libtevent.so
Cannot find libldb.so
Cannot find libcom_err-samba4.so
Cannot find libgssapi-samba4.so
Cannot find libtevent.so
Cannot find libtalloc.so
Cannot find libtdb.so
Cannot find libroken-samba4.so

Night Night!



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: It can be done...

Samba - samba-technical mailing list
> On 01/08/2017 17:25, Michael Felt via samba-technical wrote:
> >
> > 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!
>
> Ok, reran config and changed prefix to /opt
>
> What I had not noticed before is that not only is the installed LIBPATH
> (behind the 0) long and relative, the directories do not exist in the
> installed area.
>
> After
>
> LIBPATH=/opt/lib:/opt/lib/auth:/opt/lib/bind9:/opt/lib/gensec:/opt/
> lib/idmap:/opt/lib/ldb:/opt/lib/nss_info:/opt/lib/private:/opt/lib/
> process_model:/opt/lib/python2.7/site-packages/samba:/opt/lib/
> security:/opt/lib/service:/opt/lib/vfs
>
> export LIBPATH
>
> Now I get:
>
> root@x069:[/data/prj/samba/samba-4.4.15]ldd /opt/sbin/samba
> /opt/sbin/samba needs:
>           /usr/lib/libpthread.a(shr_xpg5_64.o)
> Cannot find libldb.so
>           /opt/lib/libsamba-hostconfig.so
>           /opt/lib/private/libcluster-samba4.so
>           /opt/lib/libsamba-credentials.so

>
> Night Night!
>

Hi Michael -

I don't know if is a correct fix, but since Samba switched from autoconf
to waf I've been patching buildtools/wafsamba/samba_install.py with the
following changes for building on AIX, line numbers based on the version
of samba_install.py shipped with Samba 4.4.6, but the patch didn't change
when I built with newer versions.  I haven't tried building any 4.7

1.  Modify the following code at line 121 - 128 so that the condition that
does "dev_link     = bld.make_libname(target_name)" is run for all libs on
AIX.

              install_name = bld.make_libname(target_name,
version=self.vnum)
              install_link = bld.make_libname(target_name,
version=vnum_base)
              inst_name    = bld.make_libname(t.target)
              if not self.private_library:
                  # only generate the dev link for non-bundled libs
                  dev_link     = bld.make_libname(target_name)
          elif getattr(self, 'soname', ''):
              install_name = bld.make_libname(target_name)


2.  Modify the following code at lines 330 - 336 so that the -bsrv4 option
is included in the link flags, according the man page of ld on AIX the
"-R" option is only supported when -bsrv4 is also passed.

 
      # check which compiler/linker flags are needed for rpath support
      if not conf.CHECK_LDFLAGS(['-Wl,-rpath,.']) and
conf.CHECK_LDFLAGS(['-Wl,-R,.']):
         conf.env['RPATH_ST'] = '-Wl,-R,%s'
 
      # check for rpath
      if conf.CHECK_LIBRARY_SUPPORT(rpath=True):

When I build this way the resulting binaries work without setting LIBPATH,
dump -H shows:

> dump -H /PREFIX/sbin/smbd

/PREFIX/sbin/smbd:

                        ***Loader Section***
                      Loader Header Information
VERSION#         #SYMtableENT     #RELOCent        LENidSTR
0x00000001       0x00000130       0x000001c6       0x0000097d

#IMPfilID        OFFidSTR         LENstrTBL        OFFstrTBL
0x00000067       0x000031e8       0x000015d1       0x00003b65


                        ***Import File Strings***
INDEX  PATH                          BASE                MEMBER  
0      /PREFIX/lib/private:/PREFIX/lib:/usr/lib:/lib  
1                                    libpthread.a        shr_xpg5.o  
2                                    libsamba-util.so  
3                                    libsmbd-base-samba4.so  
4                                    libtime-basic-samba4.so  
5                                    libutil-setid-samba4.so  
6                                    libsamba-debug-samba4.so  
7                                    libgenrand-samba4.so  
8                                    libtalloc.so  
9                                    libreplace-samba4.so  
10                                   libsocket-blocking-samba4.so  
11                                   libtevent.so  
12                                   libsmbregistry-samba4.so  
13                                   libtalloc-report-samba4.so  
14                                   libprinting-migrate-samba4.so  
15                                   libgssapi-samba4.so  
16                                   libtevent-util.so  
17                                   libmessages-dgm-samba4.so  
18                                   libndr-samba-samba4.so  
19                                   libsamba-errors.so  
20                                   libnet-keytab-samba4.so  
21                                   libsamba-security-samba4.so  
22                                   libnetapi.so  
23                                   libsys-rw-samba4.so  
24                                   libsmbd-conn-samba4.so  
25                                   libsamba3-util-samba4.so  
26                                   libsamba-passdb.so  
27                                   libutil-tdb-samba4.so  
28                                   libnpa-tstream-samba4.so  
29                                   libcliauth-samba4.so  
30                                   libinterfaces-samba4.so  
31                                   libauth-sam-reply-samba4.so  
32                                   libpopt-samba3-samba4.so  
33                                   libtdb.so  
34                                   libmessages-util-samba4.so  
35                                   libauth-samba4.so  
36                                   liblibsmb-samba4.so  
37                                   libmsrpc3-samba4.so  
38                                   libserver-id-db-samba4.so  
39                                   libmsghdr-samba4.so  
40                                   libdbwrap-samba4.so  
41                                   libiov-buf-samba4.so  
42                                   libsmbconf.so  
43                                   libsamba-cluster-support-samba4.so    
 
44                                   libkrb5samba-samba4.so  
45                                   libdcerpc-samba-samba4.so  
46                                   libndr-krb5pac.so  
47                                   libsamba-sockets-samba4.so  
48                                   libndr.so  
49                                   libutil-reg-samba4.so  
50                                   libsmbd-shim-samba4.so  
51                                   libcli-spoolss-samba4.so  
52                                   libkrb5-samba4.so  
53                                   libroken-samba4.so  
54                                   libasn1-samba4.so  
55                                   libhcrypto-samba4.so  
56                                   libcom_err-samba4.so  
57                                   libwind-samba4.so  
58                                   libndr-standard.so  
59                                   libasn1util-samba4.so  
60                                   libndr-nbt.so  
61                                   libz-samba4.so  
62                                   libads-samba4.so  
63                                   liblibcli-netlogon3-samba4.so  
64                                   libutil-cmdline-samba4.so  
65                                   libwbclient.so  
66                                   libflag-mapping-samba4.so  
67                                   libsamba-credentials.so  
68                                   libsecrets3-samba4.so  
69                                   libsamba-hostconfig.so  
70                                   libpopt-samba4.so  
71                                   liblibcli-lsa3-samba4.so  
72                                   libtrusts-util-samba4.so  
73                                   libaddns-samba4.so  
74                                   libcli-ldap-common-samba4.so  
75                                   libcli-cldap-samba4.so  
76                                   libcli-smb-common-samba4.so  
77                                   libgse-samba4.so  
78                                   libgensec-samba4.so  
79                                   libdcerpc-binding.so  
80                                   libndr-samba4.so  
81                                   libtdb-wrap-samba4.so  
82                                   libCHARSET3-samba4.so  
83                                   libevents-samba4.so  
84                                   libheimbase-samba4.so  
85                                   libhx509-samba4.so  
86                                   libwinbind-client-samba4.so  
87                                   libldb.so  
88                                   libsamdb-common-samba4.so  
89                                   libldbsamba-samba4.so  
90                                   libauthkrb5-samba4.so  
91                                   libserver-role-samba4.so  
92                                   libcli-ldap-samba4.so  
93                                   libsmb-transport-samba4.so  
94                                   libsamba-modules-samba4.so  
95                                   libsamdb.so  
96                                   libcli-nbt-samba4.so  
97                                   libnetif-samba4.so  
98                                   libnsl.a            shr.o  
99                                   libbsd.a            shr.o  
100                                  libc.a              shr.o  
101                                  librtl.a            shr.o  
102    /                             unix


John Janosik
[hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: It can be done...

Samba - samba-technical mailing list
On 01/08/2017 21:24, John P Janosik via samba-technical wrote:
> Hi Michael -
a) Thanks John - will try your patch next.
b) tried:
# project samba configured on Tue Aug  1 18:58:29 2017 by
# waf 1.5.19 (abi 7, python 2070cf0 on aix5)
# using ./buildtools/bin/waf configure --without-ldap --without-ads
--prefix=/opt/samba --with-static-modules=ALL
#
But do not see any effect by the '--with-static-modules=ALL' as I still
see nearly 100 shared libraries that need dlopen() calls.

Is this also something different since 'waf'?

>
> I don't know if is a correct fix, but since Samba switched from autoconf
> to waf I've been patching buildtools/wafsamba/samba_install.py with the
> following changes for building on AIX, line numbers based on the version
> of samba_install.py shipped with Samba 4.4.6, but the patch didn't change
> when I built with newer versions.  I haven't tried building any 4.7
>
> 1.  Modify the following code at line 121 - 128 so that the condition that
> does "dev_link     = bld.make_libname(target_name)" is run for all libs on
> AIX.
>
>                install_name = bld.make_libname(target_name,
> version=self.vnum)
>                install_link = bld.make_libname(target_name,
> version=vnum_base)
>                inst_name    = bld.make_libname(t.target)
>                if not self.private_library:
>                    # only generate the dev link for non-bundled libs
>                    dev_link     = bld.make_libname(target_name)
>            elif getattr(self, 'soname', ''):
>                install_name = bld.make_libname(target_name)
>
>
> 2.  Modify the following code at lines 330 - 336 so that the -bsrv4 option
> is included in the link flags, according the man page of ld on AIX the
> "-R" option is only supported when -bsrv4 is also passed.
>
>  
>        # check which compiler/linker flags are needed for rpath support
>        if not conf.CHECK_LDFLAGS(['-Wl,-rpath,.']) and
> conf.CHECK_LDFLAGS(['-Wl,-R,.']):
>           conf.env['RPATH_ST'] = '-Wl,-R,%s'
>  
>        # check for rpath
>        if conf.CHECK_LIBRARY_SUPPORT(rpath=True):
>
> When I build this way the resulting binaries work without setting LIBPATH,
> dump -H shows:
>
>> dump -H /PREFIX/sbin/smbd
> /PREFIX/sbin/smbd:
>
>                          ***Loader Section***
>                        Loader Header Information
> VERSION#         #SYMtableENT     #RELOCent        LENidSTR
> 0x00000001       0x00000130       0x000001c6       0x0000097d
>
> #IMPfilID        OFFidSTR         LENstrTBL        OFFstrTBL
> 0x00000067       0x000031e8       0x000015d1       0x00003b65
>
>
>                          ***Import File Strings***
> INDEX  PATH                          BASE                MEMBER
> 0      /PREFIX/lib/private:/PREFIX/lib:/usr/lib:/lib
> 1                                    libpthread.a        shr_xpg5.o
> 2                                    libsamba-util.so
> 3                                    libsmbd-base-samba4.so


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: It can be done...

Samba - samba-technical mailing list
In reply to this post by Samba - samba-technical mailing list
On 01/08/2017 21:24, John P Janosik via samba-technical wrote:

>> On 01/08/2017 17:25, Michael Felt via samba-technical wrote:
>>> 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!
>> Ok, reran config and changed prefix to /opt
>>
>> What I had not noticed before is that not only is the installed LIBPATH
>> (behind the 0) long and relative, the directories do not exist in the
>> installed area.
>>
>> After
>>
>> LIBPATH=/opt/lib:/opt/lib/auth:/opt/lib/bind9:/opt/lib/gensec:/opt/
>> lib/idmap:/opt/lib/ldb:/opt/lib/nss_info:/opt/lib/private:/opt/lib/
>> process_model:/opt/lib/python2.7/site-packages/samba:/opt/lib/
>> security:/opt/lib/service:/opt/lib/vfs
>>
>> export LIBPATH
>>
>> Now I get:
>>
>> root@x069:[/data/prj/samba/samba-4.4.15]ldd /opt/sbin/samba
>> /opt/sbin/samba needs:
>>            /usr/lib/libpthread.a(shr_xpg5_64.o)
>> Cannot find libldb.so
>>            /opt/lib/libsamba-hostconfig.so
>>            /opt/lib/private/libcluster-samba4.so
>>            /opt/lib/libsamba-credentials.so
>> Night Night!
>>
> Hi Michael -
>
> I don't know if is a correct fix, but since Samba switched from autoconf
> to waf I've been patching buildtools/wafsamba/samba_install.py with the
> following changes for building on AIX, line numbers based on the version
> of samba_install.py shipped with Samba 4.4.6, but the patch didn't change
> when I built with newer versions.  I haven't tried building any 4.7
>
> 1.  Modify the following code at line 121 - 128 so that the condition that
> does "dev_link     = bld.make_libname(target_name)" is run for all libs on
> AIX.
>
>                install_name = bld.make_libname(target_name,
> version=self.vnum)
>                install_link = bld.make_libname(target_name,
> version=vnum_base)
>                inst_name    = bld.make_libname(t.target)
>                if not self.private_library:
>                    # only generate the dev link for non-bundled libs
>                    dev_link     = bld.make_libname(target_name)
>            elif getattr(self, 'soname', ''):
>                install_name = bld.make_libname(target_name)
>
>
> 2.  Modify the following code at lines 330 - 336 so that the -bsrv4 option
> is included in the link flags, according the man page of ld on AIX the
> "-R" option is only supported when -bsrv4 is also passed.
>
>  
>        # check which compiler/linker flags are needed for rpath support
>        if not conf.CHECK_LDFLAGS(['-Wl,-rpath,.']) and
> conf.CHECK_LDFLAGS(['-Wl,-R,.']):
>           conf.env['RPATH_ST'] = '-Wl,-R,%s'
>  
>        # check for rpath
>        if conf.CHECK_LIBRARY_SUPPORT(rpath=True):
>
> When I build this way the resulting binaries work without setting LIBPATH,
> dump -H shows:
OK. working through waf code, trying to understand (as I cannot find any
compareable example (only @classmethod and @staticmethod examples)) how
to read, e.g.
@conf
def CHECK_LDFLAGS(conf, ldflags):
     '''check if the given ldflags are accepted by the linker
     '''
     return conf.check(fragment='int main(void) { return 0; }\n',
                       execute=0,
                       ldflags=ldflags,
                       mandatory=False,
                       msg="Checking linker accepts %s" % ldflags)


I think this is what is being called as conf.CHECK_LDFLAGS(arguments...)

Is this an additional "class" syntax, or just a way to make a pyhton
'def' look like a class 'def'?

>
>> dump -H /PREFIX/sbin/smbd
> /PREFIX/sbin/smbd:
>
>                          ***Loader Section***
>                        Loader Header Information
> VERSION#         #SYMtableENT     #RELOCent        LENidSTR
> 0x00000001       0x00000130       0x000001c6       0x0000097d
>
> #IMPfilID        OFFidSTR         LENstrTBL        OFFstrTBL
> 0x00000067       0x000031e8       0x000015d1       0x00003b65
>
>
>                          ***Import File Strings***
> INDEX  PATH                          BASE                MEMBER
> 0      /PREFIX/lib/private:/PREFIX/lib:/usr/lib:/lib
> 1                                    libpthread.a        shr_xpg5.o
> 2                                    libsamba-util.so
> ...
> 100                                  libc.a              shr.o
> 101                                  librtl.a            shr.o
> 102    /                             unix
>
>
> John Janosik
> [hidden email]
>
>


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

resolv_wrapper on AIX

Samba - samba-technical mailing list
In reply to this post by Samba - samba-technical mailing list
On Tue, 2017-08-01 at 17:25 +0200, Michael Felt via samba-technical
wrote:
> Seems this has been reported on earlier:
> https://lists.samba.org/archive/samba-technical/2016-March/112583.html
> and also related to what I am trying now...
> https://lists.samba.org/archive/samba-technical/2016-March/112583.html
> and I cannot access https://bugzilla.samba.org/show_bug.cgi?id=11765 -
> so I guess it is time to stop until I get a hint from someone.

I don't know why that bug is locked down. 

resolv_wrapper is now maintained at https://cwrap.org/ but is still
very closely tied to samba, I've CC'ed Andreas the maintainer.

The biggest difficulty is that AIX just isn't a frequent target of
Samba development, so we have got a long way behind.

I know the change to waf has been a frustration, as that means we use
many more shared libraries etc.

I wish you the best getting us going on AIX again.

Andrew Bartlett

--
Andrew Bartlett                       http://samba.org/~abartlet/
Authentication Developer, Samba Team  http://samba.org
Samba Developer, Catalyst IT          http://catalyst.net.nz/services/samba


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: resolv_wrapper on AIX

Samba - samba-technical mailing list
On Saturday, 5 August 2017 11:33:59 CEST Andrew Bartlett wrote:

> On Tue, 2017-08-01 at 17:25 +0200, Michael Felt via samba-technical
>
> wrote:
> > Seems this has been reported on earlier:
> > https://lists.samba.org/archive/samba-technical/2016-March/112583.html
> > and also related to what I am trying now...
> > https://lists.samba.org/archive/samba-technical/2016-March/112583.html
> > and I cannot access https://bugzilla.samba.org/show_bug.cgi?id=11765 -> > so I guess it is time to stop until I get a hint from someone.
>
> I don't know why that bug is locked down.

The bug fixes the issue with the missing header files on AIX descirbed in the
E-Mail thread. The fixes for AIX are part of Samba since version 4.5.0.


        Andreas


--
Andreas Schneider                   GPG-ID: CC014E3D
Samba Team                             [hidden email]
www.samba.org

Loading...