Skip to content

shared library lost SOVERSION #422

Closed
@anbe42

Description

@anbe42

After switching from add_llvm_library() to add_library() (commit 743bd15) the shared library lost its SOVERSION, the SONAME is simply the unversioned libopencl-clang.so while it previously was libopencl-clang.so.15. Not a good idea as you can now mix libLLVM-##.so.1 with incompatible libopencl-clang.so.

If I switch it back to

add_llvm_library(${TARGET_NAME} SHARED
    ${TARGET_INCLUDE_FILES}
    ${TARGET_SOURCE_FILES}
    $<TARGET_OBJECTS:cl_headers>

  DEPENDS CClangCompileOptions
  LINK_COMPONENTS
    ${OPENCL_CLANG_LLVM_MODULES}
  LINK_LIBS
    ${OPENCL_CLANG_LINK_LIBS}
)

and drop add_dependencies() and target_link_libraries() below
(with OPENCL_CLANG_LLVM_MODULES being all in case of LLVM_LINK_LLVM_DYLIB, as I (as package maintainer for Debian) only care about linking against the shared libraries from separate LLVM and SPIRV-LLVM-Translator builds, but you could probably set it to the module list used in target_link_libraries(), too),
I get again a working build with

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