configured with wrong clang resource directory

Bug #1845233 reported by Shengjing Zhu
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ccls (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

In debian/rules, it tries to determine the clang version by parsing /usr/bin/clang.

CLANG_VER := $(shell realpath /usr/bin/clang | sed -e 's/.*llvm-\([0-9]\+\).*/\1/')

However the Ubuntu patch uses a specific clang version, which missing /usr/bin/clang symlink, causing the script failed to work.

As seen from the build log,

dh_auto_configure -- -DCCLS_VERSION=0.20190823-3ubuntu3 -DCLANG_RESOURCE_DIR=/usr/include/clang//usr/bin/clang

The clang resource dir is wrong.

I don't how to write the debian/rules better. If you have ideas, please tell me, and I will include it in Debian.

For this specific case for Ubuntu, you can set CLANG_VER = 8 in debian/rules.

If you want to build ccls with default clang, which is clang-9, just add lldb to build-depends. Then ccls can build without problem. The reason is https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=941082 which is a bug in llvm.

Revision history for this message
Gianfranco Costamagna (costamagnagianfranco) wrote :

Hello, thanks twice!
I added the CLANG_VER hack to fix the build failure, and I'll take care of llvm-toolchain-9 in Debian later!

Keep up the good work!

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ccls - 0.20190823-4ubuntu1

---------------
ccls (0.20190823-4ubuntu1) eoan; urgency=medium

  * Merge from Debian unstable. Remaining changes:
    - stick with llvm-8 (thanks to Shengjing Zhu for the d/rules fix)
      LP: #1845233

 -- Gianfranco Costamagna <email address hidden> Tue, 24 Sep 2019 18:46:36 +0200

Changed in ccls (Ubuntu):
status: New → Fix Released
Revision history for this message
Gianfranco Costamagna (costamagnagianfranco) wrote :

Btw a nice feature might be to fail configure if the directory is non existent

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.