Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
kdevelop -5.3.2 - Merge error [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
paulj
Guru
Guru


Joined: 30 Sep 2004
Posts: 447
Location: Wales, UK

PostPosted: Sun May 19, 2019 9:56 am    Post subject: kdevelop -5.3.2 - Merge error [SOLVED] Reply with quote

Merging kdevelop-5.3, I am getting the following error during the cmake configure phase:
Code:
-- The following REQUIRED packages have not been found:

 * Clang (required version >= 3.8), Clang libraries from the LLVM project. Please install a package providing libclang. Either pass -DLLVM_ROOT=/path/to/llvm-prefix or install the 'llvm-config' command-line utility for auto-detection.
   Used for KDevelop's C++/C support plugin.

It merged successfully in March, but is now failing. Clang status:
Code:
[I] sys-devel/clang
     Available versions: 
     (4)    4.0.1
     (5)    5.0.2{tbz2}
     (6)    6.0.1^t{tbz2}
     (7)    7.1.0(7/7.1)^t{tbz2}
     (8)    ~8.0.0^t **8.0.9999^t
     (9)    **9999^t
       {debug default-compiler-rt default-libcxx doc +static-analyzer test xml z3 ABI_MIPS="n32 n64 o32" ABI_RISCV="lp64 lp64d" ABI_S390="32 64" ABI_X86="32 64 x32" ELIBC="musl" KERNEL="FreeBSD" LLVM_TARGETS="AArch64 AMDGPU ARM AVR BPF Hexagon Lanai MSP430 Mips NVPTX Nios2 PowerPC RISCV Sparc SystemZ WebAssembly X86 XCore" PYTHON_TARGETS="python2_7"}
     Installed versions:  6.0.1(6)^t{tbz2}(23:41:11 31/07/18)(static-analyzer xml -debug -default-compiler-rt -default-libcxx -doc -test -z3 ABI_MIPS="-n32 -n64 -o32" ABI_PPC="-32 -64" ABI_S390="-32 -64" ABI_X86="64 -32 -x32" KERNEL="-FreeBSD" LLVM_TARGETS="AMDGPU BPF NVPTX X86 -AArch64 -ARM -Hexagon -Lanai -MSP430 -Mips -PowerPC -Sparc -SystemZ -XCore" PYTHON_TARGETS="python2_7") 7.1.0(7/7.1)^t{tbz2}(20:51:12 18/05/19)(static-analyzer xml -debug -default-compiler-rt -default-libcxx -doc -test -z3 ABI_MIPS="-n32 -n64 -o32" ABI_RISCV="-lp64 -lp64d" ABI_S390="-32 -64" ABI_X86="64 -32 -x32" KERNEL="-FreeBSD" LLVM_TARGETS="AMDGPU BPF NVPTX X86 -AArch64 -ARM -Hexagon -Lanai -MSP430 -Mips -PowerPC -Sparc -SystemZ -XCore" PYTHON_TARGETS="python2_7")
     Homepage:            https://llvm.org/
     Description:         C language family frontend for LLVM

The same versions of clang-runtime are also installed, along with sys-devel/clang-common-7.1.0.

Am I missing something obvious here? I'm using cmake-3.14.4, but the same error existed with version 3.9.6.

Thanks!


Last edited by paulj on Sun May 19, 2019 7:44 pm; edited 1 time in total
Back to top
View user's profile Send private message
paulj
Guru
Guru


Joined: 30 Sep 2004
Posts: 447
Location: Wales, UK

PostPosted: Sun May 19, 2019 10:07 am    Post subject: Reply with quote

I think I have found it.
File installation locations:
Code:
ohno /home/paul # equery belongs clang
 * Searching for clang ...
sys-devel/clang-6.0.1 (/usr/lib/llvm/6/share/clang)
sys-devel/clang-6.0.1 (/usr/lib/llvm/6/include/x86_64-pc-linux-gnu/clang)
sys-devel/clang-6.0.1 (/usr/lib/llvm/6/include/clang)
sys-devel/clang-6.0.1 (/usr/lib/llvm/6/lib64/cmake/clang)
sys-devel/clang-6.0.1 (/usr/lib/clang)
sys-devel/clang-6.0.1 (/usr/lib/llvm/6/bin/clang -> clang-6.0)
sys-devel/clang-7.1.0 (/usr/lib/llvm/7/share/clang)
sys-devel/clang-7.1.0 (/usr/lib/llvm/7/include/x86_64-pc-linux-gnu/clang)
sys-devel/clang-7.1.0 (/usr/lib/llvm/7/include/clang)
sys-devel/clang-7.1.0 (/usr/lib/llvm/7/bin/clang -> clang-7)
sys-devel/clang-7.1.0 (/usr/lib/llvm/7/lib64/cmake/clang)
sys-devel/clang-7.1.0 (/usr/lib/clang)
sys-devel/clang-common-7.1.0 (/usr/share/bash-completion/completions/clang)
sys-libs/compiler-rt-6.0.1 (/usr/lib/clang)
sys-libs/compiler-rt-7.1.0 (/usr/lib/clang)
sys-libs/compiler-rt-sanitizers-6.0.1 (/usr/lib/clang)
sys-libs/compiler-rt-sanitizers-7.1.0 (/usr/lib/clang)

Path as root:
Code:
/home/paul # echo $PATH
/sbin:/bin:/usr/sbin:/usr/bin

Path as user:
Code:
~ $ echo $PATH
/home/paul/bin:/home/paul/.cargo/bin:/usr/lib/llvm/8/bin:/usr/lib/llvm/7/bin:/usr/lib/llvm/6/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin

clang is not in the path as root.

I don't remember setting the paths for llvm myself, so I need to do some more research...
Back to top
View user's profile Send private message
paulj
Guru
Guru


Joined: 30 Sep 2004
Posts: 447
Location: Wales, UK

PostPosted: Sun May 19, 2019 10:28 am    Post subject: Reply with quote

Ok, so the path is set if I login directly into root, but if I su to root (my normal practice for system maintenance), according to the man page for su, the path is set to:
Code:

The current environment is passed to the new shell. The value of $PATH is reset to /bin:/usr/bin for normal users, or
/sbin:/bin:/usr/sbin:/usr/bin for the superuser. This may be changed with the ENV_PATH and ENV_SUPATH definitions in
/etc/login.defs.

Looks like I can use the environment variables to set the correct path.

I am not sure if this is a change in behaviour, or whether this has only come up as a result of kdevelop using clang? I haven't made any effort to use clang for anything, but I have quite a few packages which depend on clang which I have installed either directly as as dependents.

Code:
 * These packages depend on clang:
dev-db/postgresql-11.3 (llvm ? sys-devel/clang)
dev-lang/rust-1.32.0-r666 (>=sys-devel/clang-3.5)
dev-lang/rust-1.34.2 (>=sys-devel/clang-3.5)
dev-util/kdevelop-5.3.2 (>=sys-devel/clang-3.8.0)
mail-client/thunderbird-60.6.1 (sys-devel/clang:8)
                               (sys-devel/clang:7)
                               (sys-devel/clang:6)
media-gfx/darktable-2.6.1 (opencl ? >=sys-devel/clang-4)
media-libs/mesa-19.1.0_rc2 (video_cards_r600 ? sys-devel/clang:9[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_riscv_lp64d(-)?,abi_riscv_lp64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,llvm_targets_AMDGPU(-)])
                           (video_cards_r600 ? sys-devel/clang:8[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_riscv_lp64d(-)?,abi_riscv_lp64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,llvm_targets_AMDGPU(-)])
                           (video_cards_r600 ? sys-devel/clang:7[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_riscv_lp64d(-)?,abi_riscv_lp64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,llvm_targets_AMDGPU(-)])
                           (sys-devel/clang[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_riscv_lp64d(-)?,abi_riscv_lp64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,llvm_targets_AMDGPU(-)])
                           (video_cards_radeonsi ? sys-devel/clang:9[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_riscv_lp64d(-)?,abi_riscv_lp64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,llvm_targets_AMDGPU(-)])
                           (video_cards_radeonsi ? sys-devel/clang:8[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_riscv_lp64d(-)?,abi_riscv_lp64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,llvm_targets_AMDGPU(-)])
                           (video_cards_radeonsi ? sys-devel/clang:7[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_riscv_lp64d(-)?,abi_riscv_lp64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,llvm_targets_AMDGPU(-)])
                           (video_cards_radeon ? sys-devel/clang:9[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_riscv_lp64d(-)?,abi_riscv_lp64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,llvm_targets_AMDGPU(-)])
                           (video_cards_radeon ? sys-devel/clang:8[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_riscv_lp64d(-)?,abi_riscv_lp64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,llvm_targets_AMDGPU(-)])
                           (video_cards_radeon ? sys-devel/clang:7[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_riscv_lp64d(-)?,abi_riscv_lp64(-)?,abi_s390_32(-)?,abi_s390_64(-)?,llvm_targets_AMDGPU(-)])
                           (!video_cards_radeonsi ? sys-devel/clang:9[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_riscv_lp64d(-)?,abi_riscv_lp64(-)?,abi_s390_32(-)?,abi_s390_64(-)?])
                           (!video_cards_radeonsi ? sys-devel/clang:8[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_riscv_lp64d(-)?,abi_riscv_lp64(-)?,abi_s390_32(-)?,abi_s390_64(-)?])
                           (!video_cards_radeonsi ? sys-devel/clang:7[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_riscv_lp64d(-)?,abi_riscv_lp64(-)?,abi_s390_32(-)?,abi_s390_64(-)?])
                           (sys-devel/clang[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_riscv_lp64d(-)?,abi_riscv_lp64(-)?,abi_s390_32(-)?,abi_s390_64(-)?])
sys-devel/clang-common-7.1.0 (sys-devel/clang)
sys-libs/compiler-rt-6.0.1 (clang ? sys-devel/clang)
                           (test ? =sys-devel/clang-6.0.1*:6)
sys-libs/compiler-rt-7.1.0 (clang ? sys-devel/clang)
                           (test ? =sys-devel/clang-7.1.0*:7)
sys-libs/compiler-rt-sanitizers-6.0.1 (clang ? sys-devel/clang)
                                      (test ? =sys-devel/clang-6.0.1*:6)
sys-libs/compiler-rt-sanitizers-7.1.0 (clang ? sys-devel/clang)
                                      (test ? =sys-devel/clang-7.1.0*:7)
sys-libs/libomp-7.1.0 (test ? >=sys-devel/clang-6)
www-client/firefox-66.0.5 (sys-devel/clang:8)
                          (sys-devel/clang:7)
                          (sys-devel/clang:6)
Back to top
View user's profile Send private message
paulj
Guru
Guru


Joined: 30 Sep 2004
Posts: 447
Location: Wales, UK

PostPosted: Sun May 19, 2019 7:44 pm    Post subject: Reply with quote

Solution in the end: the llvm and clang versions were different. I brought them all to the same level, then kdevelop compiled.

So not a $PATH issue in the end! :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum