You are not logged in.
I wanted to compile my KDE Plasma desktop (among other packages such as Xorg, etc) with heavier optimization (-O3 -march=native -mtune=native flag, etc) and used Clang for doing so.
However, after all was said and done and I rebooted my system, I found that having desktop icons on the screen (.desktop files in the "desktop folder") caused the mouse to change from Oxygen (the selected mouse theme) to Adwaita if placed to the right of them, like so:

![]()
And interacting with GTK elements, be it drop-downs; context menus; application title borders for any application (even QT ones); the Plasma Application Launcher (even though this is not GTK-based); GTK applications (such as Lutris) causes this as well:

I had edited my makepkg.conf like this:
#!/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++
#CPPFLAGS=""
CFLAGS="-march=native -mtune=native -O3 -pipe -fno-plt -minline-all-stringops -fexceptions \
-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) -e"
#-- Debugging flags
## The "-fvar-tracking-assignments" flag is for GCC
#DEBUG_CFLAGS="-g -fvar-tracking-assignments"
DEBUG_CLAGS="-g"
#DEBUG_CXXFLAGS="-g -fvar-tracking-assignments"
DEBUG_CXXFLAGS="-g"
#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)and I had edited the Asp-provided PKGBUILD like this:
# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Maintainer: Antonio Rojas <arojas@archlinux.org>
# Contributor: Andrea Scarpino <andrea@archlinux.org>
pkgname=plasma-desktop
pkgver=5.22.4
pkgrel=1
pkgdesc='KDE Plasma Desktop'
arch=(x86_64)
url='https://kde.org/plasma-desktop/'
license=(LGPL)
source=(https://download.kde.org/stable/plasma/$pkgver/$pkgname-$pkgver.tar.xz{,.sig})
depends=(gawk kdelibs4support polkit-kde-agent libxkbfile kmenuedit systemsettings baloo accountsservice xdg-user-dirs)
optdepends=('plasma-nm: Network manager applet'
'powerdevil: power management, suspend and hibernate support'
'kscreen: screen management'
'ibus: kimpanel IBUS support'
'scim: kimpanel SCIM support'
'kaccounts-integration: OpenDesktop integration plugin'
'packagekit-qt5: to install new krunner plugins')
replaces=(user-manager knetattach)
makedepends=(extra-cmake-modules kdoctools xf86-input-evdev xf86-input-synaptics xf86-input-libinput xorg-server-devel
scim kdesignerplugin kaccounts-integration intltool packagekit-qt5 kinit)
groups=(plasma)
sha256sums=('728e9f8ec670f4f0370c9cc86ede317c682f95f3655bddcf8bb06a38192d4230'
'SKIP')
validpgpkeys=('2D1D5B0588357787DE9EE225EC94D18F7F05997E' # Jonathan Riddell <jr@jriddell.org>
'0AAC775BB6437A8D9AF7A3ACFE0784117FBCE11D' # Bhushan Shah <bshah@kde.org>
'D07BD8662C56CB291B316EB2F5675605C74E02CF' # David Edmundson <davidedmundson@kde.org>
'1FA881591C26B276D7A5518EEAAF29B42A678C20') # Marco Martin <notmart@gmail.com>
build() {
cmake -B build -S $pkgname-$pkgver \
-DCMAKE_INSTALL_LIBEXECDIR=lib \
-DBUILD_TESTING=OFF \
-DCMAKE_CXX_COMPILER=clang++ \
-DCMAKE_C_COMPILER=clang \
-DUSE_NATIVE_INSTRUCTIONS=ON \
-DCMAKE_BUILD_TYPE=Release
sed -i 's/O2/O3/g' "$srcdir/build/CMakeCache.txt"
sed -i 's/O1/O3/g' "$srcdir/build/CMakeCache.txt"
sed -i 's/-march=x86-64/-march=native/g' "$srcdir/build/CMakeCache.txt"
sed -i 's/-mtune=generic/-mtune=native/g' "$srcdir/build/CMakeCache.txt"
CXXFLAGS+=" -minline-all-stringops -flto=16 -flto-compression-level=19 -fuse-linker-plugin -stdlib=libc++ -lstdc++"
CFLAGS+=" -minline-all-stringops -flto=16 -flto-compression-level=19 -fuse-linker-plugin"
cmake --build build -j $(nproc)
}
package() {
DESTDIR="$pkgdir" cmake --install build
}I had also edited PKGBUILDs for related things like Kwin, and the like, but all with basically identical edits to the build() function.
I have no clue what's going on to cause this strange behavior, given that these are supposed to be release-tagged builds and not "git" builds, when pulling PKGBUILDs from Asp; they should theoretically be near-identical in functionality. :/
(For reference, in case anyone thinks to ask, I have an AMD zen2 processor (3700X) and an Nvidia GPU)
Last edited by N3k0-san (2021-08-14 23:39:19)
Offline
Please replace the oversized images (the board max is 200x200) w/ links (and thumbnails or not) and never post screenshots of text (like your system info) - post the text.
On topic: please see https://wiki.archlinux.org/title/Cursor_themes
The clients read that config from all over the place (unfortunately) - I assume plasma tries to augment that (eg. withexporting a custom path for ~/.config/gtk-3.0)
But I can't say why that would fail w/ your custom build - ideally post the diffs for the build config changes you made.
Online
Sorry about the image sizes, I'll find a way to resize them and remove that last bit you didn't like; my screen resolution is high so the images came out big.
This would be the differences between the PKGBUILDs:
Original:
# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Maintainer: Antonio Rojas <arojas@archlinux.org>
# Contributor: Andrea Scarpino <andrea@archlinux.org>
pkgname=plasma-desktop
pkgver=5.22.4
pkgrel=1
pkgdesc='KDE Plasma Desktop'
arch=(x86_64)
url='https://kde.org/plasma-desktop/'
license=(LGPL)
source=(https://download.kde.org/stable/plasma/$pkgver/$pkgname-$pkgver.tar.xz{,.sig})
depends=(gawk kdelibs4support polkit-kde-agent libxkbfile kmenuedit systemsettings baloo accountsservice xdg-user-dirs)
optdepends=('plasma-nm: Network manager applet'
'powerdevil: power management, suspend and hibernate support'
'kscreen: screen management'
'ibus: kimpanel IBUS support'
'scim: kimpanel SCIM support'
'kaccounts-integration: OpenDesktop integration plugin'
'packagekit-qt5: to install new krunner plugins')
replaces=(user-manager knetattach)
makedepends=(extra-cmake-modules kdoctools xf86-input-evdev xf86-input-synaptics xf86-input-libinput xorg-server-devel
scim kdesignerplugin kaccounts-integration intltool packagekit-qt5 kinit)
groups=(plasma)
sha256sums=('728e9f8ec670f4f0370c9cc86ede317c682f95f3655bddcf8bb06a38192d4230'
'SKIP')
validpgpkeys=('2D1D5B0588357787DE9EE225EC94D18F7F05997E' # Jonathan Riddell <jr@jriddell.org>
'0AAC775BB6437A8D9AF7A3ACFE0784117FBCE11D' # Bhushan Shah <bshah@kde.org>
'D07BD8662C56CB291B316EB2F5675605C74E02CF' # David Edmundson <davidedmundson@kde.org>
'1FA881591C26B276D7A5518EEAAF29B42A678C20') # Marco Martin <notmart@gmail.com>
build() {
cmake -B build -S $pkgname-$pkgver \
-DCMAKE_INSTALL_LIBEXECDIR=lib \
-DBUILD_TESTING=OFF
cmake --build build
}
package() {
DESTDIR="$pkgdir" cmake --install build
}Edited:
# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Maintainer: Antonio Rojas <arojas@archlinux.org>
# Contributor: Andrea Scarpino <andrea@archlinux.org>
pkgname=plasma-desktop
pkgver=5.22.4
pkgrel=1
pkgdesc='KDE Plasma Desktop'
arch=(x86_64)
url='https://kde.org/plasma-desktop/'
license=(LGPL)
source=(https://download.kde.org/stable/plasma/$pkgver/$pkgname-$pkgver.tar.xz{,.sig})
depends=(gawk kdelibs4support polkit-kde-agent libxkbfile kmenuedit systemsettings baloo accountsservice xdg-user-dirs)
optdepends=('plasma-nm: Network manager applet'
'powerdevil: power management, suspend and hibernate support'
'kscreen: screen management'
'ibus: kimpanel IBUS support'
'scim: kimpanel SCIM support'
'kaccounts-integration: OpenDesktop integration plugin'
'packagekit-qt5: to install new krunner plugins')
replaces=(user-manager knetattach)
makedepends=(extra-cmake-modules kdoctools xf86-input-evdev xf86-input-synaptics xf86-input-libinput xorg-server-devel
scim kdesignerplugin kaccounts-integration intltool packagekit-qt5 kinit)
groups=(plasma)
sha256sums=('728e9f8ec670f4f0370c9cc86ede317c682f95f3655bddcf8bb06a38192d4230'
'SKIP')
validpgpkeys=('2D1D5B0588357787DE9EE225EC94D18F7F05997E' # Jonathan Riddell <jr@jriddell.org>
'0AAC775BB6437A8D9AF7A3ACFE0784117FBCE11D' # Bhushan Shah <bshah@kde.org>
'D07BD8662C56CB291B316EB2F5675605C74E02CF' # David Edmundson <davidedmundson@kde.org>
'1FA881591C26B276D7A5518EEAAF29B42A678C20') # Marco Martin <notmart@gmail.com>
build() {
cmake -B build -S $pkgname-$pkgver \
-DCMAKE_INSTALL_LIBEXECDIR=lib \
-DBUILD_TESTING=OFF \
-DCMAKE_CXX_COMPILER=clang++ \
-DCMAKE_C_COMPILER=clang \
-DUSE_NATIVE_INSTRUCTIONS=ON \
-DCMAKE_BUILD_TYPE=Release
sed -i 's/O2/O3/g' "$srcdir/build/CMakeCache.txt"
sed -i 's/O1/O3/g' "$srcdir/build/CMakeCache.txt"
sed -i 's/-march=x86-64/-march=native/g' "$srcdir/build/CMakeCache.txt"
sed -i 's/-mtune=generic/-mtune=native/g' "$srcdir/build/CMakeCache.txt"
CXXFLAGS+=" -minline-all-stringops -flto=16 -flto-compression-level=19 -fuse-linker-plugin -stdlib=libc++ -lstdc++"
CFLAGS+=" -minline-all-stringops -flto=16 -flto-compression-level=19 -fuse-linker-plugin"
cmake --build build -j $(nproc)
}
package() {
DESTDIR="$pkgdir" cmake --install build
}Offline
I managed to figure out how to fix it thanks to your link; I don't understand why it only now decided to obey the system-wide default setting when it didn't do that before though (not to mention why it decided to do it in the manner it did because it shouldn't have).
Not sure if this is a bug or what?
Offline
Unless it's coinicdental, the O1/O2 matches are very broad (short search string) - you may have accidental matches and invalidate relevant values (ie. not the optimization but some paths)
Alternatively the aggressive optimizations trigger or expose a bug (eg. whatever KDE/ksmserver uses to write the cursor setting crashes or misbehaves)
Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.
Online
Thanks, btw
Offline