[Samba] Issues in building single statically linked binary of smbd

Rahul Rane rrane at vmware.com
Thu Jun 21 23:44:07 UTC 2018


Hello,


I'm new to this mailing list so apologies if this question is asked before. I want to build one single binary of smbd which has all libraries statically linked into it. I tried following options but got different errors or could not get it done. I have tried following things :

  1.  Compiled samba server code using following options :
     *   ./configure --bundled-libraries=ALL --with-static-modules=ALL --nonshared-binary=smbtorture,smbd/smbd
     *   It got successfully compiled and got installed also but after checking linked libraries with smbd (ldd smbd) i found few shared libraries (mostly gnu libraries) with smbd binary.
  2.  Compiled samba server code using following options:
     *   ./configure —with-builtin-libraries=ALL --bundled-libraries=ALL --with-static-modules=ALL --nonshared-binary=smbtorture,smbd/smbd
     *   But got error in make stage. :

ERROR: source source3/smbd/notify_internal.c is in more than one subsystem of target 'smbstatus'

  3.  Compiled samba server code using following options:
     *   CC='gcc -static' ./configure --bundled-libraries=ALL --with-static-modules=ALL --nonshared-binary=smbtorture,smbd/smbd
     *   But got error while compiling code.

As mentioned before my main intention is to build a big smbd binary with all libraries statically linked to itlsef so that I can copy that binary to anywhere and run it.  Please let me know if it is possible and am I missing anything here?

Thanks,
Rahul Rane


More information about the samba mailing list