Closed Bug 1443581 Opened 6 years ago Closed 6 years ago

Compiling SpiderMonkey: no namespace js::selfhosted

Categories

(Core :: JavaScript Engine, defect)

45 Branch
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1443147

People

(Reporter: dpa-mozilla, Unassigned)

Details

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0
Build ID: 20180123215146

Steps to reproduce:

changeset:   406698:a4ef1082c51d
gcc is 7.3.0

Doing VPATH build just for SpiderMonkey I get:

make[1]: Entering directory '/root/Z'
make recurse_pre-export
make[2]: Entering directory '/root/Z'
/root/Z/_virtualenv/bin/python -m mozbuild.action.process_install_manifest --track install_dist_include.track dist/include _build_manifests/install/dist_include
Elapsed: 0.03s; From dist/include: Kept 343 existing; Added/updated 0; Removed 0 files and 0 directories.
/root/Z/_virtualenv/bin/python -m mozbuild.action.process_install_manifest --track install_dist_public.track dist/public _build_manifests/install/dist_public
Elapsed: 0.00s; From dist/public: Kept 0 existing; Added/updated 0; Removed 0 files and 0 directories.
/root/Z/_virtualenv/bin/python -m mozbuild.action.process_install_manifest --track install_dist_private.track dist/private _build_manifests/install/dist_private
Elapsed: 0.00s; From dist/private: Kept 0 existing; Added/updated 0; Removed 0 files and 0 directories.
/root/Z/_virtualenv/bin/python -m mozbuild.action.process_install_manifest --track install__tests.track _tests _build_manifests/install/_tests
Elapsed: 0.06s; From _tests: Kept 308 existing; Added/updated 0; Removed 0 files and 0 directories.
/root/Z/_virtualenv/bin/python -m mozbuild.action.process_install_manifest --track install_dist_bin.track dist/bin _build_manifests/install/dist_bin
Elapsed: 0.00s; From dist/bin: Kept 1 existing; Added/updated 0; Removed 0 files and 0 directories.
make[2]: Leaving directory '/root/Z'
make[1]: Leaving directory '/root/Z'
make[1]: Entering directory '/root/Z'
make recurse_export
make[2]: Entering directory '/root/Z'
make[3]: Entering directory '/root/Z/config'
backend.mk:2160: warning: overriding recipe for target '../dist/system_wrappers/pixman.h'
backend.mk:1278: warning: ignoring old recipe for target '../dist/system_wrappers/pixman.h'
make[3]: Nothing to be done for 'host'.
make[3]: Leaving directory '/root/Z/config'
make[3]: Entering directory '/root/Z/config'
backend.mk:2160: warning: overriding recipe for target '../dist/system_wrappers/pixman.h'
backend.mk:1278: warning: ignoring old recipe for target '../dist/system_wrappers/pixman.h'
make[3]: Nothing to be done for 'export'.
make[3]: Leaving directory '/root/Z/config'
make[3]: Entering directory '/root/Z/js/src'
make[3]: Nothing to be done for 'export'.
make[3]: Leaving directory '/root/Z/js/src'
make[3]: Entering directory '/root/Z/js/src/shell'
make[3]: Nothing to be done for 'export'.
make[3]: Leaving directory '/root/Z/js/src/shell'
make[3]: Entering directory '/root/Z/js/src/jsapi-tests'
make[3]: Nothing to be done for 'export'.
make[3]: Leaving directory '/root/Z/js/src/jsapi-tests'
make[3]: Entering directory '/root/Z/js/src/tests'
make[3]: Nothing to be done for 'export'.
make[3]: Leaving directory '/root/Z/js/src/tests'
make[3]: Entering directory '/root/Z/js/src/build'
make[3]: Nothing to be done for 'export'.
make[3]: Leaving directory '/root/Z/js/src/build'
make[3]: Entering directory '/root/Z/memory/build'
make[3]: Nothing to be done for 'export'.
make[3]: Leaving directory '/root/Z/memory/build'
make[3]: Entering directory '/root/Z/mozglue/build'
make[3]: Nothing to be done for 'export'.
make[3]: Leaving directory '/root/Z/mozglue/build'
make[2]: Leaving directory '/root/Z'
make[1]: Leaving directory '/root/Z'
make[1]: Entering directory '/root/Z'
make recurse_compile
make[2]: Entering directory '/root/Z'
make[3]: Entering directory '/root/Z/mfbt'
make[3]: Nothing to be done for 'target'.
make[3]: Leaving directory '/root/Z/mfbt'
make[3]: Entering directory '/root/Z/js/src'
/usr/local/bin/g++ -o Unified_cpp_js_src37.o -c -I/root/Z/dist/system_wrappers -include /mercurial/mozilla-central/config/gcc_hidden.h -DNDEBUG=1 -DTRIMMED=1 -DENABLE_BINARYDATA -DENABLE_SIMD -DENABLE_WASM_SATURATING_TRUNC_OPS -DENABLE_WASM_SIGNEXTEND_OPS -DENABLE_WASM_THREAD_OPS -DENABLE_WASM_GLOBAL -DWASM_HUGE_MEMORY -DJS_CACHEIR_SPEW -DENABLE_SHARED_ARRAY_BUFFER -DEXPORT_JS_API -DMOZ_HAS_MOZGLUE -I/mercurial/mozilla-central/js/src -I/root/Z/js/src -I/root/Z/dist/include -fPIC -DMOZILLA_CLIENT -include /root/Z/js/src/js-confdefs.h -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -Wall -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wsign-compare -Wtype-limits -Wunreachable-code -Wwrite-strings -Wno-invalid-offsetof -Wc++1z-compat -Wduplicated-cond -Wimplicit-fallthrough -Wno-error=maybe-uninitialized -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=free-nonheap-object -Wformat -Wformat-overflow=2 -Wno-noexcept-type -fno-sized-deallocation -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -fno-math-errno -pthread -pipe -g -freorder-blocks -O3 -fno-omit-frame-pointer -Wno-shadow -Werror=format -fno-strict-aliasing  -MD -MP -MF .deps/Unified_cpp_js_src37.o.pp   /root/Z/js/src/Unified_cpp_js_src37.cpp
In file included from /root/Z/js/src/Unified_cpp_js_src37.cpp:29:0:
/mercurial/mozilla-central/js/src/vm/SelfHosting.cpp:71:21: error: ‘selfhosted’ is not a namespace-name
 using namespace js::selfhosted;
                     ^~~~~~~~~~
/mercurial/mozilla-central/js/src/vm/SelfHosting.cpp:71:31: error: expected namespace-name before ‘;’ token
 using namespace js::selfhosted;
                               ^
/mercurial/mozilla-central/js/src/vm/SelfHosting.cpp: In member function ‘bool JSRuntime::initSelfHosting(JSContext*)’:
/mercurial/mozilla-central/js/src/vm/SelfHosting.cpp:2787:23: error: ‘GetRawScriptsSize’ was not declared in this scope
     uint32_t srcLen = GetRawScriptsSize();
                       ^~~~~~~~~~~~~~~~~
/mercurial/mozilla-central/js/src/vm/SelfHosting.cpp:2789:39: error: ‘compressedSources’ was not declared in this scope
     const unsigned char* compressed = compressedSources;
                                       ^~~~~~~~~~~~~~~~~
/mercurial/mozilla-central/js/src/vm/SelfHosting.cpp:2789:39: note: suggested alternative: ‘compressBound’
     const unsigned char* compressed = compressedSources;
                                       ^~~~~~~~~~~~~~~~~
                                       compressBound
/mercurial/mozilla-central/js/src/vm/SelfHosting.cpp:2790:30: error: ‘GetCompressedSize’ was not declared in this scope
     uint32_t compressedLen = GetCompressedSize();
                              ^~~~~~~~~~~~~~~~~
/mercurial/mozilla-central/js/src/vm/SelfHosting.cpp:2790:30: note: suggested alternative: ‘compressedLen’
     uint32_t compressedLen = GetCompressedSize();
                              ^~~~~~~~~~~~~~~~~
                              compressedLen
make[3]: *** [/mercurial/mozilla-central/config/rules.mk:1049: Unified_cpp_js_src37.o] Error 1
make[3]: Leaving directory '/root/Z/js/src'
make[2]: *** [/mercurial/mozilla-central/config/recurse.mk:73: js/src/target] Error 2
make[2]: Leaving directory '/root/Z'
make[1]: *** [/mercurial/mozilla-central/config/recurse.mk:33: compile] Error 2
make[1]: Leaving directory '/root/Z'
make: *** [/mercurial/mozilla-central/config/rules.mk:434: default] Error 2


I don't find in the code where the definition for namespace js::selfhosted should come from, except maybe js/src/builtin/embedjs.py .  But apparently on my system it is not called.
It is supposed to be defined in $OBJDIR/js/src/selfhosted.out.h, which should be created by running embedjs.py as part of the build process, and #included here: https://searchfox.org/mozilla-central/source/js/src/vm/SelfHosting.cpp#18

What options did you pass to configure?
Flags: needinfo?(dpa-mozilla)
selfhosted.out.h was empty.  I don't know why.  I started the build process from the beginning and now the file is not empty.
Flags: needinfo?(dpa-mozilla)
Next problem:

make[1]: Entering directory '/root/Z'
make recurse_pre-export
make[2]: Entering directory '/root/Z'
/root/Z/_virtualenv/bin/python -m mozbuild.action.process_install_manifest --track install_dist_include.track dist/include _build_manifests/install/dist_include
Elapsed: 0.03s; From dist/include: Kept 343 existing; Added/updated 0; Removed 0 files and 0 directories.
/root/Z/_virtualenv/bin/python -m mozbuild.action.process_install_manifest --track install_dist_public.track dist/public _build_manifests/install/dist_public
Elapsed: 0.00s; From dist/public: Kept 0 existing; Added/updated 0; Removed 0 files and 0 directories.
/root/Z/_virtualenv/bin/python -m mozbuild.action.process_install_manifest --track install_dist_private.track dist/private _build_manifests/install/dist_private
Elapsed: 0.00s; From dist/private: Kept 0 existing; Added/updated 0; Removed 0 files and 0 directories.
/root/Z/_virtualenv/bin/python -m mozbuild.action.process_install_manifest --track install__tests.track _tests _build_manifests/install/_tests
Elapsed: 0.05s; From _tests: Kept 308 existing; Added/updated 0; Removed 0 files and 0 directories.
/root/Z/_virtualenv/bin/python -m mozbuild.action.process_install_manifest --track install_dist_bin.track dist/bin _build_manifests/install/dist_bin
Elapsed: 0.00s; From dist/bin: Kept 1 existing; Added/updated 0; Removed 0 files and 0 directories.
make[2]: Leaving directory '/root/Z'
make[1]: Leaving directory '/root/Z'
make[1]: Entering directory '/root/Z'
make recurse_export
make[2]: Entering directory '/root/Z'
make[3]: Entering directory '/root/Z/config'
backend.mk:2160: warning: overriding recipe for target '../dist/system_wrappers/pixman.h'
backend.mk:1278: warning: ignoring old recipe for target '../dist/system_wrappers/pixman.h'
make[3]: Nothing to be done for 'host'.
make[3]: Leaving directory '/root/Z/config'
make[3]: Entering directory '/root/Z/config'
backend.mk:2160: warning: overriding recipe for target '../dist/system_wrappers/pixman.h'
backend.mk:1278: warning: ignoring old recipe for target '../dist/system_wrappers/pixman.h'
make[3]: Nothing to be done for 'export'.
make[3]: Leaving directory '/root/Z/config'
make[3]: Entering directory '/root/Z/js/src'
make[3]: Nothing to be done for 'export'.
make[3]: Leaving directory '/root/Z/js/src'
make[3]: Entering directory '/root/Z/js/src/shell'
make[3]: Nothing to be done for 'export'.
make[3]: Leaving directory '/root/Z/js/src/shell'
make[3]: Entering directory '/root/Z/js/src/jsapi-tests'
make[3]: Nothing to be done for 'export'.
make[3]: Leaving directory '/root/Z/js/src/jsapi-tests'
make[3]: Entering directory '/root/Z/js/src/tests'
make[3]: Nothing to be done for 'export'.
make[3]: Leaving directory '/root/Z/js/src/tests'
make[3]: Entering directory '/root/Z/js/src/build'
make[3]: Nothing to be done for 'export'.
make[3]: Leaving directory '/root/Z/js/src/build'
make[3]: Entering directory '/root/Z/memory/build'
make[3]: Nothing to be done for 'export'.
make[3]: Leaving directory '/root/Z/memory/build'
make[3]: Entering directory '/root/Z/mozglue/build'
make[3]: Nothing to be done for 'export'.
make[3]: Leaving directory '/root/Z/mozglue/build'
make[2]: Leaving directory '/root/Z'
make[1]: Leaving directory '/root/Z'
make[1]: Entering directory '/root/Z'
make recurse_compile
make[2]: Entering directory '/root/Z'
make[3]: Entering directory '/root/Z/mfbt'
make[3]: Nothing to be done for 'target'.
make[3]: Leaving directory '/root/Z/mfbt'
make[3]: Entering directory '/root/Z/js/src'
make[3]: Nothing to be done for 'target'.
make[3]: Leaving directory '/root/Z/js/src'
make[3]: Entering directory '/root/Z/js/src/editline'
make[3]: Nothing to be done for 'target'.
make[3]: Leaving directory '/root/Z/js/src/editline'
make[3]: Entering directory '/root/Z/modules/fdlibm/src'
make[3]: Nothing to be done for 'target'.
make[3]: Leaving directory '/root/Z/modules/fdlibm/src'
make[3]: Entering directory '/root/Z/config/external/nspr'
make[3]: Nothing to be done for 'target'.
make[3]: Leaving directory '/root/Z/config/external/nspr'
make[3]: Entering directory '/root/Z/config/external/zlib'
make[3]: Nothing to be done for 'target'.
make[3]: Leaving directory '/root/Z/config/external/zlib'
make[3]: Entering directory '/root/Z/memory/build'
make[3]: Nothing to be done for 'target'.
make[3]: Leaving directory '/root/Z/memory/build'
make[3]: Entering directory '/root/Z/memory/mozalloc'
make[3]: Nothing to be done for 'target'.
make[3]: Leaving directory '/root/Z/memory/mozalloc'
make[3]: Entering directory '/root/Z/mozglue/misc'
make[3]: Nothing to be done for 'target'.
make[3]: Leaving directory '/root/Z/mozglue/misc'
make[3]: Entering directory '/root/Z/config/external/icu/common'
make[3]: Nothing to be done for 'target'.
make[3]: Leaving directory '/root/Z/config/external/icu/common'
make[3]: Entering directory '/root/Z/config/external/icu/data'
make[3]: Nothing to be done for 'target'.
make[3]: Leaving directory '/root/Z/config/external/icu/data'
make[3]: Entering directory '/root/Z/config/external/icu/i18n'
make[3]: Nothing to be done for 'target'.
make[3]: Leaving directory '/root/Z/config/external/icu/i18n'
make[3]: Entering directory '/root/Z/config'
backend.mk:2160: warning: overriding recipe for target '../dist/system_wrappers/pixman.h'
backend.mk:1278: warning: ignoring old recipe for target '../dist/system_wrappers/pixman.h'
make[3]: Nothing to be done for 'host'.
make[3]: Leaving directory '/root/Z/config'
make[3]: Entering directory '/root/Z/mfbt/tests'
make[3]: Nothing to be done for 'target'.
make[3]: Leaving directory '/root/Z/mfbt/tests'
make[3]: Entering directory '/root/Z/config/external/icu'
make[3]: Nothing to be done for 'target'.
make[3]: Leaving directory '/root/Z/config/external/icu'
make[3]: Entering directory '/root/Z/js/src/build'
make[3]: Nothing to be done for 'target'.
make[3]: Leaving directory '/root/Z/js/src/build'
make[3]: Entering directory '/root/Z/mozglue/build'
make[3]: Nothing to be done for 'target'.
make[3]: Leaving directory '/root/Z/mozglue/build'
make[3]: Entering directory '/root/Z/js/src/shell'
/usr/local/bin/g++ -o Unified_cpp_js_src_shell0.o -c -I/root/Z/dist/system_wrappers -include /mercurial/mozilla-central/config/gcc_hidden.h -DNDEBUG=1 -DTRIMMED=1 -DMOZ_HAS_MOZGLUE -DEXPORT_JS_API -DENABLE_SHARED_ARRAY_BUFFER -Dtopsrcdir=/mercurial/mozilla-central/js/src -I/mercurial/mozilla-central/js/src/shell -I/root/Z/js/src/shell -I/root/Z/js/src -I/mercurial/mozilla-central/js/src -I/root/Z/dist/include -fPIC -DMOZILLA_CLIENT -include /root/Z/js/src/js-confdefs.h -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -Wall -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wsign-compare -Wtype-limits -Wunreachable-code -Wwrite-strings -Wno-invalid-offsetof -Wc++1z-compat -Wduplicated-cond -Wimplicit-fallthrough -Wno-error=maybe-uninitialized -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=free-nonheap-object -Wformat -Wformat-overflow=2 -Wno-noexcept-type -fno-sized-deallocation -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -fno-math-errno -pthread -pipe -g -freorder-blocks -O3 -fno-omit-frame-pointer -Wno-shadow -Werror=format  -MD -MP -MF .deps/Unified_cpp_js_src_shell0.o.pp   /root/Z/js/src/shell/Unified_cpp_js_src_shell0.cpp
In file included from /root/Z/js/src/shell/Unified_cpp_js_src_shell0.cpp:11:0:
/mercurial/mozilla-central/js/src/shell/js.cpp: In member function 'PRLibrary* AutoLibraryLoader::load(const char*)':
/mercurial/mozilla-central/js/src/shell/js.cpp:9008:9: error: 'PRLibSpec' was not declared in this scope
         PRLibSpec libSpec;
         ^~~~~~~~~
/mercurial/mozilla-central/js/src/shell/js.cpp:9008:9: note: suggested alternative: 'PRLibrary'
         PRLibSpec libSpec;
         ^~~~~~~~~
         PRLibrary
/mercurial/mozilla-central/js/src/shell/js.cpp:9009:9: error: 'libSpec' was not declared in this scope
         libSpec.type = PR_LibSpec_Pathname;
         ^~~~~~~
/mercurial/mozilla-central/js/src/shell/js.cpp:9009:9: note: suggested alternative: 'JitSpew'
         libSpec.type = PR_LibSpec_Pathname;
         ^~~~~~~
         JitSpew
/mercurial/mozilla-central/js/src/shell/js.cpp:9009:24: error: 'PR_LibSpec_Pathname' was not declared in this scope
         libSpec.type = PR_LibSpec_Pathname;
                        ^~~~~~~~~~~~~~~~~~~
/mercurial/mozilla-central/js/src/shell/js.cpp:9011:59: error: 'PR_LD_NOW' was not declared in this scope
         PRLibrary* dll = PR_LoadLibraryWithFlags(libSpec, PR_LD_NOW | PR_LD_GLOBAL);
                                                           ^~~~~~~~~
/mercurial/mozilla-central/js/src/shell/js.cpp:9011:59: note: suggested alternative: 'RTLD_NOW'
         PRLibrary* dll = PR_LoadLibraryWithFlags(libSpec, PR_LD_NOW | PR_LD_GLOBAL);
                                                           ^~~~~~~~~
                                                           RTLD_NOW
/mercurial/mozilla-central/js/src/shell/js.cpp:9011:71: error: 'PR_LD_GLOBAL' was not declared in this scope
         PRLibrary* dll = PR_LoadLibraryWithFlags(libSpec, PR_LD_NOW | PR_LD_GLOBAL);
                                                                       ^~~~~~~~~~~~
/mercurial/mozilla-central/js/src/shell/js.cpp:9011:71: note: suggested alternative: 'RTLD_GLOBAL'
         PRLibrary* dll = PR_LoadLibraryWithFlags(libSpec, PR_LD_NOW | PR_LD_GLOBAL);
                                                                       ^~~~~~~~~~~~
                                                                       RTLD_GLOBAL
/mercurial/mozilla-central/js/src/shell/js.cpp:9011:26: error: 'PR_LoadLibraryWithFlags' was not declared in this scope
         PRLibrary* dll = PR_LoadLibraryWithFlags(libSpec, PR_LD_NOW | PR_LD_GLOBAL);
                          ^~~~~~~~~~~~~~~~~~~~~~~
/mercurial/mozilla-central/js/src/shell/js.cpp:9011:26: note: suggested alternative: 'PR_LoadLibrary'
         PRLibrary* dll = PR_LoadLibraryWithFlags(libSpec, PR_LD_NOW | PR_LD_GLOBAL);
                          ^~~~~~~~~~~~~~~~~~~~~~~
                          PR_LoadLibrary
In file included from /root/Z/js/src/shell/Unified_cpp_js_src_shell0.cpp:11:0:
/mercurial/mozilla-central/js/src/shell/js.cpp: At global scope:
/mercurial/mozilla-central/js/src/shell/js.cpp:142:1: warning: 'PRLibrary* PR_LoadLibrary(const char*)' defined but not used [-Wunused-function]
 PR_LoadLibrary(const char* path)
 ^~~~~~~~~~~~~~
make[3]: *** [/mercurial/mozilla-central/config/rules.mk:1049: Unified_cpp_js_src_shell0.o] Error 1
make[3]: Leaving directory '/root/Z/js/src/shell'
make[2]: *** [/mercurial/mozilla-central/config/recurse.mk:73: js/src/shell/target] Error 2
make[2]: Leaving directory '/root/Z'
make[1]: *** [/mercurial/mozilla-central/config/recurse.mk:33: compile] Error 2
make[1]: Leaving directory '/root/Z'
make: *** [/mercurial/mozilla-central/config/rules.mk:434: default] Error 2
Oops, sorry. Bug 1443147.
Status: UNCONFIRMED → RESOLVED
Closed: 6 years ago
Resolution: --- → DUPLICATE
It works now with the latest source.
You need to log in before you can comment on or make changes to this bug.