Bug 202165 - www/firefox 40.0 fails to build with logging disabled
Summary: www/firefox 40.0 fails to build with logging disabled
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-gecko (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-07 20:50 UTC by rsmith
Modified: 2015-08-11 18:30 UTC (History)
4 users (show)

See Also:
bugzilla: maintainer-feedback? (gecko)


Attachments
Full build log of the failed build (541.62 KB, text/plain)
2015-08-07 20:50 UTC, rsmith
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description rsmith 2015-08-07 20:50:55 UTC
Created attachment 159651 [details]
Full build log of the failed build

Trying to build the new firefox 40.0, the build failed.
Tested with both clang and gcc.

Configuration:
===> The following configuration options are available for firefox-40.0,1:
     CANBERRA=off: Sound theme alerts
     DBUS=off: D-Bus IPC system support
     DEBUG=off: Build with debugging support
     DTRACE=off: Build with DTrace probes
     GCONF=off: GConf configuration backend support
     GIO=on: Use GIO for file I/O
     GNOMEUI=off: libgnomeui support module
     GSTREAMER=off: Multimedia support via GStreamer
     LIBPROXY=off: Proxy support via libproxy
     LOGGING=off: Additional log messages
     OPTIMIZED_CFLAGS=on: Use extra compiler optimizations
     PGO=off: Use Profile-Guided Optimization
     PROFILE=off: Build with profiling support
     TEST=off: Build and/or run tests
====> Options available for the multi AUDIO: you have to choose at least one of them
     ALSA=off: ALSA audio architecture support
     PULSEAUDIO=on: PulseAudio sound server support
====> Options available for the single TOOLKIT: you have to select exactly one of them
     GTK2=off: GTK+ 2 GUI toolkit support
     GTK3=on: GTK+ 3 GUI toolkit support



Error message (full build log attached);

Unified_cpp_widget2.o
c++ -o Unified_cpp_widget2.o -c -I../dist/stl_wrappers -I../dist/system_wrappers -include /usr/ports/www/firefox/work/mozilla-release/config/gcc_hidden.h -DMOZ_CROSS_PROCESS_IME -DOS_POSIX=1 -DOS_FREEBSD=1 -DOS_BSD=1 -DSTATIC_EXPORTABLE_JS_API -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -DMOZ_GLUE_IN_PROGRAM -DAB_CD=en-US -DNO_NSPR_10_SUPPORT -I/usr/ports/www/firefox/work/mozilla-release/widget -I. -I/usr/ports/www/firefox/work/mozilla-release/obj-x86_64-portbld-freebsd10.2/ipc/ipdl/_ipdlheaders -I/usr/ports/www/firefox/work/mozilla-release/ipc/chromium/src -I/usr/ports/www/firefox/work/mozilla-release/ipc/glue -I/usr/ports/www/firefox/work/mozilla-release/dom/base -I/usr/ports/www/firefox/work/mozilla-release/dom/ipc -I/usr/ports/www/firefox/work/mozilla-release/layout/base -I/usr/ports/www/firefox/work/mozilla-release/layout/forms -I/usr/ports/www/firefox/work/mozilla-release/layout/generic -I/usr/ports/www/firefox/work/mozilla-release/layout/xul -I/usr/ports/www/firefox/work/mozilla-release/view -I/usr/ports/www/firefox/work/mozilla-release/widget -I/usr/ports/www/firefox/work/mozilla-release/widget/gtk -I../dist/include   -I/usr/local/include/nspr -I/usr/local/include/nss -I/usr/local/include/nss/nss -I/usr/local/include -I/usr/local/include  -I/usr/local/include/pixman-1     -fPIC  -Qunused-arguments -isystem/usr/local/include -DLIBICONV_PLUG  -DMOZILLA_CLIENT -include ../mozilla-config.h -MD -MP -MF .deps/Unified_cpp_widget2.o.pp -Qunused-arguments -isystem/usr/local/include -DLIBICONV_PLUG  -Qunused-arguments -Wall -Wempty-body -Woverloaded-virtual -Wsign-compare -Wwrite-strings -Wno-invalid-offsetof -Wno-inline-new-delete -Wno-c++0x-extensions -Wno-extended-offsetof -Wno-unknown-warning-option -Wno-return-type-c-linkage -O2 -pipe -O3 -DLIBICONV_PLUG -fstack-protector -fno-strict-aliasing -DLIBICONV_PLUG -fno-exceptions -fno-strict-aliasing -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -fno-math-errno -std=gnu++0x -pipe  -DNDEBUG -DTRIMMED -O2 -O3 -fomit-frame-pointer  -I/usr/ports/www/firefox/work/mozilla-release/widget/gtk/compat-gtk3 -I/usr/local/include/gtk-3.0 -I/usr/local/include/pango-1.0 -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include -I/usr/local/include/cairo -I/usr/local/include/pixman-1 -I/usr/local/include/freetype2 -I/usr/local/include/libpng15 -I/usr/local/include/libpng16 -I/usr/local/include/gdk-pixbuf-2.0 -I/usr/local/include/gio-unix-2.0/ -I/usr/local/include/harfbuzz -I/usr/local/include/atk-1.0 -I/usr/local/include/at-spi2-atk/2.0 -I/usr/local/include/at-spi-2.0 -I/usr/local/include/dbus-1.0 -I/usr/local/lib/dbus-1.0/include -I/usr/local/include/gtk-3.0/unix-print -D_THREAD_SAFE -pthread    /usr/ports/www/firefox/work/mozilla-release/obj-x86_64-portbld-freebsd10.2/widget/Unified_cpp_widget2.cpp
In file included from /usr/ports/www/firefox/work/mozilla-release/obj-x86_64-portbld-freebsd10.2/widget/Unified_cpp_widget2.cpp:11:
In file included from /usr/ports/www/firefox/work/mozilla-release/widget/nsPrintSettingsImpl.cpp:10:
../dist/include/mozilla/gfx/Logging.h:25:18: error: unknown type name 'PRLogModuleInfo'
extern GFX2D_API PRLogModuleInfo *GetGFX2DLog();
                 ^
../dist/include/mozilla/gfx/Logging.h:45:8: error: unknown type name 'PRLogModuleLevel'
inline PRLogModuleLevel PRLogLevelForLevel(int aLevel) {
       ^
../dist/include/mozilla/gfx/Logging.h:48:12: error: use of undeclared identifier 'PR_LOG_ERROR'
    return PR_LOG_ERROR;
           ^
../dist/include/mozilla/gfx/Logging.h:50:12: error: use of undeclared identifier 'PR_LOG_WARNING'; did
      you mean 'LOG_WARNING'?
    return PR_LOG_WARNING;
           ^~~~~~~~~~~~~~
           LOG_WARNING
../dist/include/mozilla/gfx/Logging.h:34:11: note: 'LOG_WARNING' declared here
const int LOG_WARNING = 2;
          ^
../dist/include/mozilla/gfx/Logging.h:52:12: error: use of undeclared identifier 'PR_LOG_DEBUG'; did you
      mean 'LOG_DEBUG'?
    return PR_LOG_DEBUG;
           ^~~~~~~~~~~~
           LOG_DEBUG
../dist/include/mozilla/gfx/Logging.h:35:11: note: 'LOG_DEBUG' declared here
const int LOG_DEBUG = 3;
../dist/include/mozilla/gfx/Logging.h:54:12: error: use of undeclared identifier 'PR_LOG_DEBUG'; did you
      mean 'LOG_DEBUG'?
    return PR_LOG_DEBUG;
           ^~~~~~~~~~~~
           LOG_DEBUG
../dist/include/mozilla/gfx/Logging.h:35:11: note: 'LOG_DEBUG' declared here
const int LOG_DEBUG = 3;
          ^
../dist/include/mozilla/gfx/Logging.h:56:12: error: use of undeclared identifier 'PR_LOG_ALWAYS'
    return PR_LOG_ALWAYS;
           ^
../dist/include/mozilla/gfx/Logging.h:58:10: error: use of undeclared identifier 'PR_LOG_DEBUG'; did you
      mean 'LOG_DEBUG'?
  return PR_LOG_DEBUG;
         ^~~~~~~~~~~~
         LOG_DEBUG
../dist/include/mozilla/gfx/Logging.h:35:11: note: 'LOG_DEBUG' declared here
const int LOG_DEBUG = 3;
          ^
../dist/include/mozilla/gfx/Logging.h:136:11: error: use of undeclared identifier 'PR_LOG_TEST'
      if (PR_LOG_TEST(GetGFX2DLog(), PRLogLevelForLevel(aLevel))) {
          ^
../dist/include/mozilla/gfx/Logging.h:163:11: error: use of undeclared identifier 'PR_LOG_TEST'
      if (PR_LOG_TEST(GetGFX2DLog(), PRLogLevelForLevel(aLevel))) {
          ^
../dist/include/mozilla/gfx/Logging.h:164:9: error: use of undeclared identifier 'PR_LogPrint'
        PR_LogPrint("%s%s", aString.c_str(), aNoNewline ? "" : "\n");
        ^
11 errors generated.
/usr/ports/www/firefox/work/mozilla-release/config/rules.mk:946: recipe for target 'Unified_cpp_widget2.o' failed
gmake[7]: *** [Unified_cpp_widget2.o] Error 1
gmake[7]: Leaving directory '/usr/ports/www/firefox/work/mozilla-release/obj-x86_64-portbld-freebsd10.2/widget'
/usr/ports/www/firefox/work/mozilla-release/config/recurse.mk:70: recipe for target 'widget/target' failed
gmake[6]: *** [widget/target] Error 2
gmake[6]: Leaving directory '/usr/ports/www/firefox/work/mozilla-release/obj-x86_64-portbld-freebsd10.2'
/usr/ports/www/firefox/work/mozilla-release/config/recurse.mk:32: recipe for target 'compile' failed
gmake[5]: *** [compile] Error 2
gmake[5]: Leaving directory '/usr/ports/www/firefox/work/mozilla-release/obj-x86_64-portbld-freebsd10.2'
/usr/ports/www/firefox/work/mozilla-release/config/rules.mk:538: recipe for target 'default' failed
gmake[4]: *** [default] Error 2
gmake[4]: Leaving directory '/usr/ports/www/firefox/work/mozilla-release/obj-x86_64-portbld-freebsd10.2'
/usr/ports/www/firefox/work/mozilla-release/client.mk:400: recipe for target 'realbuild' failed
gmake[3]: *** [realbuild] Error 2
gmake[3]: Leaving directory '/usr/ports/www/firefox/work/mozilla-release'
/usr/ports/www/firefox/work/mozilla-release/client.mk:171: recipe for target 'build' failed
gmake[2]: *** [build] Error 2
gmake[2]: Leaving directory '/usr/ports/www/firefox/work/mozilla-release'
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/www/firefox
*** Error code 1
Comment 1 rsmith 2015-08-07 21:22:32 UTC
The problem seems to originate in "work/mozilla-release/gfx/2d/Logging.h".

This file conditionally includes "prlog.h" if MOZ_LOGGING is defined.
But it *uses* constants and structures from "prlog.h" unconditionally.

What I cannot figure out from the port Makefile is if and how the LOGGING option is related to this.
Comment 2 Jan Beich freebsd_committer freebsd_triage 2015-08-07 22:34:46 UTC
Upstream is in the process of removing --disable-logging that seem to have started in Firefox 40.0. So, the fix would be to phase out LOGGING option by hiding it in www/firefox.

https://hg.mozilla.org/mozilla-central/rev/3464d56d154d
Comment 3 Jan Beich freebsd_committer freebsd_triage 2015-08-07 22:49:15 UTC
(In reply to rsmith from comment #1)
> What I cannot figure out from the port Makefile is if and how the LOGGING option is related to this.

PR_LOGGING is defined in prlog.h when FORCE_PR_LOG is defined which *is* the case for --enable-logging (default) in configure.in and what LOGGING option uses. dxr.mozilla.org may help in connecting the dots.
Comment 4 rsmith 2015-08-08 09:50:14 UTC
Hiding the logging option sounds like a good plan.

Maybe it's just me, but firefox 40 seems to be relatively unstable. It has now hung and crashed four times in less than a day. I'm going back to 39 for the time being.
Comment 5 Jan Beich freebsd_committer freebsd_triage 2015-08-08 10:16:08 UTC
(In reply to rsmith from comment #4)
> Maybe it's just me, but firefox 40 seems to be relatively
> unstable. It has now hung and crashed four times in less than a
> day. I'm going back to 39 for the time being.

Do you use GTK2 or GTK3? Anyway, try setting the following preference in about:config:

  layers.offmainthreadcomposition.enabled -> false

Per 40.0 relnotes it was enabled for

  Improved scrolling, graphics, and video playback performance with
  off main thread compositing (GNU/Linux only)

Otherwise, with nvidia-driver OMTC may work better with these

  gfx.xrender.enabled -> false
  layers.acceleration.force-enabled -> true
Comment 6 rsmith 2015-08-08 13:44:24 UTC
I'm using GTK+ 3. I just re-installed 40.0 and set the preference as you suggested. We'll see how it goes...
Comment 7 rkoberman 2015-08-08 21:18:39 UTC
Set layers.offmainthreadcomposition.enabled to "False" and I am still crashing rather often.
FreeBSD rogue 10.2-PRERELEASE FreeBSD 10.2-PRERELEASE #0 r285995: Tue Jul 28 23:13:54 PDT 2015     root@rogue:/usr/obj/usr/src/sys/GENERIC  amd64
ThinkPad T520. Sandy Bridge without nVidia graphics running i915kms. Crashes frequently while running Google+. Suspect it has to do with a single post as it always dies after scrolling down to about the same spot.
Comment 8 Tomasz Sowa 2015-08-08 23:48:18 UTC
(In reply to rkoberman from comment #7)

Could you provide the exact url on which firefox crashes? I would like to test it. I have compiled firefox with logging disabled:

/usr/ports/www/firefox# make showconfig
===> The following configuration options are available for firefox-40.0,1:
     CANBERRA=off: Sound theme alerts
     DBUS=on: D-Bus IPC system support
     DEBUG=off: Build with debugging support
     DTRACE=off: Build with DTrace probes
     GCONF=off: GConf configuration backend support
     GIO=off: Use GIO for file I/O
     GNOMEUI=off: libgnomeui support module
     GSTREAMER=on: Multimedia support via GStreamer
     LIBPROXY=off: Proxy support via libproxy
     LOGGING=off: Additional log messages
     OPTIMIZED_CFLAGS=on: Use extra compiler optimizations
     PGO=off: Use Profile-Guided Optimization
     PROFILE=off: Build with profiling support
     TEST=off: Build and/or run tests
====> Options available for the multi AUDIO: you have to choose at least one of them
     ALSA=on: ALSA audio architecture support
     PULSEAUDIO=off: PulseAudio sound server support
====> Options available for the single TOOLKIT: you have to select exactly one of them
     GTK2=on: GTK+ 2 GUI toolkit support
     GTK3=off: GTK+ 3 GUI toolkit support
===> Use 'make config' to modify these settings


with following patch:


--- work.orig/mozilla-release/layout/base/nsRefreshDriver.cpp	2015-08-07 00:39:40.000000000 +0200
+++ work/mozilla-release/layout/base/nsRefreshDriver.cpp	2015-08-08 23:21:48.577734000 +0200
@@ -25,6 +25,7 @@
 #include "WinUtils.h"
 #endif
 
+#include "nspr/prlog.h"
 #include "mozilla/ArrayUtils.h"
 #include "mozilla/AutoRestore.h"
 #include "nsHostObjectProtocolHandler.h"
--- work.orig/mozilla-release/layout/base/nsLayoutUtils.cpp	2015-08-07 00:39:40.000000000 +0200
+++ work/mozilla-release/layout/base/nsLayoutUtils.cpp	2015-08-08 23:18:57.235017000 +0200
@@ -4,6 +4,7 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
+#include "nspr/prlog.h"
 #include "nsLayoutUtils.h"
 
 #include "mozilla/ArrayUtils.h"
--- work.orig/mozilla-release/widget/nsPrintSettingsImpl.cpp	2015-08-07 00:39:46.000000000 +0200
+++ work/mozilla-release/widget/nsPrintSettingsImpl.cpp	2015-08-08 23:14:27.846498000 +0200
@@ -3,6 +3,7 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
+#include "nspr/prlog.h"
 #include "nsPrintSettingsImpl.h"
 #include "nsReadableUtils.h"
 #include "nsIPrintSession.h"
--- work.orig/mozilla-release/gfx/layers/Layers.h	2015-08-07 00:39:48.000000000 +0200
+++ work/mozilla-release/gfx/layers/Layers.h	2015-08-08 23:20:37.643774000 +0200
@@ -6,6 +6,7 @@
 #ifndef GFX_LAYERS_H
 #define GFX_LAYERS_H
 
+#include "nspr/prlog.h"
 #include <stdint.h>                     // for uint32_t, uint64_t, uint8_t
 #include <stdio.h>                      // for FILE
 #include <sys/types.h>                  // for int32_t, int64_t
--- work.orig/mozilla-release/gfx/layers/Layers.cpp	2015-08-07 00:39:48.000000000 +0200
+++ work/mozilla-release/gfx/layers/Layers.cpp	2015-08-08 23:19:52.524416000 +0200
@@ -5,6 +5,7 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
+#include "nspr/prlog.h"
 #include "Layers.h"
 #include <algorithm>                    // for max, min
 #include "apz/src/AsyncPanZoomController.h"
--- work.orig/mozilla-release/gfx/2d/Logging.h	2015-08-07 00:39:47.000000000 +0200
+++ work/mozilla-release/gfx/2d/Logging.h	2015-08-08 23:24:21.277642000 +0200
@@ -11,6 +11,8 @@
 #include <stdio.h>
 #include <vector>
 
+#include "nspr/prlog.h"
+
 #ifdef MOZ_LOGGING
 #include <prlog.h>
 #endif
--- work.orig/mozilla-release/dom/media/MediaDecoder.cpp	2015-08-07 00:39:34.000000000 +0200
+++ work/mozilla-release/dom/media/MediaDecoder.cpp	2015-08-08 23:35:27.261569000 +0200
@@ -52,6 +52,8 @@
 // avoid redefined macro in unified build
 #undef DECODER_LOG
 
+PRLogModuleInfo* gMediaDecoderLog;
+
 #ifdef PR_LOGGING
 PRLogModuleInfo* gMediaDecoderLog;
 #define DECODER_LOG(x, ...) \
@@ -121,6 +123,7 @@
 PRLogModuleInfo* gMediaPromiseLog;
 PRLogModuleInfo* gMediaTimerLog;
 
+  
 void
 MediaDecoder::InitStatics()
 {
Comment 9 rkoberman 2015-08-09 04:02:18 UTC
Sorry, but it is crashing while in Google+, so the page is always changing. While it seems to fail at about the same point while scrolling down my home page, I have no idea exactly what on the page is doing it and no way for you to see what I am seeing without giving you my Google login.
Comment 10 rsmith 2015-08-09 11:12:10 UTC
After setting layers.offmainthreadcomposition.enabled to false, I've only had one crash so far.

Firefox "feels" faster too.
Comment 11 commit-hook freebsd_committer freebsd_triage 2015-08-09 16:26:28 UTC
A commit references this bug:

Author: jbeich
Date: Sun Aug  9 16:25:54 UTC 2015
New revision: 393803
URL: https://svnweb.freebsd.org/changeset/ports/393803

Log:
  www/firefox: remove broken LOGGING option

  NSPR logging is now always enabled as upstream partially
  removed support for disabling it.

  PR:		202165
  Reported by:	rsmith@xs4all.nl
  MFH:		2015Q3
  X-MFH-With:	r393690

Changes:
  head/Mk/bsd.gecko.mk
  head/www/firefox/Makefile
Comment 12 commit-hook freebsd_committer freebsd_triage 2015-08-11 18:30:52 UTC
A commit references this bug:

Author: jbeich
Date: Tue Aug 11 18:30:04 UTC 2015
New revision: 393958
URL: https://svnweb.freebsd.org/changeset/ports/393958

Log:
  MFH: r393690, r393803, r393805, r393879

  - Update Firefox to 40.0
  - Update Firefox ESR and libxul to 38.2.0
  - Phase out no longer supported LOGGING option [1]
  - Temporarily disable OMTC to avoid crashes [2]

  PORTREVISION was MFH'd as is to avoid merge conflicts in future.

  Changes:	https://www.mozilla.org/firefox/40.0/releasenotes/
  Changes:	https://www.mozilla.org/firefox/38.2.0/releasenotes/
  PR:		202165 [1]
  PR:		202174 [2]
  Reported by:	rsmith@xs4all.nl [1]
  Reported by:	many [2]
  Tested by:	Martin Birgmeier, Andrey Fesenko, Konstantin Belousov [2]
  Approved by:	ports-secteam (delphij, feld)

Changes:
_U  branches/2015Q3/
  branches/2015Q3/Mk/Uses/gecko.mk
  branches/2015Q3/Mk/bsd.gecko.mk
  branches/2015Q3/www/firefox/Makefile
  branches/2015Q3/www/firefox/distinfo
  branches/2015Q3/www/firefox/files/patch-bug1021761
  branches/2015Q3/www/firefox/files/patch-bug1073117
  branches/2015Q3/www/firefox/files/patch-bug826985
  branches/2015Q3/www/firefox/files/patch-bug847568
  branches/2015Q3/www/firefox/files/patch-ijg-libjpeg
  branches/2015Q3/www/firefox/files/patch-modules-libpref-init-all.js
  branches/2015Q3/www/firefox/files/patch-system-openh264
  branches/2015Q3/www/firefox/files/patch-z-bug517422
  branches/2015Q3/www/firefox-esr/Makefile
  branches/2015Q3/www/firefox-esr/distinfo
  branches/2015Q3/www/firefox-esr-i18n/Makefile
  branches/2015Q3/www/firefox-esr-i18n/distinfo
  branches/2015Q3/www/firefox-i18n/Makefile
  branches/2015Q3/www/firefox-i18n/distinfo
  branches/2015Q3/www/libxul/Makefile
  branches/2015Q3/www/libxul/distinfo
  branches/2015Q3/www/linux-firefox/Makefile
  branches/2015Q3/www/linux-firefox/distinfo
  branches/2015Q3/www/linux-firefox/pkg-plist