question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Missing symbols in node.lib

See original GitHub issue

NWJS Version : 0.39.2 Operating System : Windows 10

node.lib is missing the following symbols:

?IsCacheable@ExternalStringResourceBase@String@v8@@UEBA_NXZ (public: virtual bool __cdecl v8::String::ExternalStringResourceBase::IsCacheable(void)const )
?Lock@ExternalStringResourceBase@String@v8@@MEBAXXZ (protected: virtual void __cdecl v8::String::ExternalStringResourceBase::Lock(void)const )
?Unlock@ExternalStringResourceBase@String@v8@@MEBAXXZ (protected: virtual void __cdecl v8::String::ExternalStringResourceBase::Unlock(void)const )

These symbols exists in the 12.4.0 node-gyp version of node.lib

>cd .node-gyp\12.4.0\x64
>dumpbin  /EXPORTS node.lib | findstr v8::String::ExternalStringResourceBase::
                  ??0ExternalStringResourceBase@String@v8@@IEAA@XZ (protected: __cdecl v8::String::ExternalStringResourceBase::ExternalStringResourceBase(void))
                  ??1ExternalStringResourceBase@String@v8@@UEAA@XZ (public: virtual __cdecl v8::String::ExternalStringResourceBase::~ExternalStringResourceBase(void))
                  ??_7ExternalStringResourceBase@String@v8@@6B@ (const v8::String::ExternalStringResourceBase::`vftable')
                  ?Dispose@ExternalStringResourceBase@String@v8@@MEAAXXZ (protected: virtual void __cdecl v8::String::ExternalStringResourceBase::Dispose(void))
                  ?IsCacheable@ExternalStringResourceBase@String@v8@@UEBA_NXZ (public: virtual bool __cdecl v8::String::ExternalStringResourceBase::IsCacheable(void)const )
                  ?Lock@ExternalStringResourceBase@String@v8@@MEBAXXZ (protected: virtual void __cdecl v8::String::ExternalStringResourceBase::Lock(void)const )
                  ?Unlock@ExternalStringResourceBase@String@v8@@MEBAXXZ (protected: virtual void __cdecl v8::String::ExternalStringResourceBase::Unlock(void)const )
>

But not in the 0.39.2 nw-gyp version of node.lib

>cd .nw-gyp\0.39.2\x64
>dumpbin  /EXPORTS node.lib | findstr v8::String::ExternalStringResourceBase::

>

An other way to see this fault and the consequences of it is to create a project that is dependent of node-lmdb version 0.7.0 and the try to rebuild it with nw-gyp

set npm_config_arch=x64
set npm_config_build_from_source=true
set npm_config_node_gyp=c:\\Users\\xxxxxxxxx\\AppData\\Roaming\\npm\\node_modules\\nw-gyp\\bin\\nw-gyp.js
set npm_config_runtime=node-webkit
set npm_config_target=0.39.2
>npm rebuild --verbose --msvs_version=2015 node-lmdb

The build will fail with the following error:

(Link target) ->
  misc.obj : error LNK2001: unresolved external symbol "public: virtual bool __cdecl v8::String::ExternalStringResourceBase::IsCacheable(void)const " (?IsCacheable@ ExternalStringResourceBase@String@v8@@UEBA_NXZ) 
  misc.obj : error LNK2001: unresolved external symbol "protected: virtual void __cdecl v8::String::ExternalStringResourceBase::Lock(void)const " (?Lock@ExternalStr ingResourceBase@String@v8@@MEBAXXZ) 
  misc.obj : error LNK2001: unresolved external symbol "protected: virtual void __cdecl v8::String::ExternalStringResourceBase::Unlock(void)const " (?Unlock@Externa lStringResourceBase@String@v8@@MEBAXXZ) 

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:23 (9 by maintainers)

github_iconTop GitHub Comments

3reactions
rogerwangcommented, Sep 17, 2019

I can confirm that modules with this issue can be built successfully with clang-cl.exe and lld-link.exe. Will push an update of nw-gyp soon.

0reactions
jiangjianpingcommented, Sep 20, 2019

Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Nodejs addon static library link: missing symbols
Nodejs addon static library link: missing symbols ... I'm trying to statically link the boost regex library and I'm getting the following ...
Read more >
Unresolved symbols when compiling native node module ...
I'm trying to create an application with node-webkit that has also to call some Julia code. However, when trying to compile the module...
Read more >
ASAN missing symbols when linking with /nodefaultlib
In some situations when linking programs with ASAN you can trigger some perplexing missing symbols issues. They seem related to the CRT and...
Read more >
Undefined symbol on node.js addon
I'm trying to create some node.js addons. Inside the addon i have a call to a static lib. Everything compiles ok, but when...
Read more >
ROS2 Foxy composable node: Failed to load component due ...
The node uses another external library in order to execute ... /dev_ws/install/ether_ros2/lib/libether_ros2_component.so: undefined symbol: ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found