Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 Dec 2000 14:36:26 -0500 (EST)
From:      Mikhail Teterin <mi@privatelabs.com>
To:        questions@freebsd.org
Subject:   shared libraries weirdness
Message-ID:  <200012191936.eBJJaQB92794@misha.privatelabs.com>

next in thread | raw e-mail | index | archive | help
Hello! I have a strange problem building devel/oaf port. The configure
fails and I'm trying to link the failed confidence-test file manually.
Here is the output of cc (with the -v option):

	=============== begin ====================
cc -o conftest -O -pipe -pipe -mcpu=i686 -march=i686 -DMI_CFLAGS -I/opt/include/glib12 -I/opt/include -I/opt/include conftest.c -L/opt/lib -lintl -L/opt/lib -lORBit -lIIOP -lORBitutil -lglib12 -lm -v
Using builtin specs.
gcc version 2.95.2 19991024 (release)
 /usr/libexec/cpp -lang-c -v -I/opt/include/glib12 -I/opt/include -I/opt/include -D__GNUC__=2 -D__GNUC_MINOR__=95 -Di386 -Dunix -D__FreeBSD__=4 -D__FreeBSD_cc_version=410000 -D__i386__ -D__unix__ -D__FreeBSD__=4 -D__FreeBSD_cc_version=410000 -D__i386 -D__unix -Acpu(i386) -Amachine(i386) -Asystem(unix) -Asystem(FreeBSD) -D__OPTIMIZE__ -Acpu(i386) -Amachine(i386) -Di386 -D__i386 -D__i386__ -D__ELF__ -DMI_CFLAGS conftest.c |
 /usr/libexec/cc1 -quiet -dumpbase conftest.c -mcpu=i686 -march=i686 -O -version -o - |
 /usr/libexec/elf/as -v -o /tmp/ccT24492.o -
GNU CPP version 2.95.2 19991024 (release) (i386 FreeBSD/ELF)GNU C version 2.95.2 19991024 (release) (i386-unknown-freebsd) compiled by GNU C version 2.95.2 19991024 (release).

GNU assembler version 2.10.0 (i386-unknown-freebsd4) using BFD version 2.10.0#include "..." search starts here:

#include <...> search starts here:
 /opt/include/glib12
 /opt/include
 /usr/include
 /usr/include
End of search list.
The following default directories have been omitted from the search path:
 /usr/include/g++
End of omitted list.
 /usr/libexec/elf/ld -m elf_i386 -dynamic-linker /usr/libexec/ld-elf.so.1 -o conftest /usr/lib/crt1.o /usr/lib/crti.o /usr/lib/crtbegin.o -L/opt/lib -L/opt/lib -L/usr/libexec/elf -L/usr/libexec -L/usr/lib /tmp/ccT24492.o -lintl -lORBit -lIIOP -lORBitutil -lglib12 -lm /usr/lib/libgcc.a -lc /usr/lib/libgcc.a /usr/lib/crtend.o /usr/lib/crtn.o
/usr/lib/libwrap.so.3: undefined reference to `longjmp'
/usr/lib/libwrap.so.3: undefined reference to `setjmp'
/usr/lib/libwrap.so.3: undefined reference to `getprotobyname'
/usr/lib/libwrap.so.3: undefined reference to `sleep'
/usr/lib/libwrap.so.3: undefined reference to `wait'
/usr/lib/libwrap.so.3: undefined reference to `umask'
/usr/lib/libwrap.so.3: undefined reference to `setgid'
/usr/lib/libwrap.so.3: undefined reference to `setenv'
/usr/lib/libwrap.so.3: undefined reference to `strtok'
/usr/lib/libwrap.so.3: undefined reference to `sscanf'
/usr/lib/libwrap.so.3: undefined reference to `nice'
/usr/lib/libwrap.so.3: undefined reference to `fgetc'
/usr/lib/libwrap.so.3: undefined reference to `strspn'
/usr/lib/libwrap.so.3: undefined reference to `setuid'
	=============== end ====================

Now, if I add the explicit -lwrap to command line, the thing links properly:

	=============== begin ====================
cc -o conftest -O -pipe -pipe -mcpu=i686 -march=i686 -DMI_CFLAGS -I/opt/include/glib12 -I/opt/include -I/opt/include conftest.c -L/opt/lib -lintl -L/opt/lib -lORBit -lIIOP -lORBitutil -lglib12 -lm -v -lwrap
Using builtin specs.
gcc version 2.95.2 19991024 (release)
 /usr/libexec/cpp -lang-c -v -I/opt/include/glib12 -I/opt/include -I/opt/include -D__GNUC__=2 -D__GNUC_MINOR__=95 -Di386 -Dunix -D__FreeBSD__=4 -D__FreeBSD_cc_version=410000 -D__i386__ -D__unix__ -D__FreeBSD__=4 -D__FreeBSD_cc_version=410000 -D__i386 -D__unix -Acpu(i386) -Amachine(i386) -Asystem(unix) -Asystem(FreeBSD) -D__OPTIMIZE__ -Acpu(i386) -Amachine(i386) -Di386 -D__i386 -D__i386__ -D__ELF__ -DMI_CFLAGS conftest.c |
 /usr/libexec/cc1 -quiet -dumpbase conftest.c -mcpu=i686 -march=i686 -O -version -o - |
 /usr/libexec/elf/as -v -o /tmp/ccV24536.o -
GNU CPP version 2.95.2 19991024 (release) (i386 FreeBSD/ELF)GNU C version 2.95.2 19991024 (release) (i386-unknown-freebsd) compiled by GNU C version 2.95.2 19991024 (release).

GNU assembler version 2.10.0 (i386-unknown-freebsd4) using BFD version 2.10.0#include "..." search starts here:

#include <...> search starts here:
 /opt/include/glib12
 /opt/include
 /usr/include
 /usr/include
End of search list.
The following default directories have been omitted from the search path:
 /usr/include/g++
End of omitted list.
 /usr/libexec/elf/ld -m elf_i386 -dynamic-linker /usr/libexec/ld-elf.so.1 -o conftest /usr/lib/crt1.o /usr/lib/crti.o /usr/lib/crtbegin.o -L/opt/lib -L/opt/lib -L/usr/libexec/elf -L/usr/libexec -L/usr/lib /tmp/ccV24536.o -lintl -lORBit -lIIOP -lORBitutil -lglib12 -lm -lwrap /usr/lib/libgcc.a -lc /usr/lib/libgcc.a /usr/lib/crtend.o /usr/lib/crtn.o
	=============== end ====================

I checked this on another machine -- everything is fine, there is no need
for explicit -lwrap. The ld, elf/ld, cc, libwrap.so.3 are the same...

Any comments? TIA!

	-mi


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200012191936.eBJJaQB92794>