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
[BUILD] link error : undefined reference to `llvm::sys::getDefaultTargetTriple()' #1713
Comments
Hey @nyue, can you try modifying the following in openvdb/openvdb_ax/openvdb_ax/CMakeLists.txt Lines 108 to 114 in 9153c12
and simply remove the first branch to become: llvm_map_components_to_libnames(_llvm_libs
native core executionengine support mcjit passes)
set(LLVM_LIBS "${_llvm_libs}") |
Still not working nyue@head0:~/projects/OpenVDB/11.0.0/build$ ninja
[232/328] Linking CXX executable openvdb_cmd/vdb_ax/vdb_ax
FAILED: openvdb_cmd/vdb_ax/vdb_ax
: && /usr/bin/c++ -O3 -DNDEBUG openvdb_cmd/vdb_ax/CMakeFiles/vdb_ax.dir/main.cc.o -o openvdb_cmd/vdb_ax/vdb_ax -L/home/nyue/systems/TBB/2020.3.0/lib -Wl,-rpath,/home/nyue/systems/TBB/2020.3.0/lib:/home/nyue/projects/OpenVDB/11.0.0/build/openvdb_ax/openvdb_ax:/opt/sesi/hfs19.5.773/dsolib:/home/nyue/projects/OpenVDB/11.0.0/build/openvdb/openvdb:/home/nyue/systems/boost/1.81.0-py3.9/lib: openvdb_ax/openvdb_ax/libopenvdb_ax.so.11.0.0 /opt/sesi/hfs19.5.773/dsolib/libjemalloc.so openvdb/openvdb/libopenvdb.so.11.0.0 /home/nyue/systems/TBB/2020.3.0/lib/libtbb.so.2 /opt/sesi/hfs19.5.773/dsolib/libblosc.so /usr/lib/x86_64-linux-gnu/libz.so -pthread /home/nyue/systems/boost/1.81.0-py3.9/lib/libboost_iostreams.so.1.81.0 /home/nyue/systems/llvm/10.0.1/lib/libLLVMMCJIT.a /home/nyue/systems/llvm/10.0.1/lib/libLLVMExecutionEngine.a /home/nyue/systems/llvm/10.0.1/lib/libLLVMRuntimeDyld.a /home/nyue/systems/llvm/10.0.1/lib/libLLVMPasses.a /home/nyue/systems/llvm/10.0.1/lib/libLLVMipo.a /home/nyue/systems/llvm/10.0.1/lib/libLLVMInstrumentation.a /home/nyue/systems/llvm/10.0.1/lib/libLLVMVectorize.a /home/nyue/systems/llvm/10.0.1/lib/libLLVMIRReader.a /home/nyue/systems/llvm/10.0.1/lib/libLLVMAsmParser.a /home/nyue/systems/llvm/10.0.1/lib/libLLVMLinker.a /home/nyue/systems/llvm/10.0.1/lib/libLLVMX86CodeGen.a /home/nyue/systems/llvm/10.0.1/lib/libLLVMAsmPrinter.a /home/nyue/systems/llvm/10.0.1/lib/libLLVMDebugInfoDWARF.a /home/nyue/systems/llvm/10.0.1/lib/libLLVMCFGuard.a /home/nyue/systems/llvm/10.0.1/lib/libLLVMGlobalISel.a /home/nyue/systems/llvm/10.0.1/lib/libLLVMSelectionDAG.a /home/nyue/systems/llvm/10.0.1/lib/libLLVMCodeGen.a /home/nyue/systems/llvm/10.0.1/lib/libLLVMTarget.a /home/nyue/systems/llvm/10.0.1/lib/libLLVMScalarOpts.a /home/nyue/systems/llvm/10.0.1/lib/libLLVMAggressiveInstCombine.a /home/nyue/systems/llvm/10.0.1/lib/libLLVMInstCombine.a /home/nyue/systems/llvm/10.0.1/lib/libLLVMBitWriter.a /home/nyue/systems/llvm/10.0.1/lib/libLLVMTransformUtils.a /home/nyue/systems/llvm/10.0.1/lib/libLLVMAnalysis.a /home/nyue/systems/llvm/10.0.1/lib/libLLVMProfileData.a /home/nyue/systems/llvm/10.0.1/lib/libLLVMX86AsmParser.a /home/nyue/systems/llvm/10.0.1/lib/libLLVMX86Desc.a /home/nyue/systems/llvm/10.0.1/lib/libLLVMObject.a /home/nyue/systems/llvm/10.0.1/lib/libLLVMMCParser.a /home/nyue/systems/llvm/10.0.1/lib/libLLVMBitReader.a /home/nyue/systems/llvm/10.0.1/lib/libLLVMCore.a /home/nyue/systems/llvm/10.0.1/lib/libLLVMRemarks.a /home/nyue/systems/llvm/10.0.1/lib/libLLVMBitstreamReader.a /home/nyue/systems/llvm/10.0.1/lib/libLLVMTextAPI.a /home/nyue/systems/llvm/10.0.1/lib/libLLVMX86Disassembler.a /home/nyue/systems/llvm/10.0.1/lib/libLLVMMCDisassembler.a /home/nyue/systems/llvm/10.0.1/lib/libLLVMMC.a /home/nyue/systems/llvm/10.0.1/lib/libLLVMBinaryFormat.a /home/nyue/systems/llvm/10.0.1/lib/libLLVMDebugInfoCodeView.a /home/nyue/systems/llvm/10.0.1/lib/libLLVMDebugInfoMSF.a /home/nyue/systems/llvm/10.0.1/lib/libLLVMX86Info.a /home/nyue/systems/llvm/10.0.1/lib/libLLVMX86Utils.a /home/nyue/systems/llvm/10.0.1/lib/libLLVMSupport.a -lz -lrt -ldl -ltinfo -lpthread -lm /home/nyue/systems/llvm/10.0.1/lib/libLLVMDemangle.a && :
openvdb_ax/openvdb_ax/libopenvdb_ax.so.11.0.0: undefined reference to `llvm::sys::getDefaultTargetTriple()'
collect2: error: ld returned 1 exit status
[237/328] Building CXX object openvdb_houdini/openvdb_houdini/CMakeFiles/SOP_OpenVDB_Combine.dir/SOP_OpenVDB_Combine.cc.o
ninja: build stopped: subcommand failed. |
Hey @nyue, thanks for trying that - I'm at a bit of a loss, the right libraries seem to be there. How did you install llvm? Could you also provide the full |
Hi, i had same error like @nyue , but its all working now, but i have sop_openvdb_ax error when i am staring houdini. Building openvdb11 with ABI9, for houdini 19.5.773 openvdb-vdb_ax_compile_part01.txt |
Hi @CeeGee:
Good to hear, what was the problem in the end?
Houdini's version of OpenVDB does not include AX symbols or headers. So the fact that it's trying to find cat /Applications/Houdini/Current/Frameworks/Houdini.framework/Versions/19.5/Resources/toolkit/include/openvdb/version.h | grep OPENVDB_VERSION_NAME
#define OPENVDB_VERSION_NAME v9_1_sesi
#define OPENVDB_VERSION_NAME v9_1_sesi_abi9 @CeeGee - instead of doing two builds, could you try a single install of OpenVDB Core/Ax/Cmd/Houdini? And if that fails, could you send your
@nyue - there actually shouldn't be any runtime clashing of libopenvdb and libopenvdb_sesi AFAIK. As mentioned above, both libraries export entirely different symbols; ours will export |
Hi @Idclip and then to explore VDB AX, and see how it can help and boost my current setups, and also to do some free tutorials on this topic, to show other artist how powerfull this can be, personaly think it bit under radar for most artists. Hope this help, and sorry if i missed something. |
Thanks @CeeGee - I think I know whats going on. @nyue I also have a suspicion with regards to the undefined symbol issue with @CeeGee - your main issue is that there are some conflicting installations of some libraries on your system (
You may need to manually provide the location of
I've also spotted the @nyue - I believe the the We only use this in one place in openvdb/openvdb_ax/openvdb_ax/compiler/Compiler.cc Lines 74 to 76 in 9153c12
Can you please try and replace |
@Idclip The use of LLVMGetDefaultTargetTriple() resolved my issues. I can build everything cleanly without errors on Ubuntu 18.04 + Houdini 19.5, thank you. |
Hi @Idclip But after when i want to use openVDB sop plugins in houdini i get this error Maybe i should reinstall my ubuntu 22.04, and tried install all librarys again. |
@CeeGee you probably need to make sure
So in this example, you should append > export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/root/houdini19.5/lib/
> houdini |
@Idclip aaa yes i forgot about that part, to much compile, delete tests |
Hey @CeeGee, it looks like this issue with the dual ABI is more involved than I thought. I need to investigate this a bit more. There are two things you could try, but I haven't had a chance to test either yet, I'm hoping to this week:
> git clone https://github.com/llvm/llvm-project.git llvm-project
> cd llvm-project/llvm
> git checkout llvmorg-13.0.0 # Chosen to build LLVM 13
> mkdir .build
> cd .build
# CMAKE_INSTALL_PREFIX will install it into a local `llvm-project/install` folder, as you probably don't want to install it to your system
# -D_GLIBCXX_USE_CXX11_ABI=0 is the important one - this builds with the compatible C++ ABI
> cmake -DCMAKE_INSTALL_PREFIX=$(pwd)/../install -DCMAKE_CXX_FLAGS="-D_GLIBCXX_USE_CXX11_ABI=0" ..
> make install -j4 And then, when building VDB, add the path to your new compatible build: cmake -DLLVM_DIR=<path/to/llvm>/install <rest of your commands>
I should note that we don't even have any tests with Houdini 20 yet so you may run into other issues with this approach. |
@Idclip Thanks a lot for all tips and guide informations, i will try and let you know. |
@Idclip One small question, |
Hey @CeeGee, the discussion tab on github is the best place for these types of questions, or you can email the public OpenVDB email group too: openvdb-dev@lists.aswf.io Interesting, I took a look and have it working for me, see below: Although AX doesn't natively support Let me know if you still can't get it to work |
@Idclip aaa yes its working now, maybe some type error on my side was problem. |
Environment
Operating System: (e.g. Windows 2019, macOS-10.15, Linux CentOS 7.4)
Ubuntu 18.04
Version / Commit SHA: (e.g VDB 7.2, SHA: 1a2b3c4d5e...)
VDB 11.0.0
6c044e6
CMake Version: (e.g. 3.18)
cmake version 3.25.0
Compiler: (e.g. gcc 10, msvc 2019)
gcc (Ubuntu 9.4.0-1ubuntu1~18.04) 9.4.0
Describe the problem
Link error
openvdb_ax/openvdb_ax/libopenvdb_ax.so.11.0.0: undefined reference to `llvm::sys::getDefaultTargetTriple()'
To Reproduce
BTW I have tried with newer version of LLVM, same link errors
Cheers
The text was updated successfully, but these errors were encountered: