NetBSD Problem Report #55487

From www@netbsd.org  Mon Jul 13 20:16:11 2020
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 468EB1A9213
	for <gnats-bugs@gnats.NetBSD.org>; Mon, 13 Jul 2020 20:16:11 +0000 (UTC)
Message-Id: <20200713201609.CB7FA1A9227@mollari.NetBSD.org>
Date: Mon, 13 Jul 2020 20:16:09 +0000 (UTC)
From: nfisher.sr@gmail.com
Reply-To: nfisher.sr@gmail.com
To: gnats-bugs@NetBSD.org
Subject: samba4 fails to build due to unknown waf configure argument
X-Send-Pr-Version: www-1.0

>Number:         55487
>Category:       pkg
>Synopsis:       samba4 fails to build due to unknown waf configure argument
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          feedback
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jul 13 20:20:00 +0000 2020
>Closed-Date:    
>Last-Modified:  Thu Jun 17 01:10:44 +0000 2021
>Originator:     Nathan Fisher
>Release:        pkgsrc stable 2020Q2
>Organization:
>Environment:
Linux gandalf.shire 5.7.7-arch1-1 #1 SMP PREEMPT Wed, 01 Jul 2020 14:53:16 +0000 x86_64 GNU/Linux
>Description:
Building samba4 fails to to passing waf and unknown configure argument.

=> Bootstrap dependency digest>=20010302: found digest-20190127
=> Checksum SHA1 OK for samba-4.12.3.tar.gz
=> Checksum RMD160 OK for samba-4.12.3.tar.gz
=> Checksum SHA512 OK for samba-4.12.3.tar.gz
===> Installing dependencies for samba-4.12.3nb1
==========================================================================
The supported build options for samba are:

	acl ads avahi fam ldap pam winbind

The currently selected options are:

	ads avahi ldap pam winbind

You can select which build options to use by setting PKG_DEFAULT_OPTIONS
or the following variable.  Its current value is shown:

	PKG_OPTIONS.samba4 (not defined)

==========================================================================
==========================================================================
The following variables will affect the build process of this package,
samba-4.12.3nb1.  Their current value is shown below:

        * CURSES_DEFAULT = curses
        * PAM_DEFAULT = openpam
        * PYTHON_VERSION_DEFAULT = 37
        * SSLBASE = /usr
        * SSLCERTS = /etc/ssl/certs
        * SSLDIR = /etc/ssl
        * SSLKEYS = /etc/ssl/private
        * VARBASE = /var

Based on these variables, the following variables have been set:

        * CURSES_TYPE = curses
        * PAMBASE (defined, but empty)
        * PYPACKAGE = python37
        * TERMCAP_TYPE = curses

You may want to abort the process now with CTRL-C and change their value
before continuing.  Be sure to run `/usr/pkg/bin/bmake clean' after
the changes.
==========================================================================
=> Tool dependency glib2-tools-[0-9]*: found glib2-tools-2.64.2
=> Tool dependency nbpatch-[0-9]*: found nbpatch-20151107
=> Tool dependency pkgconf-[0-9]*: found pkgconf-1.6.0
=> Build dependency libxslt-[0-9]*: found libxslt-1.1.34nb2
=> Build dependency docbook-xml-[0-9]*: found docbook-xml-4.5
=> Build dependency docbook-xsl>=1.79.2: found docbook-xsl-1.79.2nb3
=> Build dependency xorgproto>=2016.1: found xorgproto-2020.1
=> Build dependency xcb-proto>=1.4: found xcb-proto-1.14nb1
=> Build dependency cwrappers>=20150314: found cwrappers-20180325
=> Full dependency p5-Parse-Yapp>=1.05: found p5-Parse-Yapp-1.21nb2
=> Full dependency py37-dns-[0-9]*: found py37-dns-1.16.0nb1
=> Full dependency py37-expat-[0-9]*: found py37-expat-3.7.7
=> Full dependency py37-iso8601-[0-9]*: found py37-iso8601-0.1.12
=> Full dependency perl>=5.0: found perl-5.30.3
=> Full dependency openldap-client>=2.4.48nb1: found openldap-client-2.4.50
=> Full dependency openpam>=20040210: found openpam-20190224nb1
=> Full dependency avahi>=0.6.32nb21: found avahi-0.6.32nb24
=> Full dependency gettext-lib>=0.18: found gettext-lib-0.20.2
=> Full dependency libiconv>=1.9.1nb4: found libiconv-1.14nb3
=> Full dependency zlib>=1.2.3: found zlib-1.2.11
=> Full dependency libarchive>=3.3.1: found libarchive-3.4.3
=> Full dependency ldb>=2.0.8: found ldb-2.1.3
=> Full dependency popt>=1.16nb1: found popt-1.16nb2
=> Full dependency talloc>=2.2.0: found talloc-2.3.1
=> Full dependency tevent>=0.9.37: found tevent-0.10.2
=> Full dependency lmdb>=0.9.14: found lmdb-0.9.25
=> Full dependency cmocka>=1.1.5: found cmocka-1.1.5
=> Full dependency readline>=6.0: found readline-8.0
=> Full dependency python37>=3.7: found python37-3.7.7
=> Full dependency gnutls>=3.6.13nb2: found gnutls-3.6.14
=> Full dependency libgcrypt>=1.6.0: found libgcrypt-1.8.5
=> Full dependency jansson>=2.4nb1: found jansson-2.13.1
===> Checking for vulnerabilities in samba-4.12.3nb1
Package samba-4.12.3nb1 has a use-after-free vulnerability, see https://nvd.nist.gov/vuln/detail/CVE-2020-10730
Package samba-4.12.3nb1 has a denial-of-service vulnerability, see https://nvd.nist.gov/vuln/detail/CVE-2020-10745
Package samba-4.12.3nb1 has a use-after-free vulnerability, see https://nvd.nist.gov/vuln/detail/CVE-2020-10760
Package samba-4.12.3nb1 has a remote-denial-of-service vulnerability, see https://nvd.nist.gov/vuln/detail/CVE-2020-14303
===> Overriding tools for samba-4.12.3nb1
===> Extracting for samba-4.12.3nb1
/bin/cp /usr/pkgsrc/net/samba4/files/adduser.sh /usr/pkgsrc/net/samba4/files/deluser.sh /usr/pkgsrc/net/samba4/work
===> Patching for samba-4.12.3nb1
=> Applying pkgsrc patches for samba-4.12.3nb1
===> Creating toolchain wrappers for samba-4.12.3nb1
===> Configuring for samba-4.12.3nb1
=> Fixing docbook URLs.
INFO: [subst.mk:docbook] Nothing changed in "docs-xml/xslt/docbook2pearson.xsl".
INFO: [subst.mk:docbook] Nothing changed in "docs-xml/xslt/expand-smbconfdoc.xsl".
INFO: [subst.mk:docbook] Nothing changed in "docs-xml/xslt/extract-examples.xsl".
INFO: [subst.mk:docbook] Nothing changed in "docs-xml/xslt/generate-attributions.xsl".
INFO: [subst.mk:docbook] Nothing changed in "docs-xml/xslt/generate-dependencies.xsl".
INFO: [subst.mk:docbook] Nothing changed in "docs-xml/xslt/html-common.xsl".
INFO: [subst.mk:docbook] Nothing changed in "docs-xml/xslt/latex.xsl".
INFO: [subst.mk:docbook] Nothing changed in "docs-xml/xslt/manpage-summary.xsl".
INFO: [subst.mk:docbook] Nothing changed in "docs-xml/xslt/sambadoc2pearson.xsl".
INFO: [subst.mk:docbook] Nothing changed in "docs-xml/xslt/smb.conf-html.xsl".
INFO: [subst.mk:docbook] Nothing changed in "docs-xml/xslt/strip-references.xsl".
INFO: [subst.mk:docbook] Nothing changed in "docs-xml/xslt/yodl.xsl".
=> Fixing log path.
=> Fixing paths.
=> Generating pkg-config files for builtin xz package.
=> Replacing python interpreter in buildtools/bin/waf source4/setup/wscript_build source4/scripting/bin/*.
INFO: [replace-interpreter] Nothing changed in source4/scripting/bin/ktpass.sh.
INFO: [replace-interpreter] Nothing changed in source4/scripting/bin/nsupdate-gss.
INFO: [replace-interpreter] Nothing changed in source4/scripting/bin/setup_dns.sh.
=> Replacing Perl interpreter in librpc/tables.pl pidl/pidl pidl/tests/*.pl script/*.pl source3/script/*.pl source4/build/pasn1/pasn1.pl source4/script/*.pl third_party/nss_wrapper/nss_wrapper.pl.
*** Error code 2

Stop.
bmake[1]: stopped in /usr/pkgsrc/net/samba4
*** Error code 1

Stop.
bmake: stopped in /usr/pkgsrc/net/samba4

>How-To-Repeat:
cd /usr/pkgsrc/net/samba4 && make
>Fix:

>Release-Note:

>Audit-Trail:
From: Patrick Welche <prlw1@cam.ac.uk>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/55487: samba4 fails to build due to unknown waf configure
 argument
Date: Tue, 14 Jul 2020 09:20:04 +0100

 On Mon, Jul 13, 2020 at 08:20:01PM +0000, nfisher.sr@gmail.com wrote:
 > Building samba4 fails to to passing waf and unknown configure argument.

 In your log I don't see the unknown configure argument - can you tell
 us what it is? (I didn't see a problem on NetBSD-current including with
 the acl option which works(!))

From: nfisher.sr@gmail.com
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/55487: samba4 fails to build due to unknown waf configure
 argument
Date: Tue, 14 Jul 2020 06:38:17 -0400

 The argument causing it to fail is --gmp-include, not sure how that got
 truncated from the output. I'll check better next time before
 submitting.

 waf: error: no such option: --with-gmp-include

 I tracked it to devel/gmp/builtin.mk being included. I'm still not sure
 where it's being pulled in, but I temporarily commented out the
 CONFIGURE_ARGS+= lines in that file and they no longer appeared in the
 "waf configure" command line.

 Hopefully that helps. The error happened both on Arch Linux and a
 custom distro built from source.

 On Tue, 2020-07-14 at 08:25 +0000, Patrick Welche wrote:
 > The following reply was made to PR pkg/55487; it has been noted by
 > GNATS.
 > 
 > From: Patrick Welche <prlw1@cam.ac.uk>
 > To: gnats-bugs@netbsd.org
 > Cc: 
 > Subject: Re: pkg/55487: samba4 fails to build due to unknown waf
 > configure
 >  argument
 > Date: Tue, 14 Jul 2020 09:20:04 +0100
 > 
 >  On Mon, Jul 13, 2020 at 08:20:01PM +0000, nfisher.sr@gmail.com
 > wrote:
 >  > Building samba4 fails to to passing waf and unknown configure
 > argument.
 >  
 >  In your log I don't see the unknown configure argument - can you
 > tell
 >  us what it is? (I didn't see a problem on NetBSD-current including
 > with
 >  the acl option which works(!))
 >  

From: Patrick Welche <prlw1@cam.ac.uk>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/55487: samba4 fails to build due to unknown waf configure
 argument
Date: Fri, 14 Aug 2020 16:34:55 +0100

 On Tue, Jul 14, 2020 at 10:40:01AM +0000, nfisher.sr@gmail.com wrote:
 >  I tracked it to devel/gmp/builtin.mk being included. I'm still not sure
 >  where it's being pulled in, but I temporarily commented out the
 >  CONFIGURE_ARGS+= lines in that file and they no longer appeared in the
 >  "waf configure" command line.

 I think you are right, and the CONFIGURE_ARGS lines in devel/gmp/builtin.mk
 should be removed.

 It is the package which depends on gmp which has to deal with
 a --with-gmp-include flag.

 Case in point: you hit this with samba, which depends on gnutls, which
 depends on gmp. samba doesn't have a use for --with-gmp-include, but
 neither does gnutls which even uses configure (as opposed to waf):

 # pwd
 /tmp/pkgsrc/security/gnutls/work.x86_64/gnutls-3.6.14
 # ./configure --help | grep -i gmp
   --with-nettle-mini      Link against a mini-nettle (that includes mini-gmp)
   GMP_CFLAGS  C compiler flags for gmp
   GMP_LIBS    linker flags for gmp
 # ./configure --with-gmp-include 2>&1 | more
 configure: WARNING: unrecognized options: --with-gmp-include
 checking build system type... x86_64-unknown-netbsd9.99
 ...

 It seems that packages like print/luatex, lang/ghc* already do the
 right thing.

 Second opinions?

From: Nathan Fisher <nfisher.sr@gmail.com>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/55487: samba4 fails to build due to unknown waf configure argument
Date: Fri, 14 Aug 2020 11:59:43 -0400

 --0000000000001264c805acd883fb
 Content-Type: text/plain; charset="UTF-8"

 It might be better all around if pkgsrc treated waf options separately from
 configure options. What I have observed is that waf is "mostly" compatible.
 Unfortunately that's just the sort of thing these leads to corner cases.
 However, I recognize that suggestion implies a lot of work and potential
 breakage.

 I would remove the offending line and add it right in to the Makefile for
 any packages that are discovered to actually need this switch. Although I
 would guess probably none.

 On Mon, Jul 13, 2020, 4:20 PM <gnats-admin@netbsd.org> wrote:

 > Thank you very much for your problem report.
 > It has the internal identification `pkg/55487'.
 > The individual assigned to look at your
 > report is: pkg-manager.
 >
 > >Category:       pkg
 > >Responsible:    pkg-manager
 > >Synopsis:       samba4 fails to build due to unknown waf configure
 > argument
 > >Arrival-Date:   Mon Jul 13 20:20:00 +0000 2020
 >
 >

 --0000000000001264c805acd883fb
 Content-Type: text/html; charset="UTF-8"
 Content-Transfer-Encoding: quoted-printable

 <div dir=3D"auto">It might be better all around if pkgsrc treated waf optio=
 ns separately from configure options. What I have observed is that waf is &=
 quot;mostly&quot; compatible. Unfortunately that&#39;s just the sort of thi=
 ng these leads to corner cases. However, I recognize that suggestion implie=
 s a lot of work and potential breakage.=C2=A0<div dir=3D"auto"><br></div><d=
 iv dir=3D"auto">I would remove the offending line and add it right in to th=
 e Makefile for any packages that are discovered to actually need this switc=
 h. Although I would guess probably none.=C2=A0</div></div><br><div class=3D=
 "gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Mon, Jul 13, 2020, 4=
 :20 PM  &lt;<a href=3D"mailto:gnats-admin@netbsd.org">gnats-admin@netbsd.or=
 g</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin=
 :0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thank you very muc=
 h for your problem report.<br>
 It has the internal identification `pkg/55487&#39;.<br>
 The individual assigned to look at your<br>
 report is: pkg-manager. <br>
 <br>
 &gt;Category:=C2=A0 =C2=A0 =C2=A0 =C2=A0pkg<br>
 &gt;Responsible:=C2=A0 =C2=A0 pkg-manager<br>
 &gt;Synopsis:=C2=A0 =C2=A0 =C2=A0 =C2=A0samba4 fails to build due to unknow=
 n waf configure argument<br>
 &gt;Arrival-Date:=C2=A0 =C2=A0Mon Jul 13 20:20:00 +0000 2020<br>
 <br>
 </blockquote></div>

 --0000000000001264c805acd883fb--

From: "Patrick Welche" <prlw1@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/55487 CVS commit: pkgsrc
Date: Thu, 3 Sep 2020 08:58:42 +0000

 Module Name:	pkgsrc
 Committed By:	prlw1
 Date:		Thu Sep  3 08:58:42 UTC 2020

 Modified Files:
 	pkgsrc/devel/gmp: builtin.mk
 	pkgsrc/math/mpfr: builtin.mk

 Log Message:
 gmp,mpfr: Remove CONFIGURE_ARGS flags from builtin.mk as it assumes that
 all recursively depending packages can deal with them.
 Those packages that need them already add those CONFIGURE_ARGS, at least
 pbulk hasn't revealed any issues (thanks jperkin@).
 XXX libiconv is in a similar position, so should receive similar
 treatment, but at least it only adds the flags if GNU_CONFIGURE=yes
 Fixes PR pkg/55487


 To generate a diff of this commit:
 cvs rdiff -u -r1.9 -r1.10 pkgsrc/devel/gmp/builtin.mk
 cvs rdiff -u -r1.6 -r1.7 pkgsrc/math/mpfr/builtin.mk

 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: Thu, 17 Jun 2021 01:10:44 +0000
State-Changed-Why:
fixed?


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.