Compiled on PI4B4G with 5.10.77-piCore-v8 Compile Flags: CPPFLAGS='-DNDEBUG' CFLAGS='-march=armv8-a+crc -mtune=cortex-a72 -Os -pipe -flto' CXXFLAGS='-march=armv8-a+crc -mtune=cortex-a72 -Os -pipe -flto' LDFLAGS="-Wl,-O1" export CPPFLAGS CFLAGS CXXFLAGS LDFLAGS Distcc: (don't use distcc, not helping at all, it'll slow things down) distcc[337] (dcc_please_send_email_after_investigation) Warning: remote compilation of 'ibuscomponent.c' failed, retried locally and got a different result. Dependencies: (automake required even if you use configure) automake bash compiletc coreutils python3.8-dev gtk3-dev dconf-dev gettext-dev gnome-common gtk-doc gtk2-dev gtk2-gir gtk3-gir iso-codes gtk4-dev gtk4-gir pigz py3-pygments tar unicode-character-database unicode-cldr-emoji-annotations unicode-emoji vala-dev Commands: # Adjusting system # fix LTO P=/usr/local/libexec/gcc/aarch64-unknown-linux-gnu/10.2.0/liblto_plugin.so.0.0.0 sudo mkdir -p /usr/local/lib/bfd-plugins sudo ln -sfv $P /usr/local/lib/bfd-plugins/liblto_plugin.so # insignificant, caused by wrong permission of tce.installed in docbook-xsl.tcz touch /usr/local/tce.installed/libxml2-python /usr/local/tce.installed/itstool # This file needs to be linked (aarch64 only) # simply changing the other .la files won't help # this is my test script --> ./adjust-la-aarch64.sh sudo ln -sfv /usr/lib/libuuid.la /lib/libuuid.la # Source code, pi4 has enough memory cd /tmp wget --no-check-certificate https://github.com/ibus/ibus/releases/download/1.5.26/ibus-1.5.26.tar.gz time tar -I pigz -xf ibus-1.5.26.tar.gz -C /tmp/ real 0m 0.19s user 0m 0.21s sys 0m 0.15s # required.patch ## deprecated-schema.patch gtk-query-immodules.patch python-shebang.patch cat deprecated-schema.patch gtk-query-immodules.patch python-shebang.patch > /tmp/required.patch cd /tmp/ibus-1.5.26/ && patch -Np1 -i /tmp/required.patch # Compiling # variables CPPFLAGS='-DNDEBUG' CFLAGS='-march=armv8-a+crc -mtune=cortex-a72 -Os -pipe -flto' CXXFLAGS='-march=armv8-a+crc -mtune=cortex-a72 -Os -pipe -flto' LDFLAGS="-Wl,-O1" export CPPFLAGS CFLAGS CXXFLAGS LDFLAGS # use ./configure instead of ./autogen.sh # --disable-gtk-doc # already there # disable to save time # --disable-systemd-services # disable systemd # --libexecdir=/usr/local/libexec # On aarch64, we're using the default value ./configure --prefix=/usr/local \ --sysconfdir=/usr/local/etc \ --libdir=/usr/local/lib \ --libexecdir=/usr/local/lib/ibus \ --datarootdir=/usr/local/share \ --enable-vala=yes \ --enable-python-library \ --enable-wayland \ --enable-static \ --enable-shared \ --enable-gtk4 \ --disable-gtk-doc \ --disable-systemd-services \ --with-python=/usr/local/bin/python3 \ --with-unicode-emoji-dir=/usr/local/share/unicode/emoji \ --with-emoji-annotation-dir=/usr/local/share/unicode/cldr/common/annotations \ --with-ucd-dir=/usr/local/share/unicode/ucd # on pi4 --> a few seconds; on pi3 --> 3 min real 0m 13.61s user 0m 10.31s sys 0m 5.81s # Some of the libtool variablesis empty, the cause is unclear # If you compile with lto, this has to be done after configuration # This phenomenon only happens in aarch64 [ "$CFLAGS" = "${CFLAGS/-flto/}" ] || patch -Np1 -i ../libtool-lto-aarch64.patch # make time make -j5 V=1 real 14m 16.36s user 51m 14.17s sys 1m 13.88s ## optional check # some tests require GUI or certain locales make -k check # install (or install-strip, remember to set STRIP=llvm-strip) DESTDIR=/tmp/packing-ibus make install # Note: python2 and python3 are identical without bytecodes # diff -qrs /tmp/2/usr/local/lib/python2.7/ /tmp/3/usr/local/lib/python3.8/ Packing: cd /tmp/packing-ibus/ find . -type f -exec file {} ';' > /tmp/file.info # strip grep ELF /tmp/file.info | cut -d : -f 1 | xargs strip --strip-unneeded grep 'current ar archive' /tmp/file.info | cut -d : -f 1 | xargs llvm-strip --strip-debug # remove bytecodes (.pyc) # it looks like they've dropped .pyo files find -name '*.pyc' -exec rm {} ';' # dicts mkdir -p /tmp/packing-ibus-dicts/usr/local/share/ibus/ mv ./usr/local/share/ibus/dicts/ /tmp/packing-ibus-dicts/usr/local/share/ibus/ # immodules, keep the default gtk3 in ibus.tcz # It's unclear how to install GTK4 module cause things has change a lot # https://bugs.gentoo.org/830109 # The manual isn't helping # https://github.com/ibus/ibus/wiki/Install # gtk-query-immodules-2.0 --update-cache # gtk-query-immodules-3.0 --update-cache mkdir -p /tmp/packing-ibus-gtk2/usr/local/lib/gtk-2.0/2.10.0/immodules mkdir -p /tmp/packing-ibus-gtk4/usr/local/lib/gtk-4.0/4.0.0/immodules mv ./usr/local/lib/gtk-2.0/2.10.0/immodules/im-ibus.so \ /tmp/packing-ibus-gtk2/usr/local/lib/gtk-2.0/2.10.0/immodules mv ./usr/local/lib/gtk-4.0/4.0.0/immodules/libim-ibus.so \ /tmp/packing-ibus-gtk4/usr/local/lib/gtk-4.0/4.0.0/immodules # gir mkdir -p /tmp/packing-ibus-gir/usr/local/lib mkdir -p /tmp/packing-ibus-gir/usr/local/share mv ./usr/local/lib/girepository-1.0/ /tmp/packing-ibus-gir/usr/local/lib/ mv ./usr/local/share/gir-1.0/ /tmp/packing-ibus-gir/usr/local/share/ # doc mkdir -p /tmp/packing-ibus-doc/usr/local/share mv ./usr/local/share/gtk-doc/ /tmp/packing-ibus-doc/usr/local/share/ mv ./usr/local/share/man/ /tmp/packing-ibus-doc/usr/local/share/ # locale mkdir -p /tmp/packing-ibus-locale/usr/local/share mv ./usr/local/share/locale/ /tmp/packing-ibus-locale/usr/local/share/ # wayland (new file etc/xdg/Xwayland-session.d/10-ibus-x11) mkdir -p /tmp/packing-ibus-wayland/usr/local/lib/ibus mv ./usr/local/lib/ibus/ibus-wayland /tmp/packing-ibus-wayland/usr/local/lib/ibus/ mkdir -p /tmp/packing-ibus-wayland/usr/local/etc/xdg/Xwayland-session.d mv ./usr/local/etc/xdg/Xwayland-session.d/10-ibus-x11 \ /tmp/packing-ibus-wayland/usr/local/etc/xdg/Xwayland-session.d/ # dev mkdir -p /tmp/packing-ibus-dev/usr/local/lib mv ./usr/local/lib/gtk-* /tmp/packing-ibus-dev/usr/local/lib/ mkdir -p ./usr/local/lib/gtk-3.0/3.0.0/immodules mv /tmp/packing-ibus-dev/usr/local/lib/gtk-3.0/3.0.0/immodules/im-ibus.so \ ./usr/local/lib/gtk-3.0/3.0.0/immodules mv ./usr/local/include /tmp/packing-ibus-dev/usr/local/ mv ./usr/local/lib/pkgconfig /tmp/packing-ibus-dev/usr/local/lib/ mkdir -p /tmp/packing-ibus-dev/usr/local/share mv ./usr/local/share/vala /tmp/packing-ibus-dev/usr/local/share/ mv ./usr/local/lib/*a /tmp/packing-ibus-dev/usr/local/lib/ # Main # remove empty directory find -depth -exec rmdir {} ';' 2> /dev/null Adjustment for TC: # the fake links are no longer required with gtk-query-immodules.patch # gtk-query-immodules-3.0-32 / gtk-query-immodules-3.0-64 ibus.tcz: - etc/profile.d/ibus.sh -> environment variables - usr/local/tce.installed/ibus -> commands and file copy - -> a symbolic link to /usr/local/bin/gtk-query-immodules-3.0 ibus-gtk2.tcz: - usr/local/tce.installed/ibus-gtk2 -> refresh cache Packing up: ls -1d packing-ibus* packing-ibus/ packing-ibus-dev/ packing-ibus-dicts/ packing-ibus-doc/ packing-ibus-gir/ packing-ibus-gtk2/ packing-ibus-gtk4/ packing-ibus-locale/ packing-ibus-wayland/ sudo chown -R 0.0 packing-ibus* sudo chown root:staff packing-ibus*/usr/local/tce.installed/ sudo chown tc:staff packing-ibus*/usr/local/tce.installed/* mkdir ibus-aarch64 for D in packing-ibus*; do mksquashfs $D ./ibus-aarch64/${D/packing-/}.tcz -quiet; done ========================================================================================== Build options: Version 1.5.26 Install prefix /usr/local Build shared libs yes Build static libs yes CFLAGS -march=armv8-a+crc -mtune=cortex-a72 -Os -pipe -flto PYTHON /usr/local/bin/python3 PYTHON2 /usr/local/bin/python3 Enable python2 yes Gtk2 immodule dir /usr/local/lib/gtk-2.0/2.10.0/immodules Gtk3 immodule dir /usr/local/lib/gtk-3.0/3.0.0/immodules Gtk4 immodule dir /usr/local/lib/gtk-4.0/4.0.0/immodules Build gtk2 immodule yes Build gtk3 immodule yes Build gtk4 immodule yes Build XIM agent server yes Build wayland support yes Build gdk3 wayland support yes Build appindicator support yes (enabled, use --disable-appindicator to disable) Build python library yes Build memconf modules no Build dconf modules yes (enabled, use --disable-dconf to disable) Build introspection yes IBus-1.0.gir scannerflags "--warn-all --identifier-prefix=IBus --symbol-prefix=ibus --c-include=ibus.h" Build vala binding yes Build document no (disabled, use --enable-gtk-doc to enable) Build UI yes (enabled, use --disable-ui to disable) Build engine yes (enabled, use --disable-engine to disable) Enable key snooper yes No snooper regexes "firefox.*,.*chrome.*,.*chromium.*,terminator" Panel icon "ibus-keyboard" Enable surrounding-text yes Enable Emoji dict yes (enabled, use --disable-emoji-dict to disable) Unicode Emoji directory /usr/local/share/unicode/emoji CLDR annotation directory /usr/local/share/unicode/cldr/common/annotations Enable Unicode dict yes (enabled, use --disable-unicode-dict to disable) UCD directory /usr/local/share/unicode/ucd Socket directory "unix:tmpdir=$XDG_CACHE_HOME/ibus" XFixes client disconnect no (libXfixes version is lower than 6) Install systemd service no Run test cases yes Install tests no (disabled, use --enable-install-tests to enable)