Nmap Development mailing list archives
patches for HP-UX 11.11compilation problems
From: Zakharov Mikhail <zmey20000 () yahoo com>
Date: Fri, 16 Jun 2006 16:02:39 +0400 (MSD)
Hi! These simple patches fix nmap-4.03 compilation problem under HP-UX 11.11. Tested with gcc 4.1.0 on c110 (9000/777) box under HP-UX 11.11. you should patch configure and configure.ac, then just run ./configure The point is, that library -lnm was not included to configure.ac and as a result was not specified in LIBS variable in configure script. The same patches for nmap-4.10 also included. Found another bug: can't compile nmap-4.10 on HP-UX 11.11. Here is the output: Compiling nmap rm -f nmap g++ -Llibpcap -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 MACLookup.o nmap_tty.o nmap_dns.o -lnbase -lnsock -lpcre -lpcap libdnet-stripped/src/.libs/libdnet.a -lm -lnm /usr/ccs/bin/ld: Unsatisfied symbols: pcap_parse (first referenced in libpcap/libpcap.a(gencode.o)) (code) collect2: ld returned 1 exit status gmake: *** [nmap] Error 1 ________________________________________________________ Вы уже с Yahoo!? Испытайте обновленную и улучшенную. Yahoo! Почту! http://ru.mail.yahoo.com
--- configure.orig 2006-05-06 04:28:07.000000000 +0300 +++ configure 2006-05-06 04:27:04.000000000 +0300 @@ -2935,6 +2935,82 @@ #define HPUX 1 _ACEOF + # To link with libnet and NM (/usr/lib/libnm.sl) library + # on HP-UX 11.11 (other versions?) Mikhail Zakharov (zmey20000 () yahoo com) + +echo "$as_me:$LINENO: checking for open_mib in -lnm" >&5 +echo $ECHO_N "checking for open_mib in -lnm... $ECHO_C" >&6 +if test "${ac_cv_lib_nm_open_mib+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lnm $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char open_mib (); +int +main () +{ +open_mib (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_nm_open_mib=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_nm_open_mib=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_nm_open_mib" >&5 +echo "${ECHO_T}$ac_cv_lib_nm_open_mib" >&6 +if test $ac_cv_lib_nm_open_mib = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBNM 1 +_ACEOF + + LIBS="-lnm $LIBS" + +fi + ;; *-solaris2.0*) cat >>confdefs.h <<\_ACEOF
--- configure.ac.orig 2006-05-06 04:28:01.000000000 +0300 +++ configure.ac 2006-05-06 04:26:01.000000000 +0300 @@ -140,6 +140,9 @@ ;; *-hpux*) AC_DEFINE(HPUX) + # To link with libnet and NM (/usr/lib/libnm.sl) library + # on HP-UX 11.11 (other versions?) Mikhail Zakharov (zmey20000 () yahoo com) + AC_CHECK_LIB(nm, open_mib) ;; *-solaris2.0*) AC_DEFINE(STUPID_SOLARIS_CHECKSUM_BUG)
--- configure.orig 2006-05-06 08:25:33.000000000 +0300 +++ configure 2006-05-05 22:59:38.000000000 +0300 @@ -2935,6 +2935,82 @@ #define HPUX 1 _ACEOF + # To link with libnet and NM (/usr/lib/libnm.sl) library + # on HP-UX 11.11 (other versions?) Mikhail Zakharov (zmey20000 () yahoo com) + +echo "$as_me:$LINENO: checking for open_mib in -lnm" >&5 +echo $ECHO_N "checking for open_mib in -lnm... $ECHO_C" >&6 +if test "${ac_cv_lib_nm_open_mib+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lnm $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char open_mib (); +int +main () +{ +open_mib (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_nm_open_mib=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_nm_open_mib=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_nm_open_mib" >&5 +echo "${ECHO_T}$ac_cv_lib_nm_open_mib" >&6 +if test $ac_cv_lib_nm_open_mib = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBNM 1 +_ACEOF + + LIBS="-lnm $LIBS" + +fi + ;; *-solaris2.0*) cat >>confdefs.h <<\_ACEOF
--- configure.ac.orig 2006-05-06 08:25:42.000000000 +0300 +++ configure.ac 2006-05-05 22:58:48.000000000 +0300 @@ -140,6 +140,9 @@ ;; *-hpux*) AC_DEFINE(HPUX) + # To link with libnet and NM (/usr/lib/libnm.sl) library + # on HP-UX 11.11 (other versions?) Mikhail Zakharov (zmey20000 () yahoo com) + AC_CHECK_LIB(nm, open_mib) ;; *-solaris2.0*) AC_DEFINE(STUPID_SOLARIS_CHECKSUM_BUG)
_______________________________________________ Sent through the nmap-dev mailing list http://cgi.insecure.org/mailman/listinfo/nmap-dev
Current thread:
- patches for HP-UX 11.11compilation problems Zakharov Mikhail (Jun 16)
- re: patches for HP-UX 11.11compilation problems Zakharov Mikhail (Jun 17)
- Re: patches for HP-UX 11.11compilation problems Fyodor (Jun 18)
- Ответ: Re: patches for HP-UX 11.11compilation problems Zakharov Mikhail (Jun 19)
- Re: patches for HP-UX 11.11compilation problems Fyodor (Jun 18)
- <Possible follow-ups>
- Re: Re: patches for HP-UX 11.11compilation problems Zakharov Mikhail (Jun 24)
- re: patches for HP-UX 11.11compilation problems Zakharov Mikhail (Jun 17)