PINE64
Self-compiled GTK4: artefacts and missing icons - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: PinePhone (https://forum.pine64.org/forumdisplay.php?fid=120)
+--- Forum: PinePhone Software (https://forum.pine64.org/forumdisplay.php?fid=121)
+---- Forum: Mobian on PinePhone (https://forum.pine64.org/forumdisplay.php?fid=139)
+---- Thread: Self-compiled GTK4: artefacts and missing icons (/showthread.php?tid=14233)



Self-compiled GTK4: artefacts and missing icons - Zombie Feynman - 06-19-2021

I compiled GTK4 in my home directory (specifically, in /home/mobian/build) because I want to use the latest version of Megapixels on Mobian. Compilation itself went fine, but for some reason, most icons are missing, and I'm getting strange coloured artefacts.

GTK4 demo application: https://i.imgur.com/MMrO6Qv.png
Megapixels: https://i.imgur.com/K4qRRmL.png

To see if I wasn't missing anything, I followed the same steps to compile GTK4 on my Gentoo desktop, and the demo application there looks normal: https://i.imgur.com/ocFLhbC.png The key difference is that I used the Wayland backend on the PinePhone, and the X11 backend on Gentoo.

The packages I manually compiled are atk-2.36.0, gdk-pixbuf-2.42.6, glib-2.68.2, gobject-introspection-1.68.0, gtk-4.3.0, libepoxy-1.5.8, pango-1.48.5, and wayland-protocols-1.21. Other dependencies are installed systemwide from Mobian's standard repos (total package list here: http://dpaste.com/A3WZZ8Q2N). Environment variables:
Code:
$ export
declare -x CPPFLAGS="-I/home/mobian/build/include"
declare -x DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/1000/bus"
declare -x FEEDBACK_THEME="/usr/share/feedbackd/themes/pinephone.json"
declare -x GSETTINGS_SCHEMA_DIR="/home/mobian/build/share/glib-2.0/schemas"
declare -x HOME="/home/mobian"
declare -x LANG="en_GB.UTF-8"
declare -x LDFLAGS="-L/home/mobian/build/lib -L/home/mobian/build/lib/aarch64-linux-gnu"
declare -x LD_LIBRARY_PATH="/home/mobian/build/lib:/home/mobian/build/lib/aarch64-linux-gnu"
declare -x LOGNAME="mobian"
declare -x LS_COLORS="rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:"
declare -x MOTD_SHOWN="pam"
declare -x MOZ_ENABLE_WAYLAND="1"
declare -x OLDPWD="/home/mobian/build/source/gtk-4.3.0"
declare -x PATH="/home/mobian/build/bin:/home/mobian/build/bin:/home/mobian/build/bin:/home/mobian/build/bin:/home/mobian/bin:/home/mobian/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games"
declare -x PKG_CONFIG_PATH="/home/mobian/build/lib/pkgconfig:/home/mobian/build/share/pkgconfig:/home/mobian/build/lib/aarch64-linux-gnu/pkgconfig"
declare -x PS1="\\[\\033]0;\\u@\\h:\\w\\007\\]\\[\\033[01;32m\\]\\u@\\h\\[\\033[01;34m\\] \\w \\\$\\[\\033[00m\\] "
declare -x PWD="/home/mobian/build/source"
declare -x QT_QPA_PLATFORM="wayland"
declare -x QT_WAYLAND_DISABLE_WINDOWDECORATION="1"
declare -x SHELL="/bin/bash"
declare -x SHLVL="2"
declare -x SSH_TTY="/dev/pts/0"
declare -x STY="11127.pts-0.mobian"
declare -x TERM="screen.xterm-256color"
declare -x TERMCAP="SC|screen.xterm-256color|VT 100/ANSI X3.64 virtual terminal:DO=\\E[%dB:LE=\\E[%dD:RI=\\E[%dC:UP=\\E[%dA:bs:bt=\\E[Z:cd=\\E[J:ce=\\E[K:cl=\\E[H\\E[J:cm=\\E[%i%d;%dH:ct=\\E[3g:do=^J:nd=\\E[C:pt:rc=\\E8:rs=\\Ec:sc=\\E7:st=\\EH:up=\\EM:le=^H:bl=^G:cr=^M:it#8:ho=\\E[H:nw=\\EE:ta=^I:is=\\E)0:li#59:co#238:am:xn:xv:LP:sr=\\EM:al=\\E[L:AL=\\E[%dL:cs=\\E[%i%d;%dr:dl=\\E[M:DL=\\E[%dM:dc=\\E[P:DC=\\E[%dP:im=\\E[4h:ei=\\E[4l:mi:IC=\\E[%d@:ks=\\E[?1h\\E=:ke=\\E[?1l\\E>:vi=\\E[?25l:ve=\\E[34h\\E[?25h:vs=\\E[34l:ti=\\E[?1049h:te=\\E[?1049l:us=\\E[4m:ue=\\E[24m:so=\\E[3m:se=\\E[23m:mb=\\E[5m:md=\\E[1m:mh=\\E[2m:mr=\\E[7m:me=\\E[m:ms:Co#8:pa#64:AF=\\E[3%dm:AB=\\E[4%dm:op=\\E[39;49m:AX:vb=\\Eg:G0:as=\\E(0:ae=\\E(B:ac=\\140\\140aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~..--++,,hhII00:po=\\E[5i:pf=\\E[4i:Z0=\\E[?3h:Z1=\\E[?3l:Km=\\E[<:k0=\\E[10~:k1=\\EOP:k2=\\EOQ:k3=\\EOR:k4=\\EOS:k5=\\E[15~:k6=\\E[17~:k7=\\E[18~:k8=\\E[19~:k9=\\E[20~:k;=\\E[21~:F1=\\E[23~:F2=\\E[24~:kB=\\E[Z:kh=\\E[1~:@1=\\E[1~:kH=\\E[4~:@7=\\E[4~:kN=\\E[6~:kP=\\E[5~:kI=\\E[2~:kD=\\E[3~:ku=\\EOA:kd=\\EOB:kr=\\EOC:kl=\\EOD:km:"
declare -x USER="mobian"
declare -x WINDOW="1"
declare -x XDG_DATA_DIRS="/home/mobian/build/share"
declare -x XDG_RUNTIME_DIR="/run/user/1000"
declare -x XDG_SESSION_CLASS="user"
declare -x XDG_SESSION_ID="4"
declare -x XDG_SESSION_TYPE="tty"

Has anyone seen issues like these on the PinePhone before, and if so, is there a simple fix (that doesn't involve switching distros or installing GTK4 systemwide)?


RE: Self-compiled GTK4: artefacts and missing icons - magdesign - 07-15-2021

How could you even compile megapixels ?
I am failing on mobian with:
Code:
meson.build:6:0: ERROR: Dependency "zbar" not found, tried pkgconfig and cmake
zbar-tools and zbar-cam are installed.

Megapixels is running so smoth on Arch and I want to have the same experience on Mobian... Wink


RE: Self-compiled GTK4: artefacts and missing icons - Zombie Feynman - 07-19-2021

You need the -dev packages of all the dependencies. For zbar, that's libzbar-dev.


RE: Self-compiled GTK4: artefacts and missing icons - g40 - 01-09-2022

@Zombie Feynman Can you post your gtk4 build command line? Mine keeps failing with various complaints and I do not seem to be able to tell it to build for Wayland. Using instructions from https://docs.gtk.org/gtk4/building.html.


RE: Self-compiled GTK4: artefacts and missing icons - Zombie Feynman - 02-06-2022

(01-09-2022, 01:58 PM)g40 Wrote: @Zombie Feynman Can you post your gtk4 build command  line? Mine keeps failing with various complaints and I do not seem to be able to tell it to build for Wayland. Using instructions from https://docs.gtk.org/gtk4/building.html.

First of all, sorry for the late reply.

Since GTK4 is now in Mobian's repos, I haven't touched this self-build in a while, but in any case I compiled GTK in /home/mobian/build by setting the following variables:
Code:
export CPPFLAGS="-I/home/mobian/build/include ${CPPFLAGS}" \
    LDFLAGS="-L/home/mobian/build/lib -L/home/mobian/build/lib/aarch64-linux-gnu ${LDFLAGS}" \
    PKG_CONFIG_PATH="/home/mobian/build/lib/pkgconfig:/home/mobian/build/share/pkgconfig:/home/mobian/build/lib/aarch64-linux-gnu/pkgconfig:${PKG_CONFIG_PATH}" \
    LD_LIBRARY_PATH="/home/mobian/build/lib:/home/mobian/build/lib/aarch64-linux-gnu:${LD_LIBRARY_PATH}" \
    PATH="/home/mobian/build/bin:${PATH}" \
    GSETTINGS_SCHEMA_DIR="/home/mobian/build/share/glib-2.0/schemas"

Apart from that I mostly just followed that same guide. You need to self-compile atk, gdk-pixbuf, glib, gobject-introspection, libepoxy, pango and wayland-protocols before GTK itself. Every invocation of meson should have --prefix=/home/mobian/build as an option, and for GTK itself, you need to disable the x11 backend by adding -Dx11-backend=false.