Bug 242987 - security/nmap: fails to build after update to 7.80
Summary: security/nmap: fails to build after update to 7.80
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Ben Woods
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-12-30 18:26 UTC by Dries Michiels
Modified: 2020-01-06 13:38 UTC (History)
4 users (show)

See Also:
woodsb02: merge-quarterly+


Attachments
build log (143.82 KB, text/plain)
2019-12-30 18:26 UTC, Dries Michiels
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dries Michiels 2019-12-30 18:26:33 UTC
Created attachment 210336 [details]
build log

Hi,

You can find the full build log in attachments. Also CC latest committer.


The failure happens where there should be a fix for:

c++ -L../libpcap   -fstack-protector-strong  -L/usr/lib   -o nping ArgParser.o common.o common_modified.o nping.o NpingOps.o utils.o utils_net.o output.o stats.o NpingTargets.o NpingTarget.o EchoHeader.o EchoServer.o EchoClient.o ProbeMode.o NEPContext.o Crypto.o ../nsock/src/libnsock.a ../nbase/libnbase.a ../libnetutil/libnetutil.a -lssl -lcrypto ../libpcap/libpcap.a -libverbs ../libdnet-stripped/src/.libs/libdnet.a 
ld: error: unable to find library -libverbs
c++: error: linker command failed with exit code 1 (use -v to see invocation)
Comment 1 Ben Woods freebsd_committer 2020-01-05 02:13:14 UTC
I committed the update that caused the breakage - I will try to fix it now
Comment 2 Ben Woods freebsd_committer 2020-01-05 02:29:45 UTC
Report from garga:
"I've got some linker error trying to build this version on 2 different
situations (using poudriere on both):

- aarch64 host (12-STABLE) / 11-STABLE aarch64 jail
- amd64 host (12-STABLE) / 11-STABLE arm.armv6 jail with native-xtools

Problem is identical on both cases. Here are full logs

https://pastebin.com/9KQ1aUni
https://pastebin.com/duA7AYRw

-- 
Renato Botelho"
Comment 3 Ben Woods freebsd_committer 2020-01-05 03:29:17 UTC
*** My testing ***
ENV: poudriere, host running FreeBSD 13-CURRENT r354563 / 1300056 (amd64)

PASS - The following builds pass:
- 13-CURRENT r354563 / 1300056 (amd64)
- 12.0-RELEASE-p12 / 1200086 (amd64)
- 12.0-RELEASE-p12 / 1200086 (i386)
- 11.3-RELEASE-p5 / 1103000 (amd64)

FAIL - The following builds fail:
- 11.3-RELEASE-p5 / 1103000 (i386)


*** Testing by driesm.michiels@gmail.com ***
ENV: Synth

FAIL - The follow build fails:
- 12.1-STABLE r356169 / 1201506 (amd64)


*** Testing by garga ***
ENV: poudriere, host running 1200514 and 1201500 respectively

FAIL - The following builds fail:
- 11.3-STABLE 1103504 (arm)
- 11.3-STABLE 1103504 (arm64)
Comment 4 Ben Woods freebsd_committer 2020-01-05 03:33:49 UTC
The patches that were committed with this update to fix libverbs build issues during my testing on FreeBSD 13-CURRENT r354563 / 1300056 (amd64):


security/nmap/files/patch-configure:
--- configure.orig	2019-05-24 18:28:49 UTC
+++ configure
@@ -6365,7 +6365,7 @@ if test $have_libpcap != yes; then
   else
     CPPFLAGS="$CPPFLAGS -I\$(top_srcdir)/$libpcapdir"
   fi
-  LIBPCAP_LIBS='$(LIBPCAPDIR)/libpcap.a'
+  LIBPCAP_LIBS='$(LIBPCAPDIR)/libpcap.a -libverbs'
   PCAP_BUILD="build-pcap"
   PCAP_CLEAN="clean-pcap"
   PCAP_DIST_CLEAN="distclean-pcap"


security/nmap/files/patch-ncat_configure:
--- ncat/configure.orig	2019-12-08 01:42:55 UTC
+++ ncat/configure
@@ -4934,7 +4934,7 @@ fi
   LIBS="$LIBS_OLD"
 fi
 
-PCAP_LIBS="-lpcap"
+PCAP_LIBS="-lpcap -libverbs"
 if test $have_libpcap = yes; then
   PCAP_DEPENDS=""
   PCAP_BUILD=""


security/nmap/files/patch-nping_configure:
--- nping/configure.orig	2019-01-31 23:28:21 UTC
+++ nping/configure
@@ -5356,7 +5356,7 @@ if test $have_libpcap != yes; then
     LDFLAGS="-L$libpcapdir $LDFLAGS"
     CPPFLAGS="$CPPFLAGS -I$libpcapdir"
   fi
-  LIBPCAP_LIBS='$(LIBPCAPDIR)/libpcap.a'
+  LIBPCAP_LIBS='$(LIBPCAPDIR)/libpcap.a -libverbs'
   PCAP_DEPENDS='$(LIBPCAPDIR)/libpcap.a'
   PCAP_BUILD="build-pcap"
   PCAP_CLEAN="clean-pcap"
Comment 5 commit-hook freebsd_committer 2020-01-05 15:57:44 UTC
A commit references this bug:

Author: woodsb02
Date: Sun Jan  5 15:57:39 UTC 2020
New revision: 522159
URL: https://svnweb.freebsd.org/changeset/ports/522159

Log:
  security/nmap: Fix build on 11i386, 11arm, 11arm64

  Fix patches to configure scripts to only add -libverbs if found in base

  PR:		242987
  Reported by:	Dries Michiels <driesm.michiels@gmail.com>
  Reported by:	garga
  MFH:		2020Q1

Changes:
  head/security/nmap/Makefile
  head/security/nmap/files/patch-configure
  head/security/nmap/files/patch-ncat_configure
  head/security/nmap/files/patch-nping_configure
Comment 6 Ben Woods freebsd_committer 2020-01-05 15:59:45 UTC
Committed fix to ports head branch, awaiting approval to commit to ports quarterly branch.

Dries / garga - can you please confirm this has fixed the issue for you?
Comment 7 Dries Michiels 2020-01-05 16:40:51 UTC
Looking good Ben, this fixed it on my setup. Thanks!
Comment 8 commit-hook freebsd_committer 2020-01-06 09:49:16 UTC
A commit references this bug:

Author: woodsb02
Date: Mon Jan  6 09:48:20 UTC 2020
New revision: 522213
URL: https://svnweb.freebsd.org/changeset/ports/522213

Log:
  MFH: r522159

  security/nmap: Fix build on 11i386, 11arm, 11arm64

  Fix patches to configure scripts to only add -libverbs if found in base

  PR:		242987
  Reported by:	Dries Michiels <driesm.michiels@gmail.com>
  Reported by:	garga

  Approved by:	ports-secteam (joneum)

Changes:
_U  branches/2020Q1/
  branches/2020Q1/security/nmap/Makefile
  branches/2020Q1/security/nmap/files/patch-configure
  branches/2020Q1/security/nmap/files/patch-ncat_configure
  branches/2020Q1/security/nmap/files/patch-nping_configure
Comment 9 Ben Woods freebsd_committer 2020-01-06 09:51:13 UTC
Committed to 2020Q1 ports quarterly branch. Thanks!
Comment 10 Renato Botelho freebsd_committer 2020-01-06 13:38:55 UTC
I just would like to report that it worked as expected.  Thanks!