Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 789330 - kde-misc/kdiff3-1.9.0 misrenders
Summary: kde-misc/kdiff3-1.9.0 misrenders
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Bernard Cafarelli
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-05-10 15:22 UTC by Mike Lothian
Modified: 2021-05-14 20:59 UTC (History)
5 users (show)

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


Attachments
Screenshot (kdiff3.png,125.20 KB, image/png)
2021-05-10 15:23 UTC, Mike Lothian
Details
Build.log (build.log,272.60 KB, text/x-log)
2021-05-10 15:33 UTC, Mike Lothian
Details
Remove macro patch (remove-macro.patch,55.38 KB, patch)
2021-05-11 00:33 UTC, Mike Lothian
Details | Diff
Updated build.log (build.log,322.18 KB, text/plain)
2021-05-11 00:34 UTC, Mike Lothian
Details
Updated remove macro patch (remove-macro.patch,55.40 KB, patch)
2021-05-11 00:54 UTC, Mike Lothian
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Lothian 2021-05-10 15:22:18 UTC
When loading kdiff3 it fails to render the two white text areas (screen shot included)

Reproducible: Always
Comment 1 Mike Lothian 2021-05-10 15:23:12 UTC
Created attachment 706800 [details]
Screenshot
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-05-10 15:26:54 UTC
emerge --info kdiff3 too please
Comment 3 Mike Lothian 2021-05-10 15:28:01 UTC
I have tried bisecting this however if I run these commands:

git clone https://invent.kde.org/sdk/kdiff3.git -b 1.9.0
cd kdiff3
Add limits to src/TypeUtils.h
export my cflags, cxxflags and ldflags
cmake -DCMAKE_BUILD_TYPE=Release .
make -j10

The resulting src/kdiff3 binary loads just fine
Comment 4 Mike Lothian 2021-05-10 15:32:09 UTC
emerge --info kdiff3 
Portage 3.0.18 (python 3.8.10-final-0, default/linux/amd64/17.1/desktop/plasma/systemd, gcc-11.1.0, glibc-2.33, 5.12.0-rc7-agd5f+ x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-5.12.0-rc7-agd5f+-x86_64-Intel-R-_Core-TM-_i7-6820HK_CPU_@_2.70GHz-with-glibc2.2.5
KiB Mem:    32726012 total,   2837444 free
KiB Swap:          0 total,         0 free
Head commit of repository gentoo: 65dd1edfd454be02ef7f361ad0c124063f7b3eb7

Head commit of repository FireBurn: 6a9a3d6284ac186294964b73eecdde2fa32fb80d

Timestamp of repository crossdev: Tue, 04 May 2021 22:35:02 +0000
Head commit of repository crossdev: 9738f60e120e0400f8f8fa6ba9eaa3b9ac39d806

Head commit of repository gamerlay: 672b58f4592f6c6f2fd3a568d7e7529b5ebb27c7

Head commit of repository kde: 8f77538f05d3476de247667cde2051bc5902c2d6

Timestamp of repository qt: Sat, 08 May 2021 09:51:30 +0000
Head commit of repository qt: 93cd1ed74439b5f5c93790a0e1019536dae2e437

Timestamp of repository steam-overlay: Sat, 08 May 2021 09:51:33 +0000
Head commit of repository steam-overlay: ce9e92e66de9aa9693c6bb4c1d2f10f6f7d05a71

Timestamp of repository x11: Sat, 08 May 2021 09:51:36 +0000
Head commit of repository x11: 158b368584bc58f01e22c76c2aee4768d3018e52

sh bash 5.1_p8
ld GNU gold (Gentoo 2.36.1 p3 2.36.1) 1.16
app-shells/bash:          5.1_p8::gentoo
dev-java/java-config:     2.3.1::gentoo
dev-lang/perl:            5.32.1::gentoo
dev-lang/python:          2.7.18_p9::gentoo, 3.8.10::gentoo
dev-lang/rust:            1.52.0::gentoo
dev-util/cmake:           3.20.2::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.7-r2::gentoo
sys-apps/sandbox:         2.24::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r5::gentoo
sys-devel/automake:       1.16.3-r1::gentoo
sys-devel/binutils:       2.36.1-r1::gentoo
sys-devel/gcc:            11.1.0::gentoo
sys-devel/gcc-config:     2.4::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.3::gentoo
sys-kernel/linux-headers: 5.12::gentoo (virtual/os-headers)
sys-libs/glibc:           2.33::gentoo
Repositories:

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

FireBurn
    location: /home/fireburn/Overlay
    sync-type: git
    sync-uri: https://github.com/FireBurn/Overlay
    sync-user: fireburn:users
    masters: gentoo

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

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

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

portage-crossdev
    location: /usr/local/portage-crossdev
    masters: gentoo kde gamerlay

qt
    location: /var/db/repos/qt
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/qt.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

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

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O3 -march=native -pipe -flto=8"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.8/conf /usr/share/themes/oxygen-gtk/gtk-2.0 /usr/share/themes/oxygen-gtk/gtk-3.0"
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"
CXXFLAGS="-O3 -march=native -pipe -flto=8"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--autounmask-write --with-bdeps y --complete-graph y --keep-going"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH 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 binpkg-multi-instance 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 qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="https://mirror.bytemark.co.uk/gentoo/ https://mirrors.evowise.com/gentoo/ http://gentoo.osuosl.org http://distfiles.gentoo.org"
LANG="en_GB.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu -flto=8"
LINGUAS="en_GB en"
MAKEOPTS="-j8"
PKGDIR="/usr/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 activities alsa amd64 apng berkdb bluetooth branding brightness-control bzip2 cairo cdr clang cli connection-sharing crypt cups custom-cflags d3d9 dav1d dbus declarative default-gold default-lld dri dri3 drm dts dvdr egl emboss encode exif faudio ffmpeg flac fortran gbm gdbm geckodriver gentoo-vm gif gold googledrive gpm graphite gstreamer gtk gui harfbuzz http2 iconv icu ipv6 ithreads jpeg kde kipi kwinft lcms legacy-systray libglvnd libkms libmpv libnotify libtirpc llvm lm-sensors lto lzma lzo mad mng mp3 mp4 mpeg mpris mpx multilib ncurses networkmanager nightly nls nptl nsplugin ogg ompt openal opencl opengl openmp openssl opus pam pango parallel-compiler pba pcre pdf pdfimport phonon plasma png policykit postproc ppds pulseaudio qml qt5 readline samba scp screencast seccomp spell split-usr ssl startup-notification subversion svg sync-plugin-portage system-icu system-llvm systemd tcpd theora threads thumbnail tiff touchpad truetype udev udisks unicode upower usb user-session v4l vaapi vdpau vorbis vpx vulkan vulkan-overlay wasm wayland webp webstart widgets wifi wxwidgets x264 x265 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 access_compat" 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 rdrand 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="evdev synaptics libinput" KERNEL="linux" L10N="en-GB en" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LLVM_TARGETS="AMDGPU WebAssembly" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-3 php7-4" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_8" PYTHON_TARGETS="python3_8" RUBY_TARGETS="ruby30" USERLAND="GNU" VIDEO_CARDS="intel i965 iris radeon radeonsi amdgpu" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto 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, RUSTFLAGS

=================================================================
                        Package Settings
=================================================================

kde-misc/kdiff3-1.9.0::gentoo was built with the following:
USE="handbook -debug" ABI_X86="(64)"
CFLAGS="-O2 -march=native -pipe"
CXXFLAGS="-O2 -march=native -pipe"
LDFLAGS="-Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed"
Comment 5 Mike Lothian 2021-05-10 15:33:11 UTC
Created attachment 706806 [details]
Build.log
Comment 6 Mike Lothian 2021-05-10 15:42:44 UTC
So I've figured out where the issue lies... ninja

I did an ebuild kdiff3-1.9.0.ebuild compile

Then used the cmake command the ebuild does on my local checkout of kdiff3

cmake -C /var/tmp/portage/kde-misc/kdiff3-1.9.0/work/kdiff3-1.9.0_build/gentoo_common_config.cmake -G Ninja -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_DISABLE_FIND_PACKAGE_KF5DocTools=no -DKDE_INSTALL_USE_QT_SYS_PATHS=ON -DKDE_INSTALL_DOCBUNDLEDIR=/usr/share/help -DCMAKE_BUILD_TYPE=Gentoo -DCMAKE_TOOLCHAIN_FILE=/var/tmp/portage/kde-misc/kdiff3-1.9.0/work/kdiff3-1.9.0_build/gentoo_toolchain.cmake

Then ran ninja

The resulting binary exhibits the same issue

I might be able to bisect the issue now I can replicate it
Comment 7 Mike Lothian 2021-05-10 16:24:04 UTC
So the first bad commit I'm getting is:

273efca9ab4868ad14aafae99ac7ae193ffc8a9f is the first bad commit
commit 273efca9ab4868ad14aafae99ac7ae193ffc8a9f
Author: Pavel Karelin <hkarel@yandex.ru>
Date:   Wed May 13 16:02:03 2020 +0300

    Added the macro chk_connect_X for checking work of function QObject::connect()

 src/defmac.h                 | 85 +++++++++++++++++++++++++++++++++++++++
 src/difftextwindow.cpp       | 39 +++++++++---------
 src/directorymergewindow.cpp | 18 ++++-----
 src/fileaccess.cpp           | 39 +++++++++---------
 src/guiutils.h               |  5 ++-
 src/kdiff3.cpp               | 13 +++---
 src/kdiff3.h                 |  4 +-
 src/kdiff3_shell.cpp         |  4 +-
 src/mergeresultwindow.cpp    | 95 ++++++++++++++++++++++----------------------
 src/optiondialog.cpp         | 31 ++++++++-------
 src/pdiff.cpp                | 56 +++++++++++++-------------
 src/progress.cpp             |  5 ++-
 src/smalldialogs.cpp         | 60 ++++++++++++++--------------
 13 files changed, 273 insertions(+), 181 deletions(-)
 create mode 100644 src/defmac.h

But it might be a red herring
Comment 8 Mike Lothian 2021-05-10 16:53:22 UTC
I tried adding CMAKE_MAKEFILE_GENERATOR="emake" to the ebuild - but still no luck
Comment 9 Michael Reeves 2021-05-10 23:35:28 UTC
Cann't seem to reproduce on my test under kubuntu. Will try and setup a vm. The commit sited by git bisect added a macro around calls to QObject::connect to detect failed connections. Unless something was accidentally deleted I don't see how it would have caused this. Just pushed a couple unrelated API updates to 1.9 branch so its in sync with what I have. What Qt version is this?
Comment 10 Mike Lothian 2021-05-10 23:49:54 UTC
It's 5.15.2 with frameworks 5.82 (but the same happened with 5.81 too)
Comment 11 Mike Lothian 2021-05-11 00:02:27 UTC
Going to commit 83217596728998155fc5109629e5a77105caf054 sorts things for me, so I don't think the bisect was wrong

It could be related to GCC 11.1 (or rather libstdc++) as I've tested this with Clang 12 to rule out the compiler itself
Comment 12 Mike Lothian 2021-05-11 00:32:22 UTC
So I tried reversing the commit using sed against 1.9.0 using the attached patch

I now see the following error when compiling:



In file included from /var/tmp/portage/kde-misc/kdiff3-1.9.0/work/kdiff3-1.9.0/src/directorymergewindow.cpp:16:
/var/tmp/portage/kde-misc/kdiff3-1.9.0/work/kdiff3-1.9.0/src/guiutils.h: In instantiation of ‘typename std::enable_if<std::is_same<T, QAction>::value, QAction>::type* GuiUtils::createAction(const QString&, Receiver, Func, KActionCollection*, const QString&) [with T = QAction; Receiver = KDiff3App*; Func = void (KDiff3App::*)(); typename std::enable_if<std::is_same<T, QAction>::value, QAction>::type = QAction]’:
/var/tmp/portage/kde-misc/kdiff3-1.9.0/work/kdiff3-1.9.0/src/guiutils.h:86:53:   required from ‘T* GuiUtils::createAction(const QString&, const QIcon&, const QString&, Receiver, Func, KActionCollection*, const QString&) [with T = QAction; Receiver = KDiff3App*; Func = void (KDiff3App::*)()]’
/var/tmp/portage/kde-misc/kdiff3-1.9.0/work/kdiff3-1.9.0/src/directorymergewindow.cpp:2960:60:   required from here
/var/tmp/portage/kde-misc/kdiff3-1.9.0/work/kdiff3-1.9.0/src/guiutils.h:31:16: error: invalid conversion from ‘QAction*’ to ‘int’ [-fpermissive]
   31 |        connect(theAction, &QAction::triggered, receiver, slot);
      |                ^~~~~~~~~
      |                |
      |                QAction*
/var/tmp/portage/kde-misc/kdiff3-1.9.0/work/kdiff3-1.9.0/src/guiutils.h:31:15: error: cannot convert ‘void (QAction::*)(bool)’ to ‘const sockaddr*’
   31 |        connect(theAction, &QAction::triggered, receiver, slot);
      |        ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |               |
      |               void (QAction::*)(bool)
In file included from /usr/lib64/qt5/mkspecs/linux-g++/qplatformdefs.h:74,
                 from /usr/include/KF5/KIOCore/kio/udsentry.h:18,
                 from /usr/include/KF5/KIOCore/KIO/UDSEntry:1,
                 from /var/tmp/portage/kde-misc/kdiff3-1.9.0/work/kdiff3-1.9.0/src/fileaccess.h:23,
                 from /var/tmp/portage/kde-misc/kdiff3-1.9.0/work/kdiff3-1.9.0/src/directorymergewindow.h:13,
                 from /var/tmp/portage/kde-misc/kdiff3-1.9.0/work/kdiff3-1.9.0/src/directorymergewindow.cpp:10:
/usr/include/sys/socket.h:126:52: note:   initializing argument 2 of ‘int connect(int, const sockaddr*, socklen_t)’
  126 | extern int connect (int __fd, __CONST_SOCKADDR_ARG __addr, socklen_t __len);
      |                                                    ^
make[2]: *** [src/CMakeFiles/kdiff3part.dir/build.make:112: src/CMakeFiles/kdiff3part.dir/kdiff3.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs...
Comment 13 Mike Lothian 2021-05-11 00:33:11 UTC
Created attachment 706860 [details, diff]
Remove macro patch
Comment 14 Mike Lothian 2021-05-11 00:34:57 UTC
Created attachment 706863 [details]
Updated build.log
Comment 15 Mike Lothian 2021-05-11 00:53:15 UTC
I should have checked the original patch, was missing QObject::

Kdiff 1.9.0 now compiles and renders correctly
Comment 16 Mike Lothian 2021-05-11 00:54:00 UTC
Created attachment 706866 [details, diff]
Updated remove macro patch
Comment 17 Andreas Sturmlechner gentoo-dev 2021-05-11 08:43:34 UTC
Could you report it upstream please?
Comment 18 Kyle Johnson 2021-05-13 23:15:28 UTC
(In reply to Andreas Sturmlechner from comment #17)
> Could you report it upstream please?

I reported it at https://bugs.kde.org/show_bug.cgi?id=436958#c14. Looks like the fix was applied in 5feaf425 at https://invent.kde.org/sdk/kdiff3 and it looks like there's been a version bump and tag for 1.9.1.
Comment 19 Larry the Git Cow gentoo-dev 2021-05-14 20:59:06 UTC
The bug has been closed via the following commit(s):

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

commit 29755fb5500218b36ac06c0f020bc5c9dcf1dbe1
Author:     Andreas Sturmlechner <asturm@gentoo.org>
AuthorDate: 2021-05-14 20:55:21 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2021-05-14 20:58:50 +0000

    kde-misc/kdiff3: 1.9.1 version bump
    
    Closes: https://bugs.gentoo.org/789330
    Package-Manager: Portage-3.0.18, Repoman-3.0.3
    Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>

 kde-misc/kdiff3/Manifest            |  1 +
 kde-misc/kdiff3/kdiff3-1.9.1.ebuild | 42 +++++++++++++++++++++++++++++++++++++
 2 files changed, 43 insertions(+)