Hello! I tried building gcompris with clang++ and the build failed. Please let me know what I am missing. rootkea@optimus:~/Downloads/todo/hacking/gcompris/build$ echo $CC $CXX clang clang++ rootkea@optimus:~/Downloads/todo/hacking/gcompris/build$ cmake .. -- The C compiler identification is Clang 10.0.0 -- The CXX compiler identification is Clang 10.0.0 -- Check for working C compiler: /usr/bin/clang -- Check for working C compiler: /usr/bin/clang -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/clang++ -- Check for working CXX compiler: /usr/bin/clang++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libcrypto.so (found version "1.1.1f") -- Found KF5DocTools: /lib/x86_64-linux-gnu/cmake/KF5DocTools/KF5DocToolsConfig.cmake (found version "5.68.0") -- Installing in the same prefix as Qt, adopting their path scheme. -- Did not find the qml-box2d module in system scope, falling back to submodule build ... -- Found Git: /usr/bin/git (found version "2.25.1") -- Configuring done -- Generating done -- Build files have been written to: /home/rootkea/Downloads/todo/hacking/gcompris/build rootkea@optimus:~/Downloads/todo/hacking/gcompris/build$ make -j4 Scanning dependencies of target qml_box2d Scanning dependencies of target createShareFolders Scanning dependencies of target BuildTranslations Scanning dependencies of target docs-docbook-index-cache-bz2 [ 0%] Built target BuildTranslations [ 0%] Generating shareFolders [ 0%] Creating directories for 'qml_box2d' Scanning dependencies of target gcompris-qt_autogen [ 1%] Generating index.cache.bz2 [ 2%] Automatic MOC for target gcompris-qt [ 2%] Built target createShareFolders Scanning dependencies of target rcc_activities [ 2%] Generating ../../share/gcompris-qt/rcc/activities.rcc [ 2%] Generate activities RCC [ 2%] Built target rcc_activities [ 2%] No download step for 'qml_box2d' Scanning dependencies of target rcc_menu [ 2%] Generating ../../../share/gcompris-qt/rcc/menu.rcc [ 4%] No patch step for 'qml_box2d' [ 4%] No update step for 'qml_box2d' [ 4%] Generate menu RCC [ 4%] Performing configure step for 'qml_box2d' [ 4%] Built target rcc_menu Scanning dependencies of target rcc_advanced_colors [ 4%] Generating ../../../share/gcompris-qt/rcc/advanced_colors.rcc [ 5%] Generate advanced_colors RCC [ 5%] Built target rcc_advanced_colors Scanning dependencies of target rcc_algebra_by [ 5%] Generating ../../../share/gcompris-qt/rcc/algebra_by.rcc [ 5%] Built target gcompris-qt_autogen Scanning dependencies of target rcc_algebra_div [ 5%] Generating ../../../share/gcompris-qt/rcc/algebra_div.rcc [ 5%] Generate algebra_div RCC [ 5%] Built target rcc_algebra_div [ 5%] Generate algebra_by RCC Scanning dependencies of target rcc_algebra_minus [ 5%] Built target rcc_algebra_by [ 5%] Generating ../../../share/gcompris-qt/rcc/algebra_minus.rcc Scanning dependencies of target rcc_algebra_plus [ 7%] Generate algebra_minus RCC [ 7%] Generating ../../../share/gcompris-qt/rcc/algebra_plus.rcc [ 7%] Built target rcc_algebra_minus Scanning dependencies of target rcc_algorithm [ 8%] Generating ../../../share/gcompris-qt/rcc/algorithm.rcc [ 8%] Generate algorithm RCC [ 8%] Generate algebra_plus RCC [ 8%] Built target rcc_algorithm [ 8%] Built target rcc_algebra_plus Scanning dependencies of target rcc_align4 Scanning dependencies of target rcc_align4-2players [ 8%] Generating ../../../share/gcompris-qt/rcc/align4.rcc [ 8%] Generating ../../../share/gcompris-qt/rcc/align4-2players.rcc [ 8%] Generate align4 RCC [ 8%] Built target rcc_align4 Scanning dependencies of target rcc_alphabet-sequence [ 8%] Generating ../../../share/gcompris-qt/rcc/alphabet-sequence.rcc [ 10%] Generate alphabet-sequence RCC [ 10%] Built target rcc_alphabet-sequence Scanning dependencies of target rcc_baby_keyboard [ 10%] Generating ../../../share/gcompris-qt/rcc/baby_keyboard.rcc [ 10%] Generate align4-2players RCC [ 10%] Generate baby_keyboard RCC [ 10%] Built target rcc_align4-2players [ 10%] Built target rcc_baby_keyboard Scanning dependencies of target rcc_babymatch Scanning dependencies of target rcc_babyshapes [ 10%] Generating ../../../share/gcompris-qt/rcc/babymatch.rcc [ 11%] Generating ../../../share/gcompris-qt/rcc/babyshapes.rcc Info: creating stash file /home/rootkea/Downloads/todo/hacking/gcompris/build/qml_box2d-prefix/src/qml_box2d-build/.qmake.stash [ 11%] Generate babymatch RCC Project ERROR: failed to parse default search paths from compiler output make[2]: *** [CMakeFiles/qml_box2d.dir/build.make:107: qml_box2d-prefix/src/qml_box2d-stamp/qml_box2d-configure] Error 3 make[1]: *** [CMakeFiles/Makefile2:3766: CMakeFiles/qml_box2d.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... [ 11%] Built target rcc_babymatch [ 11%] Built target docs-docbook-index-cache-bz2 [ 11%] Generate babyshapes RCC [ 11%] Built target rcc_babyshapes make: *** [Makefile:152: all] Error 2 rootkea@optimus:~/Downloads/todo/hacking/gcompris/build$ Thanks!
Can you compile with only "make", no "-j4"? It seems to be an issue with box2d compilation, but as a lot of logs are mixed, it's harder to check: Project ERROR: failed to parse default search paths from compiler output make[2]: *** [CMakeFiles/qml_box2d.dir/build.make:107: qml_box2d-prefix/src/qml_box2d-stamp/qml_box2d-configure] Error 3 Clang is already used by jenkins on FreeBSD (https://build.kde.org/job/Extragear/job/gcompris/job/kf5-qt5%20FreeBSDQt5.15/83/console) and build is fine.
Yes, indeed it looks like an issue with box2d compile. $ make Scanning dependencies of target createShareFolders [ 0%] Generating shareFolders [ 0%] Built target createShareFolders Scanning dependencies of target BuildTranslations [ 0%] Built target BuildTranslations Scanning dependencies of target qml_box2d [ 0%] Creating directories for 'qml_box2d' [ 0%] No download step for 'qml_box2d' [ 1%] No patch step for 'qml_box2d' [ 1%] No update step for 'qml_box2d' [ 1%] Performing configure step for 'qml_box2d' Info: creating stash file /home/rootmonk/Downloads/todo/hacking/gcompris/build/qml_box2d-prefix/src/qml_box2d-build/.qmake.stash Project ERROR: failed to parse default search paths from compiler output make[2]: *** [CMakeFiles/qml_box2d.dir/build.make:107: qml_box2d-prefix/src/qml_box2d-stamp/qml_box2d-configure] Error 3 make[1]: *** [CMakeFiles/Makefile2:3766: CMakeFiles/qml_box2d.dir/all] Error 2 make: *** [Makefile:152: all] Error 2 $
BTW, $ uname -a Linux optimus 5.4.0-42-generic #46-Ubuntu SMP Fri Jul 10 00:24:02 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux $ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.04.1 LTS Release: 20.04 Codename: focal $
Maybe https://bugreports.qt.io/browse/QTBUG-68139. It is not an issue specific to GCompris, I'll still try to check this week-end if I can reproduce.
qml-box2d is a dependency of gcompris and so if qml-box2d doesn't compile with one of the industry-standard compilers then that concerns us. :) > I'll still try to check this week-end if I can reproduce. Thank you!
(In reply to Avinash Sonawane from comment #5) > qml-box2d is a dependency of gcompris and so if qml-box2d doesn't compile > with one of the industry-standard compilers then that concerns us. :) It works (see FreeBSD jenkins build). It does not work on your computer specifically ;). Maybe the Qt installation is missing something or there is some configuration error... It's just theory, I didn't find much on internet, I'll know better after testing
> It does not work on your computer specifically ;). And also not on KDE Gitlab CI which fetches the ubuntu:rolling docker image failing with the same qml_box2d clang compile error.[0] Here[1] is the corresponding .gitlab-ci.yml which shows the exact steps taken on fresh ubuntu:rolling. > see FreeBSD jenkins build Yes, it looks like gcompris builds successfully on FreeBSD-clang++ but not on Linux-clang++. OR may be I'm missing something... Thanks! [0] https://invent.kde.org/rootkea/gcompris/-/jobs/59751 [1] https://invent.kde.org/rootkea/gcompris/-/blob/clang-build/.gitlab-ci.yml
> failing with the same qml_box2d clang compile error. Oops! My bad! Not the exact same error but the same package qml_box2d. The error reported by CI is "Cannot find file: /builds/rootkea/gcompris/external/qml-box2d/box2d.pro". Let me look more on that. Thanks!
> "Cannot find file: /builds/rootkea/gcompris/external/qml-box2d/box2d.pro". Turns out I had forgotten to install `git` on ubuntu:rolling docker image which was needed to clone qml_box2d module. Anyways, now that git has been added in .gitlab-ci.yml[0] the KDE Gitlab CI throws the exact same error as my system: "Project ERROR: failed to parse default search paths from compiler output"[1] So no, apparently gcompris doesn't build on linux-clang++ unless I'm missing something... Thanks! [0] https://invent.kde.org/rootkea/gcompris/-/blob/clang-build/.gitlab-ci.yml [1] https://invent.kde.org/rootkea/gcompris/-/jobs/59754
`export QMAKESPEC="linux-clang"` fixed the issue since `qml_box2d` uses `qmake` and that's how one changes the compiler used by `qmake`.
(In reply to Avinash Sonawane from comment #10) > `export QMAKESPEC="linux-clang"` fixed the issue since `qml_box2d` uses > `qmake` and that's how one changes the compiler used by `qmake`. Great! Good to hear it works fine now :)