Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 695274 - dev-qt/qt-creator-4.10.0_rc1 - clangformatutils.cpp:63:49: error: cannot convert ‘bool’ to ‘clang::format::FormatStyle::ShortIfStyle’ in assignment
Summary: dev-qt/qt-creator-4.10.0_rc1 - clangformatutils.cpp:63:49: error: cannot conv...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 2 votes (vote)
Assignee: Davide Pesavento
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2019-09-21 09:23 UTC by email200202
Modified: 2019-10-31 22:27 UTC (History)
13 users (show)

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


Attachments
build.log (build.log,5.43 KB, text/plain)
2019-09-21 09:25 UTC, email200202
Details
emerge -pqv '=dev-qt/qt-creator-4.10.0_rc1::gentoo' (file_695274.txt,489 bytes, text/plain)
2019-09-21 09:26 UTC, email200202
Details
emerge --info '=dev-qt/qt-creator-4.10.0_rc1::gentoo' (file_695274.txt,7.50 KB, text/plain)
2019-09-21 09:27 UTC, email200202
Details
user patch (clangformatutils.patch,663 bytes, patch)
2019-09-23 13:04 UTC, email200202
Details | Diff
build log (build.log.bz2,51.37 KB, application/x-bzip)
2019-10-28 08:22 UTC, Xavier Miller (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description email200202 2019-09-21 09:23:19 UTC
clangformatutils.cpp:63:49: error: cannot convert ‘bool’ to ‘clang::format::FormatStyle::ShortIfStyle’ in assignment
   63 |     style.AllowShortIfStatementsOnASingleLine = false;
      |                                                 ^~~~~
make[3]: *** [Makefile:1769: .obj/release-shared/clangformatutils.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [Makefile:120: sub-clangformat-make_first] Error 2
make[2]: *** Waiting for unfinished jobs....


Reproducible: Always

Steps to Reproduce:
1.emerge --sync
2.emerge -auvDN world

Actual Results:  
dev-qt/qt-creator-4.10.0_rc1 failed to compile

Expected Results:  
It should compile

system: ~amd64
Comment 1 email200202 2019-09-21 09:25:09 UTC
Created attachment 590502 [details]
build.log
Comment 2 email200202 2019-09-21 09:26:12 UTC
Created attachment 590504 [details]
emerge -pqv '=dev-qt/qt-creator-4.10.0_rc1::gentoo'
Comment 3 email200202 2019-09-21 09:27:34 UTC
Created attachment 590506 [details]
emerge --info '=dev-qt/qt-creator-4.10.0_rc1::gentoo'
Comment 4 Cyril 2019-09-22 19:21:10 UTC
same here
Comment 5 Arthur Zamarin archtester Gentoo Infrastructure gentoo-dev Security 2019-09-23 05:11:53 UTC
I believe this bug happened as a result of API change of clang, on the upgrade to version 9.0.0.

Also fails for me.
Comment 6 Alex 2019-09-23 11:15:17 UTC
Change src/plugins/clangformat/clangformatutils.cpp 

from
style.AllowShortIfStatementsOnASingleLine = false;
to
style.AllowShortIfStatementsOnASingleLine = FormatStyle::SIS_Never;

then proceed with the ebuild.

New format found here https://clang.llvm.org/doxygen/Format_8cpp_source.html#l00121
Comment 7 Arthur Zamarin archtester Gentoo Infrastructure gentoo-dev Security 2019-09-23 12:01:18 UTC
Thank you very much, @Alex.

Worked for me. Used this small patch (which works only for appropriate versions of Clang):

diff --git a/src/plugins/clangformat/clangformatutils.cpp b/src/plugins/clangformat/clangformatutils.cpp
index 59c2b59..2ff79b4 100644
--- a/src/plugins/clangformat/clangformatutils.cpp
+++ b/src/plugins/clangformat/clangformatutils.cpp
@@ -60,7 +60,7 @@ static clang::format::FormatStyle qtcStyle()
     style.AllowShortBlocksOnASingleLine = false;
     style.AllowShortCaseLabelsOnASingleLine = false;
     style.AllowShortFunctionsOnASingleLine = FormatStyle::SFS_Inline;
-    style.AllowShortIfStatementsOnASingleLine = false;
+    style.AllowShortIfStatementsOnASingleLine = FormatStyle::SIS_Never;
     style.AllowShortLoopsOnASingleLine = false;
     style.AlwaysBreakAfterReturnType = FormatStyle::RTBS_None;
     style.AlwaysBreakBeforeMultilineStrings = false;
Comment 8 email200202 2019-09-23 13:04:23 UTC
Created attachment 590680 [details, diff]
user patch
Comment 9 Cyril 2019-09-23 17:59:49 UTC
Thanks user patch works.
Comment 10 Xavier Miller (RETIRED) gentoo-dev 2019-09-24 11:03:32 UTC
patch as attachment 590680 [details, diff] is working fine for me, thank you!
Comment 11 Larry the Git Cow gentoo-dev 2019-10-26 20:13:53 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cdcd3965d96eee989ec92090d52ae6d1efa285fd

commit cdcd3965d96eee989ec92090d52ae6d1efa285fd
Author:     Davide Pesavento <pesa@gentoo.org>
AuthorDate: 2019-10-26 20:13:17 +0000
Commit:     Davide Pesavento <pesa@gentoo.org>
CommitDate: 2019-10-26 20:13:44 +0000

    dev-qt/qt-creator: add 4.10.1
    
    Closes: https://bugs.gentoo.org/695274
    Package-Manager: Portage-2.3.78, Repoman-2.3.17
    Signed-off-by: Davide Pesavento <pesa@gentoo.org>

 dev-qt/qt-creator/Manifest                 |   1 +
 dev-qt/qt-creator/qt-creator-4.10.1.ebuild | 201 +++++++++++++++++++++++++++++
 dev-qt/qt-creator/qt-creator-9999.ebuild   |   9 +-
 3 files changed, 207 insertions(+), 4 deletions(-)
Comment 12 Alexey Shvetsov archtester gentoo-dev 2019-10-27 12:01:13 UTC
Bug still valid for qt-creator-4.10.1 and clang-9
Comment 13 Dennis Schridde 2019-10-27 14:49:12 UTC
(In reply to Alexey Shvetsov from comment #12)
> Bug still valid for qt-creator-4.10.1 and clang-9

dev-qt/qt-creator-4.10.1 has LLVM_MAX_SLOT=8 [1], so problems with sys-devel/clang-9 should not affect it.

[1]: https://gitweb.gentoo.org/repo/gentoo.git/tree/dev-qt/qt-creator/qt-creator-4.10.1.ebuild#n5
Comment 14 Alexey Shvetsov archtester gentoo-dev 2019-10-27 17:05:33 UTC
If you have clang-9 installed you still have same problem. While using patch from this bug not. So bug reopened,  since commit didnt fixed it
Comment 15 Davide Pesavento gentoo-dev 2019-10-28 02:58:09 UTC
(In reply to Alexey Shvetsov from comment #14)
> If you have clang-9 installed you still have same problem. While using patch
> from this bug not. So bug reopened,  since commit didnt fixed it
Can you provide more information, such as a failed build log? I cannot reproduce with 4.10.1 (and clang-9 installed)
Comment 16 Xavier Miller (RETIRED) gentoo-dev 2019-10-28 08:22:44 UTC
Created attachment 594208 [details]
build log

# emerge --info '=dev-qt/qt-creator-4.10.1::gentoo'                                                                                                              [0/70119]
Portage 2.3.78 (python 3.6.9-final-0, default/linux/amd64/17.1/no-multilib, gcc-9.2.0, glibc-2.29-r6, 5.3.7-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-5.3.7-gentoo-x86_64-Intel-R-_Core-TM-_i7-8850H_CPU_@_2.60GHz-with-gentoo-2.6
KiB Mem:    16191160 total,   3151196 free
KiB Swap:          0 total,         0 free
Head commit of repository gentoo: 9edccb79be99fb590b1919fbdabec8f543d2ed9b

Head commit of repository local: c09d753472fa23ee33ea8f81b20948000891c3f9

sh bash 5.0_p11
ld GNU gold (Gentoo 2.32 p2 2.32.0) 1.16
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/cmake:           3.15.4::gentoo
dev-util/pkgconfig:       0.29.2::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.13.4-r2::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: /var/portage/repos/gentoo
    sync-type: git
    sync-uri: git://anongit.gentoo.org/repo/gentoo.git
    priority: -1000

local
    location: /usr/local/portage
    sync-type: git
    sync-uri: /data/nas/xavier/git_repos/local_overlay.git/
    masters: gentoo

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="@FREE as-is freedist"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -fomit-frame-pointer -march=native -mtune=native"
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 /etc/texmf/language.dat.d /etc/texmf/language.def.d
/etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -pipe -fomit-frame-pointer -march=native -mtune=native"
DISTDIR="/var/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps y --quiet-build=n --buildpkg"
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 buildpkg candy config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pi
d-sandbox preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="fr_BE.utf8"
LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,--hash-style=gnu -Wl,--as-needed"
LINGUAS="fr nl fr_FR fr_BE nl_NL nl_BE"
MAKEOPTS="-j9 -l13"
PKGDIR="/var/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="3dnow 3dnowext X a52 aac acpi aes alsa amd64 apng avx avx2 branding bzip2 cairo cdda cddb cdio cli crossdev crypt cryptsetup css cups cxx dbus dlna dri dssi dts dvb dvd exif f16c flac fma3 gif glamor gnome-keyring gpm
gtk gudev iconv joystick jpeg lcms libcanberra libinput libnotify libsamplerate libtirpc mad matroska mmx mmxext mng mp3 mpeg mtp natspec ncurses network nls nptl ocr ogg openal opengl openmp opus osc pam pango pclmul pcre
pdf png popcnt printsupport qt5 readline sane scanner sdl seccomp sna sndfile snmp spell split-usr sqlite sse sse2 sse3 sse4_1 sse4_2 ssl ssse3 startup-notification svg tcpd threads tiff truetype udev unicode upnp usb uxa v
aapi vorbis wmf x264 xattr xcb xinerama xml xosd xv xvid zlib" ABI_X86="64" ADA_TARGET="gnat_2018" ALSA_CARDS="ice1712 hda-intel usb-audio virmidi" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias au
th_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 ex
t_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" COLLECT
D_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 f
v18 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="keyboard mouse libinput jo
ystick" KERNEL="linux" L10N="fr nl" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LIRC_DEVICES="ftdi" LLVM_TARGETS="X86" N
ETBEANS_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="postgre
s10 postgres11" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6" QEMU_USER_TARGETS="arm" RUBY_TARGETS="ruby25" SANE_BACKENDS="hp" USERLAND="GNU" VIDEO_CARDS="intel i965" XFCE_PLUGINS="brightness trash"
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, INSTALL_MASK, LC_ALL, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 17 Davide Pesavento gentoo-dev 2019-10-29 18:21:27 UTC
(In reply to Xavier Miller from comment #16)
> Created attachment 594208 [details]
> build log
> 

You're using a patch that's not in portage...

> [32;01m*[0m Applying clang-9.patch ...
Comment 19 Davide Pesavento gentoo-dev 2019-10-31 22:27:24 UTC
(In reply to Peter Levine from comment #18)
> https://github.com/qt-creator/qt-creator/commit/
> 8c7dd57645ab30f760846f7cbf57121d763d8473
I am aware.