Undefined symbol error building libInject on macOS with clang 11
The following build error occurs when attempting to build gwollum-3.0.0 on macOS using conda-forge after including the patch from !19 (merged).
[100%] Linking CXX shared library libInject.dylib
cd $SRC_DIR/_build/src/Inject && $BUILD_PREFIX/bin/cmake -E cmake_link_script CMakeFiles/Inject.dir/link.txt --verbose=1
$BUILD_PREFIX/bin/x86_64-apple-darwin13.4.0-clang++ -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -stdlib=libc++ -fvisibility-inlines-hidden -std=c++14 -fmessage-length=0 -isystem $PREFIX/include -fdebug-prefix-map=$SRC_DIR=/usr/local/src/conda/gwollum-3.0.0 -fdebug-prefix-map=$PREFIX=/usr/local/src/conda-prefix -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -stdlib=libc++ -fvisibility-inlines-hidden -fmessage-length=0 -I$PREFIX/include -fdebug-prefix-map=/Users/runner/miniforge3/conda-bld/root_base_1622810034106/work=/usr/local/src/conda/root_base-6.24.0 -fdebug-prefix-map=$PREFIX=/usr/local/src/conda-prefix -std=c++17 -m64 -pipe -fsigned-char -fno-common -Qunused-arguments -pthread -stdlib=libc++ -O2 -g -DNDEBUG -isysroot /opt/MacOSX10.12.sdk -mmacosx-version-min=10.13 -dynamiclib -Wl,-headerpad_max_install_names -Wl,-pie -Wl,-headerpad_max_install_names -Wl,-dead_strip_dylibs -Wl,-rpath,$PREFIX/lib -L$PREFIX/lib -o libInject.dylib -install_name @rpath/libInject.dylib CMakeFiles/Inject.dir/InjTre.cc.o CMakeFiles/Inject.dir/InjGen.cc.o CMakeFiles/Inject.dir/InjRea.cc.o CMakeFiles/Inject.dir/InjEct.cc.o CMakeFiles/Inject.dir/InjectDict.cxx.o $PREFIX/lib/libMathCore.so
ld: warning: -pie being ignored. It is only used when linking a main executable
Undefined symbols for architecture x86_64:
"_GreenwichMeanSiderealTime", referenced from:
InjEct::Project() in InjEct.cc.o
"_TimeDelayFromEarthCenter", referenced from:
InjEct::Project() in InjEct.cc.o
"SplitString(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, char)", referenced from:
InjRea::InjRea(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, unsigned int) in InjRea.cc.o
"GetTukeyWindow(unsigned int, double)", referenced from:
InjEct::UpdateNativeSamplingFrequency() in InjEct.cc.o
"Error(char const*, char const*, ...)", referenced from:
InjTre::Streamer(TBuffer&) in InjectDict.cxx.o
InjGen::Streamer(TBuffer&) in InjectDict.cxx.o
InjRea::Streamer(TBuffer&) in InjectDict.cxx.o
InjEct::Streamer(TBuffer&) in InjectDict.cxx.o
non-virtual thunk to InjEct::Streamer(TBuffer&) in InjectDict.cxx.o
ROOT::streamer_InjTre(TBuffer&, void*) in InjectDict.cxx.o
ROOT::streamer_InjGen(TBuffer&, void*) in InjectDict.cxx.o
...
"TDirectory::CurrentDirectory()", referenced from:
InjTre::InjTre(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, unsigned int) in InjTre.cc.o
"GwollumPlot::Streamer(TBuffer&)", referenced from:
InjEct::Streamer(TBuffer&) in InjectDict.cxx.o
non-virtual thunk to InjEct::Streamer(TBuffer&) in InjectDict.cxx.o
ROOT::streamer_InjEct(TBuffer&, void*) in InjectDict.cxx.o
"GwollumPlot::GwollumPlot(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >)", referenced from:
InjEct::InjEct(Streams*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, unsigned int) in InjEct.cc.o
"GwollumPlot::~GwollumPlot()", referenced from:
InjEct::InjEct(Streams*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, unsigned int) in InjEct.cc.o
InjEct::~InjEct() in InjEct.cc.o
"TVirtualPad::Pad()", referenced from:
InjEct::InjEct(Streams*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, unsigned int) in InjEct.cc.o
InjEct::PlotInjection(long long) in InjEct.cc.o
"TVersionCheck::TVersionCheck(int)", referenced from:
__GLOBAL__sub_I_InjTre.cc in InjTre.cc.o
__GLOBAL__sub_I_InjGen.cc in InjGen.cc.o
__GLOBAL__sub_I_InjRea.cc in InjRea.cc.o
__GLOBAL__sub_I_InjEct.cc in InjEct.cc.o
__GLOBAL__sub_I_InjectDict.cxx in InjectDict.cxx.o
"TDirectoryFile::cd(char const*)", referenced from:
InjTre::Write(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) in InjTre.cc.o
"ROOT::Class_ShowMembers(TClass*, void const*, TMemberInspector&)", referenced from:
InjTre::ShowMembers(TMemberInspector&) const in InjTre.cc.o
InjGen::ShowMembers(TMemberInspector&) const in InjGen.cc.o
InjRea::ShowMembers(TMemberInspector&) const in InjRea.cc.o
InjEct::ShowMembers(TMemberInspector&) const in InjEct.cc.o
non-virtual thunk to InjEct::ShowMembers(TMemberInspector&) const in InjEct.cc.o
"ROOT::TGenericClassInfo::SetImplFile(char const*, int)", referenced from:
__GLOBAL__sub_I_InjTre.cc in InjTre.cc.o
__GLOBAL__sub_I_InjGen.cc in InjGen.cc.o
__GLOBAL__sub_I_InjRea.cc in InjRea.cc.o
__GLOBAL__sub_I_InjEct.cc in InjEct.cc.o
"ROOT::TGenericClassInfo::SetDestructor(void (*)(void*))", referenced from:
ROOT::GenerateInitInstanceLocal(InjTre const*) in InjectDict.cxx.o
ROOT::GenerateInitInstanceLocal(InjGen const*) in InjectDict.cxx.o
ROOT::GenerateInitInstanceLocal(InjRea const*) in InjectDict.cxx.o
ROOT::GenerateInitInstanceLocal(InjEct const*) in InjectDict.cxx.o
"ROOT::TGenericClassInfo::SetDeleteArray(void (*)(void*))", referenced from:
ROOT::GenerateInitInstanceLocal(InjTre const*) in InjectDict.cxx.o
ROOT::GenerateInitInstanceLocal(InjGen const*) in InjectDict.cxx.o
ROOT::GenerateInitInstanceLocal(InjRea const*) in InjectDict.cxx.o
ROOT::GenerateInitInstanceLocal(InjEct const*) in InjectDict.cxx.o
"ROOT::TGenericClassInfo::GetImplFileLine()", referenced from:
InjTre::ImplFileLine() in InjectDict.cxx.o
InjGen::ImplFileLine() in InjectDict.cxx.o
InjRea::ImplFileLine() in InjectDict.cxx.o
InjEct::ImplFileLine() in InjectDict.cxx.o
"ROOT::TGenericClassInfo::GetImplFileName()", referenced from:
InjTre::ImplFileName() in InjectDict.cxx.o
InjGen::ImplFileName() in InjectDict.cxx.o
InjRea::ImplFileName() in InjectDict.cxx.o
InjEct::ImplFileName() in InjectDict.cxx.o
"ROOT::TGenericClassInfo::SetStreamerFunc(void (*)(TBuffer&, void*))", referenced from:
ROOT::GenerateInitInstanceLocal(InjTre const*) in InjectDict.cxx.o
ROOT::GenerateInitInstanceLocal(InjGen const*) in InjectDict.cxx.o
ROOT::GenerateInitInstanceLocal(InjRea const*) in InjectDict.cxx.o
ROOT::GenerateInitInstanceLocal(InjEct const*) in InjectDict.cxx.o
"ROOT::TGenericClassInfo::GetClass()", referenced from:
InjTre::Dictionary() in InjectDict.cxx.o
InjTre::Class() in InjectDict.cxx.o
InjGen::Dictionary() in InjectDict.cxx.o
InjGen::Class() in InjectDict.cxx.o
InjRea::Dictionary() in InjectDict.cxx.o
InjRea::Class() in InjectDict.cxx.o
InjEct::Dictionary() in InjectDict.cxx.o
...
"ROOT::TGenericClassInfo::SetDelete(void (*)(void*))", referenced from:
ROOT::GenerateInitInstanceLocal(InjTre const*) in InjectDict.cxx.o
ROOT::GenerateInitInstanceLocal(InjGen const*) in InjectDict.cxx.o
ROOT::GenerateInitInstanceLocal(InjRea const*) in InjectDict.cxx.o
ROOT::GenerateInitInstanceLocal(InjEct const*) in InjectDict.cxx.o
"ROOT::TGenericClassInfo::TGenericClassInfo(char const*, int, char const*, int, std::type_info const&, ROOT::Internal::TInitBehavior const*, TClass* (*)(), TVirtualIsAProxy*, int, int)", referenced from:
ROOT::GenerateInitInstanceLocal(InjTre const*) in InjectDict.cxx.o
ROOT::GenerateInitInstanceLocal(InjGen const*) in InjectDict.cxx.o
ROOT::GenerateInitInstanceLocal(InjRea const*) in InjectDict.cxx.o
ROOT::GenerateInitInstanceLocal(InjEct const*) in InjectDict.cxx.o
"ROOT::TGenericClassInfo::~TGenericClassInfo()", referenced from:
ROOT::GenerateInitInstanceLocal(InjTre const*) in InjectDict.cxx.o
ROOT::GenerateInitInstanceLocal(InjGen const*) in InjectDict.cxx.o
ROOT::GenerateInitInstanceLocal(InjRea const*) in InjectDict.cxx.o
ROOT::GenerateInitInstanceLocal(InjEct const*) in InjectDict.cxx.o
"ROOT::Internal::DefineBehavior(void*, void*)", referenced from:
ROOT::GenerateInitInstanceLocal(InjTre const*) in InjectDict.cxx.o
ROOT::GenerateInitInstanceLocal(InjGen const*) in InjectDict.cxx.o
ROOT::GenerateInitInstanceLocal(InjRea const*) in InjectDict.cxx.o
ROOT::GenerateInitInstanceLocal(InjEct const*) in InjectDict.cxx.o
"ROOT::Internal::HasConsistentHashMember(char const*)", referenced from:
InjTre::CheckTObjectHashConsistency() const in InjTre.cc.o
InjGen::CheckTObjectHashConsistency() const in InjGen.cc.o
InjRea::CheckTObjectHashConsistency() const in InjRea.cc.o
InjEct::CheckTObjectHashConsistency() const in InjEct.cc.o
non-virtual thunk to InjEct::CheckTObjectHashConsistency() const in InjEct.cc.o
"ROOT::Internal::HasConsistentHashMember(TClass&)", referenced from:
InjTre::CheckTObjectHashConsistency() const in InjTre.cc.o
InjGen::CheckTObjectHashConsistency() const in InjGen.cc.o
InjRea::CheckTObjectHashConsistency() const in InjRea.cc.o
InjEct::CheckTObjectHashConsistency() const in InjEct.cc.o
non-virtual thunk to InjEct::CheckTObjectHashConsistency() const in InjEct.cc.o
"TH1D::TH1D(char const*, char const*, int, double const*)", referenced from:
InjRea::GetInjectionParamDist(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, unsigned int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) in InjRea.cc.o
"TH1D::TH1D(char const*, char const*, int, double, double)", referenced from:
InjRea::GetInjectionParamDist(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, unsigned int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) in InjRea.cc.o
"TFile::Close(char const*)", referenced from:
InjTre::Write(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) in InjTre.cc.o
"TFile::TFile(char const*, char const*, char const*, int)", referenced from:
InjTre::Write(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) in InjTre.cc.o
"TFile::~TFile()", referenced from:
InjTre::Write(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) in InjTre.cc.o
"TROOT::RegisterModule(char const*, char const**, char const**, char const*, char const*, void (*)(), std::__1::vector<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, int>, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, int> > > const&, char const**, bool)", referenced from:
(anonymous namespace)::TriggerDictionaryInitialization_libInject_Impl() in InjectDict.cxx.o
"TTree::TTree(char const*, char const*, int, TDirectory*)", referenced from:
InjTre::InjTre(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, unsigned int) in InjTre.cc.o
"TChain::TChain(char const*, char const*)", referenced from:
InjRea::InjRea(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, unsigned int) in InjRea.cc.o
"TClass::GetClass(std::type_info const&, bool, bool, unsigned long, unsigned long)", referenced from:
InjRea::InjRea(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, unsigned int) in InjRea.cc.o
"TGraph::TGraph(int)", referenced from:
InjEct::InjEct(Streams*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, unsigned int) in InjEct.cc.o
InjEct::UpdateNativeSamplingFrequency() in InjEct.cc.o
"Streams::GetDetectorAMResponse(double&, double&, double, double, double, double)", referenced from:
InjEct::Project() in InjEct.cc.o
"TObject::SetBit(unsigned int, bool)", referenced from:
InjEct::UpdateNativeSamplingFrequency() in InjEct.cc.o
"TObject::operator delete(void*)", referenced from:
InjTre::InjTre(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, unsigned int) in InjTre.cc.o
InjGen::InjGen(Segments*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, unsigned int) in InjGen.cc.o
InjRea::InjRea(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, unsigned int) in InjRea.cc.o
InjRea::GetInjectionParamDist(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, unsigned int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) in InjRea.cc.o
InjEct::InjEct(Streams*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, unsigned int) in InjEct.cc.o
InjEct::UpdateNativeSamplingFrequency() in InjEct.cc.o
"Segments::IsInsideSegment(unsigned int&, double)", referenced from:
InjGen::GenerateInjections() in InjGen.cc.o
"TStorage::ObjectAlloc(unsigned long)", referenced from:
InjTre::InjTre(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, unsigned int) in InjTre.cc.o
InjGen::InjGen(Segments*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, unsigned int) in InjGen.cc.o
InjRea::InjRea(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, unsigned int) in InjRea.cc.o
InjRea::GetInjectionParamDist(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, unsigned int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) in InjRea.cc.o
InjEct::InjEct(Streams*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, unsigned int) in InjEct.cc.o
InjEct::UpdateNativeSamplingFrequency() in InjEct.cc.o
"TDataType::GetType(std::type_info const&)", referenced from:
InjRea::InjRea(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, unsigned int) in InjRea.cc.o
"TGraph::GetXaxis() const", referenced from:
InjEct::UpdateNativeSamplingFrequency() in InjEct.cc.o
"typeinfo for GwollumPlot", referenced from:
typeinfo for InjEct in InjEct.cc.o
"_gInterpreterMutex", referenced from:
InjTre::Class() in InjectDict.cxx.o
InjGen::Class() in InjectDict.cxx.o
InjRea::Class() in InjectDict.cxx.o
InjEct::Class() in InjectDict.cxx.o
ld: symbol(s) not found for architecture x86_64
clang-11: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [src/Inject/CMakeFiles/Inject.dir/build.make:176: src/Inject/libInject.dylib] Error 1
make[2]: Leaving directory '$SRC_DIR/_build'
make[1]: *** [CMakeFiles/Makefile2:921: src/Inject/CMakeFiles/Inject.dir/all] Error 2
make[1]: Leaving directory '$SRC_DIR/_build'
make: *** [Makefile:159: all] Error 2