NetBSD Problem Report #54878
From triaxx@netbsd.org Sun Jan 19 19:57:05 2020
Return-Path: <triaxx@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 3285D7A174
for <gnats-bugs@gnats.NetBSD.org>; Sun, 19 Jan 2020 19:57:05 +0000 (UTC)
Message-Id: <20200119195703.E66107A1C0@mollari.NetBSD.org>
Date: Sun, 19 Jan 2020 19:57:03 +0000 (UTC)
From: triaxx@netbsd.org
Reply-To: triaxx@netbsd.org
To: gnats-bugs@NetBSD.org
Subject: lang/spidermonkey52 configuration fails in chroot
X-Send-Pr-Version: 3.95
>Number: 54878
>Category: pkg
>Synopsis: lang/spidermonkey52 configuration fails in chroot
>Confidential: no
>Severity: serious
>Priority: low
>Responsible: triaxx
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Jan 19 20:00:01 +0000 2020
>Closed-Date: Tue Mar 24 07:32:09 +0000 2020
>Last-Modified: Tue Mar 24 07:32:09 +0000 2020
>Originator: Frédéric Fauberteau
>Release: NetBSD 8.0 | HEAD (20200111)
>Organization:
>Environment:
System: NetBSD hydralisk.triaxx.org 8.0 NetBSD 8.0 (GENERIC) #0: Fri Jan 17 23:04:35 CET 2020 triaxx@hydralisk.triaxx.org:/mnt/ccd0/sysbuild/hydralisk-8.0/amd64/obj/mnt/ccd0/netbsd/netbsd-8-0-RELEASE/src/sys/arch/amd64/compile/GENERIC amd64
Architecture: x86_64
Machine: amd64
>Description:
When I try to build lang/spidermonkey52 using pbulk in a chrooted sandbox, the configuration step fails with the log below.
But when I try the common manner (without pbulk), the configuration step succeeds.
===> Configuring for spidermonkey52-52.7.4nb11
cd /var/pkgsrc/work/lang/spidermonkey52/work/mozjs-52.7.4/js/src && autoconf
=> Adding run-time search paths to pkg-config files.
Creating Python environment
New python executable in /var/pkgsrc/work/lang/spidermonkey52/work/mozjs-52.7.4/_virtualenv/bin/python2.7
Also creating executable in /var/pkgsrc/work/lang/spidermonkey52/work/mozjs-52.7.4/_virtualenv/bin/python
Installing setuptools, pip, wheel...done.
platform netbsd8 is not supported
Error processing command. Ignoring because optional. (optional:setup.py:python/psutil:build_ext:--inplace)
Reexecuting in the virtualenv
Creating Python environment
Please use the *system* python to run this script
Traceback (most recent call last):
File "/var/pkgsrc/work/lang/spidermonkey52/work/mozjs-52.7.4/python/virtualenv/virtualenv.py", line 2325, in <module>
main()
File "/var/pkgsrc/work/lang/spidermonkey52/work/mozjs-52.7.4/python/virtualenv/virtualenv.py", line 711, in main
symlink=options.symlink and hasattr(os, 'symlink')) # MOZ: Make sure we don't use symlink when we don't have it
File "/var/pkgsrc/work/lang/spidermonkey52/work/mozjs-52.7.4/python/virtualenv/virtualenv.py", line 924, in create_environment
site_packages=site_packages, clear=clear, symlink=symlink))
File "/var/pkgsrc/work/lang/spidermonkey52/work/mozjs-52.7.4/_virtualenv/lib/python2.7/posixpath.py", line 367, in abspath
if not isabs(path):
File "/var/pkgsrc/work/lang/spidermonkey52/work/mozjs-52.7.4/_virtualenv/lib/python2.7/posixpath.py", line 54, in isabs
return s.startswith('/')
AttributeError: 'NoneType' object has no attribute 'startswith'
Traceback (most recent call last):
File "./../../configure.py", line 107, in <module>
sys.exit(main(sys.argv))
File "./../../configure.py", line 26, in main
sandbox.run(os.path.join(os.path.dirname(__file__), 'moz.configure'))
File "/var/pkgsrc/work/lang/spidermonkey52/work/mozjs-52.7.4/python/mozbuild/mozbuild/configure/__init__.py", line 334, in run
self.include_file(path)
File "/var/pkgsrc/work/lang/spidermonkey52/work/mozjs-52.7.4/python/mozbuild/mozbuild/configure/__init__.py", line 325, in include_file
exec_(code, self)
File "/var/pkgsrc/work/lang/spidermonkey52/work/mozjs-52.7.4/python/mozbuild/mozbuild/util.py", line 59, in exec_
exec(object, globals, locals)
File "/var/pkgsrc/work/lang/spidermonkey52/work/mozjs-52.7.4/moz.configure", line 7, in <module>
include('build/moz.configure/init.configure')
File "/var/pkgsrc/work/lang/spidermonkey52/work/mozjs-52.7.4/python/mozbuild/mozbuild/configure/__init__.py", line 627, in include_impl
self.include_file(what)
File "/var/pkgsrc/work/lang/spidermonkey52/work/mozjs-52.7.4/python/mozbuild/mozbuild/configure/__init__.py", line 325, in include_file
exec_(code, self)
File "/var/pkgsrc/work/lang/spidermonkey52/work/mozjs-52.7.4/python/mozbuild/mozbuild/util.py", line 59, in exec_
exec(object, globals, locals)
File "/var/pkgsrc/work/lang/spidermonkey52/work/mozjs-52.7.4/build/moz.configure/init.configure", line 137, in <module>
@imports('distutils.sysconfig')
File "/var/pkgsrc/work/lang/spidermonkey52/work/mozjs-52.7.4/python/mozbuild/mozbuild/configure/__init__.py", line 610, in decorator
depends = DependsFunction(self, func, dependencies, when=when)
File "/var/pkgsrc/work/lang/spidermonkey52/work/mozjs-52.7.4/python/mozbuild/mozbuild/configure/__init__.py", line 69, in __init__
sandbox._value_for(self)
File "/var/pkgsrc/work/lang/spidermonkey52/work/mozjs-52.7.4/python/mozbuild/mozbuild/configure/__init__.py", line 406, in _value_for
return self._value_for_depends(obj, need_help_dependency)
File "/var/pkgsrc/work/lang/spidermonkey52/work/mozjs-52.7.4/python/mozbuild/mozbuild/util.py", line 925, in method_call
cache[args] = self.func(instance, *args)
File "/var/pkgsrc/work/lang/spidermonkey52/work/mozjs-52.7.4/python/mozbuild/mozbuild/configure/__init__.py", line 416, in _value_for_depends
return obj.result
File "/var/pkgsrc/work/lang/spidermonkey52/work/mozjs-52.7.4/python/mozbuild/mozbuild/util.py", line 943, in __get__
setattr(instance, name, self.func(instance))
File "/var/pkgsrc/work/lang/spidermonkey52/work/mozjs-52.7.4/python/mozbuild/mozbuild/configure/__init__.py", line 90, in result
return self.func(*resolved_args)
File "/var/pkgsrc/work/lang/spidermonkey52/work/mozjs-52.7.4/python/mozbuild/mozbuild/configure/__init__.py", line 932, in wrapped
return new_func(*args, **kwargs)
File "/var/pkgsrc/work/lang/spidermonkey52/work/mozjs-52.7.4/build/moz.configure/init.configure", line 184, in virtualenv_python
manager.build(python)
File "/var/pkgsrc/work/lang/spidermonkey52/work/mozjs-52.7.4/python/mozbuild/mozbuild/virtualenv.py", line 439, in build
self.create(python)
File "/var/pkgsrc/work/lang/spidermonkey52/work/mozjs-52.7.4/python/mozbuild/mozbuild/virtualenv.py", line 203, in create
'Failed to create virtualenv: %s' % self.virtualenv_root)
Exception: Failed to create virtualenv: /var/pkgsrc/work/lang/spidermonkey52/work/mozjs-52.7.4/_virtualenv
*** Error code 1
Stop.
bmake[1]: stopped in /usr/pkgsrc/lang/spidermonkey52
*** Error code 1
Stop.
bmake: stopped in /usr/pkgsrc/lang/spidermonkey52
>How-To-Repeat:
Build lang/spidermonkey52 using pbulk in a chrooted sandbox.
>Fix:
>Release-Note:
>Audit-Trail:
From: =?UTF-8?Q?Fr=C3=A9d=C3=A9ric_Fauberteau?= <triaxx@NetBSD.org>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: pkg/54878: lang/spidermonkey52 configuration fails in chroot
Date: Thu, 23 Jan 2020 07:02:11 +0100
I can't reproduce this error in a deterministic way:
- 20200118.1055: configuration failed
- 20200120.2046: build succeeded
- current pbulk: configuration failed
From: =?UTF-8?Q?Fr=C3=A9d=C3=A9ric_Fauberteau?= <triaxx@NetBSD.org>
To: gnats-bugs@netbsd.org
Cc: tech-pkg@NetBSD.org
Subject: Re: pkg/54878: lang/spidermonkey52 configuration fails in chroot
Date: Mon, 02 Mar 2020 16:00:51 +0100
The patch below fix the bug but I am not sure to have clearly identified
the problem. It occurs only when I build lang/spidermonkey52 with
pbulk+sandbox. I noticed that in this context I got:
activate_mtime=X
dep_mtime=X+1 (approximately)
whereas I got the following when I 'make configure' in my pkgsrc tree
(out of pbulk, sandbox and chroot):
activate_mtime=X
dep_mtime=X-5 (approximately)
I tried MAKE_JOBS_SAFE=no but without any success.
Does anyone see an objection to commit this patch?
cvs diff: Diffing .
Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/lang/spidermonkey52/distinfo,v
retrieving revision 1.8
diff -u -r1.8 distinfo
--- distinfo 8 Oct 2019 21:34:15 -0000 1.8
+++ distinfo 2 Mar 2020 14:17:39 -0000
@@ -22,3 +22,4 @@
SHA1 (patch-mozglue_build_moz.build) =
f35ffa1a54ccc4cd1ed7983aac792e334c9169b1
SHA1 (patch-python_mozbuild_mozbuild_backend_recursivemake.py) =
ffb59ddf2d95eb284d24dad3d3aedc7d7f5b5d96
SHA1 (patch-python_mozbuild_mozbuild_configure_constants.py) =
e90a88fba0643d02efb3c399aa22e5b9b225bc02
+SHA1 (patch-python_mozbuild_mozbuild_virtualenv.py) =
73f13c50d7a2d5c722d00c93bcabb84b3ff34273
cvs diff: Diffing patches
Index: patches/patch-python_mozbuild_mozbuild_virtualenv.py
===================================================================
RCS file: patches/patch-python_mozbuild_mozbuild_virtualenv.py
diff -N patches/patch-python_mozbuild_mozbuild_virtualenv.py
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-python_mozbuild_mozbuild_virtualenv.py 2 Mar
2020 14:17:39 -0000
@@ -0,0 +1,21 @@
+$NetBSD$
+
+Remove a test that drives the Python environment to be reduild during
the
+configure step. This bug seems esoteric since it only occurs when using
+pbulk with sandbox.
+
+--- python/mozbuild/mozbuild/virtualenv.py.orig 2018-04-28
01:04:06.000000000 +0000
++++ python/mozbuild/mozbuild/virtualenv.py
+@@ -122,12 +122,6 @@ class VirtualenvManager(object):
+
+ return False
+
+- # check modification times
+- activate_mtime = os.path.getmtime(self.activate_path)
+- dep_mtime = max(os.path.getmtime(p) for p in deps)
+- if dep_mtime > activate_mtime:
+- return False
+-
+ # Verify that the Python we're checking here is either the
virutalenv
+ # python, or we have the Python version that was used to
create the
+ # virtualenv. If this fails, it is likely system Python has
been
Responsible-Changed-From-To: pkg-manager->triaxx
Responsible-Changed-By: bsiegert@NetBSD.org
Responsible-Changed-When: Sun, 15 Mar 2020 20:13:42 +0000
Responsible-Changed-Why:
No one objected, so feel free to make the commit :)
From: =?UTF-8?B?RnLDqWTDqXJpYyBGYXViZXJ0ZWF1?= <triaxx@NetBSD.org>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: pkg/54878 (lang/spidermonkey52 configuration fails in chroot)
Date: Wed, 18 Mar 2020 09:45:38 +0100
I have some doubts because I encountered a potentially similar problem with lang/go113.I would like to test with netbsd-9 before committing.
From: =?UTF-8?B?RnLDqWTDqXJpYyBGYXViZXJ0ZWF1?= <triaxx@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/54878 CVS commit: pkgsrc/lang/spidermonkey52/patches
Date: Mon, 23 Mar 2020 08:46:14 +0000
Module Name: pkgsrc
Committed By: triaxx
Date: Mon Mar 23 08:46:14 UTC 2020
Added Files:
pkgsrc/lang/spidermonkey52/patches:
patch-python_mozbuild_mozbuild_virtualenv.py
Log Message:
spidermonkey52: fix PR pkg/54878
This patch hacks the virtualenv configuration process that finds invalid
modification times in some very rare configurations.
To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 \
pkgsrc/lang/spidermonkey52/patches/patch-python_mozbuild_mozbuild_virtualenv.py
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->closed
State-Changed-By: triaxx@NetBSD.org
State-Changed-When: Tue, 24 Mar 2020 07:32:09 +0000
State-Changed-Why:
Fix applied
>Unformatted:
(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.