From owner-freebsd-ports@FreeBSD.ORG Wed Jan 28 12:39:54 2004 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A5F0316A4CE for ; Wed, 28 Jan 2004 12:39:54 -0800 (PST) Received: from smtpout.mac.com (A17-250-248-89.apple.com [17.250.248.89]) by mx1.FreeBSD.org (Postfix) with ESMTP id DE2CC43D39 for ; Wed, 28 Jan 2004 12:39:51 -0800 (PST) (envelope-from cswiger@mac.com) Received: from mac.com (smtpin08-en2 [10.13.10.153]) by smtpout.mac.com (Xserve/MantshX 2.0) with ESMTP id i0SKdpqa010009 for ; Wed, 28 Jan 2004 12:39:51 -0800 (PST) Received: from [192.168.1.6] (pool-68-160-236-34.ny325.east.verizon.net [68.160.236.34]) (authenticated bits=0) by mac.com (Xserve/smtpin08/MantshX 3.0) with ESMTP id i0SKdot6013328 for ; Wed, 28 Jan 2004 12:39:51 -0800 (PST) Mime-Version: 1.0 (Apple Message framework v612) Content-Transfer-Encoding: 7bit Message-Id: <1E5E3622-51D2-11D8-96D6-003065A20588@mac.com> Content-Type: text/plain; charset=US-ASCII; format=flowed To: ports@freebsd.org From: Charles Swiger Date: Wed, 28 Jan 2004 15:39:50 -0500 X-Mailer: Apple Mail (2.612) Subject: security/nmap & gcc3.3? X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jan 2004 20:39:54 -0000 Hi, all-- On a FreeBSD-4.9 system, nmap-3.50 builds fine using the stock cc (gcc version 2.95.4 20020320), but fails using gcc33 (version 3.3.3 20040126): 9-sec# make -k [ ... ] 10-sec# make ===> Building for nmap-3.50 Compiling libnbase cd nbase && make Compiling libnsock cd nsock/src && make Compiling nmap rm -f nmap /usr/local/bin/g++33 -L/usr/local/lib -rpath=/usr/lib:/usr/local/lib -L/usr/lib -Lnbase -Lnsock/src/ -o nmap main.o nmap.o targets.o tcpip.o nmap_error.o utils.o idle_scan.o osscan.o output.o scan_engine.o timing.o charpool.o services.o protocols.o nmap_rpc.o portlist.o NmapOps.o TargetGroup.o Target.o FingerPrintResults.o service_scan.o NmapOutputTable.o -lm -lssl -lcrypto -lnbase -lnsock -lpcre -lpcap main.o(.eh_frame+0x11): undefined reference to `__gxx_personality_v0' nmap.o: In function `nmap_main(int, char**)': nmap.o(.text+0x1a18): undefined reference to `operator new(unsigned)' nmap.o(.text+0x1f7a): undefined reference to `operator delete(void*)' nmap.o(.text+0x1f8f): undefined reference to `operator delete(void*)' nmap.o(.text+0x2ba5): undefined reference to `operator delete(void*)' nmap.o(.text+0x2bad): undefined reference to `_Unwind_Resume' nmap.o(.eh_frame+0x12): undefined reference to `__gxx_personality_v0' targets.o: In function `nexthost(HostGroupState*, scan_lists*, int*)': targets.o(.text+0x653): undefined reference to `operator new(unsigned)' targets.o(.text+0x87f): undefined reference to `operator delete(void*)' targets.o(.text+0x934): undefined reference to `operator delete(void*)' targets.o(.text+0x93c): undefined reference to `_Unwind_Resume' targets.o(.eh_frame+0x12): undefined reference to `__gxx_personality_v0' tcpip.o(.eh_frame+0x11): undefined reference to `__gxx_personality_v0' nmap_error.o(.eh_frame+0x11): undefined reference to `__gxx_personality_v0' utils.o(.eh_frame+0x11): undefined reference to `__gxx_personality_v0' idle_scan.o(.eh_frame+0x11): undefined reference to `__gxx_personality_v0' osscan.o: In function `os_scan(Target*)': osscan.o(.text+0x2d48): undefined reference to `operator new(unsigned)' osscan.o(.text+0x2db0): undefined reference to `operator delete(void*)' osscan.o(.text+0x2de4): undefined reference to `_Unwind_Resume' osscan.o(.eh_frame+0x12): undefined reference to `__gxx_personality_v0' [ ... ] collect2: ld returned 1 exit status *** Error code 1 Stop in /usr/ports/security/nmap/work/nmap-3.50. *** Error code 1 Stop in /usr/ports/security/nmap. ==== I would gather that nmap is setting the linking path in a fashion which causes the gcc33 version of libstdc++ to not be found, or to not be linked in by default? Retrying the linking stage by hand as follows produces a working binary: 58-sec# /usr/local/bin/g++33 -L/usr/local/lib/gcc-lib/i386-portbld-freebsd4.9/3.3.3/ -L/usr/local/lib -rpath=/usr/lib:/usr/local/lib -L/usr/lib -Lnbase -Lnsock/src/ -o nmap main.o nmap.o targets.o tcpip.o nmap_error.o utils.o idle_scan.o osscan.o output.o scan_engine.o timing.o charpool.o services.o protocols.o nmap_rpc.o portlist.o NmapOps.o TargetGroup.o Target.o FingerPrintResults.o service_scan.o NmapOutputTable.o -lm -lssl -lcrypto -lnbase -lnsock -lpcre -lpcap -lstdc++ [ Other ports I've tried which use g++33 link fine; this problem seems specific to security/nmap... ] -- -Chuck