You are not logged in.

#1 2021-10-13 03:25:43

N3k0-san
Member
From: Elsweyr
Registered: 2021-08-14
Posts: 27

[KDE Plasma Desktop] Dependency and Compilation Complications

I'm trying to compile the KDE Plasma desktop (and some other things but mostly KDE packages), however, attempting to compile them with Clang enabled in makepkg.conf either works sometimes or not at all for some packages and this causes subsequent dependencies to fail to compile because the related packages failed.

This goes slightly beyond the below list of git packages from the AUR, because some of these have other dependencies necessary for compilation, but the gist is that it isn't possible to have a feature-complete Plasma desktop ecosystem (like what is provided via the Arch repos) completely compiled with Clang (and with the ease of consistently updating the affected packages as such).

kcodecs-git lib32-alsa-lib-git kguiaddons-git libxcvt-git kcrash-git kglobalaccel-git kiconthemes-git kservice-git kcrash-git kdbusaddons-git kio-git kdeclarative-git kparts-git kcmutils-git kscreenlocker-git plasma-framework-git krunner-git plasma-workspace-git kwallet-git phonon-qt5-gstreamer-git kpeople-git pavucontrol-qt-git pacman-git gnome-settings-daemon-git sdl2-git sddm-git sddm-kcm-git xorg-server-git xorg-xwayland-git kwayland-git libva-git qt5-wayland-git layer-shell-qt-git kwayland-integration-git kaccounts-providers-git kaccounts-integration-git dbus-git dbus-glib-git kdevelop-git qbittorrent-enhanced-git kmod-git networkmanager-wireguard-git networkmanager-qt-git networkmanager-git qt5-imageformats-git qt5-location-git qt5-networkauth-git qt5-quickcontrols2-git qt5-quickcontrols-git qt5-quick3d-git qt5-multimedia-git qt5-sensors-git qt5-virtualkeyboard-git qt5-webchannel-git qt5-webkit-git qt5-x11extras-git qt5-xmlpatterns-git qt5-svg-git unrar-free xf86-input-libinput-git xorg-xinit-git ark-git kalendar-git akonadi-git akonadi-calendar-git akonadi-contacts-git akonadi-notes-git akonadi-search-git akonadi-calendar-tools-git akonadi-mime-git zenity-git kalarm-git kde-servicemenus-rootactions dolphin-git dolphin-plugins-git k3b-git kfind-git kompare-git libkdepim-git korganizer-git kdepim-runtime-git kalarm-git telepathy-kde-accounts-kcm-git telepathy-kde-desktop-applets-git telepathy-qt-git telepathy-kde-filetransfer-handler-git telepathy-kde-integration-module-git telepathy-kde-contact-runner-git telepathy-kde-contact-list-git telepathy-kde-common-internals-git telepathy-kde-call-ui-git telepathy-kde-auth-handler-git telepathy-kde-approver-git kpeople-git kpeoplevcard-git gtk3-git gtk4-git telepathy-kde-integration-module-git telepathy-kde-filetransfer-handler-git kinfocenter-git kgamma5-git kmenuedit-git kdeplasma-addons-git telepathy-kde-text-ui-git telepathy-kde-send-file-git drkonqi-git tar-git yakuake-git konsole-git filelight-git kde-gtk-config-git khotkeys-git kitinerary-git kwallet-pam-git plasma-disks-git plasma-nm-git vulkan-icd-loader-git plasma-thunderbolt-git plasma-systemmonitor-git powerdevil-git plasma-pa-git ksshaskpass-git partitionmanager-git okular-git spectacle-git signon-kwallet-extension-git libksane-git libkomparediff2-git libkleo-git libkipi-git libkgapi-git libkexiv2-git libkdepim-git libkdegames-git libkdcraw-git libkcddb-git kwave-git kpmcore-git kpkpass-git kpimtextedit-git ktimer-git ksystemlog-git ksmtp-git kruler-git kpublictransport-git kpmcore-git kontrast-git kontactinterface-git kldap-git kitinerary-git kirigami-gallery-git kipi-plugins-git kimap-git kidentitymanagement-git kgpg-git kdialog-git kdegraphics-thumbnailers-git kdegraphics-mobipocket-git kdeconnect-git kcharselect-git kcalutils-git kcalc-git kamoso-git kalzium-git kalgebra-git kalarmcal-git sed-git vulkan-headers-git qt5-imageformats-git qt5-graphicaleffects-git polkit-qt5-git polkit-git pacman-contrib-git ibus-git libinput-git pulseaudio-git pulseaudio-qt-git libarchive-git kross-git krb5-git kplotting-git kmod-git kjs-git kimageannotator-git khtml-git kfilemetadata-git keyutils-git kdsoap-ws-discovery-client-git kdsoap-git kdnssd-git kdiagram-git kdewebkit-git kdevelop-php-git kdav-git kcontacts-git kcolorpicker-git kcalendarcore-git gzip-git dbus-glib-git dbus-git bzip2-git bluez-qt-git gnome-desktop-git alsa-plugins-git linux-firmware-git alsa-lib-git gsettings-desktop-schemas-git gnome-settings-daemon-git ksysguard-git plasma-wayland-protocols-git

With that said, I'll show my makepkg.conf for reference, but this is mainly problematic for when one just wants to compile the desktop environment with Clang and heavier optimization than what's provided via the repos:

#!/hint/bash
#
# /etc/makepkg.conf
#

#########################################################################
# SOURCE ACQUISITION
#########################################################################
#
#-- The download utilities that makepkg should use to acquire sources
#  Format: 'protocol::agent'
DLAGENTS=('file::/usr/bin/curl -gqC - -o %o %u'
          'ftp::/usr/bin/curl -gqfC - --ftp-pasv --retry 3 --retry-delay 3 -o %o %u'
          'http::/usr/bin/curl -gqb "" -fLC - --retry 3 --retry-delay 3 -o %o %u'
          'https::/usr/bin/curl -gqb "" -fLC - --retry 3 --retry-delay 3 -o %o %u'
          'rsync::/usr/bin/rsync --no-motd -z %u %o'
          'scp::/usr/bin/scp -C %u %o')

# Other common tools:
# /usr/bin/snarf
# /usr/bin/lftpget -c
# /usr/bin/wget
# /usr/bin/axel

#-- The package required by makepkg to download VCS sources
#  Format: 'protocol::package'
VCSCLIENTS=('bzr::bzr'
            'fossil::fossil'
            'git::git'
            'hg::mercurial'
            'svn::subversion')

#########################################################################
# ARCHITECTURE, COMPILE FLAGS
#########################################################################
#
CARCH="x86_64"
CHOST="x86_64-pc-linux-gnu"

#-- Compiler and Linker Flags
export CC=clang
export CXX=clang++
export LD=lld
export CC_LD=lld
export CXX_LD=lld
export AR=llvm-ar

#CPPFLAGS=""
CFLAGS="-march=native -mtune=native -O3 -pipe -fno-plt -minline-all-stringops -fexceptions -Wall \
        -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security \
        -fstack-clash-protection -fcf-protection"
CXXFLAGS="$CFLAGS -Wp,-D_GLIBCXX_ASSERTIONS"
LDFLAGS="-Wl,-O3,--sort-common,--as-needed,-z,relro,-z,now"
RUSTFLAGS="-C opt-level=3 -C target-cpu=native"

#-- Make Flags: change this for DistCC/SMP systems
MAKEFLAGS="-j$(nproc)"

#-- Debugging flags
## The "-fvar-tracking-assignments" flag is for GCC
# For Clang
DEBUG_CLAGS="-g"
DEBUG_CXXFLAGS="-g"

# For gcc
#DEBUG_CFLAGS="-g -fvar-tracking-assignments"
#DEBUG_CXXFLAGS="-g -fvar-tracking-assignments"

# Rust debug flags
#DEBUG_RUSTFLAGS="-C debuginfo=2"

#########################################################################
# BUILD ENVIRONMENT
#########################################################################
#
# Makepkg defaults: BUILDENV=(!distcc !color !ccache check !sign)
#  A negated environment option will do the opposite of the comments below.
#
#-- distcc:   Use the Distributed C/C++/ObjC compiler
#-- color:    Colorize output messages
#-- ccache:   Use ccache to cache compilation
#-- check:    Run the check() function if present in the PKGBUILD
#-- sign:     Generate PGP signature file
#
BUILDENV=(!distcc color !ccache check !sign)
#
#-- If using DistCC, your MAKEFLAGS will also need modification. In addition,
#-- specify a space-delimited list of hosts running in the DistCC cluster.
#DISTCC_HOSTS=""
#
#-- Specify a directory for package building.
#BUILDDIR=/tmp/makepkg

#########################################################################
# GLOBAL PACKAGE OPTIONS
#   These are default values for the options=() settings
#########################################################################
#
# Makepkg defaults: OPTIONS=(!strip docs libtool staticlibs emptydirs !zipman !purge !debug !lto)
#  A negated option will do the opposite of the comments below.
#
#-- strip:      Strip symbols from binaries/libraries
#-- docs:       Save doc directories specified by DOC_DIRS
#-- libtool:    Leave libtool (.la) files in packages
#-- staticlibs: Leave static library (.a) files in packages
#-- emptydirs:  Leave empty directories in packages
#-- zipman:     Compress manual (man and info) pages in MAN_DIRS with gzip
#-- purge:      Remove files specified by PURGE_TARGETS
#-- debug:      Add debugging flags as specified in DEBUG_* variables
#-- lto:        Add compile flags for building with link time optimization
#
OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !debug lto)

#-- File integrity checks to use. Valid: md5, sha1, sha224, sha256, sha384, sha512, b2
INTEGRITY_CHECK=(sha256)
#-- Options to be used when stripping binaries. See `man strip' for details.
STRIP_BINARIES="--strip-all"
#-- Options to be used when stripping shared libraries. See `man strip' for details.
STRIP_SHARED="--strip-unneeded"
#-- Options to be used when stripping static libraries. See `man strip' for details.
STRIP_STATIC="--strip-debug"
#-- Manual (man and info) directories to compress (if zipman is specified)
MAN_DIRS=({usr{,/local}{,/share},opt/*}/{man,info})
#-- Doc directories to remove (if !docs is specified)
DOC_DIRS=(usr/{,local/}{,share/}{doc,gtk-doc} opt/*/{doc,gtk-doc})
#-- Files to be removed from all packages (if purge is specified)
PURGE_TARGETS=(usr/{,share}/info/dir .packlist *.pod)
#-- Directory to store source code in for debug packages
DBGSRCDIR="/usr/src/debug"

#########################################################################
# PACKAGE OUTPUT
#########################################################################
#
# Default: put built package and cached source in build directory
#
#-- Destination: specify a fixed directory where all packages will be placed
#PKGDEST=/home/packages
#-- Source cache: specify a fixed directory where source files will be cached
#SRCDEST=/home/sources
#-- Source packages: specify a fixed directory where all src packages will be placed
#SRCPKGDEST=/home/srcpackages
#-- Log files: specify a fixed directory where all log files will be placed
#LOGDEST=/home/makepkglogs
#-- Packager: name/email of the person or organization building packages
#PACKAGER="John Doe <john@doe.com>"
#-- Specify a key to use for package signing
#GPGKEY=""

#########################################################################
# COMPRESSION DEFAULTS
#########################################################################
#
COMPRESSGZ=(gzip -c -f -n)
COMPRESSBZ2=(bzip2 -c -f)
COMPRESSXZ=(xz -c -z --threads=0 -)
COMPRESSZST=(zstd -c -z -q --threads=0 -)
COMPRESSLRZ=(lrzip -q)
COMPRESSLZO=(lzop -q)
COMPRESSZ=(compress -c -f)
COMPRESSLZ4=(lz4 -q)
COMPRESSLZ=(lzip -c -f)

#########################################################################
# EXTENSION DEFAULTS
#########################################################################
#
PKGEXT='.pkg.tar.zst'
SRCEXT='.src.tar.gz'

#########################################################################
# OTHER
#########################################################################
#
#-- Command used to run pacman as root, instead of trying sudo and su
#PACMAN_AUTH=(doas)

Now, to be clear, I use an AUR helper for this process, because *that's a lot of PKGBUILDs,* so some things do compile and install and others don't; and other times it throws a message about there being conflicting files, namely these:

/usr/lib/python2.7/site-packages/PyKF5/__init__.py 
/usr/lib/python3.9/site-packages/PyKF5/__init__.py

Which, turn out to be blank python files, so removing them fixes that issue, but this ultimately results in the user having to frequently go in to remove them during this process and it's not exactly a great experience...

I don't really know who to talk to about streamlining the KDE and Qt AUR process (I had a related topic like this a while ago about Qt5-Base in a a separate area, and I contacted their maintainer, but never got a response) and so I'm left defeated in this endeavor at the moment... :/

Last edited by N3k0-san (2021-10-13 21:13:35)

Offline

#2 2021-10-13 11:20:34

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 9,505

Re: [KDE Plasma Desktop] Dependency and Compilation Complications

If I remember that thread correctly the problems were mainly at the linking stage.

Have you tried only setting CC and CXX ?


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
Did you use the guided installer ? If yes, I can't help you.

(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Online

#3 2021-10-13 16:34:39

loqs
Member
Registered: 2014-03-06
Posts: 13,964

Re: [KDE Plasma Desktop] Dependency and Compilation Complications

Link to the original thread https://bbs.archlinux.org/viewtopic.php?id=269172 where configure does not use $CC and $CXX so a gcc bug with LTO and versioned symbols caused the build to fail.

Offline

#4 2021-10-13 17:36:18

N3k0-san
Member
From: Elsweyr
Registered: 2021-08-14
Posts: 27

Re: [KDE Plasma Desktop] Dependency and Compilation Complications

@Lone_wolf
To be clear, I did notice that the domino effect starts in this circumstance regardless of LTO being enabled - @loqs is right that the other issue was slightly different and is somewhat related; some of the dependencies, as a result of this process, forces compilation with g++ and gcc respectively, and I can try only setting CC and CXX (I will attempt this next) but it's worth noting that doing so with Clang LTO variables enabled causes some of these packages to fail and creates that domino effect and puts the AUR update list in an awkward situation where desiring Clang LTO isn't compatible for all packages consistently as well

That aside, another cause of the domino effect was that, with Plasma already installed, this might also fail due to it looking at what's currently installed as a dependency rather than what's *pending* to be installed (this might be the fault of Paru though)

Last edited by N3k0-san (2021-10-13 17:40:26)

Offline

#5 2021-10-13 20:30:00

N3k0-san
Member
From: Elsweyr
Registered: 2021-08-14
Posts: 27

Re: [KDE Plasma Desktop] Dependency and Compilation Complications

@Lone_wolf
I tried it with just the clang variables in the makepkg.conf and it still results in the domino effect

#!/hint/bash
#
# /etc/makepkg.conf
#

#########################################################################
# SOURCE ACQUISITION
#########################################################################
#
#-- The download utilities that makepkg should use to acquire sources
#  Format: 'protocol::agent'
DLAGENTS=('file::/usr/bin/curl -gqC - -o %o %u'
          'ftp::/usr/bin/curl -gqfC - --ftp-pasv --retry 3 --retry-delay 3 -o %o %u'
          'http::/usr/bin/curl -gqb "" -fLC - --retry 3 --retry-delay 3 -o %o %u'
          'https::/usr/bin/curl -gqb "" -fLC - --retry 3 --retry-delay 3 -o %o %u'
          'rsync::/usr/bin/rsync --no-motd -z %u %o'
          'scp::/usr/bin/scp -C %u %o')

# Other common tools:
# /usr/bin/snarf
# /usr/bin/lftpget -c
# /usr/bin/wget
# /usr/bin/axel

#-- The package required by makepkg to download VCS sources
#  Format: 'protocol::package'
VCSCLIENTS=('bzr::bzr'
            'fossil::fossil'
            'git::git'
            'hg::mercurial'
            'svn::subversion')

#########################################################################
# ARCHITECTURE, COMPILE FLAGS
#########################################################################
#
CARCH="x86_64"
CHOST="x86_64-pc-linux-gnu"

#-- Compiler and Linker Flags
export CC=clang
export CXX=clang++
#export LD=lld
#export CC_LD=lld
#export CXX_LD=lld
#export AR=llvm-ar

#CPPFLAGS=""
CFLAGS="-march=native -mtune=native -O3 -pipe -fno-plt -minline-all-stringops -fexceptions -Wall \
        -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security \
        -fstack-clash-protection -fcf-protection"
CXXFLAGS="$CFLAGS -Wp,-D_GLIBCXX_ASSERTIONS"
LDFLAGS="-Wl,-O3,--sort-common,--as-needed,-z,relro,-z,now"
#LDFLAGS="-Wl -O3 -fuse-ld=lld -rtlib=compiler-rt -unwindlib=libunwind"
RUSTFLAGS="-C opt-level=3 -C target-cpu=native"

#-- Make Flags: change this for DistCC/SMP systems
MAKEFLAGS="-j$(nproc)"

#-- Debugging flags
## The "-fvar-tracking-assignments" flag is for GCC
# For Clang
DEBUG_CLAGS="-g"
DEBUG_CXXFLAGS="-g"

# For gcc
#DEBUG_CFLAGS="-g -fvar-tracking-assignments"
#DEBUG_CXXFLAGS="-g -fvar-tracking-assignments"

# Rust debug flags
#DEBUG_RUSTFLAGS="-C debuginfo=2"

#########################################################################
# BUILD ENVIRONMENT
#########################################################################
#
# Makepkg defaults: BUILDENV=(!distcc !color !ccache check !sign)
#  A negated environment option will do the opposite of the comments below.
#
#-- distcc:   Use the Distributed C/C++/ObjC compiler
#-- color:    Colorize output messages
#-- ccache:   Use ccache to cache compilation
#-- check:    Run the check() function if present in the PKGBUILD
#-- sign:     Generate PGP signature file
#
BUILDENV=(!distcc color !ccache check !sign)
#
#-- If using DistCC, your MAKEFLAGS will also need modification. In addition,
#-- specify a space-delimited list of hosts running in the DistCC cluster.
#DISTCC_HOSTS=""
#
#-- Specify a directory for package building.
#BUILDDIR=/tmp/makepkg

#########################################################################
# GLOBAL PACKAGE OPTIONS
#   These are default values for the options=() settings
#########################################################################
#
# Makepkg defaults: OPTIONS=(!strip docs libtool staticlibs emptydirs !zipman !purge !debug !lto)
#  A negated option will do the opposite of the comments below.
#
#-- strip:      Strip symbols from binaries/libraries
#-- docs:       Save doc directories specified by DOC_DIRS
#-- libtool:    Leave libtool (.la) files in packages
#-- staticlibs: Leave static library (.a) files in packages
#-- emptydirs:  Leave empty directories in packages
#-- zipman:     Compress manual (man and info) pages in MAN_DIRS with gzip
#-- purge:      Remove files specified by PURGE_TARGETS
#-- debug:      Add debugging flags as specified in DEBUG_* variables
#-- lto:        Add compile flags for building with link time optimization
#
OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !debug lto)

#-- File integrity checks to use. Valid: md5, sha1, sha224, sha256, sha384, sha512, b2
INTEGRITY_CHECK=(sha256)
#-- Options to be used when stripping binaries. See `man strip' for details.
STRIP_BINARIES="--strip-all"
#-- Options to be used when stripping shared libraries. See `man strip' for details.
STRIP_SHARED="--strip-unneeded"
#-- Options to be used when stripping static libraries. See `man strip' for details.
STRIP_STATIC="--strip-debug"
#-- Manual (man and info) directories to compress (if zipman is specified)
MAN_DIRS=({usr{,/local}{,/share},opt/*}/{man,info})
#-- Doc directories to remove (if !docs is specified)
DOC_DIRS=(usr/{,local/}{,share/}{doc,gtk-doc} opt/*/{doc,gtk-doc})
#-- Files to be removed from all packages (if purge is specified)
PURGE_TARGETS=(usr/{,share}/info/dir .packlist *.pod)
#-- Directory to store source code in for debug packages
DBGSRCDIR="/usr/src/debug"

#########################################################################
# PACKAGE OUTPUT
#########################################################################
#
# Default: put built package and cached source in build directory
#
#-- Destination: specify a fixed directory where all packages will be placed
#PKGDEST=/home/packages
#-- Source cache: specify a fixed directory where source files will be cached
#SRCDEST=/home/sources
#-- Source packages: specify a fixed directory where all src packages will be placed
#SRCPKGDEST=/home/srcpackages
#-- Log files: specify a fixed directory where all log files will be placed
#LOGDEST=/home/makepkglogs
#-- Packager: name/email of the person or organization building packages
#PACKAGER="John Doe <john@doe.com>"
#-- Specify a key to use for package signing
#GPGKEY=""

#########################################################################
# COMPRESSION DEFAULTS
#########################################################################
#
COMPRESSGZ=(gzip -c -f -n)
COMPRESSBZ2=(bzip2 -c -f)
COMPRESSXZ=(xz -c -z --threads=0 -)
COMPRESSZST=(zstd -c -z -q --threads=0 -)
COMPRESSLRZ=(lrzip -q)
COMPRESSLZO=(lzop -q)
COMPRESSZ=(compress -c -f)
COMPRESSLZ4=(lz4 -q)
COMPRESSLZ=(lzip -c -f)

#########################################################################
# EXTENSION DEFAULTS
#########################################################################
#
PKGEXT='.pkg.tar.zst'
SRCEXT='.src.tar.gz'

#########################################################################
# OTHER
#########################################################################
#
#-- Command used to run pacman as root, instead of trying sudo and su
#PACMAN_AUTH=(doas)

Last edited by N3k0-san (2021-10-13 20:30:54)

Offline

#6 2021-10-13 20:55:38

loqs
Member
Registered: 2014-03-06
Posts: 13,964

Re: [KDE Plasma Desktop] Dependency and Compilation Complications

N3k0-san wrote:

@Lone_wolf
To be clear, I did notice that the domino effect starts in this circumstance regardless of LTO being enabled - @loqs is right that the other issue was slightly different and is somewhat related; some of the dependencies, as a result of this process, forces compilation with g++ and gcc respectively, and I can try only setting CC and CXX

I tried to explain in the original thread that you can obtain qt5 built with clang and lto but you can not achieve it using environment options.  You need to pass -platform linux-clang and -ltcg to the configure script.

Did you patch mkspecs/common/clang.conf as I mentioned in the original thread?  That could be another cause of KDE packages not building correctly with clang.

Have you read DeveloperWiki:Building_in_a_clean_chroot to avoid issues with packages installed on the build system?

Please also post the log from makepkg for one of the affected KDE packages.

Offline

#7 2021-10-13 21:56:57

N3k0-san
Member
From: Elsweyr
Registered: 2021-08-14
Posts: 27

Re: [KDE Plasma Desktop] Dependency and Compilation Complications

Example:

==> Making package: kirigami2-git 5.83.0_r2803.gdd7bb331-1 (Wed 13 Oct 2021 04:27:18 PM CDT)
==> Retrieving sources...
  -> Updating kirigami git repo...
Fetching origin
==> Validating source files with sha256sums...
    kirigami ... Skipped
==> Making package: kirigami2-git 5.83.0_r2803.gdd7bb331-1 (Wed 13 Oct 2021 04:27:19 PM CDT)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Updating kirigami git repo...
Fetching origin
==> Validating source files with sha256sums...
    kirigami ... Skipped
==> Removing existing $srcdir/ directory...
==> Extracting sources...
  -> Creating working copy of kirigami git repo...
Cloning into 'kirigami'...
done.
==> Starting pkgver()...
==> Updated version: kirigami2-git 5.88.0_r2925.g241c5e64-1
==> Sources are ready.
kirigami2-git-5.83.0_r2803.gdd7bb331-1: parsing pkg list...
==> Making package: kirigami2-git 5.88.0_r2925.g241c5e64-1 (Wed 13 Oct 2021 04:27:21 PM CDT)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> WARNING: Using existing $srcdir/ tree
==> Starting pkgver()...
==> Removing existing $pkgdir/ directory...
==> Starting build()...
-- The C compiler identification is Clang 12.0.1
-- The CXX compiler identification is Clang 12.0.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/clang - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/clang++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at /usr/lib64/cmake/Qt5Svg/Qt5SvgConfig.cmake:111 (find_package):
  Could not find a configuration file for package "Qt5Widgets" that is
  compatible with requested version "5.15.3".

  The following configuration files were considered but not accepted:

    /usr/lib64/cmake/Qt5Widgets/Qt5WidgetsConfig.cmake, version: 5.15.2

Call Stack (most recent call first):
  /usr/lib64/cmake/Qt5/Qt5Config.cmake:28 (find_package)
  CMakeLists.txt:29 (find_package)


-- Configuring incomplete, errors occurred!
See also "/mnt/extraStorage/paru/clone/kirigami2-git/src/build/CMakeFiles/CMakeOutput.log".
==> ERROR: A failure occurred in build().
    Aborting...
error: failed to build 'kirigami2-git-5.83.0_r2803.gdd7bb331-1': 
==> Making package: plasma-framework-git r13831.0ffd768-2 (Wed 13 Oct 2021 04:27:23 PM CDT)
==> Retrieving sources...
  -> Updating plasma-framework git repo...
Fetching origin
==> Validating source files with md5sums...
    plasma-framework ... Skipped
==> Making package: plasma-framework-git r13831.0ffd768-2 (Wed 13 Oct 2021 04:27:27 PM CDT)
==> Checking runtime dependencies...
==> Missing dependencies:
  -> kirigami-git
==> Checking buildtime dependencies...
==> ERROR: Could not resolve all dependencies.
error: failed to build 'plasma-framework-git-r13831.0ffd768-2': 
==> Making package: krunner-git 5.83.0_r627.gf60ec40-1 (Wed 13 Oct 2021 04:27:27 PM CDT)
==> Retrieving sources...
  -> Updating krunner git repo...
Fetching origin
==> Validating source files with sha256sums...
    krunner ... Skipped
==> Making package: krunner-git 5.83.0_r627.gf60ec40-1 (Wed 13 Oct 2021 04:27:29 PM CDT)
==> Checking runtime dependencies...
==> Missing dependencies:
  -> plasma-framework-git
==> Checking buildtime dependencies...
==> ERROR: Could not resolve all dependencies.
error: failed to build 'krunner-git-5.83.0_r627.gf60ec40-1':

Full log

@loqs
I know

First, I did try to make an AUR chroot for this purpose, but I struggled quite a bit with getting one properly set up and working, so I ended up just giving up on it

Second, I had abstained from editing the source, in that other thread, because this would both require doing so on every update, can affect multiple Qt5 packages, and I know I'll be likely to forget to do so; the reason I had brought up talking to the maintainer about it was so that this could be more elegantly resolved "upstream"  so that the basic **intended** features of makepkg.conf would be honored at compilation with the PKGBUILDs so that any user wanting a Clang compiled and/or more optimized build of these packages don't have to do chores on every update because it would already be taken care of (though, the maintainer never contacted me back)

Offline

#8 2021-10-13 22:17:45

loqs
Member
Registered: 2014-03-06
Posts: 13,964

Re: [KDE Plasma Desktop] Dependency and Compilation Complications

Are you using the git version of the packages by choice instead of the currently packaged versions?

For the git version if you are not going to use a chroot then you need to have installed the correct version of the dependencies in this case qt 5.13.

I keep my changes in a branch or diff from the official PKGBUILDs.  I can then merge my changes against official updates after pulling them.

Offline

#9 2021-10-13 22:36:39

N3k0-san
Member
From: Elsweyr
Registered: 2021-08-14
Posts: 27

Re: [KDE Plasma Desktop] Dependency and Compilation Complications

loqs wrote:

Are you using the git version of the packages by choice instead of the currently packaged versions?

For the git version if you are not going to use a chroot then you need to have installed the correct version of the dependencies in this case qt 5.13.

I keep my changes in a branch or diff from the official PKGBUILDs.  I can then merge my changes against official updates after pulling them.

In this case, yes, I was trying to use the git version of everything I listed in the first post of this thread, by choice

If you're willing to assist in helping me better understand and get the chroot working, and don't mind taking the time, we can try that but I really don't want to have to keep my own branches of things to have a setup working the way I mentioned

I'm tempted to just stop this process altogether but I figured that mentioning/noting the lack of simplicity of doing so is lacking; I just expected PKGBUILDs and dependencies to respect the order they know they need to go in and the official settings and the normal basic flags indicated by the Arch Wiki for makepkg.conf and Clang

Offline

#10 2021-10-13 23:08:11

loqs
Member
Registered: 2014-03-06
Posts: 13,964

Re: [KDE Plasma Desktop] Dependency and Compilation Complications

Anyone can upload a package to AUR.  It is not subject to review and I would suggest reviewing all AUR PKGBUILDs before use unless you trust the author.  Beyond that the git KDE packages may have an implicit version dependency on git Qt similar to how dependencies in official PKGBUILDs implicitly require the current version of dependencies.
I expect Clang will work in many cases but as you have found out there are packages that do not.  GNU authored automake based projects are the most likely to with old unmaintained Makefile only based projects being the least likely to from my experience.

What solution did you propose to arojas to allow building qt5-base with clang if CC=clang and CXX=clang++ that would preserve the current behavior when not set?
You mail may have been ignored because you did not submit a feature request to the bug tracker.

Last edited by loqs (2021-10-13 23:08:54)

Offline

#11 2021-10-13 23:16:59

N3k0-san
Member
From: Elsweyr
Registered: 2021-08-14
Posts: 27

Re: [KDE Plasma Desktop] Dependency and Compilation Complications

Basically all I had said to them was what the issue was about and a link to the thread for reference

You had stated the potential solution already, and them being the maintainer, I figured they'd know how to add proper support easily enough

Offline

#12 2021-10-13 23:24:15

loqs
Member
Registered: 2014-03-06
Posts: 13,964

Re: [KDE Plasma Desktop] Dependency and Compilation Complications

The changes I documented build qt5-base with clang and LTO which is what you wanted.  They no longer allow building with gcc or without LTO which means they break the current build:

<srcbase> = /build/qt5-base/src/qtbase 
<bldbase> = /build/qt5-base/src/qtbase 
<outbase> = /build/qt5-base/src/qtbase 
QtCore: created fwd-include header(s) for <srcbase>/src/corelib/animation/ { qabstractanimation.h (1), qabstractanimation_p.h (1), qanimationgroup.h (1), qanimationgroup_p.h (1), qparallelanimationgroup.h (1), qparallelanimationgroup_p.h (1), qpauseanimation.h (1), qpropertyanimation.h (1), qpropertyanimation_p.h (1), qsequentialanimationgroup.h (1), qsequentialanimationgroup_p.h (1), qvariantanimation.h (1), qvariantanimation_p.h (1) }
QtCore: created fwd-include header(s) for <srcbase>/src/corelib/codecs/ { cp949codetbl_p.h (1), qbig5codec_p.h (1), qeucjpcodec_p.h (1), qeuckrcodec_p.h (1), qgb18030codec_p.h (1), qiconvcodec_p.h (1), qicucodec_p.h (1), qisciicodec_p.h (1), qjiscodec_p.h (1), qjpunicode_p.h (1), qlatincodec_p.h (1), qsimplecodec_p.h (1), qsjiscodec_p.h (1), qtextcodec.h (1), qtextcodec_p.h (1), qtsciicodec_p.h (1), qutfcodec_p.h (1), qwindowscodec_p.h (1) }
QtCore: created fwd-include header(s) for <srcbase>/src/corelib/global/ { minimum-linux_p.h (1), qcompilerdetection.h (1), qconfig-bootstrapped.h (1), qendian.h (2), qendian_p.h (1), qflags.h (1), qfloat16.h (1), qglobal.h (2), qglobal_p.h (1), qglobalstatic.h (1), qhooks_p.h (1), qisenum.h (1), qlibraryinfo.h (1), qlogging.h (1), qlogging_p.h (1), qmemory_p.h (1), qnamespace.h (2), qnumeric.h (2), qnumeric_p.h (1), qoperatingsystemversion.h (1), qoperatingsystemversion_p.h (1), qoperatingsystemversion_win_p.h (1), qprocessordetection.h (1), qrandom.h (1), qrandom_p.h (1), qsysinfo.h (1), qsystemdetection.h (1), qt_pch.h (1), qt_windows.h (1), qtrace_p.h (1), qtypeinfo.h (1), qtypetraits.h (1), qversiontagging.h (1) }
QtCore: created fwd-include header(s) for <srcbase>/src/corelib/io/ { qabstractfileengine_p.h (1), qbuffer.h (1), qdataurl_p.h (1), qdebug.h (2), qdebug_p.h (1), qdir.h (1), qdir_p.h (1), qdiriterator.h (1), qfile.h (1), qfile_p.h (1), qfiledevice.h (1), qfiledevice_p.h (1), qfileinfo.h (1), qfileinfo_p.h (1), qfileselector.h (1), qfileselector_p.h (1), qfilesystemengine_p.h (1), qfilesystementry_p.h (1), qfilesystemiterator_p.h (1), qfilesystemmetadata_p.h (1), qfilesystemwatcher.h (1), qfilesystemwatcher_fsevents_p.h (1), qfilesystemwatcher_inotify_p.h (1), qfilesystemwatcher_kqueue_p.h (1), qfilesystemwatcher_p.h (1), qfilesystemwatcher_polling_p.h (1), qfilesystemwatcher_win_p.h (1), qfsfileengine_iterator_p.h (1), qfsfileengine_p.h (1), qiodevice.h (1), qiodevice_p.h (1), qipaddress_p.h (1), qlockfile.h (1), qlockfile_p.h (1), qloggingcategory.h (1), qloggingregistry_p.h (1), qnoncontiguousbytedevice_p.h (1), qprocess.h (1), qprocess_p.h (1), qresource.h (1), qresource_iterator_p.h (1), qresource_p.h (1), qsavefile.h (1), qsavefile_p.h (1), qsettings.h (1), qsettings_p.h (1), qstandardpaths.h (1), qstorageinfo.h (1), qstorageinfo_p.h (1), qtemporarydir.h (1), qtemporaryfile.h (1), qtemporaryfile_p.h (1), qtldurl_p.h (1), qurl.h (1), qurl_p.h (1), qurlquery.h (1), qurltlds_p.h (1), qwindowspipereader_p.h (1), qwindowspipewriter_p.h (1) }
QtCore: created fwd-include header(s) for <srcbase>/src/corelib/itemmodels/ { qabstractitemmodel.h (1), qabstractitemmodel_p.h (1), qabstractproxymodel.h (1), qabstractproxymodel_p.h (1), qconcatenatetablesproxymodel.h (1), qidentityproxymodel.h (1), qitemselectionmodel.h (1), qitemselectionmodel_p.h (1), qsortfilterproxymodel.h (1), qstringlistmodel.h (1), qtransposeproxymodel.h (1), qtransposeproxymodel_p.h (1) }
QtCore: created fwd-include header(s) for <srcbase>/src/corelib/kernel/ { qabstracteventdispatcher.h (1), qabstracteventdispatcher_p.h (1), qabstractnativeeventfilter.h (1), qbasictimer.h (1), qcfsocketnotifier_p.h (1), qcore_mac_p.h (1), qcore_unix_p.h (1), qcoreapplication.h (1), qcoreapplication_p.h (1), qcorecmdlineargs_p.h (1), qcoreevent.h (1), qcoreglobaldata_p.h (1), qdeadlinetimer.h (1), qdeadlinetimer_p.h (1), qelapsedtimer.h (1), qeventdispatcher_cf_p.h (1), qeventdispatcher_glib_p.h (1), qeventdispatcher_unix_p.h (1), qeventdispatcher_win_p.h (1), qeventdispatcher_winrt_p.h (1), qeventloop.h (1), qeventloop_p.h (1), qfunctions_fake_env_p.h (1), qfunctions_nacl.h (1), qfunctions_p.h (1), qfunctions_vxworks.h (1), qfunctions_winrt.h (1), qjni_p.h (1), qjnihelpers_p.h (1), qmath.h (1), qmetaobject.h (1), qmetaobject_moc_p.h (1), qmetaobject_p.h (1), qmetaobjectbuilder_p.h (1), qmetatype.h (1), qmetatype_p.h (1), qmetatypeswitcher_p.h (1), qmimedata.h (1), qobject.h (1), qobject_impl.h (1), qobject_p.h (1), qobjectcleanuphandler.h (1), qobjectdefs.h (1), qobjectdefs_impl.h (1), qpointer.h (1), qpoll_p.h (1), qppsattribute_p.h (1), qppsattributeprivate_p.h (1), qppsobject_p.h (1), qppsobjectprivate_p.h (1), qsharedmemory.h (1), qsharedmemory_p.h (1), qsignalmapper.h (1), qsocketnotifier.h (1), qsystemerror_p.h (1), qsystemsemaphore.h (1), qsystemsemaphore_p.h (1), qtestsupport_core.h (1), qtimer.h (1), qtimerinfo_unix_p.h (1), qtranslator.h (1), qtranslator_p.h (1), qvariant.h (4), qvariant_p.h (1), qwineventnotifier.h (1), qwineventnotifier_p.h (1), qwinregistry_p.h (1) }
QtCore: created fwd-include header(s) for <srcbase>/src/corelib/mimetypes/ { qmimedatabase.h (1), qmimedatabase_p.h (1), qmimeglobpattern_p.h (1), qmimemagicrule_p.h (1), qmimemagicrulematcher_p.h (1), qmimeprovider_p.h (1), qmimetype.h (1), qmimetype_p.h (1), qmimetypeparser_p.h (1) }
QtCore: created fwd-include header(s) for <srcbase>/src/corelib/plugin/ { qelfparser_p.h (1), qfactoryinterface.h (1), qfactoryloader_p.h (1), qlibrary.h (1), qlibrary_p.h (1), qmachparser_p.h (1), qplugin.h (2), qplugin_p.h (1), qpluginloader.h (1), qsystemlibrary_p.h (1), quuid.h (1) }
QtCore: created fwd-include header(s) for <srcbase>/src/corelib/serialization/ { qbinaryjson_p.h (1), qbinaryjsonarray_p.h (1), qbinaryjsonobject_p.h (1), qbinaryjsonvalue_p.h (1), qcborarray.h (1), qcborcommon.h (1), qcborcommon_p.h (1), qcbormap.h (1), qcborstream.h (1), qcborstreamreader.h (1), qcborstreamwriter.h (1), qcborvalue.h (1), qcborvalue_p.h (1), qdatastream.h (1), qdatastream_p.h (1), qjson_p.h (1), qjsonarray.h (1), qjsondocument.h (1), qjsonobject.h (1), qjsonparser_p.h (1), qjsonvalue.h (1), qjsonwriter_p.h (1), qtextstream.h (1), qtextstream_p.h (1), qxmlstream.h (1), qxmlstream_p.h (1), qxmlutils_p.h (1) }
QtCore: created fwd-include header(s) for <srcbase>/src/corelib/statemachine/ { qabstractstate.h (1), qabstractstate_p.h (1), qabstracttransition.h (1), qabstracttransition_p.h (1), qeventtransition.h (1), qeventtransition_p.h (1), qfinalstate.h (1), qfinalstate_p.h (1), qhistorystate.h (1), qhistorystate_p.h (1), qsignaleventgenerator_p.h (1), qsignaltransition.h (1), qsignaltransition_p.h (1), qstate.h (1), qstate_p.h (1), qstatemachine.h (1), qstatemachine_p.h (1) }
QtCore: created fwd-include header(s) for <srcbase>/src/corelib/text/ { qbytearray.h (1), qbytearray_p.h (1), qbytearraylist.h (1), qbytearraymatcher.h (1), qbytedata_p.h (1), qchar.h (1), qcollator.h (1), qcollator_p.h (1), qdoublescanprint_p.h (1), qharfbuzz_p.h (1), qlocale.h (1), qlocale_data_p.h (1), qlocale_p.h (1), qlocale_tools_p.h (1), qregexp.h (1), qregularexpression.h (1), qstring.h (1), qstringalgorithms.h (1), qstringalgorithms_p.h (1), qstringbuilder.h (1), qstringiterator_p.h (1), qstringlist.h (1), qstringliteral.h (1), qstringmatcher.h (1), qstringview.h (1), qtextboundaryfinder.h (1), qunicodetables_p.h (1), qunicodetools_p.h (1) }
QtCore: created fwd-include header(s) for <srcbase>/src/corelib/thread/ { qatomic.h (1), qatomic_bootstrap.h (1), qatomic_cxx11.h (1), qatomic_msvc.h (1), qbasicatomic.h (1), qexception.h (1), qfutex_p.h (1), qfuture.h (1), qfutureinterface.h (1), qfutureinterface_p.h (1), qfuturesynchronizer.h (1), qfuturewatcher.h (1), qfuturewatcher_p.h (1), qgenericatomic.h (1), qlocking_p.h (1), qmutex.h (1), qmutex_p.h (1), qorderedmutexlocker_p.h (1), qreadwritelock.h (1), qreadwritelock_p.h (1), qresultstore.h (1), qrunnable.h (1), qsemaphore.h (1), qthread.h (1), qthread_p.h (1), qthreadpool.h (1), qthreadpool_p.h (1), qthreadstorage.h (1), qwaitcondition.h (1), qwaitcondition_p.h (1) }
QtCore: created fwd-include header(s) for <srcbase>/src/corelib/time/ { qcalendar.h (1), qcalendarbackend_p.h (1), qcalendarmath_p.h (1), qdatetime.h (1), qdatetime_p.h (1), qdatetimeparser_p.h (1), qgregoriancalendar_p.h (1), qhijricalendar_data_p.h (1), qhijricalendar_p.h (1), qislamiccivilcalendar_p.h (1), qjalalicalendar_data_p.h (1), qjalalicalendar_p.h (1), qjuliancalendar_p.h (1), qmilankoviccalendar_p.h (1), qromancalendar_data_p.h (1), qromancalendar_p.h (1), qtimezone.h (1), qtimezoneprivate_data_p.h (1), qtimezoneprivate_p.h (1) }
QtCore: created fwd-include header(s) for <srcbase>/src/corelib/tools/ { qalgorithms.h (2), qarraydata.h (1), qarraydataops.h (1), qarraydatapointer.h (1), qbitarray.h (1), qcache.h (1), qcommandlineoption.h (1), qcommandlineparser.h (1), qcontainerfwd.h (2), qcontainertools_impl.h (1), qcontiguouscache.h (1), qcryptographichash.h (1), qduplicatetracker_p.h (1), qeasingcurve.h (1), qfreelist_p.h (1), qhash.h (1), qhashfunctions.h (1), qiterator.h (1), qline.h (1), qlinkedlist.h (1), qlist.h (1), qmakearray_p.h (1), qmap.h (1), qmargins.h (1), qmessageauthenticationcode.h (1), qoffsetstringarray_p.h (1), qpair.h (1), qpoint.h (1), qqueue.h (1), qrect.h (1), qrefcount.h (1), qringbuffer_p.h (1), qscopedpointer.h (1), qscopedpointer_p.h (1), qscopedvaluerollback.h (1), qscopeguard.h (1), qset.h (1), qshareddata.h (1), qsharedpointer.h (1), qsharedpointer_impl.h (1), qsimd_p.h (1), qsimd_x86_p.h (1), qsize.h (1), qstack.h (1), qtimeline.h (1), qtools_p.h (1), qvarlengtharray.h (1), qvector.h (1), qversionnumber.h (1) }
QtCore: created fwd-include header(s) for <srcbase>/src/corelib/platform/wasm/ { qstdweb_p.h (1) }
Creating qmake...
clang++ -c -o main.o   -std=c++11 -ffunction-sections -fdata-sections  -g  -I/build/qt5-base/src/qtbase/qmake -I/build/qt5-base/src/qtbase/qmake/library -I/build/qt5-base/src/qtbase/qmake/generators -I/build/qt5-base/src/qtbase/src/3rdparty/tinycbor/src -I/build/qt5-base/src/qtbase/qmake/generators/unix -I/build/qt5-base/src/qtbase/qmake/generators/win32 -I/build/qt5-base/src/qtbase/qmake/generators/mac -I../include -I../include/QtCore -I../include/QtCore/5.15.2 -I../include/QtCore/5.15.2/QtCore -I../src/corelib/global -I/build/qt5-base/src/qtbase/mkspecs/linux-clang -DQT_VERSION_STR=\"5.15.2\" -DQT_VERSION_MAJOR=5 -DQT_VERSION_MINOR=15 -DQT_VERSION_PATCH=2 -DQT_BUILD_QMAKE -DQT_BOOTSTRAPPED -DPROEVALUATOR_FULL -DQT_NO_FOREACH /build/qt5-base/src/qtbase/qmake/main.cpp
make: clang++: No such file or directory
make: *** [Makefile:250: main.o] Error 127

Offline

#13 2021-10-14 00:00:14

N3k0-san
Member
From: Elsweyr
Registered: 2021-08-14
Posts: 27

Re: [KDE Plasma Desktop] Dependency and Compilation Complications

Ah, well, what I meant regardless was I was sure they'd know how to add support for both either way :p

Offline

Board footer

Powered by FluxBB