# Firefox crashed and starts no more



## talsamon (Jan 6, 2018)

Firefox crashed unexpected with a bus error. I removed it and all directories from firefox. Installed new. It starts but crashed if I open a second tab, sometimes also with one tab.
Any suggestions or ideas? (I had never before such problem with firefox).


----------



## cpm@ (Jan 6, 2018)

Recent update to LLVM 50 causes problems that need to be addressed.

Build firefox with devel/llvm40 as a workaround:

`$ env CC=clang40 CXX=clang++40 CPP=clang-cpp40 make clean all deinstall install -C /usr/ports/www/firefox`

https://lists.freebsd.org/pipermail/freebsd-gecko/2018-January/007947.html


----------



## talsamon (Jan 6, 2018)

End up with errors like

```
/ram/usr/ports/www/firefox/work/firefox-57.0.4/obj-x86_64-unknown-freebsd10.4/dist/include/mozilla/Char16.h:194:1: error:
      C++ requires a type specifier for all declarations
/ram/usr/ports/www/firefox/work/firefox-57.0.4/obj-x86_64-unknown-freebsd10.4/dist/include/mozilla/Char16.h:194:22: error:
      use of undeclared identifier 'char16_t'
static_assert(sizeof(char16_t) == 2, "Is char16_t type 16 bits?");
                     ^
/ram/usr/ports/www/firefox/work/firefox-57.0.4/obj-x86_64-unknown-freebsd10.4/dist/include/mozilla/Char16.h:195:1: error:
      C++ requires a type specifier for all declarations
static_assert(char16_t(-1) > char16_t(0), "Is char16_t type unsigned?");
^
/ram/usr/ports/www/firefox/work/firefox-57.0.4/obj-x86_64-unknown-freebsd10.4/dist/include/mozilla/Char16.h:195:15: error:
      use of undeclared identifier 'char16_t'
static_assert(char16_t(-1) > char16_t(0), "Is char16_t type unsigned?");
              ^
/ram/usr/ports/www/firefox/work/firefox-57.0.4/obj-x86_64-unknown-freebsd10.4/dist/include/mozilla/Char16.h:195:30: error:
      use of undeclared identifier 'char16_t'
static_assert(char16_t(-1) > char16_t(0), "Is char16_t type unsigned?");
                             ^
/ram/usr/ports/www/firefox/work/firefox-57.0.4/obj-x86_64-unknown-freebsd10.4/dist/include/mozilla/Char16.h:196:1: error:
      C++ requires a type specifier for all declarations
static_assert(sizeof(u'A') == 2, "Is unicode char literal 16 bits?");
^
/ram/usr/ports/www/firefox/work/firefox-57.0.4/obj-x86_64-unknown-freebsd10.4/dist/include/mozilla/Char16.h:196:22: error:
      use of undeclared identifier 'u'
static_assert(sizeof(u'A') == 2, "Is unicode char literal 16 bits?");
                     ^
/ram/usr/ports/www/firefox/work/firefox-57.0.4/obj-x86_64-unknown-freebsd10.4/dist/include/mozilla/Char16.h:197:1: error:
      C++ requires a type specifier for all declarations
static_assert(sizeof(u""[0]) == 2, "Is unicode string char 16 bits?");
^
/ram/usr/ports/www/firefox/work/firefox-57.0.4/obj-x86_64-unknown-freebsd10.4/dist/include/mozilla/Char16.h:197:22: error:
      use of undeclared identifier 'u'
static_assert(sizeof(u""[0]) == 2, "Is unicode string char 16 bits?");
                     ^
In file included from /ram/usr/ports/www/firefox/work/firefox-57.0.4/js/src/builtin/RegExp.cpp:7:
In file included from /ram/usr/ports/www/firefox/work/firefox-57.0.4/js/src/builtin/RegExp.h:10:
In file included from /ram/usr/ports/www/firefox/work/firefox-57.0.4/js/src/vm/RegExpObject.h:15:
In file included from /ram/usr/ports/www/firefox/work/firefox-57.0.4/js/src/jscntxt.h:14:
In file included from /ram/usr/ports/www/firefox/work/firefox-57.0.4/obj-x86_64-unknown-freebsd10.4/dist/include/js/CharacterEncoding.h:10:
In file included from /ram/usr/ports/www/firefox/work/firefox-57.0.4/obj-x86_64-unknown-freebsd10.4/dist/include/mozilla/Range.h:10:
In file included from /ram/usr/ports/www/firefox/work/firefox-57.0.4/obj-x86_64-unknown-freebsd10.4/dist/include/mozilla/RangedPtr.h:15:
In file included from /ram/usr/ports/www/firefox/work/firefox-57.0.4/obj-x86_64-unknown-freebsd10.4/dist/include/mozilla/ArrayUtils.h:14:
In file included from /ram/usr/ports/www/firefox/work/firefox-57.0.4/obj-x86_64-unknown-freebsd10.4/dist/include/mozilla/Assertions.h:21:
/ram/usr/ports/www/firefox/work/firefox-57.0.4/obj-x86_64-unknown-freebsd10.4/dist/include/mozilla/Types.h:136:11: warning:
      'decltype' macro redefined [-Wmacro-redefined]
#  define decltype __typeof__
          ^
/usr/include/c++/v1/__config:561:9: note: previous definition is here
#define decltype(x) __typeof__(x)
        ^
In file included from /ram/usr/ports/www/firefox/wor
```

in the moment I try it with `gcc6`. Package also not working.
If this try will not working, next step downgrade.

Edit: forgot -  I am on 10.4 amd64.


----------



## talsamon (Jan 6, 2018)

There is something totally weird:

```
/work/firefox-57.0.4/configure --help | more
Traceback (most recent call last):
  File "/ram/usr/ports/www/firefox/work/firefox-57.0.4/configure.py", line 124, in <module>
    sys.exit(main(sys.argv))
  File "/ram/usr/ports/www/firefox/work/firefox-57.0.4/configure.py", line 29, in main
    sandbox.run(os.path.join(os.path.dirname(__file__), 'moz.configure'))
  File "/ram/usr/ports/www/firefox/work/firefox-57.0.4/python/mozbuild/mozbuild/configure/__init__.py", line 423, in run
    raise InvalidOptionError('Unknown option: %s' % without_value)
mozbuild.configure.options.InvalidOptionError: Unknown option: PYTHON
```


----------



## talsamon (Jan 6, 2018)

Found this:  PR 224917.


----------



## talsamon (Jan 6, 2018)

Recompiled devel/autoconf - and the configure error was gone. No advance with www/firefox (try with devel/gcc6 failed).

-- The configure error was only in the www/firefox port. I don't know what went wrong. And don't know if it was really caused by `autoconf`.


----------



## talsamon (Jan 6, 2018)

For the moment I am back to www/firefox-esr.... and this is a slowfox grrr :-((


----------



## talsamon (Jan 7, 2018)

Now I have compiled www/firefox with `clang40`. Maybe,  it was the problem with `configure` (but I am not sure). But I am waiting to install it cause of jbeich stated in the PR  "
Nevermind, firefox still crashes frequently...".


EDIT: started now www/waterfox ... seems to work.


----------

