Nmap Development mailing list archives

Re: Problems building with ASAN


From: Daniel Miller <bonsaiviking () gmail com>
Date: Sat, 30 Jul 2016 09:28:43 -0500

Jacek,

Would you mind including your nbase/config.log or at least the portions
relating to getaddrinfo? Does the problem persist if you do "make
distclean" before configuring? Nbase's configure script should detect that
you already have getaddrinfo (which necessarily means you have struct
addrinfo).

Dan

On Sat, Jul 30, 2016 at 5:47 AM, Jacek Wielemborek <d33tah () gmail com> wrote:

W dniu 30.07.2016 o 06:24, Daniel Miller pisze:
Jacek,

To avoid repeating effort, you should make sure you're working from the
latest SVN (which has an internal version number of 7.25SVN). I just
pushed
half a dozen fixes for minor issues found with AddressSanitizer and
UndefinedBehaviorSanitizer in the past few days.

Also, if you're having build issues, be sure to "make distclean" before
re-running configure. It shouldn't be necessary to define any HAVE_*
macros, so report that if it still is a problem.

Dan

Whoops, you're right, forgot to run "svn up". I did it this time though
and I'm still having issues:

$ make -j1
Compiling libnetutil
cd libnetutil && make
make[1]: Entering directory '/home/d33tah/.nmap/libnetutil'
g++ -c -I../liblinear -I../liblua -I/usr/include/lua
-I../libdnet-stripped/include  -I../nbase -I../nsock/include
-DHAVE_CONFIG_H -D_FORTIFY_SOURCE=2 -fsanitize=address -Wall
-fno-strict-aliasing netutil.cc -o netutil.o
In file included from /usr/include/sys/stat.h:25:0,
                 from ../nbase/nbase.h:173,
                 from netutil.cc:131:
/usr/include/features.h:328:4: warning: #warning _FORTIFY_SOURCE
requires compiling with optimization (-O) [-Wcpp]
 #  warning _FORTIFY_SOURCE requires compiling with optimization (-O)
    ^
In file included from ../nbase/nbase.h:591:0,
                 from netutil.cc:131:
../nbase/nbase_ipv6.h:246:8: error: redefinition of ‘struct addrinfo’
 struct addrinfo {
        ^
In file included from ../nbase/nbase.h:200:0,
                 from netutil.cc:131:
/usr/include/netdb.h:567:8: error: previous definition of ‘struct addrinfo’
 struct addrinfo
        ^
Makefile:37: recipe for target 'netutil.o' failed
make[1]: *** [netutil.o] Error 1
make[1]: Leaving directory '/home/d33tah/.nmap/libnetutil'
Makefile:142: recipe for target 'build-netutil' failed
make: *** [build-netutil] Error 2

Tested on latest SVN version, command executed:

CFLAGS="-fsanitize=address" CXXFLAGS="-fsanitize=address"
LDFLAGS="-fsanitize=address" ./configure && make


_______________________________________________
Sent through the dev mailing list
https://nmap.org/mailman/listinfo/dev
Archived at http://seclists.org/nmap-dev/

Current thread: