[sclug] Staticly link smbclient

pieter claassen pieter at claassen.co.uk
Tue May 6 13:36:15 UTC 2008


I am trying to link smbclient statically and I have tried:

1. ./configure; make LDFLAGS="-static"
2. edited the Makefile and added -static to the bin/smbclient target

When I try to run the binary, I get:

r at etch:~/dev/samba-3.0.24/source/bin$ ./smbclient
bash: ./smbclient: No such file or directory

If I run file on it:

r at etch:~/dev/samba-3.0.24/source/bin$ file smbclient
smbclient: ELF 32-bit LSB shared object, Intel 80386, version 1  
(SYSV), for GNU/Linux 2.4.1, not stripped

If I strace it:

r at etch:~/dev/samba-3.0.24/source/bin$ strace ./smbclient
execve("./smbclient", ["./smbclient"], [/* 25 vars */]) = -1 ENOENT  
(No such file or directory)
dup(2)                                  = 3
fcntl64(3, F_GETFL)                     = 0x2 (flags O_RDWR)
fstat64(3, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 1), ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,  
0) = 0xb7f1b000
_llseek(3, 0, 0xbfc53ea4, SEEK_CUR)     = -1 ESPIPE (Illegal seek)
write(3, "strace: exec: No such file or di"..., 40strace: exec: No  
such file or directory
) = 40
close(3)                                = 0
munmap(0xb7f1b000, 4096)                = 0
exit_group(1)                           = ?
Process 4365 detached

This is clearly not working.
Any ideas?

Regards,
Pieter

pieter claassen
pieter at claassen.co.uk






More information about the Sclug mailing list