From nobody@FreeBSD.org  Mon Aug 29 15:38:27 2005
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 66C4016A41F
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 29 Aug 2005 15:38:27 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 19D7C43D5E
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 29 Aug 2005 15:38:27 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id j7TFcQo6040842
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 29 Aug 2005 15:38:26 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id j7TFcQTl040841;
	Mon, 29 Aug 2005 15:38:26 GMT
	(envelope-from nobody)
Message-Id: <200508291538.j7TFcQTl040841@www.freebsd.org>
Date: Mon, 29 Aug 2005 15:38:26 GMT
From: David Landgren <david@landgren.net>
To: freebsd-gnats-submit@FreeBSD.org
Subject: tcptraceroute-1.4 port is broken if libnet-devel is installed
X-Send-Pr-Version: www-2.3

>Number:         85441
>Category:       ports
>Synopsis:       tcptraceroute-1.4 port is broken if libnet-devel is installed
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Mon Aug 29 15:40:17 GMT 2005
>Closed-Date:    Wed Aug 31 20:02:15 GMT 2005
>Last-Modified:  Wed Aug 31 20:02:15 GMT 2005
>Originator:     David Landgren
>Release:        5.2.1-RELEASE
>Organization:
>Environment:
FreeBSD bechet.bpinet.com 5.2.1-RELEASE FreeBSD 5.2.1-RELEASE #0: Mon Feb 23 20:45:55 GMT 2004     root@wv1u.btc.adaptec.com:/usr/obj/usr/src/sys/GENERIC  i386

>Description:
I wanted to install tcptraceroute from ports, and I received the following compile output:

# make
===>  Extracting for tcptraceroute-1.4
=> Checksum OK for tcptraceroute-1.4.tar.gz.
===>  Patching for tcptraceroute-1.4
===>  Applying FreeBSD patches for tcptraceroute-1.4
===>   tcptraceroute-1.4 depends on file: /usr/local/lib/libnet.a - found
===>  Configuring for tcptraceroute-1.4
===>  Building for tcptraceroute-1.4
cc -O -pipe -march=pentiumpro -march=pentiumpro `libnet-config --defines` -I/usr/local/include  -o tcptraceroute tcptraceroute.c  -L/usr/local/lib `libnet-config --libs` -lpcap
tcptraceroute.c: In function `iptohost':
tcptraceroute.c:596: warning: return makes pointer from integer without a cast
tcptraceroute.c: In function `allocateid':
tcptraceroute.c:885: error: `PRu16' undeclared (first use in this function)
tcptraceroute.c:885: error: (Each undeclared identifier is reported only once
tcptraceroute.c:885: error: for each function it appears in.)
tcptraceroute.c: In function `debugoptions':
tcptraceroute.c:1007: error: `LIBNET_IP_H' undeclared (first use in this function)
tcptraceroute.c:1007: error: `LIBNET_ICMP_H' undeclared (first use in this function)
tcptraceroute.c: In function `defaults':
tcptraceroute.c:1136: error: `LIBNET_IP_H' undeclared (first use in this function)
tcptraceroute.c:1145: error: too few arguments to function `libnet_seed_prand'
tcptraceroute.c: In function `initcapture':
tcptraceroute.c:1182: error: `LIBNET_IP_H' undeclared (first use in this function)
tcptraceroute.c:1182: error: `LIBNET_ICMP_H' undeclared (first use in this function)
tcptraceroute.c: In function `probe':
tcptraceroute.c:1225: error: `LIBNET_IP_H' undeclared (first use in this function)
tcptraceroute.c:1298: warning: passing arg 8 of `libnet_build_tcp' makes integer from pointer without a cast
tcptraceroute.c:1298: error: too few arguments to function `libnet_build_tcp'
tcptraceroute.c:1300: warning: passing arg 1 of `libnet_do_checksum' from incompatible pointer type
tcptraceroute.c:1300: warning: passing arg 2 of `libnet_do_checksum' makes pointer from integer without a cast
tcptraceroute.c:1300: error: too few arguments to function `libnet_do_checksum'
tcptraceroute.c: In function `capture':
tcptraceroute.c:1412: error: `LIBNET_IP_H' undeclared (first use in this function)
tcptraceroute.c:1418: error: `LIBNET_ICMP_H' undeclared (first use in this function)
tcptraceroute.c:1426: error: dereferencing pointer to incomplete type
tcptraceroute.c:1432: error: dereferencing pointer to incomplete type
tcptraceroute.c:1438: error: dereferencing pointer to incomplete type
tcptraceroute.c:1441: error: dereferencing pointer to incomplete type
tcptraceroute.c:1451: error: dereferencing pointer to incomplete type
tcptraceroute.c:1489: error: dereferencing pointer to incomplete type
tcptraceroute.c:1495: error: dereferencing pointer to incomplete type
tcptraceroute.c:1501: error: dereferencing pointer to incomplete type
tcptraceroute.c:1504: error: dereferencing pointer to incomplete type
tcptraceroute.c:1508: error: dereferencing pointer to incomplete type
tcptraceroute.c:1511: error: dereferencing pointer to incomplete type
tcptraceroute.c:1516: error: dereferencing pointer to incomplete type
tcptraceroute.c:1523: error: dereferencing pointer to incomplete type
tcptraceroute.c:1537: error: dereferencing pointer to incomplete type
tcptraceroute.c:1541: error: dereferencing pointer to incomplete type
tcptraceroute.c:1582: error: dereferencing pointer to incomplete type
tcptraceroute.c:1586: error: dereferencing pointer to incomplete type
tcptraceroute.c:1591: error: dereferencing pointer to incomplete type
tcptraceroute.c:1594: error: dereferencing pointer to incomplete type
tcptraceroute.c:1599: error: dereferencing pointer to incomplete type
tcptraceroute.c:1600: error: dereferencing pointer to incomplete type
tcptraceroute.c:1603: error: dereferencing pointer to incomplete type
tcptraceroute.c:1611: error: dereferencing pointer to incomplete type
tcptraceroute.c:1615: error: dereferencing pointer to incomplete type
tcptraceroute.c:1618: error: dereferencing pointer to incomplete type
tcptraceroute.c:1631: error: dereferencing pointer to incomplete type
tcptraceroute.c:1632: error: dereferencing pointer to incomplete type
tcptraceroute.c:1675: error: dereferencing pointer to incomplete type
tcptraceroute.c: In function `trace':
tcptraceroute.c:1693: error: `LIBNET_IP_H' undeclared (first use in this function)
*** Error code 1

Stop in /usr/ports/net/tcptraceroute/work/tcptraceroute-1.4.
*** Error code 1

Stop in /usr/ports/net/tcptraceroute.
-----

I then verified on a fresh 5.4-STABLE box to see if the problem persists across versions, and I noticed that it depended on the net/libnet port.

Going back to the 5.2.1 box, it turns out that the net/libnet-devel port was installed (for reasons lost in the mists of time). I deinstalled this port and installed net/libnet instead. I was then able to install tcptraceroute successfully.

The port should either know how to use libnet-devel, or complain about the incompatibility.
>How-To-Repeat:
Deinstall the net/libnet port (e.g. libnet-1.0.2a,1), if present.

Install the net/libnet-devel port (libnet-devel-1.1.2.1).

Install the net/tcptraceroute port.
>Fix:
Deinstall net/libnet-devel
>Release-Note:
>Audit-Trail:

From: Vasil Dimov <vd@datamax.bg>
To: David Landgren <david@landgren.net>
Cc: freebsd-gnats-submit@FreeBSD.org, bug-followup@freebsd.org
Subject: Re: ports/85441: tcptraceroute-1.4 port is broken if libnet-devel is installed
Date: Mon, 29 Aug 2005 19:02:42 +0300

 On Mon, Aug 29, 2005 at 03:38:26PM +0000, David Landgren wrote:
 
 > The port should either know how to use libnet-devel, or complain about the incompatibility.
 
 This is the trivial fix: libnet installs libpwrite.a, and libnet-devel
 does not. If libnet-devel is installed the port will not detect
 libpwrite.a and will attempt to install net/libnet which will fail with
 error "conflicting with installed libnet-devel". This seems to be quite
 a little more explanative.
 
 This is not very robust in means that some future version of
 libnet-devel may install libpwrite.a...
 
 
 Index: Makefile
 ===================================================================
 RCS file: /home/ncvs/ports/net/tcptraceroute/Makefile,v
 retrieving revision 1.5
 diff -u -r1.5 Makefile
 --- Makefile	13 Apr 2005 14:30:01 -0000	1.5
 +++ Makefile	29 Aug 2005 15:51:38 -0000
 @@ -13,7 +13,7 @@
  MAINTAINER=	ports@FreeBSD.org
  COMMENT=	A traceroute implementation using TCP packets
  
 -BUILD_DEPENDS=	${LOCALBASE}/lib/libnet.a:${PORTSDIR}/net/libnet
 +BUILD_DEPENDS=	${LOCALBASE}/lib/libpwrite.a:${PORTSDIR}/net/libnet
  
  MAN8=	tcptraceroute.8
 

From: Vasil Dimov <vd@datamax.bg>
To: David Landgren <david@landgren.net>
Cc: freebsd-gnats-submit@FreeBSD.org, bug-followup@freebsd.org
Subject: Re: ports/85441: tcptraceroute-1.4 port is broken if libnet-devel is installed
Date: Mon, 29 Aug 2005 19:02:42 +0300

 On Mon, Aug 29, 2005 at 03:38:26PM +0000, David Landgren wrote:
 
 > The port should either know how to use libnet-devel, or complain about the incompatibility.
 
 This is the trivial fix: libnet installs libpwrite.a, and libnet-devel
 does not. If libnet-devel is installed the port will not detect
 libpwrite.a and will attempt to install net/libnet which will fail with
 error "conflicting with installed libnet-devel". This seems to be quite
 a little more explanative.
 
 This is not very robust in means that some future version of
 libnet-devel may install libpwrite.a...
 
 
 Index: Makefile
 ===================================================================
 RCS file: /home/ncvs/ports/net/tcptraceroute/Makefile,v
 retrieving revision 1.5
 diff -u -r1.5 Makefile
 --- Makefile	13 Apr 2005 14:30:01 -0000	1.5
 +++ Makefile	29 Aug 2005 15:51:38 -0000
 @@ -13,7 +13,7 @@
  MAINTAINER=	ports@FreeBSD.org
  COMMENT=	A traceroute implementation using TCP packets
  
 -BUILD_DEPENDS=	${LOCALBASE}/lib/libnet.a:${PORTSDIR}/net/libnet
 +BUILD_DEPENDS=	${LOCALBASE}/lib/libpwrite.a:${PORTSDIR}/net/libnet
  
  MAN8=	tcptraceroute.8
 
State-Changed-From-To: open->closed 
State-Changed-By: pav 
State-Changed-When: Wed Aug 31 20:01:59 GMT 2005 
State-Changed-Why:  
Vasil's suggestion applied. Port will not complain about conflict between 
libnet and libnet-devel 

http://www.freebsd.org/cgi/query-pr.cgi?pr=85441 
>Unformatted:
