NetBSD Problem Report #53347
From john@hlin.zia.io Wed Jun 6 21:18:26 2018
Return-Path: <john@hlin.zia.io>
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 787AE7A1E3
for <gnats-bugs@gnats.NetBSD.org>; Wed, 6 Jun 2018 21:18:26 +0000 (UTC)
Message-Id: <201806062118.w56LILtI023091@hlin.zia.io>
Date: Wed, 6 Jun 2018 21:18:21 GMT
From: john@ziaspace.com
Reply-To: john@ziaspace.com
To: gnats-bugs@NetBSD.org
Subject: devel/cmake fails to build
X-Send-Pr-Version: 3.95
>Number: 53347
>Category: pkg
>Synopsis: devel/cmake fails to build
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: leot
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Jun 06 21:20:00 +0000 2018
>Closed-Date: Thu Jun 07 17:58:38 +0000 2018
>Last-Modified: Thu Jun 07 17:58:38 +0000 2018
>Originator: John Klos
>Release: NetBSD 8.0_BETA
>Organization:
>Environment:
System: NetBSD hlin.zia.io 8.0_BETA NetBSD 8.0_BETA (HLIN) #0: Mon Jan 29 15:54:47 UTC 2018 john@hlin.zia.io:/usr/obj-evbarm/sys/arch/evbarm/compile/HLIN evbarm
Architecture: earmv7hf
Machine: evbarm
>Description:
Running pkg_rolling-replace fails with:
=> Applying pkgsrc patches for cmake-3.11.3
===> wrapper-message [cmake-3.11.3] ===> Creating toolchain wrappers for cmake-3.11.3
sed: unknown option -- b
Usage: sed [-aElnru] command [file ...]
sed [-aElnru] [-e command] [-f command_file] [-I[extension]]
[-i[extension]] [file ...]
*** Error code 1
Stop.
make[1]: stopped in /usr/pkgsrc/devel/cmake
*** Error code 1
Running make in devel/cmake after the first failure succeeds.
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: pkg-manager->adam
Responsible-Changed-By: bsiegert@NetBSD.org
Responsible-Changed-When: Thu, 07 Jun 2018 09:02:43 +0000
Responsible-Changed-Why:
Over to updater.
Responsible-Changed-From-To: adam->gdt
Responsible-Changed-By: maya@NetBSD.org
Responsible-Changed-When: Thu, 07 Jun 2018 10:08:22 +0000
Responsible-Changed-Why:
Not a cmake problem.
From: Leonardo Taccari <leot@NetBSD.org>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: pkg/53347: devel/cmake fails to build
Date: Thu, 07 Jun 2018 13:11:09 +0200
Hello John,
john@ziaspace.com writes:
> >Number: 53347
> >Category: pkg
> >Synopsis: devel/cmake fails to build
> >Confidential: no
> >Severity: serious
> >Priority: medium
> >Responsible: pkg-manager
> >State: open
> >Class: sw-bug
> >Submitter-Id: net
> >Arrival-Date: Wed Jun 06 21:20:00 +0000 2018
> >Originator: John Klos
> >Release: NetBSD 8.0_BETA
> >Organization:
> =
> >Environment:
> [...]
> >Description:
> =
> Running pkg_rolling-replace fails with:
>
> =3D> Applying pkgsrc patches for cmake-3.11.3
> =3D=3D=3D> wrapper-message [cmake-3.11.3] =3D=3D=3D> Creating toolchain =
wrappers for cmake-3.11.3
> sed: unknown option -- b
> Usage: sed [-aElnru] command [file ...]
> sed [-aElnru] [-e command] [-f command_file] [-I[extension]]
> [-i[extension]] [file ...]
> *** Error code 1
>
> Stop.
> make[1]: stopped in /usr/pkgsrc/devel/cmake
> *** Error code 1
>
>
> Running make in devel/cmake after the first failure succeeds.
> [...]
I do not think that this is a cmake problem but probably a regression
of `-r1.7 pkgsrc/archivers/libarchive/builtin.mk' because sed commands
are not properly quoted, and, at least the last one, contains whitespace
and can be problematic.
I think that the following patch will fix the issue:
<https://www.NetBSD.org/~leot/pkgsrc-patches/libarchive-fake-pc-sed-quote=
.patch>
Can you please test it and let us known if it fixes the problem
reported?
Thank you!
For completeness here the same patch inline:
------------------------ 8< ----------------- 8< ------------------------
libarchive: Quote all sed commands in fake-libarchive-pc target
At least the last `-e' contains whitespaces and can be problematic.
Avoid that by quoting all commands.
Should fix PR pkg/53347.
Index: builtin.mk
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvsroot/pkgsrc/archivers/libarchive/builtin.mk,v
retrieving revision 1.7
diff -u -p -r1.7 builtin.mk
--- builtin.mk 6 Jun 2018 14:21:09 -0000 1.7
+++ builtin.mk 7 Jun 2018 10:53:20 -0000
@@ -113,12 +113,12 @@ fake-libarchive-pc:
${LN} -sf $${src} $${dst}; \
else \
${ECHO_BUILDLINK_MSG} "Creating $${dst}"; \
- ${SED} -e s,@prefix@,${BUILDLINK_PREFIX.libarchive}, \
- -e s,@exec_prefix@,${BUILDLINK_PREFIX.libarchive},\
- -e s,@libdir@,${BUILDLINK_PREFIX.libarchive}/lib${LIBABISUFFIX},\
- -e s,@includedir@,${BUILDLINK_PREFIX.libarchive}/include,\
- -e s,@VERSION@,${BUILTIN_VERSION.libarchive}, \
- -e s,@LIBS@,-llzma -lbz2 -lz, \
+ ${SED} -e 's,@prefix@,${BUILDLINK_PREFIX.libarchive},' \
+ -e 's,@exec_prefix@,${BUILDLINK_PREFIX.libarchive},'\
+ -e 's,@libdir@,${BUILDLINK_PREFIX.libarchive}/lib${LIBABISUFFIX},'\
+ -e 's,@includedir@,${BUILDLINK_PREFIX.libarchive}/include,'\
+ -e 's,@VERSION@,${BUILTIN_VERSION.libarchive},' \
+ -e 's,@LIBS@,-llzma -lbz2 -lz,' \
$${sedsrc} > $${dst}; \
fi \
fi
State-Changed-From-To: open->feedback
State-Changed-By: leot@NetBSD.org
State-Changed-When: Thu, 07 Jun 2018 11:25:32 +0000
State-Changed-Why:
Possible patch shared.
Responsible-Changed-From-To: gdt->leot
Responsible-Changed-By: leot@NetBSD.org
Responsible-Changed-When: Thu, 07 Jun 2018 11:42:07 +0000
Responsible-Changed-Why:
Take (that's probably neither a cmake problem nor a pkg_rolling-replace one!)
From: "Leonardo Taccari" <leot@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/53347 CVS commit: pkgsrc/archivers/libarchive
Date: Thu, 7 Jun 2018 11:47:58 +0000
Module Name: pkgsrc
Committed By: leot
Date: Thu Jun 7 11:47:58 UTC 2018
Modified Files:
pkgsrc/archivers/libarchive: builtin.mk
Log Message:
libarchive: Quote all sed commands in fake-libarchive-pc target
At least the last `-e' contains whitespaces and can be problematic.
Avoid that by quoting all commands.
Should fix PR pkg/53347.
To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 pkgsrc/archivers/libarchive/builtin.mk
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: John Klos <john@ziaspace.com>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: PR/53347 CVS commit: pkgsrc/archivers/libarchive
Date: Thu, 7 Jun 2018 17:52:30 +0000 (UTC)
> At least the last `-e' contains whitespaces and can be problematic.
> Avoid that by quoting all commands.
>
> Should fix PR pkg/53347.
Confirmed that this does, in fact, fix PR pkg/53347. Thanks!
State-Changed-From-To: feedback->closed
State-Changed-By: leot@NetBSD.org
State-Changed-When: Thu, 07 Jun 2018 17:58:38 +0000
State-Changed-Why:
Confirmed fixed.
Thank you John for the PR and feedback!
>Unformatted:
It was really obviously not a pkg_rr problem. People report things as
"I ran pkg_rr and ..." without doing the underlying make replace
separately. In the overwhelming majority of cases, there is something
wrong elsewhere in pkgsrc. I probably should put this in the pkg_rr
man page :-)
The new version of libarchive/builtin.mk works for me, building pkgin.
(Contact us)
$NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.