8000 undefined references for common_clang.o with opencl-clang 10.0.0-2 · Issue #156 · intel/opencl-clang · GitHub 8000
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
undefined references for common_clang.o with opencl-clang 10.0.0-2 #156
Open
@boegel

Description

@boegel

I'm trying to build opencl-clang 10.0.0-2 on top of Clang 10.0.0 (in the context of getting https://github.com/intel/compute-runtime/releases/tag/20.25.17111 built from source), and I'm running into this problem:

[ 97%] Linking CXX shared library libopencl-clang.so
/software/CMake/3.16.4-GCCcore-9.3.0/bin/cmake -E cmake_link_script CMakeFiles/opencl-clang.dir/link.txt --verbose=1
/software/GCCcore/9.3.0/bin/g++ -fPIC -O2 -ftree-vectorize -march=native -fno-math-errno -O3 -DNDEBUG  -Wl,-O3 -Wl,--gc-sections -Wl,--no-undefined -Wl,-Bsymbolic -Wl,--version-script=/tmp/openclclang/10.0.0-2/GCCcore-9.3.0/opencl-clang-10.0.0-2/common_clang.map -L/software/libxml2/2.9.10-GCCcore-9.3.0/lib -L/software/Clang/10.0.0-GCCcore-9.3.0/lib -L/software/SPIRV-LLVM-Translator/10.0.0-GCCcore-9.3.0-20200527/lib -L/software/binutils/2.34-GCCcore-9.3.0/lib -L/software/GCCcore/9.3.0/lib64 -L/software/GCCcore/9.3.0/lib -shared -Wl,-soname,libopencl-clang.so.10 -o libopencl-clang.so.10 CMakeFiles/opencl-clang.dir/common_clang.cpp.o CMakeFiles/opencl-clang.dir/options.cpp.o 
CMakeFiles/opencl-clang.dir/pch_mgr.cpp.o CMakeFiles/opencl-clang.dir/options_compile.cpp.o cl_headers/CMakeFiles/cl_headers.dir/opencl-c.h.cpp.o cl_headers/CMakeFiles/cl_headers.dir/opencl-c-base.h.cpp.o cl_headers/CMakeFiles/cl_headers.dir/opencl-c-12-spir.mod.cpp.o cl_headers/CMakeFiles/cl_headers.dir/opencl-c-20-spir.mod.cpp.o cl_headers/CMakeFiles/cl_headers.dir/opencl-c-12-spir64.mod.cpp.o cl_headers/CMakeFiles/cl_headers.dir/opencl-c-20-spir64.mod.cpp.o cl_headers/CMakeFiles/cl_headers.dir/opencl-c-12-spir-fp64.mod.cpp.o cl_headers/CMakeFiles/cl_headers.dir/opencl-c-20-spir-fp64.mod.cpp.o cl_headers/CMakeFiles/cl_headers.dir/opencl-c-12-spir64-fp64.mod.cpp.o cl_headers/CMakeFiles/cl_headers.dir/opencl-c-20-spir64-fp64.mod.cpp.o cl_headers/CMakeFiles/cl_headers.dir/module.modulemap.cpp.o  -Wl,-rpath,"\$ORIGIN/../lib:/software/Clang/10.0.0-GCCcore-9.3.0/lib" -ldl -lLLVMSPIRVLib -lclang-cpp
CMakeFiles/opencl-clang.dir/common_clang.cpp.o:common_clang.cpp:function CommonClangInitialize(): error: undefined reference to 'LLVMInitializeX86TargetInfo'
CMakeFiles/opencl-clang.dir/common_clang.cpp.o:common_clang.cpp:function CommonClangInitialize(): error: undefined reference to 'LLVMInitializeX86Target'
CMakeFiles/opencl-clang.dir/common_clang.cpp.o:common_clang.cpp:function CommonClangInitialize(): error: undefined reference to 'LLVMInitializeX86AsmPrinter'
CMakeFiles/opencl-clang.dir/common_clang.cpp.o:common_clang.cpp:function CommonClangInitialize(): error: undefined reference to 'LLVMInitializeX86AsmParser'
CMakeFiles/opencl-clang.dir/common_clang.cpp.o:common_clang.cpp:function CommonClangInitialize(): error: undefined reference to 'LLVMInitializeX86TargetMC'
collect2: error: ld returned 1 exit status
make[2]: *** [libopencl-clang.so.10] Error 1

I'm also building Clang 10.0.0 from source myself, so it's possible the -lclang-cpp being linked with isn't what opencl-clang expects it to be...

I have specified the location to the Clang/LLVM installation via -DLLVM_DIR as is explained in the README, so I'm fairly sure that's not the problem here...

Any suggestions on what may be wrong here?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0