Homebrew / legacy-homebrew

💀 The former home of Homebrew/homebrew (deprecated)
https://brew.sh
26.99k stars 11.36k forks source link

SlimerJS/XULRunner does not build on Yosemite #33558

Closed skycaptain closed 8 years ago

skycaptain commented 9 years ago

Trying to build slimerjs on yosemite fails with:

==> make -f client.mk build
clang -o plat_api_stub.o -c -fvisibility=hidden -DCHROMIUM_BUILD -DUSE_LIBJPEG_TURBO='1' -DENABLE_ONE_CLICK_SIGNIN -DENABLE_REMOTING='1' -DENABLE_WEBRTC='1' -DENABLE_CONFIGURATION_POLICY -DENABLE_INPUT_SPEECH -DENABLE_NOTIFICATIONS -DENABLE_HIDPI='1' -DENABLE_GPU='1' -DUSE_OPENSSL='1' -DENABLE_EGLIMAGE='1' -DUSE_SKIA='1' -DENABLE_TASK_MANAGER='1' -DENABLE_WEB_INTENTS='1' -DENABLE_EXTENSIONS='1' -DENABLE_PLUGIN_INSTALLATION='1' -DENABLE_PROTECTOR_SERVICE='1' -DENABLE_SESSION_SERVICE='1' -DENABLE_THEMES='1' -DENABLE_BACKGROUND='1' -DENABLE_AUTOMATION='1' -DENABLE_PRINTING='1' -DENABLE_CAPTIVE_PORTAL_DETECTION='1' -DSIP_OS_OSX -D_POSIX_SOURCE -DCPR_MEMORY_LITTLE_ENDIAN -DNO_SOCKET_POLLING -DUSE_TIMER_SELECT_BASED -DFULL_BUILD -DSTUBBED_OUT -DUSE_PRINTF -D_DARWIN_C_SOURCE -DNO_NSPR_10_SUPPORT -D__STDC_FORMAT_MACROS -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED='0' -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL  -DSTATIC_EXPORTABLE_JS_API -DNO_NSPR_10_SUPPORT -I. -I/private/tmp/xulrunner-2vPGUu/mozilla-release/media/webrtc/signaling/./src/common/browser_logging -I/private/tmp/xulrunner-2vPGUu/mozilla-release/media/webrtc/signaling/./src/common/time_profiling -I/private/tmp/xulrunner-2vPGUu/mozilla-release/media/webrtc/signaling/./src/sipcc/include -I/private/tmp/xulrunner-2vPGUu/mozilla-release/media/webrtc/signaling/./src/sipcc/core/includes -I/private/tmp/xulrunner-2vPGUu/mozilla-release/media/webrtc/signaling/./src/sipcc/cpr/include -I/private/tmp/xulrunner-2vPGUu/mozilla-release/media/webrtc/signaling/./src/sipcc/core/common -I/private/tmp/xulrunner-2vPGUu/mozilla-release/media/webrtc/signaling/./src/sipcc/core/sipstack/h -I/private/tmp/xulrunner-2vPGUu/mozilla-release/media/webrtc/signaling/./src/sipcc/core/ccapp -I/private/tmp/xulrunner-2vPGUu/mozilla-release/media/webrtc/signaling/./src/sipcc/core/sdp -I/private/tmp/xulrunner-2vPGUu/mozilla-release/media/webrtc/signaling/./src/sipcc/core/gsm/h -I/private/tmp/xulrunner-2vPGUu/mozilla-release/media/webrtc/signaling/./src/sipcc/plat/common -I/private/tmp/xulrunner-2vPGUu/mozilla-release/media/webrtc/signaling/../../../media/mtransport -I/private/tmp/xulrunner-2vPGUu/mozilla-release/media/webrtc/signaling/../../../dom/base -I/private/tmp/xulrunner-2vPGUu/mozilla-release/media/webrtc/signaling/../trunk/third_party/libsrtp/srtp/include -I/private/tmp/xulrunner-2vPGUu/mozilla-release/media/webrtc/signaling/../trunk/third_party/libsrtp/srtp/crypto/include -I/private/tmp/xulrunner-2vPGUu/mozilla-release/media/webrtc/signaling/../trunk/third_party/libsrtp/config -I/private/tmp/xulrunner-2vPGUu/mozilla-release/media/webrtc/signaling/../../../netwerk/sctp/datachannel -I/private/tmp/xulrunner-2vPGUu/mozilla-release/ipc/chromium/src -I/private/tmp/xulrunner-2vPGUu/mozilla-release/ipc/glue -I../../../../ipc/ipdl/_ipdlheaders  -I../../../../dist/include  -fPIC  -Qunused-arguments  -include ../../../../mozilla-config.h -DMOZILLA_CLIENT -MD -MP -MF .deps/plat_api_stub.o.pp -Qunused-arguments  -Qunused-arguments -Wall -Wpointer-arith -Wdeclaration-after-statement -Werror=return-type -Werror=int-to-pointer-cast -Wtype-limits -Wempty-body -Wsign-compare -Wno-unused -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk -std=gnu99 -fno-strict-aliasing -fno-math-errno -pthread -DNO_X11 -pipe  -DNDEBUG -DTRIMMED -g -O3 -fomit-frame-pointer  -I/private/tmp/xulrunner-2vPGUu/mozilla-release/objdir/dist/include/nspr   /private/tmp/xulrunner-2vPGUu/mozilla-release/media/webrtc/signaling/src/sipcc/plat/darwin/plat_api_stub.c
make[3]: *** [compile] Error 2
make[2]: *** [default] Error 2
make[1]: *** [realbuild] Error 2
make: *** [build] Error 2

Building xulrunner directly fails with

==> make -f client.mk build
clang++ -o YarrSyntaxChecker.o -c  -fvisibility=hidden -DEXPORT_JS_API -DJS_HAS_CTYPES -DDLL_PREFIX='"lib"' -DDLL_SUFFIX='".dylib"' -DUSE_SYSTEM_MALLOC=1 -DENABLE_ASSEMBLER=1 -DENABLE_JIT=1 -DNO_NSPR_10_SUPPORT -DUSE_ZLIB -I/private/tmp/xulrunner-WF1fsQ/mozilla-release/js/src -I. -I/private/tmp/xulrunner-WF1fsQ/mozilla-release/js/src/../../mfbt/double-conversion -Ictypes/libffi/include -I/private/tmp/xulrunner-WF1fsQ/mozilla-release/intl/icu/source/common -I/private/tmp/xulrunner-WF1fsQ/mozilla-release/intl/icu/source/i18n -I../../dist/include  -I/private/tmp/xulrunner-WF1fsQ/mozilla-release/objdir/dist/include/nspr        -fPIC  -Qunused-arguments  -DMOZILLA_CLIENT -include ../../js/src/js-confdefs.h -MD -MP -MF .deps/YarrSyntaxChecker.o.pp -Qunused-arguments  -Qunused-arguments -Wall -Wpointer-arith -Woverloaded-virtual -Werror=return-type -Werror=int-to-pointer-cast -Wtype-limits -Wempty-body -Werror=conversion-null -Wsign-compare -Wno-invalid-offsetof -Wno-c++0x-extensions -Wno-extended-offsetof -Wno-unknown-warning-option -Wno-return-type-c-linkage -Wno-mismatched-tags -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk -fno-common -fno-rtti -fno-exceptions -fno-math-errno -std=gnu++0x -pthread -pipe  -DNDEBUG -DTRIMMED -g -O3 -fno-stack-protector -fomit-frame-pointer     /private/tmp/xulrunner-WF1fsQ/mozilla-release/js/src/yarr/YarrSyntaxChecker.cpp
make[3]: *** [compile] Error 2
make[2]: *** [default] Error 2
make[1]: *** [realbuild] Error 2
make: *** [build] Error 2

brew, xcode and xcode clt are up to date.

asparagui commented 9 years ago

Upstream report: https://github.com/laurentj/slimerjs/issues/242

jacknagel commented 9 years ago

xulrunner 34.0.5 is out, anyone want to take a crack at this?

skycaptain commented 9 years ago

I will have a look at it. thanks for the reminder.

Update A: Just changing the url and sha-1 also results in an error.

==> make -f client.mk build
*** Fix above errors and then restart with               "/Applications/Xcode.app/Contents/Developer/usr/bin/make -f client.mk build"
make[2]: *** [configure] Error 1
make[1]: *** [/private/tmp/xulrunner-Q2OGHl/mozilla-release/objdir/Makefile] Error 2
make: *** [build] Error 2

Update B: As before building from source works.

Update C: Using the verbose mode:

updating cache /private/tmp/xulrunner-krbLmf/mozilla-release/objdir/config.cache
creating ./config.status
Reticulating splines...
Traceback (most recent call last):
  File "./config.status", line 935, in <module>
    config_status(**args)
  File "/private/tmp/xulrunner-krbLmf/mozilla-release/python/mozbuild/mozbuild/config_status.py", line 148, in config_status
    summary = the_backend.consume(definitions)
  File "/private/tmp/xulrunner-krbLmf/mozilla-release/python/mozbuild/mozbuild/backend/base.py", line 181, in consume
    for obj in objs:
  File "/private/tmp/xulrunner-krbLmf/mozilla-release/python/mozbuild/mozbuild/frontend/emitter.py", line 135, in emit
    objs = list(self.emit_from_context(out))
  File "/private/tmp/xulrunner-krbLmf/mozilla-release/python/mozbuild/mozbuild/frontend/emitter.py", line 523, in emit_from_context
    self._binaries[program].relativedir), context)
mozbuild.frontend.reader.SandboxValidationError: 
==============================
ERROR PROCESSING MOZBUILD FILE
==============================

The error occurred while processing the following file or one of the files it includes:

    /private/tmp/xulrunner-krbLmf/mozilla-release/xulrunner/stub/moz.build

The error occurred when validating the result of the execution. The reported error is:

    Cannot use "xulrunner" as PROGRAM name, because it is already used in xulrunner/app

*** Fix above errors and then restart with               "/Applications/Xcode.app/Contents/Developer/usr/bin/make -f client.mk build"
make[2]: *** [configure] Error 1
make[1]: *** [/private/tmp/xulrunner-krbLmf/mozilla-release/objdir/Makefile] Error 2
make: *** [build] Error 2
paazmaya commented 9 years ago

@skycaptain any updates on this? Anything I could try testing?

skycaptain commented 9 years ago

Oh man, I totally forgot about this ...was very busy that time around. Anyway there are some good and some bad news.

I don't know if this is a xulrunner bug or formula bug, but appently the xulrunner-stub-name was somehow overwritten to use "xulrunner" instead of "xulrunner-stub", which is the default. By adding ac_add_options --with-xulrunner-stub-name="xulrunner-stub" to the build options around line 89 we are forcing the default value. Maybe s.o. with more knowledge about xul can verify that?!

And now to the bad news. By setting the xulrunner-stub-name I could successfully pass the configuration process. But now I'm getting compilation errors < 34.0, which may relate to my nss and nspr versions. >34.0 compiles fine but xulrunner won't run. See #36348.

timgilbert commented 9 years ago

For what it's worth, I tried updating this to use XULRunner 39.0 and was able to compile it just fine; however, when it runs it quits with a message "Couldn't load XPCOM." Apparently this is a manifestation of this upstream bug, which is reported fixed upstream, but as far as I can tell has not made it into a stable release yet. My diff is available here if anyone else is interested in giving it a go.

dunn commented 9 years ago

If you brew install --HEAD slimerjs, does that run? If so, we can try to apply the fix to the current stable version.

timgilbert commented 9 years ago

No dice with brew install xulrunner --HEAD, I get a build error:

==> ./configure --program-suffix=213 --prefix=/private/tmp/xulrunner20150718-6023-w91uth/mozilla-central/ac213
==> make install
==> make -f client.mk build
Please run `mach mercurial-setup` now.
python2.7 /private/tmp/xulrunner20150718-6023-w91uth/mozilla-central/config/pythonpath.py -I /private/tmp/xulrunner20150718-6023-w91uth/mozilla-central/testing/mozbase/mozfile \
        /private/tmp/xulrunner20150718-6023-w91uth/mozilla-central/python/mozbuild/mozbuild/controller/clobber.py /private/tmp/xulrunner20150718-6023-w91uth/mozilla-central
Usage: clobber.py topsrcdir topobjdir
make: *** [/CLOBBER] Error 1

Possibly this is fixable with some recipe trickery.

I also tried xulrunner releases 39.0b7 and 40.0b4, which built successfully but gave me the same XPCOM error message.

l-hedgehog commented 8 years ago

FYI, maybe it's time to retire this formula, see XULRunner future and ownership and Remove xulrunner from mozilla-central.

dunn commented 8 years ago

@l-hedgehog thanks! Probably what we'll have to do.