[Samba] How to build Samba4 using static linked libraries

peixing.sun at emc.com peixing.sun at emc.com
Mon May 7 16:21:51 MDT 2012

Thanks very much for answers from both Stefan and Volker.

The solutions from both of you are built for source3/torture/

I actually want to build the smbtorture using source code under source4/torture/smb2
I am trying the solutions you gave, but not sure if they apply to source4/torture/smb2.

Thanks a lot

-----Original Message-----
From: Stefan (metze) Metzmacher [mailto:metze at samba.org] 
Sent: Monday, May 07, 2012 3:48 PM
To: Sun, Peixing
Cc: samba-technical at lists.samba.org; samba at lists.samba.org
Subject: Re: How to build Samba4 using static linked libraries


> I am building the  torture/smbtorture for    samba-4.0.0alpha17.  After build,  I am running the test in another environment.
> I not only need to copy the binary smbtorture,  I also need to copy the shared libraries.   This is HUGE inconvenient for us.
> Could somebody tell me how to build the binary using static linked libraries?

Take a look at


This should build a statically linked smbtorture4:

cd source3
make bin/smbtorture4


More information about the samba mailing list