[Samba] samba 4.12 build with gnuTLS on hp-ux

Andrew Bartlett abartlet at samba.org
Thu Jan 23 19:20:01 UTC 2020


On Thu, 2020-01-23 at 14:21 +0100, Peter Eriksson via samba wrote:
> I just went thru that process, but for OmniOS (Solaris-based) instead of HP-UX. In case someone else is interested, here are my notes for building Samba 4.11.5 on the latest OmniOS release:
> 
> Two patches are needed to the Samba source in order to compile and have it run without too many errors, those might not be needed for HP-UX (they can be downloaded from http://www.grebo.net/~peter/omnios/samba <http://www.grebo.net/~peter/omnios/samba> if needed though)
> 
> 1. memset(…, 0, sizeof(pthread_t)) before pthread_mutex_init() in lib/tdb/common/mutex.c (or it will fail when running)

> 2. fmemopen() is used in a test program - add a simulated version since it doesn’t exist in OmniOS.

Thankfully we have fixed #2 in Samba 4.12.  The test programs are now
only compiled with --enable-selftest is configured, and additionally
those that use fmemopen() are conditional on that.  This should make it
a little easier to build on a broader range of platforms. 

> (#1 is due to a bug in OmniOS libc when using “robust” mutexes).

OK.  We probably won't try and upstream that then.  Presumably you are
working with them to have that fixed? 

> I compile with Gcc 8.3.0 and Gnu make, 64 bit code.
> 
> 
> GMP (6.2.0)
> 
> % env MAKE=gmake PKG_CONFIG_PATH=/usr/local/lib/64/pkgconfig:/usr/lib/64/pkgconfig CXX="g++ -m64" CC="gcc -m64" ./configure  --libdir=/usr/local/lib/64 && gmake && gmake install
> 
> 
> NETTLE (3.4.1) - Fails to build an example program - hogweed-benchmark - but we ignore that
> 
> % env MAKE=gmake PKG_CONFIG_PATH=/usr/local/lib/64/pkgconfig:/usr/lib/64/pkgconfig CXX="g++ -m64" CC="gcc -m64" ./configure  --libdir=/usr/local/lib/64 && gmake -k ; gmake -k install
> 
> 
> GNUTLS (3.6.11.1)
> 
> % env MAKE=gmake PKG_CONFIG_PATH=/usr/local/lib/64/pkgconfig:/usr/lib/64/pkgconfig CXX="g++ -m64" CC="gcc -m64" ./configure --libdir=/usr/local/lib/64 --with-included-libtasn1 --with-included-unistring --without-p11-kit && gmake && gmake install
> 
> 
> SAMBA (4.11.5)
> 
> % env MAKE=gmake PKG_CONFIG_PATH=/usr/local/lib/64/pkgconfig:/usr/lib/64/pkgconfig CXX="g++ -m64" CC="gcc -D_POSIX_PTHREAD_SEMANTICS -m64 -lsocket -lnsl" ./configure  --libdir=/usr/local/lib/64 --without-ad-dc --without-json --without-libarchive && gmake && gmake install
> 

Thanks for showing the example!  This will be helpful to others.

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





More information about the samba mailing list