Closed Bug 1421159 Opened 7 years ago Closed 6 years ago

js/src/shell/js.cpp:69: fatal error: prerror.h: No such file or directory

Categories

(Core :: JavaScript Engine, defect, P1)

Unspecified
FreeBSD
defect

Tracking

()

RESOLVED FIXED
mozilla59
Tracking Status
firefox-esr52 --- unaffected
firefox57 --- unaffected
firefox58 --- unaffected
firefox59 --- fixed

People

(Reporter: jbeich, Assigned: jbeich)

References

Details

(Keywords: regression)

Attachments

(1 file)

GNOME uses SpiderMonkey but it's now broken on future ESR59.

$ c++ -v
FreeBSD clang version 5.0.0 (tags/RELEASE_500/final 312559) (based on LLVM 5.0.0svn)
Target: x86_64-unknown-freebsd12.0
Thread model: posix
InstalledDir: /usr/bin

$ pkg install autoconf213 gmake python27 binutils mercurial
$ hg clone https://hg.mozilla.org/mozilla-central
$ cd mozilla-central/js/src
$ autoconf-2.13
$ ./configure --disable-jemalloc
$ gmake
[...]
gmake[3]: Entering directory '/tmp/mozilla-central/js/src/js/src/shell'
/usr/bin/c++ -std=gnu++14 -o Unified_cpp_js_src_shell0.o -c -I/tmp/mozilla-central/js/src/dist/system_wrappers -include /tmp/mozilla-central/config/gcc_hidden.h -DNDEBUG=1 -DTRIMMED=1 -DMOZ_HAS_MOZGLUE -DEXPORT_JS_API -DENABLE_SHARED_ARRAY_BUFFER -Dtopsrcdir=/tmp/mozilla-central/js/src -I/tmp/mozilla-central/js/src/shell -I/tmp/mozilla-central/js/src/js/src/shell -I/tmp/mozilla-central/js/src/js/src -I/tmp/mozilla-central/js/src -I/tmp/mozilla-central/js/src/dist/include -fPIC -DMOZILLA_CLIENT -include /tmp/mozilla-central/js/src/js/src/js-confdefs.h -Qunused-arguments -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -Qunused-arguments -Wall -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wsign-compare -Wtype-limits -Wunreachable-code -Wunreachable-code-return -Wwrite-strings -Wno-invalid-offsetof -Wclass-varargs -Wloop-analysis -Wc++1z-compat -Wcomma -Wimplicit-fallthrough -Wstring-conversion -Wno-inline-new-delete -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wformat -Wformat-security -Wno-gnu-zero-variadic-macro-arguments -Wno-noexcept-type -Wno-unknown-warning-option -Wno-return-type-c-linkage -fno-sized-deallocation -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-rtti -fno-exceptions -fno-math-errno -pipe -g -O -fno-omit-frame-pointer -Wno-shadow -Werror=format  -MD -MP -MF .deps/Unified_cpp_js_src_shell0.o.pp   /tmp/mozilla-central/js/src/js/src/shell/Unified_cpp_js_src_shell0.cpp
In file included from /tmp/mozilla-central/js/src/js/src/shell/Unified_cpp_js_src_shell0.cpp:11:
In file included from /tmp/mozilla-central/js/src/shell/js.cpp:69:
/tmp/mozilla-central/js/src/dist/system_wrappers/prerror.h:3:15: fatal error: 'prerror.h' file not
      found
#include_next <prerror.h>
              ^~~~~~~~~~~
1 error generated.
Ugh. This broke on osx too. The fix was https://hg.mozilla.org/mozilla-central/rev/08115b27691 to change some

  #ifdef __linux__

to

  #if defined(__linux__) || defined(XP_MACOSX)

So for now, you can add your platform in there. At some point, I'd like to move to a (hopefully?) better solution, which is to turn js/src/vm/PosixNSPR.cpp into an NSPR-lite that falls back to NSPR when available.
(or I think you could compile with either --with-system-nspr or --enable-nspr-build and it would still work. I guess GNOME doesn't use ctypes? That would already require nspr.)
(In reply to Steve Fink [:sfink] [:s:] from comment #1)
> So for now, you can add your platform in there.

Do you mean for DragonFly, FreeBSD, NetBSD, OpenBSD, GNU/kFreeBSD and maybe Solaris? SpiderMonkey supports more platforms than Gecko, so the whitelist may be larger. For one, Darwin/X11 is kinda semi-dead like OS/2 was years ago.
What if we just check for #ifdef JS_POSIX_NSPR ?
Priority: -- → P1
Did something get fixed here?
Flags: needinfo?(sphink)
(In reply to Jan de Mooij [:jandem] from comment #4)
> What if we just check for #ifdef JS_POSIX_NSPR ?

Thanks. It appears to build/work fine on FreeBSD.
Comment on attachment 8940925 [details]
Bug 1421159 - Unbreak JS shell build on BSDs after bug bug 1410528.

https://reviewboard.mozilla.org/r/211194/#review219892

Sorry for the delay. I don't think this is the right final state, but it is clearly far better than what it replaces, so r=me.
Attachment #8940925 - Flags: review?(sphink) → review+
Pushed by sfink@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/2530d8fe4490
Unbreak JS shell build on BSDs after bug bug 1410528. r=sfink
https://hg.mozilla.org/mozilla-central/rev/2530d8fe4490
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
Assignee: nobody → jbeich
Flags: needinfo?(sphink)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: