Opened 4 years ago

Closed 4 years ago

#59821 closed defect (fixed)

ccls: dyld: Library not loaded: @rpath/libLLVM.dylib

Reported by: casouri (Yuan Fu) Owned by: egorenar (Alexander Egorenkov)
Priority: Normal Milestone:
Component: ports Version: 2.6.2
Keywords: Cc:
Port: ccls

Description

ccls-clang-8.0 doesn't work. When I run ccls(soft-linked from ccls-clang-8.0)

dyld: Library not loaded: @rpath/libLLVM.dylib
  Referenced from: /opt/local/bin/ccls
  Reason: image not found
zsh: abort      ccls

is printed.

Change History (7)

comment:1 Changed 4 years ago by kencu (Ken)

Well heck -- I was sure we had this fixed finally. Let me look into that.

comment:2 Changed 4 years ago by kencu (Ken)

I see, this is not in the clang-X build itself, but uses clang.

It will probably need a similar fix to what we did in clang-8.0 for example, I would think:

# clang shared libraries are not all installed in ${cmake.install_prefix}/lib
# so we have to let the llvm/clang cmake scripts handle the @rpath setting
# See:
#     https://llvm.org/bugs/show_bug.cgi?id=31425
#     https://trac.macports.org/ticket/53299
configure.args-delete \
    -DCMAKE_INSTALL_NAME_DIR=${cmake.install_prefix}/lib \
    -DCMAKE_INSTALL_RPATH=${cmake.install_prefix}/lib \
    -DCMAKE_SYSTEM_PREFIX_PATH="${prefix}\;/usr"
configure.args-append \
    -DCMAKE_SYSTEM_PREFIX_PATH="${cmake.install_prefix}\;${prefix}\;/usr"

comment:3 Changed 4 years ago by kencu (Ken)

comment:4 Changed 4 years ago by mf2k (Frank Schima)

Priority: HighNormal

The Priority field is for use by Macports team members only, please do not set it.

comment:5 Changed 4 years ago by casouri (Yuan Fu)

Oh sorry, didn't know that.

comment:6 Changed 4 years ago by jmroot (Joshua Root)

Owner: set to egorenar
Status: newassigned

comment:7 Changed 4 years ago by kencu (Ken)

Resolution: fixed
Status: assignedclosed

In 05510df9f751eef0bc28ec66e66f221edcb5f67c/macports-ports (master):

ccls: support @rpath linking

llvm-* was changed to use @rpath linking
modify this build to add the @path for the llvm*.dylib
closes: #59821

Note: See TracTickets for help on using tickets.