From owner-freebsd-questions Tue Dec 19 11:37:10 2000 From owner-freebsd-questions@FreeBSD.ORG Tue Dec 19 11:37:08 2000 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from privatecube.privatelabs.com (unknown [63.114.185.254]) by hub.freebsd.org (Postfix) with ESMTP id 02C8B37B402 for ; Tue, 19 Dec 2000 11:37:04 -0800 (PST) Received: from misha.privatelabs.com (root@misha.plten [10.0.0.106]) by privatecube.privatelabs.com (8.9.3/8.9.2) with ESMTP id OAA20480 for ; Tue, 19 Dec 2000 14:56:51 -0500 Received: (from mi@localhost) by misha.privatelabs.com (8.11.0/8.9.3) id eBJJaQB92794 for questions@freebsd.org; Tue, 19 Dec 2000 14:36:26 -0500 (EST) (envelope-from mi) From: Mikhail Teterin Message-Id: <200012191936.eBJJaQB92794@misha.privatelabs.com> Subject: shared libraries weirdness To: questions@freebsd.org Date: Tue, 19 Dec 2000 14:36:26 -0500 (EST) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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