security/nmap & gcc3.3?

Simon Barner barner at in.tum.de
Thu Jan 29 07:17:22 PST 2004


Charles Swiger wrote:

[...]

> 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?

Yes, that's the problem.
 
> 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... ]

This is very strange. g++ is supposed to link against lstdc++ without
any additional options.

I tried to compile nmap with my older version of g++33, and it compiled
and linked just fine:

g++33 -v
Reading specs from /usr/local/lib/gcc-lib/i386-portbld-freebsd4.9/3.3.3/specs
Configured with: ./..//gcc-3.3-20031208/configure --disable-nls
--with-gxx-include-dir=/usr/local/lib/gcc-lib/i386-portbld-freebsd4.9/3.3.3/
include/c++/ --with-system-zlib --enable-shared --enable-threads
--enable-threads=posix --prefix=/usr/local i386-portbld-freebsd4.9

Thread model: posix
gcc version 3.3.3 20031208 (prerelease) [FreeBSD]

I'd suggest that you make sure that you have the very latest version of
the gcc33 port installed, and if the problem continues to exist, IMO you
should contact the gcc maintainer (gerald@).

Simon
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: Digital signature
Url : http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20040129/fb7d36b0/attachment-0001.bin


More information about the freebsd-ports mailing list