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

ld: version node not found for symbol #2985

Closed
pplmx opened this issue Feb 29, 2024 · 2 comments
Closed

ld: version node not found for symbol #2985

pplmx opened this issue Feb 29, 2024 · 2 comments

Comments

@pplmx
Copy link

pplmx commented Feb 29, 2024

  • Node Version: v20.11.1

  • Npm Version: 10.2.4

  • Platform: Linux localhost.localdomain 3.10.0-1127.el7.x86_64 CentOS Linux release 7.8.2003 (Core)

  • Compiler: 11.2.1-9

    gcc/g++ -v:
    gcc -v
    Using built-in specs.
    COLLECT_GCC=gcc
    COLLECT_LTO_WRAPPER=/opt/rh/devtoolset-11/root/usr/libexec/gcc/x86_64-redhat-linux/11/lto-wrapper
    Target: x86_64-redhat-linux
    Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,fortran,lto --prefix=/opt/rh/devtoolset-11/root/usr --mandir=/opt/rh/devtoolset-11/root/usr/share/man --infodir=/opt/rh/devtoolset-11/root/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --with-default-libstdcxx-abi=gcc4-compatible --enable-plugin --enable-initfini-array --with-isl=/builddir/build/BUILD/gcc-11.2.1-20220127/obj-x86_64-redhat-linux/isl-install --enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux
    Thread model: posix
    Supported LTO compression algorithms: zlib
    gcc version 11.2.1 20220127 (Red Hat 11.2.1-9) (GCC)
    
    g++ -v
    Using built-in specs.
    COLLECT_GCC=g++
    COLLECT_LTO_WRAPPER=/opt/rh/devtoolset-11/root/usr/libexec/gcc/x86_64-redhat-linux/11/lto-wrapper
    Target: x86_64-redhat-linux
    Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,fortran,lto --prefix=/opt/rh/devtoolset-11/root/usr --mandir=/opt/rh/devtoolset-11/root/usr/share/man --infodir=/opt/rh/devtoolset-11/root/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --with-default-libstdcxx-abi=gcc4-compatible --enable-plugin --enable-initfini-array --with-isl=/builddir/build/BUILD/gcc-11.2.1-20220127/obj-x86_64-redhat-linux/isl-install --enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux
    Thread model: posix
    Supported LTO compression algorithms: zlib
    gcc version 11.2.1 20220127 (Red Hat 11.2.1-9) (GCC)
    
  • glibc: upgraded 2.17 to 2.31

    glibc:
    ls -l /usr/lib64/libc.so.6*
    lrwxrwxrwx. 1 root root 12 Feb 27 18:43 /usr/lib64/libc.so.6 -> libc-2.31.so
    
  • libstdc++: upgraded 6.0.19 to 6.0.25

    libstdc++:
    ls -l /usr/lib64/libstdc++.so.6*
    lrwxrwxrwx. 1 root root      19 Feb 28 01:07 /usr/lib64/libstdc++.so.6 -> libstdc++.so.6.0.25
    -rwxr-xr-x. 1 root root  995840 Sep 29  2020 /usr/lib64/libstdc++.so.6.0.19
    -rwxr-xr-x. 1 root root 1661392 Feb 27 22:24 /usr/lib64/libstdc++.so.6.0.25
    
Verbose output (from node-gyp rebuild --verbose):
gyp info it worked if it ends with ok
gyp verb cli [
gyp verb cli '/home/moss/.nvm/versions/node/v20.11.1/bin/node',
gyp verb cli '/home/moss/.nvm/versions/node/v20.11.1/bin/node-gyp',
gyp verb cli 'rebuild',
gyp verb cli '--verbose'
gyp verb cli ]
gyp info using [email protected]
gyp info using [email protected] | linux | x64
gyp verb clean removing "build" directory
gyp verb find Python Python is not set from command line or npm configuration
gyp verb find Python Python is not set from environment variable PYTHON
gyp verb find Python checking if "python3" can be used
gyp verb find Python - executing "python3" to get executable path
gyp verb find Python - executable path is "/usr/local/bin/python3"
gyp verb find Python - executing "/usr/local/bin/python3" to get version
gyp verb find Python - version is "3.8.18"
gyp info find Python using Python version 3.8.18 found at "/usr/local/bin/python3"
gyp verb get node dir no --target version specified, falling back to host node version: 20.11.1

gyp verb install input version string "20.11.1"
gyp verb install installing version: 20.11.1
gyp verb install --ensure was passed, so won't reinstall if already installed
gyp verb install version is already installed, need to check "installVersion"
gyp verb got "installVersion" 11
gyp verb needs "installVersion" 11
gyp verb install version is good
gyp verb get node dir target node version installed: 20.11.1
gyp verb build dir attempting to create "build" dir: /var/tmp/mo-deploy/repos/task-executor/solver_addon/build
gyp verb build dir "build" dir needed to be created? Yes
gyp verb build/config.gypi creating config file
gyp verb build/config.gypi writing out config file: /var/tmp/mo-deploy/repos/task-executor/solver_addon/build/config.gypi
gyp verb config.gypi checking for gypi file: /var/tmp/mo-deploy/repos/task-executor/solver_addon/config.gypi
gyp verb common.gypi checking for gypi file: /var/tmp/mo-deploy/repos/task-executor/solver_addon/common.gypi
gyp verb gyp gyp format was not specified; forcing "make"
gyp info spawn /usr/local/bin/python3
gyp info spawn args [
gyp info spawn args '/home/moss/.nvm/versions/node/v20.11.1/lib/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/var/tmp/mo-deploy/repos/task-executor/solver_addon/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/home/moss/.nvm/versions/node/v20.11.1/lib/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/home/moss/.cache/node-gyp/20.11.1/include/node/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/home/moss/.cache/node-gyp/20.11.1',
gyp info spawn args '-Dnode_gyp_dir=/home/moss/.nvm/versions/node/v20.11.1/lib/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/home/moss/.cache/node-gyp/20.11.1/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/var/tmp/mo-deploy/repos/task-executor/solver_addon',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.'
gyp info spawn args ]
gyp verb build type Release
gyp verb architecture x64
gyp verb node dev dir /home/moss/.cache/node-gyp/20.11.1
gyp verb python /usr/local/bin/python3
gyp verb `which` succeeded for `make` /opt/rh/devtoolset-11/root/usr/bin/make
gyp verb bin symlinks created symlink to "/usr/local/bin/python3" in "/var/tmp/mo-deploy/repos/task-executor/solver_addon/build/node_gyp_bins" and added to PATH
gyp info spawn make
gyp info spawn args [ 'V=1', 'BUILDTYPE=Release', '-C', 'build' ]
make: Entering directory '/var/tmp/mo-deploy/repos/task-executor/solver_addon/build'
  g++ -o Release/obj.target/solver_addon/addon.o ../addon.cc '-DNODE_GYP_MODULE_NAME=solver_addon' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_GLIBCXX_USE_CXX11_ABI=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-D__STDC_FORMAT_MACROS' '-DOPENSSL_NO_PINSHARED' '-DOPENSSL_THREADS' '-DNAPI_DISABLE_CPP_EXCEPTIONS' '-D_WIN_' '-D_LINUX_' '-DBUILDING_NODE_EXTENSION' -I/home/moss/.cache/node-gyp/20.11.1/include/node -I/home/moss/.cache/node-gyp/20.11.1/src -I/home/moss/.cache/node-gyp/20.11.1/deps/openssl/config -I/home/moss/.cache/node-gyp/20.11.1/deps/openssl/openssl/include -I/home/moss/.cache/node-gyp/20.11.1/deps/uv/include -I/home/moss/.cache/node-gyp/20.11.1/deps/zlib -I/home/moss/.cache/node-gyp/20.11.1/deps/v8/include -I/var/tmp/mo-deploy/repos/task-executor/node_modules/node-addon-api -I../platform  -fPIC -pthread -Wall -Wextra -Wno-unused-parameter -m64 -O3 -fno-omit-frame-pointer -fno-rtti -std=gnu++17 -std=c++11 -MMD -MF ./Release/.deps/Release/obj.target/solver_addon/addon.o.d.raw   -c
  g++ -o Release/obj.target/solver_addon/mo_certificate.o ../mo_certificate.cpp '-DNODE_GYP_MODULE_NAME=solver_addon' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_GLIBCXX_USE_CXX11_ABI=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-D__STDC_FORMAT_MACROS' '-DOPENSSL_NO_PINSHARED' '-DOPENSSL_THREADS' '-DNAPI_DISABLE_CPP_EXCEPTIONS' '-D_WIN_' '-D_LINUX_' '-DBUILDING_NODE_EXTENSION' -I/home/moss/.cache/node-gyp/20.11.1/include/node -I/home/moss/.cache/node-gyp/20.11.1/src -I/home/moss/.cache/node-gyp/20.11.1/deps/openssl/config -I/home/moss/.cache/node-gyp/20.11.1/deps/openssl/openssl/include -I/home/moss/.cache/node-gyp/20.11.1/deps/uv/include -I/home/moss/.cache/node-gyp/20.11.1/deps/zlib -I/home/moss/.cache/node-gyp/20.11.1/deps/v8/include -I/var/tmp/mo-deploy/repos/task-executor/node_modules/node-addon-api -I../platform  -fPIC -pthread -Wall -Wextra -Wno-unused-parameter -m64 -O3 -fno-omit-frame-pointer -fno-rtti -std=gnu++17 -std=c++11 -MMD -MF ./Release/.deps/Release/obj.target/solver_addon/mo_certificate.o.d.raw   -c
  g++ -o Release/obj.target/solver_addon/mo_utils.o ../mo_utils.cpp '-DNODE_GYP_MODULE_NAME=solver_addon' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_GLIBCXX_USE_CXX11_ABI=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-D__STDC_FORMAT_MACROS' '-DOPENSSL_NO_PINSHARED' '-DOPENSSL_THREADS' '-DNAPI_DISABLE_CPP_EXCEPTIONS' '-D_WIN_' '-D_LINUX_' '-DBUILDING_NODE_EXTENSION' -I/home/moss/.cache/node-gyp/20.11.1/include/node -I/home/moss/.cache/node-gyp/20.11.1/src -I/home/moss/.cache/node-gyp/20.11.1/deps/openssl/config -I/home/moss/.cache/node-gyp/20.11.1/deps/openssl/openssl/include -I/home/moss/.cache/node-gyp/20.11.1/deps/uv/include -I/home/moss/.cache/node-gyp/20.11.1/deps/zlib -I/home/moss/.cache/node-gyp/20.11.1/deps/v8/include -I/var/tmp/mo-deploy/repos/task-executor/node_modules/node-addon-api -I../platform  -fPIC -pthread -Wall -Wextra -Wno-unused-parameter -m64 -O3 -fno-omit-frame-pointer -fno-rtti -std=gnu++17 -std=c++11 -MMD -MF ./Release/.deps/Release/obj.target/solver_addon/mo_utils.o.d.raw   -c
  g++ -o Release/obj.target/solver_addon/platform/mo_linux.o ../platform/mo_linux.cpp '-DNODE_GYP_MODULE_NAME=solver_addon' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_GLIBCXX_USE_CXX11_ABI=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-D__STDC_FORMAT_MACROS' '-DOPENSSL_NO_PINSHARED' '-DOPENSSL_THREADS' '-DNAPI_DISABLE_CPP_EXCEPTIONS' '-D_WIN_' '-D_LINUX_' '-DBUILDING_NODE_EXTENSION' -I/home/moss/.cache/node-gyp/20.11.1/include/node -I/home/moss/.cache/node-gyp/20.11.1/src -I/home/moss/.cache/node-gyp/20.11.1/deps/openssl/config -I/home/moss/.cache/node-gyp/20.11.1/deps/openssl/openssl/include -I/home/moss/.cache/node-gyp/20.11.1/deps/uv/include -I/home/moss/.cache/node-gyp/20.11.1/deps/zlib -I/home/moss/.cache/node-gyp/20.11.1/deps/v8/include -I/var/tmp/mo-deploy/repos/task-executor/node_modules/node-addon-api -I../platform  -fPIC -pthread -Wall -Wextra -Wno-unused-parameter -m64 -O3 -fno-omit-frame-pointer -fno-rtti -std=gnu++17 -std=c++11 -MMD -MF ./Release/.deps/Release/obj.target/solver_addon/platform/mo_linux.o.d.raw   -c
../platform/mo_linux.cpp: In function 'int create_child_process(const char*, const Napi::CallbackInfo&)':
../platform/mo_linux.cpp:41:29: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
   41 |         char* cmdArgs[] = { "sh", "-c", const_cast<char*>(cmd_line), NULL };
      |                             ^~~~
../platform/mo_linux.cpp:41:35: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
   41 |         char* cmdArgs[] = { "sh", "-c", const_cast<char*>(cmd_line), NULL };
      |                                   ^~~~
  g++ -o Release/obj.target/solver_addon/platform/filemap_linux.o ../platform/filemap_linux.cc '-DNODE_GYP_MODULE_NAME=solver_addon' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_GLIBCXX_USE_CXX11_ABI=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-D__STDC_FORMAT_MACROS' '-DOPENSSL_NO_PINSHARED' '-DOPENSSL_THREADS' '-DNAPI_DISABLE_CPP_EXCEPTIONS' '-D_WIN_' '-D_LINUX_' '-DBUILDING_NODE_EXTENSION' -I/home/moss/.cache/node-gyp/20.11.1/include/node -I/home/moss/.cache/node-gyp/20.11.1/src -I/home/moss/.cache/node-gyp/20.11.1/deps/openssl/config -I/home/moss/.cache/node-gyp/20.11.1/deps/openssl/openssl/include -I/home/moss/.cache/node-gyp/20.11.1/deps/uv/include -I/home/moss/.cache/node-gyp/20.11.1/deps/zlib -I/home/moss/.cache/node-gyp/20.11.1/deps/v8/include -I/var/tmp/mo-deploy/repos/task-executor/node_modules/node-addon-api -I../platform  -fPIC -pthread -Wall -Wextra -Wno-unused-parameter -m64 -O3 -fno-omit-frame-pointer -fno-rtti -std=gnu++17 -std=c++11 -MMD -MF ./Release/.deps/Release/obj.target/solver_addon/platform/filemap_linux.o.d.raw   -c
  g++ -o Release/obj.target/solver_addon.node -shared -pthread -rdynamic -m64  -Wl,-soname=solver_addon.node -Wl,--start-group Release/obj.target/solver_addon/addon.o Release/obj.target/solver_addon/mo_certificate.o Release/obj.target/solver_addon/mo_utils.o Release/obj.target/solver_addon/platform/mo_linux.o Release/obj.target/solver_addon/platform/filemap_linux.o -Wl,--end-group /var/tmp/mo-deploy/repos/task-executor/solver_addon/src/mocomm.lib
/opt/rh/devtoolset-11/root/usr/libexec/gcc/x86_64-redhat-linux/11/ld: Release/obj.target/solver_addon.node: version node not found for symbol ??_C@_0BI@DHKBAJAA@authorization?5success?$CB?6@
/opt/rh/devtoolset-11/root/usr/libexec/gcc/x86_64-redhat-linux/11/ld: failed to set dynamic section sizes: bad value
collect2: error: ld returned 1 exit status
make: *** [solver_addon.target.mk:158: Release/obj.target/solver_addon.node] Error 1
make: Leaving directory '/var/tmp/mo-deploy/repos/task-executor/solver_addon/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.<anonymous> (/home/moss/.nvm/versions/node/v20.11.1/lib/node_modules/node-gyp/lib/build.js:209:23)
gyp ERR! System Linux 3.10.0-1127.el7.x86_64
gyp ERR! command "/home/moss/.nvm/versions/node/v20.11.1/bin/node" "/home/moss/.nvm/versions/node/v20.11.1/bin/node-gyp" "rebuild" "--verbose"
gyp ERR! cwd /var/tmp/mo-deploy/repos/task-executor/solver_addon
gyp ERR! node -v v20.11.1
gyp ERR! node-gyp -v v10.0.1
gyp ERR! not ok
@pplmx pplmx closed this as completed Mar 13, 2024
@cclauss
Copy link
Contributor

cclauss commented Mar 13, 2024

Any hints on what was the fix?

@pplmx
Copy link
Author

pplmx commented Mar 14, 2024

Hi, @cclauss

Due to the definition of a namespace with a very misleading name, node. In fact, I forgot to import the linux static libraries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants