NWChemEx / NWChemEx/PluginPlay

Shared library linking fails

Open
#362 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
13
Forks
1
Avg merge
43m
Merged PRs (30d)
4

Description

[ 80%] Linking CXX shared library libpluginplay.so
/usr/bin/ld: _deps/utilities-build/libutilities.a(demangler.cpp.o): warning: relocation against `_ZTINSt8__detail11_AnyMatcherINSt7__cxx1112regex_traitsIcEELb1ELb0ELb0EEE' in read-only section `.text._ZNSt17_Function_handlerIFbcENSt8__detail11_AnyMatcherINSt7__cxx1112regex_traitsIcEELb1ELb0ELb0EEEE10_M_managerERSt9_Any_dataRKS8_St18_Manager_operation[_ZNSt17_Function_handlerIFbcENSt8__detail11_AnyMatcherINSt7__cxx1112regex_traitsIcEELb1ELb0ELb0EEEE10_M_managerERSt9_Any_dataRKS8_St18_Manager_operation]'
/usr/bin/ld: _deps/utilities-build/libutilities.a(demangler.cpp.o): relocation R_X86_64_PC32 against symbol `_ZNSt5ctypeIcE2idE@@GLIBCXX_3.4' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/pluginplay.dir/build.make:427: libpluginplay.so.1.0.41] Error 1
make[1]: *** [CMakeFiles/Makefile2:294: CMakeFiles/pluginplay.dir/all] Error 2
make: *** [Makefile:156: all] Error 2

I get this error when building with cmake -S . -B build -DNWX_MODULE_DIRECTORY=/home/jacob/Projects/PluginPlay/install when building with shared libraries. If the option is set to off, then the build is able to complete.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure with cmake -S . -B build -DNWX_MODULE_DIRECTORY=/home/jacob/Projects/PluginPlay/install and shared libraries enabled, then compare the generated build configuration with a successful non-shared build. Trace how the _deps/utilities-build/libutilities.a dependency is built and linked; done means the shared libpluginplay.so build completes without the relocation error.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, cpp
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.