Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 935456 - dev-qt/qdoc-5.15.14 compile fail : fatal error: clang-c/Index.h: No such file or directory : qmake cannot undertand that 19.0.0git3ae67557 is newer than 3.9.0
Summary: dev-qt/qdoc-5.15.14 compile fail : fatal error: clang-c/Index.h: No such file...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Qt Bug Alias
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-07-04 08:17 UTC by Arniii
Modified: 2024-07-05 17:21 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (file_935456.txt,37.07 KB, text/plain)
2024-07-04 08:17 UTC, Arniii
Details
/etc/portage in compressed tarball via lzip . (etcportage.tar.lz,119.27 KB, application/x-lzip)
2024-07-04 08:21 UTC, Arniii
Details
environment // profile default/linux/amd64/23.0/split-usr/desktop/plasma gcc-13.2.1_p20240210 O3 pipe march=native(verbose) lto graphite ggdb3 (file_935456.txt,103.59 KB, text/plain)
2024-07-04 08:21 UTC, Arniii
Details
fzf --walker-root=/usr -f clang-c/Index.h (file_935456.txt,15.20 KB, text/plain)
2024-07-04 08:35 UTC, Arniii
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Arniii 2024-07-04 08:17:09 UTC
Created attachment 896960 [details]
build.log

from build.log: 
```
x86_64-pc-linux-gnu-g++ -c -O3 -pipe -march=alderlake -mabm -mno-cldemote -mno-kl -mno-pconfig -mno-sgx -mno-widekl -mshstk --param=l1-cache-line-size=64 --param=l1-cache-size=48 --param=l2-cache-size=30720 -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing -fgraphite-identity -floop-interchange -floop-strip-mine -floop-nest-optimize -ggdb3 -std=c++1z -fno-exceptions -Wall -Wextra -Wvla -Wdate-time -Wshift-overflow=2 -Wduplicated-cond -Wno-stringop-overflow -Wno-format-overflow -D_REENTRANT -fPIC -DQT_NO_LINKED_LIST -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_LINKED_LIST -DQT_NO_FOREACH -D'CLANG_RESOURCE_DIR="/clang//include"' -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_USE_QSTRINGBUILDER -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_QMLDEVTOOLS_LIB -DQT_CORE_LIB -I/var/tmp/portage/dev-qt/qdoc-5.15.14/work/qttools-everywhere-src-5.15.14/src/qdoc -I. -I/src/tools/qdoc -I/src/tools/qdoc/qmlparser -I/usr/include/qt5 -I/usr/include/qt5/QtQml -I/usr/include/qt5/QtQml/5.15.14 -I/usr/include/qt5/QtQml/5.15.14/QtQml -I/usr/include/qt5/QtCore/5.15.14 -I/usr/include/qt5/QtCore/5.15.14/QtCore -I/usr/include/qt5/QtCore -I.moc -I/usr/lib64/qt5/mkspecs/linux-g++ -o .obj/quoter.o /var/tmp/portage/dev-qt/qdoc-5.15.14/work/qttools-everywhere-src-5.15.14/src/qdoc/quoter.cpp
/var/tmp/portage/dev-qt/qdoc-5.15.14/work/qttools-everywhere-src-5.15.14/src/qdoc/clangcodeparser.cpp:58:10: fatal error: clang-c/Index.h: No such file or directory
   58 | #include <clang-c/Index.h>
      |          ^~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:967: .obj/clangcodeparser.o] Error 1
```

just for info: (I've installed a lot of llvm-clang related stuff of version 19.0.0_pre20240623 via unmasking:
from /etc/portage/package.accept_keywords/always_new.conf :
```
  =sys-devel/lld-19.0.0_pre20240623 **
  =sys-devel/llvm-19.0.0_pre20240623 **
  =sys-devel/clang-19.0.0_pre20240623 **
  =sys-devel/clang-runtime-19.0.0_pre20240623 **
  =sys-devel/clang-common-19.0.0_pre20240623 **
  =sys-libs/compiler-rt-19.0.0_pre20240623 **
  =sys-libs/compiler-rt-sanitizers-19.0.0_pre20240623 **
  =sys-devel/clang-toolchain-symlinks-19 **
  =sys-libs/libcxx-19.0.0_pre20240623 **
  =sys-libs/libcxxabi-19.0.0_pre20240623 **
  =sys-libs/libomp-19.0.0_pre20240623 **

```

```
  │  ~  clang --version                                                                                                                                                                 
clang version 19.0.0git3ae67557
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm/19/bin
Build config: +assertions
Configuration file: /etc/clang/x86_64-pc-linux-gnu-clang.cfg
  │  ~  llvm-addr2line --version                                                                                                                                                                     
llvm-addr2line
LLVM (http://llvm.org/):
  LLVM version 19.0.0git3ae67557
  Optimized build with assertions.
```
Comment 1 Arniii 2024-07-04 08:21:14 UTC
Created attachment 896961 [details]
/etc/portage in compressed tarball via lzip .
Comment 2 Arniii 2024-07-04 08:21:55 UTC
Created attachment 896962 [details]
environment // profile default/linux/amd64/23.0/split-usr/desktop/plasma gcc-13.2.1_p20240210 O3 pipe march=native(verbose) lto graphite ggdb3
Comment 3 Arniii 2024-07-04 08:24:37 UTC
I'm in the process of upgrading the system, maybe I've not installed something, but everything is in the process of `emerge -avtqbUDuke @world` (notice -e aka --emptytree)
Comment 4 Arniii 2024-07-04 08:29:34 UTC
it seems to be continuation of bug https://bugs.gentoo.org/678080 and https://bugs.gentoo.org/678098
Comment 5 Arniii 2024-07-04 08:35:54 UTC
Created attachment 896963 [details]
fzf --walker-root=/usr -f clang-c/Index.h

from here:
```
/usr/lib/llvm/15/include/clang-c/Index.h
/usr/lib/llvm/17/include/clang-c/Index.h
/usr/lib/llvm/18/include/clang-c/Index.h
/usr/lib/llvm/19/include/clang-c/Index.h
/usr/lib/llvm/16/include/clang-c/Index.h
/usr/src/debug/sys-devel/clang-17.0.6/clang/include/clang-c/Index.h
/usr/src/debug/sys-devel/clang-18.1.3/clang/include/clang-c/Index.h
/usr/src/debug/sys-devel/clang-16.0.6/clang/include/clang-c/Index.h
/usr/src/debug/sys-devel/clang-15.0.7-r3/clang/include/clang-c/Index.h
/usr/src/debug/sys-devel/clang-19.0.0_pre20240623/clang/include/clang-c/Index.h
```
Comment 6 Arniii 2024-07-04 10:09:54 UTC
Please, notice that I'm using a default profile with GCC compiler, not clang.
Comment 7 Arniii 2024-07-04 12:42:27 UTC
After manually adding -L/usr/lib/llvm/19/lib64 to COMMON_FLAGS and LDFLAGS via an env file, it gives a lot of `undefined reference ...` and the symbols it looking for in /usr can be found only in /usr/lib/llvm/19/lib64/libclang.so.19.0.0git3ae67557 or any libclang.so for any llvm version from 15 to 19. I've checked that via `rg -al clang_getArgType`
Comment 8 Arniii 2024-07-05 08:41:05 UTC
Oh, maybe I got it:
```
Checking for libclang... LLVM/Clang version >= 3.9.0 required, version provided: 19.0.0git3ae67557.
no

...

WARNING: QDoc will not be compiled, probably because libclang could not be located. This means that you cannot build the Qt documentation.

Either ensure that llvm-config is in your PATH environment variable, or set LLVM_INSTALL_DIR to the location of your llvm installation.
On Linux systems, you may be able to install libclang by installing the libclang-dev or libclang-devel package, depending on your distribution.
On macOS, you can use Homebrew's llvm package.
On Windows, you must set LLVM_INSTALL_DIR to the installation path.

```

So, it have found libclang but refused to use it?
Comment 9 Arniii 2024-07-05 09:23:28 UTC
Ok, my PATH was next: 
```
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/usr/lib/llvm/19/bin:/usr/lib/llvm/18/bin:/usr/lib/llvm/17/bin:/usr/lib/llvm/16/bin:/usr/lib/llvm/15/bin:/opt/android-sdk-update-manager/tools:/opt/android-sdk-update-manager/platform-tools:/etc/eselect/wine/bin:/opt/cuda/bin:/opt/cuda/libnvvp
```

I removed /usr/lib/llvm/19/bin so that llvm-config --version in the terminal now show 18.1.3 .

And still it somehow finds libclang with version 19.0.0git3ae67557
Comment 10 Arniii 2024-07-05 09:30:55 UTC
I've solved it via 
1. Removing path from PATH with llvm-config with version 19.0.0git3ae67557
2. Setting LLVM_INSTALL_DIR=/usr/lib/llvm/18/

Diagnosis: qmake cannot understand that version 19.0.0git3ae67557
a.  is a version
b.  cannot check that it newer than 3.9.0
Comment 11 Mike Gilbert gentoo-dev 2024-07-05 17:07:34 UTC
Please provide emerge --info.
Comment 12 Arniii 2024-07-05 17:11:21 UTC
(In reply to Mike Gilbert from comment #11)
> Please provide emerge --info.

Here's environment file for this.
Comment 13 Arniii 2024-07-05 17:18:31 UTC
emerge --info :
https://bugs.gentoo.org/attachment.cgi?id=897087