Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build failure for -with-code-cache target #23907

Closed
suresh-srinivas opened this issue Oct 26, 2018 · 3 comments
Closed

Build failure for -with-code-cache target #23907

suresh-srinivas opened this issue Oct 26, 2018 · 3 comments
Labels
build Issues and PRs related to build files or the CI. tools Issues and PRs related to the tools directory.

Comments

@suresh-srinivas
Copy link
Contributor

The Build fails for -with-code-cache target. It appears that internalBinding is already defined.

out/Release/node --expose-internals tools/generate_code_cache.js out/Release/obj/gen/node_code_cache.cc
internal/bootstrap/cache.js:9
  NativeModule, internalBinding
                ^

SyntaxError: Identifier 'internalBinding' has already been declared
    at NativeModule.compile (internal/bootstrap/loaders.js:275:22)
    at Function.NativeModule.require (internal/bootstrap/loaders.js:168:18)
    at Function.Module._load (internal/modules/cjs/loader.js:523:25)
    at Module.require (internal/modules/cjs/loader.js:643:17)
    at require (internal/modules/cjs/helpers.js:22:18)
    at Object.<anonymous> (/home/labuser/ssuresh/nodejs-master/tools/generate_code_cache.js:14:5)
    at Module._compile (internal/modules/cjs/loader.js:707:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:718:10)
    at Module.load (internal/modules/cjs/loader.js:605:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:544:12)

We were able to make progress by commenting out that line. I havent looked to see where it is define. @joyeecheung @addaleax @hashseed if that is the right thing to do we can raise a PR.

@joyeecheung very nice piece of work to improve startup time. I was wondering why the cache is kept in the executable as opposed to be outside like in Chrome. We can discuss outside this bug. I am interested in the use case of keeping the compiled code for the library in persistent memory.

labuser@y004:~/ssuresh/nodejs-master$ git diff
diff --git a/lib/internal/bootstrap/cache.js b/lib/internal/bootstrap/cache.js
index 41fe1e3..e146f9f 100644
--- a/lib/internal/bootstrap/cache.js
+++ b/lib/internal/bootstrap/cache.js
@@ -6,7 +6,8 @@
 // cannot be tampered with even with --expose-internals
 
 const {
-  NativeModule, internalBinding
+  NativeModule
+ // internalBinding
 } = require('internal/bootstrap/loaders');
 
 function getCodeCache(id) {

  • Version: master
  • Platform: Linux 64-bit.
  • Subsystem: build
@richardlau
Copy link
Member

Being addressed in #23855.

@suresh-srinivas
Copy link
Contributor Author

Being addressed in #23855.

Thanks good to hear.

@ChALkeR ChALkeR added build Issues and PRs related to build files or the CI. tools Issues and PRs related to the tools directory. labels Oct 29, 2018
@apapirovski
Copy link
Member

The related PR has been merged so I believe this can now be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Issues and PRs related to build files or the CI. tools Issues and PRs related to the tools directory.
Projects
None yet
Development

No branches or pull requests

4 participants