NetBSD Problem Report #54228

From www@netbsd.org  Fri May 24 17:10:37 2019
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 81CC87A187
	for <gnats-bugs@gnats.NetBSD.org>; Fri, 24 May 2019 17:10:37 +0000 (UTC)
Message-Id: <20190524171036.8D67E7A1D7@mollari.NetBSD.org>
Date: Fri, 24 May 2019 17:10:36 +0000 (UTC)
From: mdfarnsworth@gmail.com
Reply-To: mdfarnsworth@gmail.com
To: gnats-bugs@NetBSD.org
Subject: lang/spidermonkey52
X-Send-Pr-Version: www-1.0

>Number:         54228
>Category:       pkg
>Synopsis:       lang/spidermonkey52
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    leot
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri May 24 17:15:00 +0000 2019
>Closed-Date:    Thu Jun 20 07:34:42 +0000 2019
>Last-Modified:  Thu Jun 20 07:34:42 +0000 2019
>Originator:     matt farnsworth
>Release:        8,0
>Organization:
>Environment:
virtual box
>Description:
Excessive use of disk space to compile (>2GB).

This appears to be an old release with a different versioning style from newer spidermonkey. Build and configure scripts leverage custom python and appear to be a work in progress shared by other projects.

lang/spidermonkey (other) has version 1.8 can compiles using 10MB of space in work folder.

lang/spidermonkey comsumes more than 2GB to compile. During the process it appears to create many objects around 10MB each prefaced with Unified_*[99]*.o and then tries to replace a 128MB lib with a 455MB lib in .destdir/

nm seems to indicate many undefined symbols in the library at this point.

FYI: I use tmpfs for WRKOBJDIR. Building like this in vbox appears slower than on wd (a vmdk)

After several attempts I gave up.
>How-To-Repeat:
cd lang/spidermonkey52
make install clean

This version of spidermonkey52 is required somehow by vulnerable package security/polkit (version 0.115 or polkit-1) and something labeled virtual:worlds. freedesktop polkit requires ECMA-262 version 5 (2009-20011).

I think there might be a polkit-1 version 0.116

polkit-1 was required by gdm (which may be outdated)

I tried some mozilla build instructions.
I changed lang/spidermonkey52/Makefile line 53
cd ${WRKSRC}/js/src && autoconf-2.13 && mkdir build_OPT.OBJ && cd build_OPT.OBJ && ../configure

but this did not help.
netbsd8 is not supported by spidermonkey build system

>Fix:
do over without pkgrsrc

extract mozjs in work
cd js/src
autoconf-2.13
mkdir build_OPT.OBJ # name alchemy, dirname is a flag. ('optimal' not using build_DBJ.OBJ)
cd build_OPT.OBJ # the configure.py uses dirname to make choices
../configure
# make causes errors in ../../../config/basename.mk
gmake # yeap requires gmake (how to call this from pkgsrc?)
# now libjs_static.a is 500MB
strip --strip-debug js/src/libjs_static.a
# now the file is 40M
# on mint linux installation the libmozjs-52.so is 24MB and shared/dynamic
# note: configure --disable-debug 

It seems that netBSD still installs binaries not-stripped, if that is the policy then maybe just place a warning in the DESCR about the size and strip option. 
Maybe pkgsrc Makefile can check for space before building? 
Maybe the packages that depend on spidermonkey52 can be dropped? 
Maybe canonical has a better build solution than mozilla?

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->leot
Responsible-Changed-By: leot@NetBSD.org
Responsible-Changed-When: Fri, 24 May 2019 17:57:53 +0000
Responsible-Changed-Why:
Take


State-Changed-From-To: open->analyzed
State-Changed-By: leot@NetBSD.org
State-Changed-When: Fri, 24 May 2019 17:57:53 +0000
State-Changed-Why:
Probably `--disable-debug-symbols' and `--enable-strip' needs to
be added (at least the former on NetBSD/amd64 -current reduce the WRKOBJDIR
usage from 2.3GB to 265MB, latter still need testing.)



State-Changed-From-To: analyzed->feedback
State-Changed-By: leot@NetBSD.org
State-Changed-When: Fri, 24 May 2019 18:19:27 +0000
State-Changed-Why:
Can you please retry with current pkgsrc-current?

(In general: no, package should avoid to enforce `-g' CFLAGS and always
strip installed objects.)


From: "Leonardo Taccari" <leot@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/54228 CVS commit: pkgsrc/lang/spidermonkey52
Date: Fri, 24 May 2019 18:15:38 +0000

 Module Name:	pkgsrc
 Committed By:	leot
 Date:		Fri May 24 18:15:38 UTC 2019

 Modified Files:
 	pkgsrc/lang/spidermonkey52: Makefile distinfo
 	pkgsrc/lang/spidermonkey52/patches: patch-js_src_old-configure_in

 Log Message:
 spidermonkey52: Do not build with debug symbols and strip

 configure forced to pass `-g' to CFLAGS and did not strip resulting binaries and
 libraries. Pass `--disable-debug-symbols' and `--enable-strip' to respectively
 address that.
 Fix PR pkg/54228 reported by matt farnsworth.

 While here, avoid to pass `-Wl,-z,wxneeded' to LDFLAGS on NetBSD.


 To generate a diff of this commit:
 cvs rdiff -u -r1.15 -r1.16 pkgsrc/lang/spidermonkey52/Makefile
 cvs rdiff -u -r1.5 -r1.6 pkgsrc/lang/spidermonkey52/distinfo
 cvs rdiff -u -r1.3 -r1.4 \
     pkgsrc/lang/spidermonkey52/patches/patch-js_src_old-configure_in

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: Leonardo Taccari <leot@NetBSD.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/54228 (lang/spidermonkey52)
Date: Fri, 24 May 2019 20:23:30 +0200

 leot@NetBSD.org writes:
 > Probably `--disable-debug-symbols' and `--enable-strip' needs to
 > be added (at least the former on NetBSD/amd64 -current reduce the WRKOBJDIR
 > usage from 2.3GB to 265MB, latter still need testing.)

 Sorry, I meant WRKSRC (not WRKOBJDIR) and it wasn't 265MB but 386MB.

State-Changed-From-To: feedback->closed
State-Changed-By: leot@NetBSD.org
State-Changed-When: Thu, 20 Jun 2019 07:34:42 +0000
State-Changed-Why:
Feedback timeout.

Problem reported should be fixed, please reply to this PR
or fill a new PR if there are any problems.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

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