Skip to content

libopencl-clang.so cannot be linked on Fedora 32 and rawhide #108

@JacekDanecki

Description

@JacekDanecki

Starting with (clang-10.0.0-0.2.rc1.fc32](https://koji.fedoraproject.org/koji/buildinfo?buildID=1458974) libopencl-clang.so cannot be linked because of missing libraries. The same issue with newer clang package reproduced in copr build.
More details about clang in Fedora 32: https://lists.fedoraproject.org/archives/list/[email protected]/thread/7YQGZ2RQUNJCD7QA37AVVJQF4F4QCPXL/

[ 94%] Linking CXX shared library libopencl-clang.so
/usr/bin/cmake -E cmake_link_script CMakeFiles/opencl-clang.dir/link.txt --verbose=1
/usr/bin/c++ -fPIC -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -DNDEBUG  -Wl,-rpath-link,  -Wl,-O3 -Wl,--no-undefined -Wl,-Bsymbolic -Wl,--version-script=/root/rpmbuild/BUILD/opencl-clang-0a5a9f67b56431ef7b9436d1af812df6dfb44975/common_clang.map -Wl,-z,relro -Wl,--as-needed  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -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   -L/usr/lib64/lib64  -Wl,-rpath,"\$ORIGIN/../lib64" -lclangBasic -lclangCodeGen -lclangDriver -lclangFrontend -lclangFrontendTool -lclangCodeGen -lclangRewriteFrontend -lclangARCMigrate -lclangStaticAnalyzerFrontend -lclangStaticAnalyzerCheckers -lclangStaticAnalyzerCore -lclangCrossTU -lclangIndex -lclangFrontend -lclangDriver -lclangParse -lclangSerialization -lclangSema -lclangAnalysis -lclangEdit -lclangFormat -lclangToolingInclusions -lclangToolingCore -lclangRewrite -lclangASTMatchers -lclangAST -lclangLex -lclangBasic -ldl -lLLVMSPIRVLib /usr/lib64/libLLVM-10.so -lclangCodeGen -lclangDriver -lclangFrontend -lclangFrontendTool -lclangRewriteFrontend -lclangARCMigrate -lclangStaticAnalyzerFrontend -lclangStaticAnalyzerCheckers -lclangStaticAnalyzerCore -lclangCrossTU -lclangIndex -lclangParse -lclangSerialization -lclangSema -lclangAnalysis -lclangEdit -lclangFormat -lclangToolingInclusions -lclangToolingCore -lclangRewrite -lclangASTMatchers -lclangAST -lclangLex -ldl -lLLVMSPIRVLib 
/usr/bin/ld: cannot find -lclangBasic
/usr/bin/ld: cannot find -lclangCodeGen
/usr/bin/ld: cannot find -lclangDriver
/usr/bin/ld: cannot find -lclangFrontend
/usr/bin/ld: cannot find -lclangFrontendTool
/usr/bin/ld: cannot find -lclangCodeGen
/usr/bin/ld: cannot find -lclangRewriteFrontend
/usr/bin/ld: cannot find -lclangARCMigrate
/usr/bin/ld: cannot find -lclangStaticAnalyzerFrontend
/usr/bin/ld: cannot find -lclangStaticAnalyzerCheckers
/usr/bin/ld: cannot find -lclangStaticAnalyzerCore
/usr/bin/ld: cannot find -lclangCrossTU
/usr/bin/ld: cannot find -lclangIndex
/usr/bin/ld: cannot find -lclangFrontend
/usr/bin/ld: cannot find -lclangDriver
/usr/bin/ld: cannot find -lclangParse
/usr/bin/ld: cannot find -lclangSerialization
/usr/bin/ld: cannot find -lclangSema
/usr/bin/ld: cannot find -lclangAnalysis
/usr/bin/ld: cannot find -lclangEdit
/usr/bin/ld: cannot find -lclangFormat
/usr/bin/ld: cannot find -lclangToolingInclusions
/usr/bin/ld: cannot find -lclangToolingCore
/usr/bin/ld: cannot find -lclangRewrite
/usr/bin/ld: cannot find -lclangASTMatchers
/usr/bin/ld: cannot find -lclangAST
/usr/bin/ld: cannot find -lclangLex
/usr/bin/ld: cannot find -lclangBasic
/usr/bin/ld: cannot find -lclangCodeGen
/usr/bin/ld: cannot find -lclangDriver
/usr/bin/ld: cannot find -lclangFrontend
/usr/bin/ld: cannot find -lclangFrontendTool
/usr/bin/ld: cannot find -lclangRewriteFrontend
/usr/bin/ld: cannot find -lclangARCMigrate
/usr/bin/ld: cannot find -lclangStaticAnalyzerFrontend
/usr/bin/ld: cannot find -lclangStaticAnalyzerCheckers
/usr/bin/ld: cannot find -lclangStaticAnalyzerCore
/usr/bin/ld: cannot find -lclangCrossTU
/usr/bin/ld: cannot find -lclangIndex
/usr/bin/ld: cannot find -lclangParse
/usr/bin/ld: cannot find -lclangSerialization
/usr/bin/ld: cannot find -lclangSema
/usr/bin/ld: cannot find -lclangAnalysis
/usr/bin/ld: cannot find -lclangEdit
/usr/bin/ld: cannot find -lclangFormat
/usr/bin/ld: cannot find -lclangToolingInclusions
/usr/bin/ld: cannot find -lclangToolingCore
/usr/bin/ld: cannot find -lclangRewrite
/usr/bin/ld: cannot find -lclangASTMatchers
/usr/bin/ld: cannot find -lclangAST
/usr/bin/ld: cannot find -lclangLex
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/opencl-clang.dir/build.make:175: libopencl-clang.so.10] Error 1
make[2]: Leaving directory '/root/rpmbuild/BUILD/opencl-clang-0a5a9f67b56431ef7b9436d1af812df6dfb44975/build'
make[1]: *** [CMakeFiles/Makefile2:235: CMakeFiles/opencl-clang.dir/all] Error 2
make: *** [Makefile:133: all] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.iV4OfP (%build)


RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.iV4OfP (%build)

Libraries in clang-libs package:

$ rpm -ql clang-libs | grep so.10
/usr/lib64/libclang-cpp.so.10
/usr/lib64/libclang.so.10

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