NetBSD Problem Report #50089

From www@NetBSD.org  Sat Jul 25 22:18:41 2015
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id DE356A5858
	for <gnats-bugs@gnats.NetBSD.org>; Sat, 25 Jul 2015 22:18:41 +0000 (UTC)
Message-Id: <20150725221840.91FBEA6551@mollari.NetBSD.org>
Date: Sat, 25 Jul 2015 22:18:40 +0000 (UTC)
From: davshao@gmail.com
Reply-To: davshao@gmail.com
To: gnats-bugs@NetBSD.org
Subject: www/firefox and firefox38 on DragonFly 4.3 no build with --enable-shared-js
X-Send-Pr-Version: www-1.0

>Number:         50089
>Category:       pkg
>Synopsis:       www/firefox and firefox38 on DragonFly 4.3 no build with --enable-shared-js
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jul 25 22:20:00 +0000 2015
>Closed-Date:    Fri Aug 14 06:54:37 +0000 2015
>Last-Modified:  Fri Aug 14 07:00:00 +0000 2015
>Originator:     David Shao
>Release:        pkgsrc current
>Organization:
>Environment:
DragonFly  4.3-DEVELOPMENT DragonFly v4.2.2.123.g14929-DEVELOPMENT #10: Sat Jul 25 07:24:55 PDT 2015     xxxxx@:/usr/obj/usr/src/sys/X86_64_GENERIC  x86_64
>Description:
Neither www/firefox nor www/firefox38 build on DragonFly 4.3-DEVELOPMENT with

CONFIGURE_ARGS+= --enable-shared-js

Similar apparently to DragonFly dports, both successfully build on Dragonfly 4.3 when the above line in mozilla-common.mk is commented out.
Unfortunately the PLIST also needs to be modified to omit the now non-built shared library libmozjs.so.

1) The following set of patches adds a new option shared-js for firefox, and by extension firefox38, that would be suggested by default for every OS other than DragonFly.

2) CONFIGURE_ARGS+= --enable-shared-js is moved to options.mk.

3) PLIST_VAR libmozjs is added so that the non-built shared library can be omitted.

This problem is apparently not unknown on other platforms from time-to-time:

https://bugzilla.mozilla.org/show_bug.cgi?id=1112945



>How-To-Repeat:

>Fix:
diff -bur firefox.orig/PLIST firefox/PLIST
--- firefox.orig/PLIST	2015-07-07 02:04:12.000000000 -0700
+++ firefox/PLIST	2015-07-23 07:00:36.995343000 -0700
@@ -2628,7 +2628,7 @@
 lib/firefox/hyphenation/hyph_uk.dic
 lib/firefox/libmozalloc.so
 ${PLIST.mozglue}lib/firefox/libmozglue.so
-lib/firefox/libmozjs.so
+${PLIST.libmozjs}lib/firefox/libmozjs.so
 lib/firefox/libxul.so
 lib/firefox/modules/AboutReader.jsm
 lib/firefox/modules/ActivitiesService.jsm
Only in firefox: PLIST.new
Only in firefox: PLIST.orig
diff -bur firefox.orig/mozilla-common.mk firefox/mozilla-common.mk
--- firefox.orig/mozilla-common.mk	2015-07-07 02:04:12.000000000 -0700
+++ firefox/mozilla-common.mk	2015-07-23 07:35:52.684766000 -0700
@@ -85,8 +85,6 @@
 CONFIGURE_ARGS+=	--disable-installer
 CONFIGURE_ARGS+=	--enable-url-classifier
 #CONFIGURE_ARGS+=	--enable-startup-notification
-# Disabled from https://bugzilla.mozilla.org/show_bug.cgi?id=977400
-CONFIGURE_ARGS+=	--enable-shared-js
 CONFIGURE_ARGS+=	--with-system-ply
 CONFIGURE_ARGS+=	--disable-icf
 CONFIGURE_ARGS+=	--disable-updater
Only in firefox: mozilla-common.mk.orig
diff -bur firefox.orig/options.mk firefox/options.mk
--- firefox.orig/options.mk	2015-07-07 02:04:12.000000000 -0700
+++ firefox/options.mk	2015-07-23 07:54:04.644142000 -0700
@@ -3,6 +3,7 @@
 PKG_OPTIONS_VAR=	PKG_OPTIONS.firefox
 PKG_SUPPORTED_OPTIONS=	official-mozilla-branding
 PKG_SUPPORTED_OPTIONS+=	alsa debug debug-info mozilla-jemalloc gnome pulseaudio webrtc
+PKG_SUPPORTED_OPTIONS+=	shared-js
 PLIST_VARS+=		gnome jemalloc debug

 .if ${OPSYS} == "Linux"
@@ -16,6 +17,10 @@
 PKG_SUGGESTED_OPTIONS+=	webrtc
 .endif

+.if ${OPSYS} != "DragonFly"
+PKG_SUGGESTED_OPTIONS+= shared-js	
+.endif
+
 .include "../../mk/bsd.options.mk"

 .if !empty(PKG_OPTIONS:Malsa)
@@ -97,3 +102,11 @@
 .else
 CONFIGURE_ARGS+=	--disable-webrtc
 .endif
+
+PLIST_VARS+=		libmozjs
+.if !empty(PKG_OPTIONS:Mshared-js)
+# Disabled from https://bugzilla.mozilla.org/show_bug.cgi?id=977400
+# Not enabled on DragonFly from https://bugzilla.mozilla.org/show_bug.cgi?id=1112945
+CONFIGURE_ARGS+=	--enable-shared-js
+PLIST.libmozjs=yes
+.endif


>Release-Note:

>Audit-Trail:
From: David Shao <davshao@gmail.com>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/50089: www/firefox and firefox38 on DragonFly 4.3 no build
 with --enable-shared-js
Date: Wed, 12 Aug 2015 10:42:53 -0700

 Firefox 40.0 from current pkgsrc builds and installs out of the box
 now for DragonFly 4.3-DEVELOPMENT x86_64, and its functionality has
 been verified to correctly play a Leonard Susskind lecture on Youtube
 including sound.  The sound actually seems dramatically improved
 without hissing, but that might be due to improvements in DragonFly.
 Thanks for commenting out the --enable-shared-js option in
 mozilla-common.mk   And thanks for the stupendous amount of work to
 keep this port so well-maintained.

State-Changed-From-To: open->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Fri, 14 Aug 2015 06:54:37 +0000
State-Changed-Why:
fixed, I guess - too bad no commits came through to the PR, as ideally they
should get pulled up to the stable branch.


From: Ryo ONODERA <ryo_on@yk.rim.or.jp>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/50089 (www/firefox and firefox38 on DragonFly 4.3 no build
 with --enable-shared-js)
Date: Fri, 14 Aug 2015 15:57:42 +0900 (JST)

 From: dholland@NetBSD.org, Date: Fri, 14 Aug 2015 06:54:37 +0000 (UTC)

 > Synopsis: www/firefox and firefox38 on DragonFly 4.3 no build with --enable-shared-js
 > 
 > State-Changed-From-To: open->closed
 > State-Changed-By: dholland@NetBSD.org
 > State-Changed-When: Fri, 14 Aug 2015 06:54:37 +0000
 > State-Changed-Why:
 > fixed, I guess - too bad no commits came through to the PR, as ideally they
 > should get pulled up to the stable branch.

 Sorry. I disabled shared mozjs with different reason.
 If DragonFly build was fixed, it is side effect.

 Anyway I will write correct commit message.

 Thank you.

 --
 Ryo ONODERA // ryo_on@yk.rim.or.jp
 PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.