NetBSD Problem Report #54912

From www@netbsd.org  Fri Jan 31 11:34:43 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 24D4B7A1AE
	for <gnats-bugs@gnats.NetBSD.org>; Fri, 31 Jan 2020 11:34:43 +0000 (UTC)
Message-Id: <20200131113442.4AE137A1B4@mollari.NetBSD.org>
Date: Fri, 31 Jan 2020 11:34:42 +0000 (UTC)
From: nykula@ukr.net
Reply-To: nykula@ukr.net
To: gnats-bugs@NetBSD.org
Subject: Quickjs packaging mistakes date, bignum and lto
X-Send-Pr-Version: www-1.0

>Number:         54912
>Category:       pkg
>Synopsis:       Quickjs packaging mistakes date, bignum and lto
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    he
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jan 31 11:35:00 +0000 2020
>Closed-Date:    Tue Feb 11 14:51:12 +0000 2020
>Last-Modified:  Tue Feb 11 14:51:12 +0000 2020
>Originator:     Denys Nykula
>Release:        current
>Organization:
>Environment:
Linux e11 5.5.0-rc3 #1 SMP Thu Dec 26 01:45:51 UTC 2019 x86_64
>Description:
Makefile sets a DATE variable, a name which PLIST checks use internally,
which causes a conflict.

Also, the 2020-01-05 release started to "always compile the bignum code. Added
'--bignum' option to qjs", so qjsbn{,c} and libquickjs.bn.a, still mentioned
in the PLIST, no longer build.
https://www.freelists.org/post/quickjs-devel/New-release,89

On Linux another file appears, libquickjs.lto.a, which PLIST should include.
>How-To-Repeat:
Search for quickjs in Makoto Fujiwara's nightly report diffs for NetBSD, such as:
http://www.ki.nu/pkgsrc/reports/current/NetBSD-9.0_RC1/20200130.2056/quickjs-20200119/install.log

=> Generating post-install file lists
sh: 2020-01-19: not found
make[1]: "2020-01-19 "+%Y-%m-%d %H:%M:%S %z"" returned non-zero status

=> Checking file-check results for quickjs-20200119
ERROR: ************************************************************
ERROR: The following files are in the PLIST but not in /tmp/lang/quickjs/work/.destdir/usr/pkg:
ERROR:         /tmp/lang/quickjs/work/.destdir/usr/pkg/bin/qjsbn
ERROR:         /tmp/lang/quickjs/work/.destdir/usr/pkg/bin/qjsbnc
ERROR:         /tmp/lang/quickjs/work/.destdir/usr/pkg/lib/quickjs/libquickjs.bn.a

For Linux, try running bmake install in pkgsrc/lang/quickjs yourself.
>Fix:
You'll probably want to delete qjsbn{,c} or libquickjs.bn.a from the
PLIST as they no longer build. Instead you could adjust CONFIG_BIGNUM=
in the workdir Makefile depending on the platform.

Consider the following edit in your next work on the package. Note I
haven't changed the bignum thing myself because I don't know what you
need on NetBSD so my patch just fixes the generic DATE thing and, on
Linux, excludes the now-missing .bn. lib and mentions the .lto. one.

lang/quickjs: Fix date and, on Linux, bignum and lto PLIST

diff --git a/lang/quickjs/Makefile b/lang/quickjs/Makefile
index 46f94539e..ec974a40b 100644
--- a/lang/quickjs/Makefile
+++ b/lang/quickjs/Makefile
@@ -1,9 +1,9 @@
 # $NetBSD: Makefile,v 1.4 2020/01/26 19:08:41 he Exp $

 NAME=		quickjs
-DATE=		2020-01-19
-VERSION=	${DATE:S/-//g}
-DISTNAME=	${NAME}-${DATE}
+QJS_DATE=	2020-01-19
+VERSION=	${QJS_DATE:S/-//g}
+DISTNAME=	${NAME}-${QJS_DATE}
 PKGNAME=	${NAME}-${VERSION}
 CATEGORIES=	lang
 MASTER_SITES=	https://bellard.org/quickjs/
@@ -20,8 +20,10 @@ TEST_TARGET=	test

 .include "../../mk/bsd.prefs.mk"

-PLIST_VARS+=	bignum
-.if ${OPSYS} == "NetBSD"
+PLIST_VARS+=	bignum lto
+.if ${OPSYS} == "Linux"
+PLIST.lto=yes
+.elif ${OPSYS} == "NetBSD"
 HAS_ATOMIC_64!=	${CC} -E files/netbsd-has-atomic64.c | tail -1
 .if (${HAS_ATOMIC_64} == "YES")
 PLIST.bignum=yes
diff --git a/lang/quickjs/PLIST b/lang/quickjs/PLIST
index 833bb616d..ca4c5147e 100644
--- a/lang/quickjs/PLIST
+++ b/lang/quickjs/PLIST
@@ -8,3 +8,4 @@ include/quickjs/quickjs-libc.h
 include/quickjs/quickjs.h
 lib/quickjs/libquickjs.a
 ${PLIST.bignum}lib/quickjs/libquickjs.bn.a
+${PLIST.lto}lib/quickjs/libquickjs.lto.a

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->he
Responsible-Changed-By: rillig@NetBSD.org
Responsible-Changed-When: Sun, 09 Feb 2020 19:47:54 +0000
Responsible-Changed-Why:
Over to he, who introduced the DATE variable on 2020-01-26.


From: "Havard Eidnes" <he@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/54912 CVS commit: pkgsrc/lang/quickjs
Date: Mon, 10 Feb 2020 13:06:09 +0000

 Module Name:	pkgsrc
 Committed By:	he
 Date:		Mon Feb 10 13:06:09 UTC 2020

 Modified Files:
 	pkgsrc/lang/quickjs: Makefile PLIST distinfo
 	pkgsrc/lang/quickjs/patches: patch-Makefile

 Log Message:
 Make some adjustments to fix the issues from PR#54912:

  * Don't use DATE as a variable, as it's used elsewhere, use QJS_DATE instead
  * Don't use the "bignum" PLIST variable anymore, the "bn" variants are no
    longer being built
  * Add "lto" PLIST variable, supported by and used on Linux
  * Move the setting of CONFIG_BIGNUM to the pkg Makefile instead of
    always setting it, should support 32-bit NetBSD ports.

 Bump PKGREVISION.


 To generate a diff of this commit:
 cvs rdiff -u -r1.4 -r1.5 pkgsrc/lang/quickjs/Makefile \
     pkgsrc/lang/quickjs/distinfo
 cvs rdiff -u -r1.2 -r1.3 pkgsrc/lang/quickjs/PLIST
 cvs rdiff -u -r1.2 -r1.3 pkgsrc/lang/quickjs/patches/patch-Makefile

 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: he@NetBSD.org
State-Changed-When: Mon, 10 Feb 2020 13:28:08 +0000
State-Changed-Why:
Committed an update along the outline given here.
Bumped PKGREVISION.
Did not test on Linux, would appreciate to know if it's fixed there.


From: Denys Nykula <nykula@ukr.net>
To: gnats-bugs@netbsd.org
Cc: he@netbsd.org, pkgsrc-bugs@netbsd.org, gnats-admin@netbsd.org
Subject: Re: pkg/54912 (Quickjs packaging mistakes date, bignum and lto)
Date: Tue, 11 Feb 2020 15:37:54 +0200

 Thanks, installs fine now.

State-Changed-From-To: feedback->closed
State-Changed-By: he@NetBSD.org
State-Changed-When: Tue, 11 Feb 2020 14:51:12 +0000
State-Changed-Why:
Submitter confirm issue is solved.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(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.