NetBSD Problem Report #49752

From www@NetBSD.org  Tue Mar 17 01:35:14 2015
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id CA958A654B
	for <gnats-bugs@gnats.NetBSD.org>; Tue, 17 Mar 2015 01:35:14 +0000 (UTC)
Message-Id: <20150317013513.85A95A65B8@mollari.NetBSD.org>
Date: Tue, 17 Mar 2015 01:35:13 +0000 (UTC)
From: epergne@hotmail.com
Reply-To: epergne@hotmail.com
To: gnats-bugs@NetBSD.org
Subject: ./bootstrap --unpriveleged fails on Alpine Linux
X-Send-Pr-Version: www-1.0

>Number:         49752
>Category:       pkg
>Synopsis:       ./bootstrap --unpriveleged fails on Alpine Linux
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    joerg
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Mar 17 01:40:00 +0000 2015
>Closed-Date:    Mon Mar 14 04:24:52 +0000 2016
>Last-Modified:  Mon Mar 14 04:24:52 +0000 2016
>Originator:     Michael Roberts
>Release:        pkgsrc-2014Q4
>Organization:
>Environment:
Linux alpine 3.14.30-0-grsec #1-Alpine SMP Wed Jan 28 13:20:34 GMT 2015 i686 Linux
>Description:
Bootstraping pkgsrc with the following command:

./bootstrap --unprivileged --prefix /home/user/.local/opt/pkgsrc

Fails with the following compilation error:

gcc -O2 -Wno-error -Wno-error  -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-uninitialized -Wreturn-type -Wcast-qual -
Wpointer-arith -Wwrite-strings -Wswitch -Wshadow -Werror  -D_LARGEFILE_SOURCE -D_LARGE_FILES -D_FILE_OFFSET_BITS=64 -DDEF_UMASK=022 -I/home/
user/.local/opt/pkgsrc/pkgsrc/bootstrap/work/wrk/pkgtools/pkg_install/work/bzip2 -I/home/user/.local/opt/pkgsrc/pkgsrc/bootstrap/work/wr
k/pkgtools/pkg_install/work/zlib -I/home/user/.local/opt/pkgsrc/pkgsrc/bootstrap/work/wrk/pkgtools/pkg_install/work/libarchive/libarchive 
-I/home/user/.local/opt/pkgsrc/pkgsrc/bootstrap/work/wrk/pkgtools/pkg_install/work/libfetch -DHAVE_NBCOMPAT_H=1 -I/home/user/.local/opt/
pkgsrc/pkgsrc/bootstrap/work/wrk/pkgtools/pkg_install/work/libnbcompat -I. -D_LARGEFILE_SOURCE -D_LARGE_FILES -D_FILE_OFFSET_BITS=64 -DINET6
 -DFTP_COMBINE_CWDS -c common.c
In file included from /home/user/.local/opt/pkgsrc/pkgsrc/bootstrap/work/wrk/pkgtools/pkg_install/work/libnbcompat/nbcompat/cdefs.h:36:0,
                 from /home/user/.local/opt/pkgsrc/pkgsrc/bootstrap/work/wrk/pkgtools/pkg_install/work/libnbcompat/nbcompat.h:31,
                 from common.c:37:
/usr/include/sys/cdefs.h:1:2: error: #warning usage of non-standard #include <sys/cdefs.h> is deprecated [-Werror=cpp]
 #warning usage of non-standard #include <sys/cdefs.h> is deprecated
  ^
cc1: all warnings being treated as errors


>How-To-Repeat:
- Install Alpine Linux <http://www.alpinelinux.org>
- Install the latest SDK (apk add alpine-sdk)
- Install CVS (apk add cvs)
- Download pkgsrc & update
- Bootstrap pkgsrc


>Fix:

>Release-Note:

>Audit-Trail:
From: David Holland <dholland-pbugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/49752: ./bootstrap --unpriveleged fails on Alpine Linux
Date: Wed, 18 Mar 2015 19:20:39 +0000

 On Tue, Mar 17, 2015 at 01:40:00AM +0000, epergne@hotmail.com wrote:
  > /usr/include/sys/cdefs.h:1:2: error: #warning usage of non-standard #include <sys/cdefs.h> is deprecated [-Werror=cpp]
  >  #warning usage of non-standard #include <sys/cdefs.h> is deprecated

 huzzah for glibc...

 There are two issues here (besides routine glibc stupidity):
   (1) the configure script isn't correctly detecting that the system
       <sys/cdefs.h> is no good;
   (2) the gcc command line contains -Wno-error -Wno-error -Werror

 If the configure script doesn't use -Werror it won't fail on that
 warning, hence #1; the question I guess is where that -Werror in the
 gcc command line is coming from.

 -- 
 David A. Holland
 dholland@netbsd.org

From: michael lowell roberts <epergne@hotmail.com>
To: gnats-bugs@NetBSD.org, pkg-manager@netbsd.org, gnats-admin@netbsd.org,
 pkgsrc-bugs@netbsd.org
Cc: 
Subject: Re: pkg/49752: ./bootstrap --unpriveleged fails on Alpine Linux
Date: Sun, 12 Apr 2015 11:30:39 -0700

 On Wed, Mar 18, 2015, at 12:25 PM, David Holland wrote:
 > The following reply was made to PR pkg/49752; it has been noted by GNATS.
 > 
 > From: David Holland <dholland-pbugs@netbsd.org>
 > To: gnats-bugs@NetBSD.org
 > Cc: 
 > Subject: Re: pkg/49752: ./bootstrap --unpriveleged fails on Alpine Linux
 > Date: Wed, 18 Mar 2015 19:20:39 +0000
 > 
 >  On Tue, Mar 17, 2015 at 01:40:00AM +0000, epergne@hotmail.com wrote:
 >   > /usr/include/sys/cdefs.h:1:2: error: #warning usage of non-standard #include <sys/cdefs.h> is deprecated [-Werror=cpp]
 >   >  #warning usage of non-standard #include <sys/cdefs.h> is deprecated
 >  
 >  huzzah for glibc...
 >  
 >  There are two issues here (besides routine glibc stupidity):
 >    (1) the configure script isn't correctly detecting that the system
 >        <sys/cdefs.h> is no good;
 >    (2) the gcc command line contains -Wno-error -Wno-error -Werror
 >  
 >  If the configure script doesn't use -Werror it won't fail on that
 >  warning, hence #1; the question I guess is where that -Werror in the
 >  gcc command line is coming from.

 Thanks for getting back to me. I did some digging around to find out
 where the -Werror might be coming from.

 Prefixing the bootstrap command with `NOGCCERROR=1` solves the problem.
 i.e.:

 NOGCCERROR=1 ./bootstrap --unprivileged

 I got the idea after seeing the following in a grep result:

 share/mk/bsd.sys.mk:25:CFLAGS+= -Werror

 Which appeared to be the only place where that flag is specified.

 After seeing the bug report at <https://gnats.netbsd.org/46292>,
 however, I have concerns that my workaround could break something else.
 If so, is there a way to address the core issue?

 ~mlr

Responsible-Changed-From-To: pkg-manager->joerg
Responsible-Changed-By: bsiegert@NetBSD.org
Responsible-Changed-When: Sun, 28 Jun 2015 16:39:04 +0000
Responsible-Changed-Why:
This is a problem in the libnbcompat configure.
Joerg, any ideas?


From: Joerg Sonnenberger <joerg@britannica.bec.de>
To: gnats-bugs@NetBSD.org
Cc: joerg@NetBSD.org, pkg-manager@netbsd.org, pkgsrc-bugs@netbsd.org,
	gnats-admin@netbsd.org, bsiegert@NetBSD.org, epergne@hotmail.com
Subject: Re: pkg/49752 (./bootstrap --unpriveleged fails on Alpine Linux)
Date: Sun, 28 Jun 2015 18:48:54 +0200

 On Sun, Jun 28, 2015 at 04:39:04PM +0000, bsiegert@NetBSD.org wrote:
 > Synopsis: ./bootstrap --unpriveleged fails on Alpine Linux
 > 
 > Responsible-Changed-From-To: pkg-manager->joerg
 > Responsible-Changed-By: bsiegert@NetBSD.org
 > Responsible-Changed-When: Sun, 28 Jun 2015 16:39:04 +0000
 > Responsible-Changed-Why:
 > This is a problem in the libnbcompat configure.
 > Joerg, any ideas?

 This should have been fixed a while ago.

 Joerg

State-Changed-From-To: open->feedback
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Sun, 28 Jun 2015 19:55:27 +0000
State-Changed-Why:
joerg thinks it's already fixed - can you try current or soon-to-be-branched
2015Q2?


State-Changed-From-To: feedback->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Mon, 14 Mar 2016 04:24:52 +0000
State-Changed-Why:
submitter's email bounced.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.