Skip to content

android: update to use NDK 23c #10610

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 10, 2023

Conversation

benoit-pierre
Copy link
Contributor

@benoit-pierre benoit-pierre commented Jun 24, 2023

Depends on: koreader/android-luajit-launcher#419 and koreader/koreader-base#1620

Additionally, speedup Android development cycle: don't recreate assets.7z from scratch every time, and also ensure it's reproducible to avoid busting gradle's cache.


This change is Reviewable

@benoit-pierre benoit-pierre requested a review from Frenzie as a code owner June 24, 2023 11:11
@benoit-pierre benoit-pierre marked this pull request as draft June 24, 2023 11:11
@Frenzie Frenzie added this to the 2023.07 milestone Jun 24, 2023
Copy link
Member

@Frenzie Frenzie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@pazos
Copy link
Member

pazos commented Jun 25, 2023

Adding a note here, before this PR gets merged.

We need to update otamanager, so it won't insist in updating to a version that will fail to install.
Extra points if users of an old version get the final release available for their device (for both stable and dev channels)

@Frenzie
Copy link
Member

Frenzie commented Jun 25, 2023

You mean something like a file that says 2023.07 requires at least ABI 18?

@pazos
Copy link
Member

pazos commented Jun 26, 2023

You mean something like a file that says 2023.07 requires at least ABI 18?

Not sure about the implementation.

What I would like:

  1. EOL devices running the last supported version receive an "you're up to date" while checking updates.
  2. EOL devices on previous versions receive an update to last supported version.

I'm afraid we cannot fix it backwards (ie: updating from v2023.01) so 2 won't work fully.

@pazos
Copy link
Member

pazos commented Jul 6, 2023

@benoit-pierre: did you try to build for x86_64 with all your patches in?. I know it was borked with the old toolchain but I'm not sure if you tried to build to a yet unsupported target.

@benoit-pierre
Copy link
Contributor Author

On my meson branch, yes, with a small patch to luajit-launcher:

diff --git a/assets/android.lua b/assets/android.lua
index 7e310856..99de6bd7 100644
--- a/assets/android.lua
+++ b/assets/android.lua
@@ -2654,9 +2654,10 @@ local function run(android_app_state)
 
     -- load the dlopen() implementation
     android.dl = require("dl")
+    android.dl.system_libdir = ffi.arch == "x64" and "/system/lib64" or "/system/lib"
     android.dl.library_path = android.nativeLibraryDir..":"..
         android.dir..":"..android.dir.."/libs:"..
-        "/lib:/system/lib:/lib/lib?.so:/system/lib/lib?.so"
+        string.gsub("@:@/lib?.so", "@", android.dl.system_libdir)
 
     -- register the dependency lib loader
     table.insert(package.loaders, 3, android.deplib_loader)
diff --git a/assets/dl.lua b/assets/dl.lua
index a5f5dd5d..30917c07 100644
--- a/assets/dl.lua
+++ b/assets/dl.lua
@@ -54,6 +54,9 @@ end
 local dl = {
     -- set this to search in certain directories
     library_path = '/lib/?;/usr/lib/?;/usr/local/lib/?',
+    -- set this to the directory of system libraries
+    -- (to be ignored when loading dependencies).
+    system_libdir = nil,
 }
 
 local function sys_dlopen(library, global, padding)
@@ -120,7 +123,7 @@ function dl.dlopen(library, load_func, depth)
             -- libvulkan, and libz
             -- c.f., https://android.googlesource.com/platform/bionic/+/master/android-changes-for-ndk-developers.md#private-api-enforced-for-api-level-24
             -- Our current code should *never* hit any private system libs, so, this is basically overkill ;).
-            if depth > 0 and (pspec == "/system/lib" or library == "libdl.so") then
+            if depth > 0 and (pspec == dl.system_libdir or library == "libdl.so") then
                 -- depth > 0 to allow explicitly loading a system lib
                 -- (because this might have genuine use cases, as some early API levels do not put DT_NEEDED libraries into the global namespace)
                 -- pspec to reject system libs

Don't recreate `assets.7z` from scratch every time, and also
ensure it's reproducible to avoid busting gradle's cache.
@benoit-pierre benoit-pierre force-pushed the pr/android_ndk_update branch from 732e60b to 535cfed Compare July 10, 2023 17:48
@benoit-pierre benoit-pierre marked this pull request as ready for review July 10, 2023 17:53
@Frenzie
Copy link
Member

Frenzie commented Jul 10, 2023

@benoit-pierre With regard to the failing tests, did you rebase this on top of the latest master?

@benoit-pierre
Copy link
Contributor Author

Yes.

@benoit-pierre benoit-pierre marked this pull request as draft July 10, 2023 19:29
@Frenzie
Copy link
Member

Frenzie commented Jul 10, 2023

This error is real, though I don't immediately see a clear culprit in the base PR.

frontend/ui/widget/textwidget.lua:187: error loading module 'libs/libkoreader-xtext' from file 'libs/libkoreader-xtext.so':
	libs/libkoreader-xtext.so: undefined symbol: hb_unicode_funcs_get_default

stack traceback:
	frontend/ui/widget/textwidget.lua:187: in function '_measureWithXText'
	frontend/ui/widget/textwidget.lua:131: in function 'updateSize'
	frontend/ui/widget/textwidget.lua:293: in function 'getSize'
	frontend/apps/reader/modules/readerfooter.lua:2199: in function 'updateFooterText'
	frontend/apps/reader/modules/readerfooter.lua:2139: in function 'updateFooterPage'
	frontend/apps/reader/modules/readerfooter.lua:2123: in function 'onUpdateFooter'
	frontend/apps/reader/modules/readerfooter.lua:2310: in function 'handleEvent'
	...
	/home/ko/.luarocks/share/lua/5.1/busted/block.lua:155: in function 'execute'
	/home/ko/.luarocks/share/lua/5.1/busted/init.lua:7: in function 'executor'
	/home/ko/.luarocks/share/lua/5.1/busted/core.lua:312: in function </home/ko/.luarocks/share/lua/5.1/busted/core.lua:312>

@benoit-pierre
Copy link
Contributor Author

CI:

File: libs/libkoreader-xtext.so

Dynamic section at offset 0x9e00 contains 26 entries:
  Tag        Type                         Name/Value
 0x0000000000000001 (NEEDED)             Shared library: [libstdc++.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libc.so.6]
 0x000000000000001d (RUNPATH)            Library runpath: [$ORIGIN]
 0x000000000000000c (INIT)               0x3000
 0x000000000000000d (FINI)               0x7c84
 0x0000000000000019 (INIT_ARRAY)         0xac88
 0x000000000000001b (INIT_ARRAYSZ)       16 (bytes)
 0x000000000000001a (FINI_ARRAY)         0xac98
 0x000000000000001c (FINI_ARRAYSZ)       8 (bytes)
 0x000000006ffffef5 (GNU_HASH)           0x2f0
 0x0000000000000005 (STRTAB)             0xc30
 0x0000000000000006 (SYMTAB)             0x318
 0x000000000000000a (STRSZ)              1708 (bytes)
 0x000000000000000b (SYMENT)             24 (bytes)
 0x0000000000000003 (PLTGOT)             0xb000
 0x0000000000000002 (PLTRELSZ)           2184 (bytes)
 0x0000000000000014 (PLTREL)             RELA
 0x0000000000000017 (JMPREL)             0x1830
 0x0000000000000007 (RELA)               0x1410
 0x0000000000000008 (RELASZ)             1056 (bytes)
 0x0000000000000009 (RELAENT)            24 (bytes)
 0x000000006ffffffe (VERNEED)            0x13a0
 0x000000006fffffff (VERNEEDNUM)         2
 0x000000006ffffff0 (VERSYM)             0x12dc
 0x000000006ffffff9 (RELACOUNT)          40
 0x0000000000000000 (NULL)               0x0

vs locally:

Dynamic section at offset 0x9d80 contains 32 entries:
  Tag        Type                         Name/Value
 0x0000000000000001 (NEEDED)             Shared library: [libfreetype.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libfribidi.so.0]
 0x0000000000000001 (NEEDED)             Shared library: [libharfbuzz.so.0]
 0x0000000000000001 (NEEDED)             Shared library: [libunibreak.so.5]
 0x0000000000000001 (NEEDED)             Shared library: [libstdc++.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libm.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libgcc_s.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libc.so.6]
 0x000000000000001d (RUNPATH)            Library runpath: [$ORIGIN]
 0x000000000000000c (INIT)               0x3000
 0x000000000000000d (FINI)               0x7114
 0x0000000000000019 (INIT_ARRAY)         0x9c10
 0x000000000000001b (INIT_ARRAYSZ)       8 (bytes)
 0x000000000000001a (FINI_ARRAY)         0x9c18
 0x000000000000001c (FINI_ARRAYSZ)       8 (bytes)
 0x000000006ffffef5 (GNU_HASH)           0x300
 0x0000000000000005 (STRTAB)             0xc40
 0x0000000000000006 (SYMTAB)             0x328
 0x000000000000000a (STRSZ)              1781 (bytes)
 0x000000000000000b (SYMENT)             24 (bytes)
 0x0000000000000003 (PLTGOT)             0x9fe8
 0x0000000000000002 (PLTRELSZ)           2184 (bytes)
 0x0000000000000014 (PLTREL)             RELA
 0x0000000000000017 (JMPREL)             0x1860
 0x0000000000000007 (RELA)               0x1458
 0x0000000000000008 (RELASZ)             1032 (bytes)
 0x0000000000000009 (RELAENT)            24 (bytes)
 0x000000006ffffffe (VERNEED)            0x13f8
 0x000000006fffffff (VERNEEDNUM)         2
 0x000000006ffffff0 (VERSYM)             0x1336
 0x000000006ffffff9 (RELACOUNT)          39
 0x0000000000000000 (NULL)               0x0

@Frenzie
Copy link
Member

Frenzie commented Jul 10, 2023

Nah, locally you just have an old one, presumably from before these changes.

image

Delete the old one and locally you get:

$ readelf -d libkoreader-xtext.so 

Dynamic section at offset 0x6de0 contains 26 entries:
  Tag        Type                         Name/Value
 0x0000000000000001 (NEEDED)             Shared library: [libstdc++.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libc.so.6]
 0x000000000000001d (RUNPATH)            Library runpath: [$ORIGIN]
 0x000000000000000c (INIT)               0x2000
 0x000000000000000d (FINI)               0x5fc4
 0x0000000000000019 (INIT_ARRAY)         0x7c70
 0x000000000000001b (INIT_ARRAYSZ)       8 (bytes)
 0x000000000000001a (FINI_ARRAY)         0x7c78
 0x000000000000001c (FINI_ARRAYSZ)       8 (bytes)
 0x000000006ffffef5 (GNU_HASH)           0x260
 0x0000000000000005 (STRTAB)             0xb88
 0x0000000000000006 (SYMTAB)             0x288
 0x000000000000000a (STRSZ)              1663 (bytes)
 0x000000000000000b (SYMENT)             24 (bytes)
 0x0000000000000003 (PLTGOT)             0x7fe8
 0x0000000000000002 (PLTRELSZ)           2160 (bytes)
 0x0000000000000014 (PLTREL)             RELA
 0x0000000000000017 (JMPREL)             0x1720
 0x0000000000000007 (RELA)               0x1318
 0x0000000000000008 (RELASZ)             1032 (bytes)
 0x0000000000000009 (RELAENT)            24 (bytes)
 0x000000006ffffffe (VERNEED)            0x12c8
 0x000000006fffffff (VERNEEDNUM)         2
 0x000000006ffffff0 (VERSYM)             0x1208
 0x000000006ffffff9 (RELACOUNT)          39
 0x0000000000000000 (NULL)               0x0

Perhaps libs should depend on the Makefile itself. :-)

@benoit-pierre
Copy link
Contributor Author

I don't see why… The link command looks alright:

/usr/bin/ccache g++ -I/home/ko/project/base/thirdparty/freetype2/build/x86_64-linux-gnu/freetype2-prefix/src/freetype2-build/include/freetype2 \
-I/home/ko/project/base/thirdparty/harfbuzz/build/x86_64-linux-gnu/harfbuzz-prefix/src/harfbuzz-build/include/harfbuzz \
-I/home/ko/project/base/thirdparty/fribidi/build/x86_64-linux-gnu/fribidi-prefix/src/fribidi-build/include/fribidi \
-I/home/ko/project/base/thirdparty/libunibreak/build/x86_64-linux-gnu/libunibreak-prefix/src/libunibreak-build/include \
-L/home/ko/project/base/build/x86_64-linux-gnu/libs -O2 -ffast-math -pipe -fomit-frame-pointer   -march=native -fPIC -I/home/ko/project/base/thirdparty/luajit/build/x86_64-linux-gnu/luajit-prefix/src/luajit/src -shared -Wl,-E -Wl,-rpath,'$ORIGIN' -fvisibility=hidden \
-l:libfreetype.so.6 \
-l:libfribidi.so.0 \
-l:libharfbuzz.so.0 \
-l:libunibreak.so.5 \
 \
-Wall -o build/x86_64-linux-gnu/libs/libkoreader-xtext.so xtext.cpp

@benoit-pierre
Copy link
Contributor Author

I've cleaned and rebuilt from scratch.

@Frenzie
Copy link
Member

Frenzie commented Jul 10, 2023

For me it works if I put them back behind as they were.

@Frenzie
Copy link
Member

Frenzie commented Jul 10, 2023

/usr/bin/ccache g++ -I/home/frans/src/kobo/koreader/base/thirdparty/freetype2/build/x86_64-linux-gnu-debug/freetype2-prefix/src/freetype2-build/include/freetype2 \
-I/home/frans/src/kobo/koreader/base/thirdparty/harfbuzz/build/x86_64-linux-gnu-debug/harfbuzz-prefix/src/harfbuzz-build/include/harfbuzz \
-I/home/frans/src/kobo/koreader/base/thirdparty/fribidi/build/x86_64-linux-gnu-debug/fribidi-prefix/src/fribidi-build/include/fribidi \
-I/home/frans/src/kobo/koreader/base/thirdparty/libunibreak/build/x86_64-linux-gnu-debug/libunibreak-prefix/src/libunibreak-build/include \
-L/home/frans/src/kobo/koreader/base/build/x86_64-linux-gnu-debug/libs -Og -g -pipe -fno-omit-frame-pointer   -march=native -fPIC -I/home/frans/src/kobo/koreader/base/thirdparty/luajit/build/x86_64-linux-gnu-debug/luajit-prefix/src/luajit/src -shared -Wl,-E -Wl,-rpath,'$ORIGIN' -fvisibility=hidden \
-Wall -o build/x86_64-linux-gnu-debug/libs/libkoreader-xtext.so xtext.cpp \
-l:libfreetype.so.6 \
-l:libfribidi.so.0 \
-l:libharfbuzz.so.0 \
-l:libunibreak.so.5 \
$ gcc --version
gcc (Debian 12.2.0-14) 12.2.0
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ g++ --version
g++ (Debian 12.2.0-14) 12.2.0
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

@benoit-pierre
Copy link
Contributor Author

Can't reproduce locally:

/usr/bin/ccache g++ -I/home/bpierre/dev/koreader.bak01/base/thirdparty/freetype2/build/x86_64-pc-linux-gnu-debug/freetype2-prefix/src/freetype2-build/include/freetype2 \
-I/home/bpierre/dev/koreader.bak01/base/thirdparty/harfbuzz/build/x86_64-pc-linux-gnu-debug/harfbuzz-prefix/src/harfbuzz-build/include/harfbuzz \
-I/home/bpierre/dev/koreader.bak01/base/thirdparty/fribidi/build/x86_64-pc-linux-gnu-debug/fribidi-prefix/src/fribidi-build/include/fribidi \
-I/home/bpierre/dev/koreader.bak01/base/thirdparty/libunibreak/build/x86_64-pc-linux-gnu-debug/libunibreak-prefix/src/libunibreak-build/include \
-L/home/bpierre/dev/koreader.bak01/base/build/x86_64-pc-linux-gnu-debug/libs -Og -g -pipe -fno-omit-frame-pointer   -march=native -fPIC -I/home/bpierre/dev/koreader.bak01/base/thirdparty/luajit/build/x86_64-pc-linux-gnu-debug/luajit-prefix/src/luajit/src -shared -Wl,-E -Wl,-rpath,'$ORIGIN' -fvisibility=hidden \
-l:libfreetype.so.6 \
-l:libfribidi.so.0 \
-l:libharfbuzz.so.0 \
-l:libunibreak.so.5 \
 \
-Wall -o build/x86_64-pc-linux-gnu-debug/libs/libkoreader-xtext.so xtext.cpp
Dynamic section at offset 0x8d80 contains 32 entries:
  Tag        Type                         Name/Value
 0x0000000000000001 (NEEDED)             Shared library: [libfreetype.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libfribidi.so.0]
 0x0000000000000001 (NEEDED)             Shared library: [libharfbuzz.so.0]
 0x0000000000000001 (NEEDED)             Shared library: [libunibreak.so.5]
 0x0000000000000001 (NEEDED)             Shared library: [libstdc++.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libm.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libgcc_s.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libc.so.6]
 0x000000000000001d (RUNPATH)            Library runpath: [$ORIGIN]
 0x000000000000000c (INIT)               0x3000
 0x000000000000000d (FINI)               0x70a8
 0x0000000000000019 (INIT_ARRAY)         0x9c10
 0x000000000000001b (INIT_ARRAYSZ)       8 (bytes)
 0x000000000000001a (FINI_ARRAY)         0x9c18
 0x000000000000001c (FINI_ARRAYSZ)       8 (bytes)
 0x000000006ffffef5 (GNU_HASH)           0x300
 0x0000000000000005 (STRTAB)             0xc40
 0x0000000000000006 (SYMTAB)             0x328
 0x000000000000000a (STRSZ)              1781 (bytes)
 0x000000000000000b (SYMENT)             24 (bytes)
 0x0000000000000003 (PLTGOT)             0x9fe8
 0x0000000000000002 (PLTRELSZ)           2184 (bytes)
 0x0000000000000014 (PLTREL)             RELA
 0x0000000000000017 (JMPREL)             0x1860
 0x0000000000000007 (RELA)               0x1458
 0x0000000000000008 (RELASZ)             1032 (bytes)
 0x0000000000000009 (RELAENT)            24 (bytes)
 0x000000006ffffffe (VERNEED)            0x13f8
 0x000000006fffffff (VERNEEDNUM)         2
 0x000000006ffffff0 (VERSYM)             0x1336
 0x000000006ffffff9 (RELACOUNT)          39
 0x0000000000000000 (NULL)               0x0

@benoit-pierre
Copy link
Contributor Author

benoit-pierre commented Jul 10, 2023

Presumably GCC 13 changed 15+ years of behaving as I know it to behave. ¯\_(ツ)_/¯

No, it works fine with GCC 11 too. But I'm on Arch Linux.

@benoit-pierre
Copy link
Contributor Author

No, it's just that -l: needs to go after the input files. I have no idea why you're seeing different behavior. Nor does this have anything to do with crengine! Heh. :-)

The crengine teardown code need if constexpr (…) support -> the android toolchain need to be updated, and so on…

Frenzie added a commit to koreader/koreader-base that referenced this pull request Jul 10, 2023
See discussion in <koreader/koreader#10610 (comment)>. It would seem Arch behaves differently.
@Frenzie
Copy link
Member

Frenzie commented Jul 10, 2023

Ah, that way. I'm grateful to you for taking the time!

Anyway, if you update base in this PR with koreader/koreader-base@c1a5edb it should pass.

@benoit-pierre benoit-pierre force-pushed the pr/android_ndk_update branch from 0524fa7 to 88c6618 Compare July 10, 2023 20:14
@Frenzie
Copy link
Member

Frenzie commented Jul 10, 2023

I suspect your problem was because Ubuntu v11.10's GCC v4.6 enabled -Wl,--as-needed by default, and that made the linker sensitive to the ordering of libraries on the command line.

That probably explains my perspective. Interesting.

@NiLuJe
Copy link
Member

NiLuJe commented Jul 10, 2023

Yeah, we've seen the linking order being either critical (or... just broken ;D) in the past (like, way, way, past), and I don't rightly recall all the details (but there's probably an old PR of me ranting about it somewhere ;p).

(But as-needed shenanigans sounds sensible, I've seen very weird shit happening when mixing some binutils and GCC versions where as-needed is concerned...).

@Frenzie
Copy link
Member

Frenzie commented Jul 10, 2023

@benoit-pierre Anyway, I'll go ahead and merge this in a few minutes once it passes? As I said it's fine locally, so it should be in CI here as well.

@benoit-pierre benoit-pierre marked this pull request as ready for review July 10, 2023 20:39
@Frenzie Frenzie merged commit 3ac8a67 into koreader:master Jul 10, 2023
@benoit-pierre benoit-pierre deleted the pr/android_ndk_update branch July 10, 2023 20:47
@Frenzie
Copy link
Member

Frenzie commented Jul 10, 2023

Some hiccup at the end on the Android builds. I'm not going to go through the arduous ordeal of trying to fix my Android environment tonight, so at least from my end it'll be for tomorrow.
https://gitlab.com/koreader/nightly-builds/-/jobs/4627340427

[*] Install C++ runtime...
cp -fL /home/ko/android-ndk-r23c/toolchains/llvm/prebuilt/linux-x86_64/bin/../sysroot/usr/lib/i686-linux-android/libc++_shared.so koreader-android-/koreader/libs/
Makefile:81: recipe for target 'all' failed

Edit:
and the others for reference
https://gitlab.com/koreader/nightly-builds/-/jobs/4627340426
https://gitlab.com/koreader/nightly-builds/-/jobs/4627340425

@benoit-pierre
Copy link
Contributor Author

The real error is before that:

cp: cannot create regular file 'koreader-android-/koreader/libs/': Not a directory
make: *** [all] Error 1

@benoit-pierre
Copy link
Contributor Author

In your environment, is koreader-android-/koreader/libs a file maybe?

@benoit-pierre
Copy link
Contributor Author

How many CIs does koreader have…

@Frenzie
Copy link
Member

Frenzie commented Jul 10, 2023

That environment is identical to the one in base except base only checks that it compiles while front creates an Android package from the result (but we don't check that here because it all takes way too long).

@Frenzie
Copy link
Member

Frenzie commented Jul 10, 2023

It's also (sufficiently) identical to your local environment normally, but apparently Arch is a wild card. 😅

@Frenzie
Copy link
Member

Frenzie commented Jul 10, 2023

But more to the point, koreader-android-/koreader/libs/ is missing something. Normally that looks something like koreader-android-arm-linux-androideabi or koreader-android-i686-linux-android-debug. Perhaps this has something to do with clang.

@benoit-pierre
Copy link
Contributor Author

Oh, yeah, missed that… and there are errors about the compiler not being found:

bash: armv7a-linux-androideabi18-clang: command not found

@benoit-pierre
Copy link
Contributor Author

I'll try to run build_release.sh locally…

@benoit-pierre
Copy link
Contributor Author

That environment is identical to the one in base except base only checks that it compiles while front creates an Android package from the result (but we don't check that here because it all takes way too long).

I don't know, I think with proper caching it's doable, see the meson branch.

@Frenzie
Copy link
Member

Frenzie commented Jul 10, 2023

I wouldn't want to do it on every single PR regardless, but I suppose it could potentially be interesting if it could be set up to run on a specific tag or something. But generically speaking I'd only want it to run once a night so as not to unnecessarily waste tons of energy, pretty much exactly as it's done right now.

@benoit-pierre
Copy link
Contributor Author

You don't think up-to-date release artifacts for each commit are useful?

On the meson branch, installing is always done with symlinks, so the install can be cached and is small, and running the update rule will create an updated artifact (no need to build when there are only lua changes to the frontend/plugins/base).

@benoit-pierre
Copy link
Contributor Author

Same with running the tests, no need to (re)build anything.

@benoit-pierre
Copy link
Contributor Author

And running the testsuite is much faster.

@mergen3107
Copy link
Contributor

I have 1.2 MB, which has around 30-40 read books (50-60, if including manga volumes).

@mergen3107
Copy link
Contributor

Sorry, wrong ticket

@Frenzie
Copy link
Member

Frenzie commented Jul 10, 2023

You don't think up-to-date release artifacts for each commit are useful?

Not compared to the cost, no. Unless you're talking about manipulating the zip (apk) file directly without involving anything from the Android side of the equation, which might work but you'd probably have to fiddle around with the checksums.

On the meson branch, installing is always done with symlinks, so the install can be cached and is small, and running the update rule will create an updated artifact (no need to build when there are only lua changes to the frontend/plugins/base).

This paints an extremely rosy picture of maven/gradle doing "nothing" for a minute. ;-) Make/ninja can do a multitude as much nothing in less than a second.

Same with running the tests, no need to (re)build anything.

Nothing is rebuilt when running the tests, only when base is updated.

@benoit-pierre
Copy link
Contributor Author

OK, see koreader/koreader-base#1630

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants