Build failure: undefined symbols 'TCanvas::SetWindowSize' and '_fftw_execute' when building libOmicron on macOS
When attempting to build omicron-3.0.0 on macOS with conda-forge (including a patch to fix #16 (closed)), the following build failure occurs:
[ 65%] Linking CXX shared library libOmicron.dylib
cd $SRC_DIR/_build/src && $BUILD_PREFIX/bin/cmake -E cmake_link_script CMakeFiles/libOmicron.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/omicron-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.9 -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 libOmicron.dylib -install_name @rpath/libOmicron.dylib CMakeFiles/libOmicron.dir/Omap.cc.o CMakeFiles/libOmicron.dir/Oqplane.cc.o CMakeFiles/libOmicron.dir/Otile.cc.o CMakeFiles/libOmicron.dir/Oinject.cc.o CMakeFiles/libOmicron.dir/Outils.cc.o CMakeFiles/libOmicron.dir/Oparameters.cc.o CMakeFiles/libOmicron.dir/Ohtml.cc.o CMakeFiles/libOmicron.dir/Oomicron.cc.o CMakeFiles/libOmicron.dir/OmicronDict.cxx.o $PREFIX/lib/libCore.so $PREFIX/lib/libHist.so $PREFIX/lib/libMathCore.so $PREFIX/lib/libRIO.so -lCUtils -lInject -lRootUtils -lSegments -lStreams -lTime -lTriggers
ld: warning: -pie being ignored. It is only used when linking a main executable
Undefined symbols for architecture x86_64:
"TCanvas::SetWindowSize(unsigned int, unsigned int)", referenced from:
Omicron::ReadOptions(unsigned int, bool) in Oparameters.cc.o
"_fftw_execute", referenced from:
Oqplane::ProjectData(fft*, double) in Oqplane.cc.o
Omicron::Condition(unsigned int, double*, bool&) in Oomicron.cc.o
Omicron::WriteOutput() in Oomicron.cc.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)
Edited by Duncan Macleod