使用waf构建静态链接的二进制文件

时间:2016-11-23 04:48:18

标签: gcc makefile samba waf

我正在尝试使用静态链接从最新源构建一个smbclient二进制文件,因此它可以是可移植的。我在已安装所有配置依赖项的RHEL 7计算机上执行此操作。

我尝试了以下内容,但ldd仍然说二进制文件具有动态依赖性。

# wget https://www.samba.org/samba/ftp/samba-latest.tar.gz
# tar -zxvf samba-latest.tar.gz
# cd samba-4.5.1/
# ./configure
# make SHARED=0 CC='gcc -static'
# ldd /root/samba-4.5.1/bin/default/source4/client/smbclient4
    linux-vdso.so.1 =>  (0x00007fff3ebb1000)
    libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fb7bf35d000)
    libcmdline-credentials-samba4.so => /root/samba-4.5.1/bin/shared/private/libcmdline-credentials-samba4.so (0x00007fb7bf159000)
    libsmbclient-raw-samba4.so => /root/samba-4.5.1/bin/shared/private/libsmbclient-raw-samba4.so (0x00007fb7bef0e000)
    libtalloc.so.2 => /root/samba-4.5.1/bin/shared/private/libtalloc.so.2 (0x00007fb7bed04000)
    libsamba-credentials.so.0 => /root/samba-4.5.1/bin/shared/libsamba-credentials.so.0 (0x00007fb7beaef000)
    libsamba-errors.so.1 => /root/samba-4.5.1/bin/shared/libsamba-errors.so.1 (0x00007fb7be7a0000)
    libsamba-hostconfig.so.0 => /root/samba-4.5.1/bin/shared/libsamba-hostconfig.so.0 (0x00007fb7be56f000)
    libsamba-security-samba4.so => /root/samba-4.5.1/bin/shared/private/libsamba-security-samba4.so (0x00007fb7be34b000)
    ...

我不确定这是否是因为Samba现在使用WAF进行构建。所以我正在寻求帮助。

0 个答案:

没有答案