NetBSD Problem Report #47546
From www@NetBSD.org Fri Feb 8 23:31:36 2013
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
by www.NetBSD.org (Postfix) with ESMTP id B1CEB63E520
for <gnats-bugs@gnats.NetBSD.org>; Fri, 8 Feb 2013 23:31:35 +0000 (UTC)
Message-Id: <20130208233135.0600363E520@www.NetBSD.org>
Date: Fri, 8 Feb 2013 23:31:34 +0000 (UTC)
From: rkitover@gmail.com
Reply-To: rkitover@gmail.com
To: gnats-bugs@NetBSD.org
Subject: pkgsrc: linux support for net/host
X-Send-Pr-Version: www-1.0
>Number: 47546
>Category: pkg
>Synopsis: pkgsrc: linux support for net/host
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: pkg-manager
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Feb 08 23:35:00 +0000 2013
>Closed-Date: Wed Feb 20 10:39:41 +0000 2013
>Last-Modified: Wed Feb 20 10:39:41 +0000 2013
>Originator: Rafael Kitover
>Release:
>Organization:
>Environment:
Linux amsems2wb-Stage 2.6.32-122.el6.i686 #1 SMP Wed Mar 9 23:47:29 EST 2011 i686 i686 i386 GNU/Linux
>Description:
net/host does not compile on linux
>How-To-Repeat:
cd net/host
bmake install clean clean-depends
>Fix:
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/net/host/Makefile,v
retrieving revision 1.25
diff -u -r1.25 Makefile
--- Makefile 23 Oct 2012 17:18:27 -0000 1.25
+++ Makefile 8 Feb 2013 23:29:02 -0000
@@ -31,6 +31,10 @@
BUILDLINK_TRANSFORM+= rm:-Wl,--warn-common
BUILDLINK_TRANSFORM+= rm:-static
.endif
+.if ${OPSYS} == "Linux"
+LDFLAGS+= -lresolv -lnsl
+BUILDLINK_TRANSFORM+= rm:-static
+.endif
.if !empty(MACHINE_PLATFORM:MIRIX-5*)
CPPFLAGS+= -DIRIX5
.endif
>Release-Note:
>Audit-Trail:
From: David Holland <dholland-pbugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: pkg/47546: pkgsrc: linux support for net/host
Date: Sat, 9 Feb 2013 09:10:28 +0000
On Fri, Feb 08, 2013 at 11:35:00PM +0000, rkitover@gmail.com wrote:
> +.if ${OPSYS} == "Linux"
> +LDFLAGS+= -lresolv -lnsl
^^^^^
> +BUILDLINK_TRANSFORM+= rm:-static
> +.endif
Are you sure? I don't think I've ever seen a Linux with -lnsl...
--
David A. Holland
dholland@netbsd.org
From: Rafael Kitover <rkitover@gmail.com>
To: gnats-bugs@netbsd.org
Cc: pkg-manager@netbsd.org, gnats-admin@netbsd.org,
pkgsrc-bugs@netbsd.org
Subject: Re: pkg/47546: pkgsrc: linux support for net/host
Date: Mon, 11 Feb 2013 20:39:28 -0500
On Saturday, February 9, 2013 at 4:15 AM, David Holland wrote:
> The following reply was made to PR pkg/47546; it has been noted by GNATS.
>
> From: David Holland <dholland-pbugs@netbsd.org (mailto:dholland-pbugs@netbsd.org)>
> To: gnats-bugs@NetBSD.org (mailto:gnats-bugs@NetBSD.org)
> Cc:
> Subject: Re: pkg/47546: pkgsrc: linux support for net/host
> Date: Sat, 9 Feb 2013 09:10:28 +0000
>
> On Fri, Feb 08, 2013 at 11:35:00PM +0000, rkitover@gmail.com (mailto:rkitover@gmail.com) wrote:
> > +.if ${OPSYS} == "Linux"
> > +LDFLAGS+= -lresolv -lnsl
>
> ^^^^^
> > +BUILDLINK_TRANSFORM+= rm:-static
> > +.endif
>
>
> Are you sure? I don't think I've ever seen a Linux with -lnsl...
>
> --
> David A. Holland
> dholland@netbsd.org (mailto:dholland@netbsd.org)
Sorry, a case of copypasta.
I do have a libnsl actually (rhel 6) but it isn't necessary:
rkitover@amsems2wb-Stage ~/src/pkgsrc/net/host % ls -l /usr/lib/libnsl*
-rw-r--r-- 1 root root 147558 Jan 31 06:06 /usr/lib/libnsl.a
lrwxrwxrwx 1 root root 21 Feb 8 18:03 /usr/lib/libnsl.so -> ../../lib/libnsl.so.1
Just -lresolv builds the package fine.
Unfortunately it spews a bunch of warning during build, but my pkgsrc skills are not up to par to fix those.
From: "David A. Holland" <dholland@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/47546 CVS commit: pkgsrc/net/host
Date: Mon, 18 Feb 2013 04:25:07 +0000
Module Name: pkgsrc
Committed By: dholland
Date: Mon Feb 18 04:25:07 UTC 2013
Modified Files:
pkgsrc/net/host: Makefile distinfo
pkgsrc/net/host/patches: patch-aa
Log Message:
Fix Linux build; from Rafael Kitover in PR 47546. While here, teach it
to not store IP(v4) addresses in 64-bit integers on LP64 hosts, as
that causes problems.
To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 pkgsrc/net/host/Makefile
cvs rdiff -u -r1.10 -r1.11 pkgsrc/net/host/distinfo
cvs rdiff -u -r1.4 -r1.5 pkgsrc/net/host/patches/patch-aa
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->feedback
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Mon, 18 Feb 2013 04:37:15 +0000
State-Changed-Why:
Committed; give it a try.
I fixed one warning that was caused by bad probing of the machine type;
there's one uninitialized variable warning that looks to be harmless.
Otherwise there are some unused variables (harmless) and a lot of drivel
caused by enabling -Wtraditional, which isn't interesting. If you see
anything further that looks serious, let me know.
From: Rafael Kitover <rkitover@gmail.com>
To: gnats-bugs@netbsd.org
Cc: pkg-manager@netbsd.org, pkgsrc-bugs@netbsd.org,
gnats-admin@netbsd.org, dholland@netbsd.org
Subject: Re: pkg/47546 (pkgsrc: linux support for net/host)
Date: Tue, 19 Feb 2013 15:02:23 -0500
On Sunday, February 17, 2013 at 11:37 PM, dholland@netbsd.org wrote:
> Synopsis: pkgsrc: linux support for net/host
>
> State-Changed-From-To: open->feedback
> State-Changed-By: dholland@NetBSD.org (mailto:dholland@NetBSD.org)
> State-Changed-When: Mon, 18 Feb 2013 04:37:15 +0000
> State-Changed-Why:
> Committed; give it a try.
>
> I fixed one warning that was caused by bad probing of the machine type;
> there's one uninitialized variable warning that looks to be harmless.
> Otherwise there are some unused variables (harmless) and a lot of drivel
> caused by enabling -Wtraditional, which isn't interesting. If you see
> anything further that looks serious, let me know.
Works perfectly, thank you!
State-Changed-From-To: feedback->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Wed, 20 Feb 2013 10:39:41 +0000
State-Changed-Why:
Confirmed, thanks.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.