Building Samba on OmniOS


  1. OmniOS Dependencies
  2. # pkg install developer/gcc51 developer/pkg-config \
    developer/parser/bison developer/build/gnu-make \
    developer/object-file system/library/math system/header
    
  3. https://ftp.gnu.org/gnu/nettle/
  4. 
    Munge config.make link to add -shared
    LIBNETTLE_LINK = $(CC) $(CFLAGS) $(LDFLAGS) -G -shared -h $(LIBNETTLE_SONAME)
    LIBHOGWEED_LINK = $(CC) $(CFLAGS) $(LDFLAGS) -G -shared -h $(LIBHOGWEED_SONAME)
    
    $ env PATH=/usr/bin:/usr/sbin:/usr/ccs/bin:/usr/gnu/bin:/usr/sfw/bin \
    CC=gcc CFLAGS="-m64 -O3" CPPFLAGS=-I/usr/include/gmp \
    LDFLAGS="-m64 -R/opt/nettle/lib" \
    ./configure --prefix=/opt/nettle --disable-static --enable-shared \
    --disable-assembler
    
  5. http://ftp.gnu.org/gnu/libtasn1/
  6. 
    $ env PATH=/usr/bin:/usr/sbin:/usr/ccs/bin:/usr/gnu/bin:/usr/sfw/bin \
    CC=gcc CFLAGS="-m64 -O3" LDFLAGS=-m64 \
    ./configure --prefix=/opt/libtasn1 --disable-static --enable-shared
    
  7. https://www.gnutls.org/
  8. 
    $ env PATH=/usr/bin:/usr/sbin:/usr/ccs/bin:/usr/gnu/bin:/usr/sfw/bin \
    CC=gcc CFLAGS="-m64 -O3" CXXFLAGS="-m64 -O3" \
    CPPFLAGS="-I/opt/nettle/include -I/opt/libtasn1/include -I/usr/include/gmp" \
    LDFLAGS="-m64 -R/opt/nettle/lib -R/opt/libtasn1/lib" \
    PKG_CONFIG_PATH=/usr/lib/pkgconfig:/opt/nettle/lib/pkgconfig:/opt/libtasn1/lib/p
    kgconfig \
    ./configure --prefix=/opt/gnutls --disable-static --enable-shared \
    --without-p11-kit --without-tpm
    
  9. Samba
  10. 
    64-bit python expects modules under 64/ directories
    
    $ env PATH=/usr/bin:/usr/sbin:/usr/ccs/bin:/usr/gnu/bin:/usr/sfw/bin:/opt/gnutls/bin \
    CC=gcc CFLAGS=-m64 CPPFLAGS=-I/opt/gnutls/include \
    LDFLAGS="-m64 -R/opt/gnutls/lib" \
    PKG_CONFIG_PATH=/usr/lib/pkgconfig:/opt/gnutls/lib/pkgconfig:/opt/nettle/lib/pkgconfig:/opt/libtasn1/lib/pkgconfig \
    ./configure --prefix=/opt/samba --sysconfdir=/etc/opt/samba \
    --localstatedir=/var/opt/samba --enable-gnutls \
    --with-privatedir=/var/opt/samba/private --with-ntvfs-fileserver
    
    # env PATH=/usr/bin/amd64:/usr/bin:/usr/sbin:/usr/ccs/bin:/opt/samba/bin:/opt/samba/sbin:/usr/bin \
     samba-tool domain provision --use-rfc2307 --use-ntvfs --interactive
    

John D. Groenveld <groenveld@acm.org>
$Id: samba.html,v 1.6 2017/09/21 11:28:30 jdg117 Exp jdg117 $