rework how some targets are handled#2298
Conversation
If we can't find the library with `$CC -print-file-name=$SONAME`, then give `find_library(…)` a try: this is mainly for macOS, so homebrew libraries are found (e.g. when searching for SDL).
- drop the `appimage` target: the `linux` target will be used for building the AppImage too - drop support for cross-compiling the `linux` target: our SDL3 need to be built (since older Debian / Ubuntu distros don't provide it), and installing the necessary build deps (DBus, X11, Wayland, etc…) for a cross-toolchain is problematic - tweak the `linux` target architecture flag for maximum x86_64 compatibility (same flags previously used for `appimage`: `-march=x86-64 -mtune=generic`) - build the `emulator` with `-march=native` (including on macOS, only the `macos` target is built with `-mcpu=apple-m1` / `-mtune=generic`) - when cross-compiling, build host flags no longer contain architecture specific flags
- SDL3: track mouse pointers and finger pointers separately (koreader/koreader-base#2295) - xss-dummy: drop the library (koreader/koreader-base#2296) - ci/macos: fix nodejs deprecation warnings (koreader/koreader-base#2297) - rework how some targets are handled (koreader/koreader-base#2298)
- SDL3: track mouse pointers and finger pointers separately (koreader/koreader-base#2295) - xss-dummy: drop the library (koreader/koreader-base#2296) - ci/macos: fix nodejs deprecation warnings (koreader/koreader-base#2297) - rework how some targets are handled (koreader/koreader-base#2298)
|
Random pick (might not be the right PR) for my usual emulator rebuit adventure: Just ran my usual wrapper script to build, did I miss installing some newly required package ? |
|
Some extra build dependencies were added to https://github.com/koreader/koreader/blob/6b6ecb5b053abae28c12b734ed97fdde55c0e21f/doc/Building.md#debianubuntu I think that one should be provided by |
|
Oh, I guess I just forgot to install libsdl3-dev ? Or will SDL3 still be build from our tree (I think I read that recently, that we always build sdl3) ? |
|
Always for the release build, not for the emulator if the system already has SDL3 installed. |
|
And you don't need the development sdl3 package, just the library. If not provided by you distribution, you should be able to use the library from our Linux distribution. |
|
But I have it (debian 13, installed when I previously asked you about it I guess 2026-02-15 - or on my first build after you introduced sdl3 and it was needed): So, something must have changed recently, as I remember I did build it after you made it use sdl3 and reported my success. |
|
We need >= 3.2.12 for accumulated whole scroll "ticks" in mouse wheel events (cf. #2288). |
|
:/ So I need to have SDL3 built... |
|
I don't understand your reasoning: how is manually unpacking stuff somewhere cleaner than just installing the required distribution packages? And 70 seems a lot, on a bare Trixie docker image, installing the minimum dependencies required for both Wayland and X11 support only pull 58 packages (223 MB). Anyway, I imagine your problem is with pkg-config search path: normally we isolate our build, but for SDL, we need to punch a hole through our isolation to access system packages. We do this by resetting pkg-config search path to its build time default: |
Because I'm not a builder like you, I'm a user :)
Maybe I didn't check what packages were needed to built KOReader last time I refreshed it, and kept going on with the list I had from when I started it (Debian jessie), but I had installed for Bookworm: My last notes for BookwormThat's a lot of crap I don't need for anything else :)
So, no pkg-config in my tree, and my My build wrapper script just does: export PATH=/space/kobo/deb_extras/usr/bin:$PATH
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/space/kobo/deb_extras/usr/lib/x86_64-linux-gnu
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/space/kobo/deb_extras/usr/lib
cd koreader
/space/kobo/koreader/kodev buildAny suggestion on how to go on ? |
|
Did you try to follow the instructions from Because I see a lot of unnecessary stuff in your list: libsdl2-dev, libibus, libpulse, ragel, libssl-dev, luarocks… |
|
What if you add the SDL3 library from our Linux distribution to |
|
And add |
These must have been in the Building.md at some point (pulse pulled by sdl I guess, ragel was needed for building Harfbuzz at some point). Your last 2 suggestion did not help.
our = your and mine debian ? or some KOReader linux distribution ? :) |
From our v2026.03 release: https://ota.koreader.rocks/koreader-linux-x86_64-v2026.03.tar.xz Check the output of |
|
It does - although mentionnig the /usr/lib/... path which wouldn't be 3.4.0: The built then went to its end. Anyway, KOReader starts, the luajit process has Sigh. Edit: but it works when launched with |
|
Well yes, you still need to mess with And that setup phase is still wrong (run with |
Right.
What would be the better/right way ? |
|
The better way is to stop making your life harder and just install the necessary distribution packages… And we should definitively raise an error at run time if the SDL version is too old. |
|
You can build a meta package that will install all the necessary package without marking those as manually installed (for easier cleanup later): ▸ apt install --no-install-recommends equivs
[…]
▸ cat >control <<\EOF
Source: koreader-build-deps
Section: misc
Priority: optional
Standards-Version: 3.9.2
Package: koreader-build-deps
Depends: autoconf, automake, build-essential, ca-certificates, cmake, gcc-multilib, gettext, git, libtool, libtool-bin, meson, nasm, ninja-build, patch, perl, pkg-config, unzip, wget, ccache, lua-check, p7zip-full, shellcheck, shfmt, libegl-dev, libwayland-dev, libx11-dev, libxext-dev
Description: Meta package to install all necessary build requirements for KOReader.
EOF
▸ equivs-build control
▸ apt install --no-install-recommends ./koreader-build-deps_1.0_all.deb
Note, selecting 'koreader-build-deps' instead of './koreader-build-deps_1.0_all.deb'
Installing:
koreader-build-deps
Installing dependencies:
7zip libdrm-intel1 libngtcp2-crypto-gnutls8 libx32gcc-14-dev ninja-build
build-essential libdrm2 libp11-kit0 libx32gcc-s1 openssl
ca-certificates libedit2 libpciaccess0 libx32gomp1 p7zip-full
ccache libegl-dev libpkgconf3 libx32itm1 pkg-config
cmake libegl-mesa0 libproc2-0 libx32quadmath0 pkgconf
cmake-data libegl1 libpsl5t64 libx32stdc++6 pkgconf-bin
g++ liberror-perl libpython3-stdlib libx32ubsan1 procps
g++-14 libexpat1 libpython3.13-minimal libxau-dev python3
g++-14-x86-64-linux-gnu libffi-dev libpython3.13-stdlib libxau6 python3-autocommand
g++-x86-64-linux-gnu libffi8 libreadline8t64 libxcb-dri3-0 python3-inflect
gcc-14-multilib libfmt10 librhash1 libxcb-glx0 python3-jaraco.context
gcc-multilib libgbm1 librtmp1 libxcb-present0 python3-jaraco.functools
git libgl-dev libsasl2-2 libxcb-randr0 python3-jaraco.text
git-man libgl1 libsasl2-modules-db libxcb-shm0 python3-minimal
lib32asan8 libgl1-mesa-dri libsensors-config libxcb-sync1 python3-more-itertools
lib32atomic1 libglvnd0 libsensors5 libxcb-xfixes0 python3-pkg-resources
lib32gcc-14-dev libglx-dev libssh2-1t64 libxcb1 python3-setuptools
lib32gcc-s1 libglx-mesa0 libstdc++-14-dev libxcb1-dev python3-typeguard
lib32gomp1 libglx0 libtasn1-6 libxdmcp-dev python3-typing-extensions
lib32itm1 libgnutls30t64 libtool-bin libxdmcp6 python3-zipp
lib32quadmath0 libgssapi-krb5-2 libuv1t64 libxext-dev python3.13
lib32stdc++6 libhiredis1.1.0 libvulkan1 libxext6 python3.13-minimal
lib32ubsan1 libidn2-0 libwayland-bin libxshmfence1 readline-common
libarchive13t64 libjsoncpp26 libwayland-client0 libxxf86vm1 shellcheck
libbrotli1 libk5crypto3 libwayland-cursor0 libz3-4 shfmt
libc6-dev-i386 libkeyutils1 libwayland-dev lua-argparse unzip
libc6-dev-x32 libkrb5-3 libwayland-egl1 lua-check wget
libc6-i386 libkrb5support0 libwayland-server0 lua-filesystem x11proto-dev
libc6-x32 libldap2 libx11-6 lua5.1 xorg-sgml-doctools
libcom-err2 libllvm19 libx11-data media-types xtrans-dev
libcurl3t64-gnutls libncursesw6 libx11-dev mesa-libgallium
libcurl4t64 libnghttp2-14 libx11-xcb1 meson
libdrm-amdgpu1 libnghttp3-9 libx32asan8 nasm
libdrm-common libngtcp2-16 libx32atomic1 netbase
Suggested packages:
7zip-standalone cmake-format git-doc git-cvs krb5-doc libwayland-doc python3-tk binfmt-support
7zip-rar elpa-cmake-mode git-email git-mediawiki krb5-user libx11-doc python3-venv readline-doc
distcc g++-multilib git-gui git-svn pciutils libxcb-doc python-setuptools-doc zip
| icecc g++-14-multilib gitk lrzip lm-sensors libxext-doc python3.13-venv
cmake-doc gcc-14-doc gitweb gnutls-bin libstdc++-14-doc python3-doc python3.13-doc
Recommended packages:
less krb5-locales libgpm2 libsasl2-modules | vulkan-icd linux-sysctl-defaults
ssh-client libldap-common publicsuffix mesa-vulkan-drivers psmisc
Summary:
Upgrading: 0, Installing: 167, Removing: 0, Not Upgrading: 0
Download size: 140 MB / 140 MB
Space needed: 592 MB / 7085 MB available
Continue? [Y/n] n
Abort. |
- SDL3: track mouse pointers and finger pointers separately (koreader/koreader-base#2295) - xss-dummy: drop the library (koreader/koreader-base#2296) - ci/macos: fix nodejs deprecation warnings (koreader/koreader-base#2297) - rework how some targets are handled (koreader/koreader-base#2298)
|
Btw, is there some official kodev/Makefile way to prune |
|
Nope. |
|
I used to get AppImage releases to test regressions (and tweak frontend code, so appimage-extract). What is the now classic location where I should I copy my settings and history.lua ? (I'd rather not have them in my $HOME, for me all this is volatile). |
|
You can set the |
- SDL3: track mouse pointers and finger pointers separately (koreader/koreader-base#2295) - xss-dummy: drop the library (koreader/koreader-base#2296) - ci/macos: fix nodejs deprecation warnings (koreader/koreader-base#2297) - rework how some targets are handled (koreader/koreader-base#2298)
appimagetarget: thelinuxtarget will be used for building the AppImage toolinuxtarget: our SDL3 need to be built (since older Debian / Ubuntu distros don't provide it), and installing the necessary build deps (DBus, X11, Wayland, etc…) for a cross-toolchain is problematiclinuxtarget architecture flag for maximum x86_64 compatibility (same flags previously used forappimage:-march=x86-64 -mtune=generic)emulatorwith-march=native(including on macOS, only themacostarget is built with-mcpu=apple-m1/-mtune=generic)This change is