I've a really interesting problem...

# make
gcc  -fomit-frame-pointer -Wall -s -o dhcpcd  peekfd.o udpipgen.o
buildmsg.o signals.o arp.o client.o dhcpcd.o  
# ls -l dhcpcd
-rwxr-xr-x    1 root     root        31780 Aug  9 11:58 dhcpcd
# ldd dhcpcd
        libc.so.6 => /lib/libc.so.6 (0x4001b000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)

...that worked, but...

# rm dhcpcd
# make
gcc  -static -fomit-frame-pointer -Wall -s -o dhcpcd  peekfd.o
udpipgen.o buildmsg.o signals.o arp.o client.o dhcpcd.o  
signals.o: In function `killPid':
signals.o(.text+0x94): undefined reference to `_IO_stderr_'
client.o: In function `dhcpConfig':
client.o(.text+0x158c): undefined reference to `_IO_stdout_'
client.o(.text+0x16b3): undefined reference to `_IO_stdout_'
client.o(.text+0x17eb): undefined reference to `_IO_stdout_'
client.o: In function `checkIfAlreadyRunning':
client.o(.text+0x2cce): undefined reference to `_IO_stderr_'
dhcpcd.o: In function `print_version':
dhcpcd.o(.text+0x9): undefined reference to `_IO_stderr_'
dhcpcd.o: In function `main':
dhcpcd.o(.text+0x59): undefined reference to `_IO_stderr_'
dhcpcd.o(.text+0x416): undefined reference to `_IO_stderr_'
dhcpcd.o(.text+0x4a2): undefined reference to `_IO_stderr_'
dhcpcd.o(.text+0x52e): more undefined references to `_IO_stderr_' follow
collect2: ld returned 1 exit status
make: *** [dhcpcd] Error 1
#

...that fails.  The *ONLY* difference is adding "-static" to the gcc
command line.  What's the difference?

_______________________________________________
Leaf-devel mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/leaf-devel

Reply via email to