peixing.sun at emc.com
2012-May-07 16:21 UTC
[Samba] How to build Samba4 using static linked libraries
Hi All:
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?
Thanks very much
Peixing
libpthread.so.0 => /lib64/libpthread.so.0 (0x0000003745400000)
libcmdline-credentials.so => not found
libldb.so.1 => not found
libcli-nbt.so => not found
libsamdb-common.so => not found
libsmbclient.so.0 => /usr/lib64/libsmbclient.so.0
(0x00002b7566e79000)
libsmbclient-raw.so.0 => not found
libtevent-util.so.0 => not found
libreplace.so => not found
libcluster.so => not found
libsamba-credentials.so.0 => not found
libUTIL_TDB.so => not found
libndr-samba.so => not found
libauthkrb5.so => not found
libsamba-hostconfig.so.0 => not found
libldbsamba.so => not found
libcliauth.so => not found
liberrors.so => not found
libnetapi.so.0 => not found
libsamdb.so.0 => not found
libndr-samba4.so => not found
libwbclient.so.0 => not found
libshares.so => not found
libsmbpasswdparser.so => not found
libcli-ldap.so => not found
libdcerpc-binding.so.0 => not found
libevents.so => not found
libgensec.so.0 => not found
libtorture.so.0 => not found
libsamba-net.so => not found
libdcerpc.so.0 => not found
libdsdb-module.so => not found
libregistry.so.0 => not found
libasn1util.so => not found
libtevent.so.0 => not found
libsamba-sockets.so => not found
libcli_cldap.so => not found
libnetif.so => not found
libtdb-wrap.so => not found
libservice.so => not found
libndr.so.0 => not found
libtalloc.so.2 => not found
libauth4.so => not found
libntvfs.so => not found
libdcerpc-samba.so => not found
libndr-standard.so.0 => not found
peixing.sun at emc.com
2012-May-07 18:23 UTC
[Samba] How to build Samba4 using static linked libraries
Hi All:
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?
Thanks very much
Peixing
libpthread.so.0 => /lib64/libpthread.so.0 (0x0000003745400000)
libcmdline-credentials.so => not found
libldb.so.1 => not found
libcli-nbt.so => not found
libsamdb-common.so => not found
libsmbclient.so.0 => /usr/lib64/libsmbclient.so.0
(0x00002b7566e79000)
libsmbclient-raw.so.0 => not found
libtevent-util.so.0 => not found
libreplace.so => not found
libcluster.so => not found
libsamba-credentials.so.0 => not found
libUTIL_TDB.so => not found
libndr-samba.so => not found
libauthkrb5.so => not found
libsamba-hostconfig.so.0 => not found
libldbsamba.so => not found
libcliauth.so => not found
liberrors.so => not found
libnetapi.so.0 => not found
libsamdb.so.0 => not found
libndr-samba4.so => not found
libwbclient.so.0 => not found
libshares.so => not found
libsmbpasswdparser.so => not found
libcli-ldap.so => not found
libdcerpc-binding.so.0 => not found
libevents.so => not found
libgensec.so.0 => not found
libtorture.so.0 => not found
libsamba-net.so => not found
libdcerpc.so.0 => not found
libdsdb-module.so => not found
libregistry.so.0 => not found
libasn1util.so => not found
libtevent.so.0 => not found
libsamba-sockets.so => not found
libcli_cldap.so => not found
libnetif.so => not found
libtdb-wrap.so => not found
libservice.so => not found
libndr.so.0 => not found
libtalloc.so.2 => not found
libauth4.so => not found
libntvfs.so => not found
libdcerpc-samba.so => not found
libndr-standard.so.0 => not found
Volker Lendecke
2012-May-07 19:38 UTC
[Samba] How to build Samba4 using static linked libraries
On Mon, May 07, 2012 at 02:23:22PM -0400, peixing.sun at emc.com wrote:> 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?For me if I do a ./autogen.sh; ./configure.developer; make; make bin/smbtorture4 in the source3 directory, bin/smbtorture4 links only against system libs. You might want to try that. With best regards, Volker -- SerNet GmbH, Bahnhofsallee 1b, 37081 G?ttingen phone: +49-551-370000-0, fax: +49-551-370000-9 AG G?ttingen, HRB 2816, GF: Dr. Johannes Loxen http://www.sernet.de, mailto:kontakt at sernet.de
Stefan (metze) Metzmacher
2012-May-07 19:47 UTC
[Samba] How to build Samba4 using static linked libraries
Hi,> 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 https://gitweb.samba.org/?p=samba.git;a=blob;f=source3/Makefile-smbtorture4; This should build a statically linked smbtorture4: cd source3 ./configure.developer make bin/smbtorture4 metze
peixing.sun at emc.com
2012-May-07 22:21 UTC
[Samba] How to build Samba4 using static linked libraries
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 Peixing -----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 Hi,> 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 https://gitweb.samba.org/?p=samba.git;a=blob;f=source3/Makefile-smbtorture4; This should build a statically linked smbtorture4: cd source3 ./configure.developer make bin/smbtorture4 metze
Andrew Bartlett
2012-May-07 22:30 UTC
[Samba] How to build Samba4 using static linked libraries
On Mon, 2012-05-07 at 18:21 -0400, peixing.sun at emc.com wrote:> 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.Yes, this is a recursive invocation of the waf build from the autoconf build, which (by design) produces the static linked smbtorture4 that you desire. You can of course produce this directly at the top level build, just follow the pattern in the Makefile-smbtorture4 that was indicated. Andrew Bartlett -- Andrew Bartlett http://samba.org/~abartlet/ Authentication Developer, Samba Team http://samba.org
Richard Sharpe
2012-May-13 20:17 UTC
[Samba] How to build Samba4 using static linked libraries
On Mon, 2012-05-07 at 12:21 -0400, peixing.sun at emc.com wrote:> Hi All: > > 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?Is there anything else you would like us to do for you? Come clean now.
Volker Lendecke
2012-May-14 05:21 UTC
[Samba] How to build Samba4 using static linked libraries
On Mon, May 07, 2012 at 12:21:29PM -0400, peixing.sun at emc.com wrote:> 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.You might want to try the following steps: cd source3 ./autogen.sh ./configure.developer make bin/smbtorture4 The resulting binary bin/smbtorture4 *is* the smbtorture from the main build from source4/torture, but it is linked so that it only depends on system libraries. With best regards, Volker Lendecke -- SerNet GmbH, Bahnhofsallee 1b, 37081 G?ttingen phone: +49-551-370000-0, fax: +49-551-370000-9 AG G?ttingen, HRB 2816, GF: Dr. Johannes Loxen http://www.sernet.de, mailto:kontakt at sernet.de