dev-0x7C6 / dev1990-overlay

My gentoo overlay, there's a ebuild for separate qtsdk workspaces if you want to develop with many qtsdks, slic3r prusa edition and some ebuilds for my projects, and other stuff that I'm using or used
6 stars 1 forks source link

dev-qt/qt-creator fails to build even if I disable most of the use flags #2

Closed NuLL3rr0r closed 4 years ago

NuLL3rr0r commented 5 years ago
Calculating dependencies... done!
[ebuild     U  ] dev-qt/qt-creator-4.10.1::dev1990-overlay [4.10.0::NuLL3rr0r] USE="beautifier* clang cmake glsl lsp perfprofiler* -android* -autotest* -baremetal -bazaar -clearcase -cppcheck* -cvs -designer* -doc -git* -help* -ios -mercurial* -modeling* -nim* -perforce -python* -qbs -qmldesigner* -qmlprofiler -qnx -remotelinux -scxml* -serialterminal -silversearcher* -subversion* -systemd -test -valgrind* -webengine -winrt" L10N="-cs -da -de -fr -ja -pl -ru -sl -uk -zh-CN -zh-TW" 0 KiB

build-log.txt

$ emerge --info
Portage 2.3.77 (python 3.6.9-final-0, default/linux/amd64/17.1/desktop, gcc-9.2.0, glibc-2.29-r6, 5.2.21 x86_64)
=================================================================
System uname: Linux-5.2.21-x86_64-Intel-R-_Core-TM-_i7-6820HK_CPU_@_2.70GHz-with-gentoo-2.6
KiB Mem:    65901956 total,  48579612 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Sun, 20 Oct 2019 12:45:48 +0000
Head commit of repository gentoo: b6e71e954dc06e1c2ef604e30cf62c4b503c4c32

sh bash 5.0_p11
ld GNU ld (Gentoo 2.32 p2) 2.32.0
ccache version 3.7.4 [enabled]
app-shells/bash:          5.0_p11::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.30.0::gentoo
dev-lang/python:          2.7.16::gentoo, 3.6.9::gentoo
dev-util/ccache:          3.7.4::gentoo
dev-util/cmake:           3.15.4::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/openrc:          0.42.1::gentoo
sys-apps/sandbox:         2.18::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.11.6-r3::gentoo, 1.16.1-r1::gentoo
sys-devel/binutils:       2.32-r1::gentoo
sys-devel/gcc:            9.2.0-r1::gentoo
sys-devel/gcc-config:     2.1::gentoo
sys-devel/libtool:        2.4.6-r5::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 5.3::gentoo (virtual/os-headers)
sys-libs/glibc:           2.29-r6::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/gentoo.git
    priority: 10

dev1990-overlay
    location: /var/lib/layman/dev1990-overlay
    masters: gentoo
    priority: 50

local
    location: /usr/local/portage
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CPPFLAGS="-march=native -O2 -pipe"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/var/cache/portage/distfiles"
EMERGE_DEFAULT_OPTS="--jobs=8 --load-average=8 --keep-going --with-bdeps=y"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-march=native -O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg ccache config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-march=native -O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,--as-needed"
LINGUAS="en_US en fa_IR fa nl_NL nl"
MAKEOPTS="-j9 -l8"
PKGDIR="/var/cache/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 aac acl acpi alsa amd64 berkdb bluetooth branding bzip2 cairo cdda cdr cli consolekit crypt cups cxx dbus dri dts dvd dvdr emboss encode exif fam flac fortran gdbm gif glamor gpm gtk iconv icu ipv6 jpeg lcms ldap libnotify libtirpc mad mng mp3 mp4 mpeg multilib ncurses nls nptl ogg opengl openmp pam pango pcre pdf png policykit ppds pulseaudio qt5 readline sdl seccomp spell split-usr ssl startup-notification svg tcpd tiff truetype udev udisks unicode upower usb vorbis wxwidgets x264 xattr xcb xml xv xvid zlib" ABI_X86="64" ADA_TARGET="gnat_2018" ALSA_CARDS="hda-intel" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="joystick keyboard libinput mouse" KERNEL="linux" L10N="en-US en fa-IR fa nl-NL nl" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LLVM_TARGETS="BPF NVPTX X86" NETBEANS_MODULES="apisupport cnd groovy gsf harness ide identity j2ee java mobility nb php profiler soa visualweb webcommon websvccommon xml" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6" RUBY_TARGETS="ruby24 ruby25" USERLAND="GNU" VIDEO_CARDS="nvidia v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CTARGET, CXX, INSTALL_MASK, LC_ALL, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
NuLL3rr0r commented 5 years ago

OK, initially I was not able to find it, but this line is intersting:

clangformatutils.cpp: In function ‘clang::format::FormatStyle ClangFormat::qtcStyle()’:
clangformatutils.cpp:63:49: error: cannot convert ‘bool’ to ‘clang::format::FormatStyle::ShortIfStyle’ in assignment
   63 |     style.AllowShortIfStatementsOnASingleLine = false;
      |                                                 ^~~~~
dev-0x7C6 commented 5 years ago

There is problem with building against system LLVM/Clang https://bugreports.qt.io/browse/QTCREATORBUG-22923. For what I understand Clang community don't accepted some Qt patches for clang-format (or Clang in general). I'm waiting for upstream solution.

dev-0x7C6 commented 5 years ago

I managed to compile older version with LLVM/Clang 8.0.1, but editor formatting was broken at runtime :(

NuLL3rr0r commented 5 years ago

Thank you so much for the information. It is also reproducible on 4.11.0-beta1.

dev-0x7C6 commented 5 years ago

I tested latest version from git (Qt Creator 4.11.0-rc1 (4.10.84))

Compilation against LLVM/Clang 9.0.0 was fixed probably by https://code.qt.io/cgit/qt-creator/qt-creator.git/commit/?h=4.11&id=8c7dd57645ab30f760846f7cbf57121d763d8473

But ClangFormat integration is still broken.

Plugin initialization failed: Disabling ClangFormat plugin as it has not been built against a modified Clang's libFormat.For more information see the Qt Creator README at https://code.qt.io/cgit/qt-creator/qt-creator.git/tree/README.md

NuLL3rr0r commented 5 years ago

Thank you so much for the update.

klimentyev commented 4 years ago

:) https://www.qt.io/blog/qt-creator-4.11-rc-released

klimentyev commented 4 years ago

@dev-0x7C6 For 4.11_rc, I've the same errors as in the first message :( Which uses I should enable and disable for success build?

dev-0x7C6 commented 4 years ago

I was able to build 4.11.0_rc1 without errors. But I have broken code deduction and analysis at run-time. Here is a screenshot:

Screenshot_20191205_223326

I think I should report this to upstream bugtracker. Update: reported here https://bugreports.qt.io/browse/QTCREATORBUG-23330#

Notes:

My qt-creator flags:

[ebuild   R    ] dev-qt/qt-creator-4.11.0_rc1::dev1990-overlay  USE="android autotest baremetal beautifier clang cmake cppcheck designer git glsl help lsp modeling nim perfprofiler python qmldesigner qmlprofiler remotelinux scxml serialterminal silversearcher systemd valgrind webengine -bazaar -clearcase -cvs -doc -ios -mercurial -perforce -qbs -qnx -subversion -test -winrt" L10N="-cs -da -de -fr -ja -pl -ru -sl -uk -zh-CN -zh-TW" 0 KiB

Details:

Portage 2.3.80 (python 3.6.9-final-0, default/linux/amd64/17.1/desktop/plasma/systemd, gcc-9.2.0, glibc-2.29-r2, 5.4.2-gentoo x86_64)
=================================================================
System uname: Linux-5.4.2-gentoo-x86_64-Intel-R-_Core-TM-_i5-4670K_CPU_@_3.40GHz-with-gentoo-2.6
KiB Mem:    24573640 total,  14627280 free
KiB Swap:          0 total,         0 free
Head commit of repository gentoo: 6e95a9b55ecb1151ef94ad03896a8c5f602137e9

Head commit of repository dev1990-overlay: 48b8ce866a6f73b86ed0eb1063a4a96b63d3b81f

Timestamp of repository kde: Tue, 03 Dec 2019 01:05:45 +0000
Head commit of repository kde: a00f113a7d218b2a7d3a12a267a8275531b00c37

Timestamp of repository steam-overlay: Sun, 01 Dec 2019 20:29:50 +0000
Head commit of repository steam-overlay: 35b13e8cb3cebfc6647b0e088ce7c319c87478ca

sh bash 4.4_p23-r1
ld GNU gold (Gentoo 2.33.1 p1 2.33.1) 1.16
distcc 3.3.3 x86_64-pc-linux-gnu [enabled]
app-shells/bash:          4.4_p23-r1::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.28.2-r1::gentoo
dev-lang/python:          2.7.16::gentoo, 3.6.9::gentoo, 3.7.5-r1::gentoo
dev-util/cmake:           3.16.0::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/sandbox:         2.18::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.11.6-r3::gentoo, 1.16.1-r1::gentoo
sys-devel/binutils:       2.33.1::gentoo
sys-devel/gcc:            9.2.0-r2::gentoo
sys-devel/gcc-config:     2.1::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 4.19::gentoo (virtual/os-headers)
sys-libs/glibc:           2.29-r2::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: git
    sync-uri: git://anongit.gentoo.org/repo/gentoo.git
    priority: -1000

dev1990-overlay
    location: /var/db/repos/dev1990-overlay
    sync-type: git
    sync-uri: git@github.com:dev-0x7C6/dev1990-overlay.git
    masters: gentoo

kde
    location: /var/db/repos/kde
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/kde.git
    masters: gentoo

steam-overlay
    location: /var/db/repos/steam-overlay
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/steam-overlay.git
    masters: gentoo

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=haswell -mtune=haswell -O2 -pipe -ggdb"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=haswell -mtune=haswell -O2 -pipe -ggdb"
DISTDIR="/usr/portage/distfiles"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs compressdebug config-protect-if-modified distcc distlocks ebuild-locks fixlafiles installsources ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="pl_PL.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en pl"
MAKEOPTS="-j16"
PKGDIR="/usr/portage/packages"
PORTAGE_BUNZIP2_COMMAND="lbunzip2"
PORTAGE_BZIP2_COMMAND="lbzip2"
PORTAGE_COMPRESS="lbzip2"
PORTAGE_COMPRESS_FLAGS="--repetitive-fast -z"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 aac acl acpi activities amd64 berkdb bluetooth branding bzip2 cairo cdda cdr cli crypt cups cxx dbus dri drm dts dvd dvdr egl emboss encode exif fam ffmpeg flac fortran gbm gdbm gif gles gles1 gles2 gpm iconv icu ipv6 jpeg kde kipi lame lcms ldap libass libnotify libtirpc libvisual mad mng mp3 mp4 mpeg multilib ncurses nls nptl ogg opengl openmp opus pam pango pcre pdf phonon plasma png policykit ppds printsupport pulseaudio python qml qt5 readline sdl seccomp spell split-usr ssl startup-notification svg systemd taglib tcpd theora threads tiff truetype udev udisks unicode upower usb v4l vaapi vdpau vorbis vpx vulcan wayland widgets wxwidgets x264 xattr xcb xcomposite xml xv xvid zlib" ABI_X86="64 32" ADA_TARGET="gnat_2018" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 fma3 mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="pc" INPUT_DEVICES="evdev keyboard mouse joystick" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LLVM_TARGETS="PowerPC AMDGPU BPF NVPTX X86 AArch64 ARM" NETBEANS_MODULES="apisupport cnd groovy gsf harness ide identity j2ee java mobility nb php profiler soa visualweb webcommon websvccommon xml" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6" QEMU_SOFTMMU_TARGETS="arm x86_64 sparc" QEMU_USER_TARGETS="x86_64" RUBY_TARGETS="ruby24 ruby25" USERLAND="GNU" VIDEO_CARDS="virgl amdgpu radeonsi radeon" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BINHOST, PORTAGE_RSYNC_EXTRA_OPTS
klimentyev commented 4 years ago

@dev-0x7C6 Thx! I built it. I disabled android use too. In my project, code parser works very well)

klimentyev commented 4 years ago

@dev-0x7C6 I'm wrong. Yes, I have broken code deduction too...

klimentyev commented 4 years ago

In Clion 2019.3 the similar bug with clangd: https://blog.jetbrains.com/clion/2019/12/clion-2019-3-1-critical-bug-fix-update/

dev-0x7C6 commented 4 years ago

That's interesting.

I'm not sure if qtcreator using clangd, they develop their clangcodemodel plugin back in the days. But maybe they switching or switched - totally not sure here. Since they added LSP as separate plugin, maybe they looking to get rid of clangcodemodel entirely.

I searched for more info about LSP in qtcreator and i found this: https://doc-snapshots.qt.io/qtcreator-4.11/creator-language-servers.html https://bugreports.qt.io/browse/QTCREATORBUG-20284

@klimentyev Is Clion spawning clangd as process?

klimentyev commented 4 years ago

Now I'm not using of Clion, so I can't say about clangd process. I think that LLVM API was changed. Qt Creator and Clion use the same upstream LLVM API. So we have bugs in code analysis in two different IDE. It's very strange that releases passed tests in developer environment. Why they did not see error? In addition, Clion is distributed with bundled libs (I think llvm/clang in this list).

klimentyev commented 4 years ago

4.11 is released :( without our bug fixing https://www.qt.io/blog/qt-creator-4.11.0-is-released

dev-0x7C6 commented 4 years ago

I have compiled qt-creator 4.11.0 but reported bug still persist :(

I wonder if this is related to libcxx. In Gentoo Clang is using by default GCC standard library probably for compatibility reasons. I'll recompile sys-devel/clang with default-libcxx and default-compiler-rt then recompile qt-creator to check if this helps. But I have bad feeling it won't help much, since qt-creator 4.10.2 works fine with default configuration.

There is also bundled version of qt-creator https://download.qt.io/official_releases/qtcreator/4.11/4.11.0/ with their patched llvm and other precompiled libs. Probably this is working fine.

dev-0x7C6 commented 4 years ago

As expected default-libcxx and default-compiler-rt did not help. Let's wait for response from Qt-Creator developers.

dev-0x7C6 commented 4 years ago

I prepared ebuild for qtcreator 4.11.0-rc1 with fixed gcc include paths. I think it's time to close this issue :-)