Skip to content
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

[Package]: rnote #17655

Closed
1 task done
rhjdvsgsgks opened this issue Aug 17, 2023 · 59 comments · Fixed by #21524
Closed
1 task done

[Package]: rnote #17655

rhjdvsgsgks opened this issue Aug 17, 2023 · 59 comments · Fixed by #21524
Labels
has build issues Package compilation fails package request A new package was requested x11 Issue is related to stuff requiring X11 environment or x11-packages

Comments

@rhjdvsgsgks
Copy link
Contributor

Why is it worth to add this package?

its a modern replacement for xournalpp. using gtk4, may have better touch screen support

Home page URL

No response

Source code URL

https://github.com/flxzt/rnote

Packaging policy acknowledgement

  • I certify that I have read Termux Packaging Policy and understand that my request will be denied in case of violation.

Additional information

seems like it using meson build system. which not avaliable on termux yet

@rhjdvsgsgks rhjdvsgsgks added the package request A new package was requested label Aug 17, 2023
@2096779623 2096779623 added the x11 Issue is related to stuff requiring X11 environment or x11-packages label Aug 17, 2023
@romanovj
Copy link

meson build system. which not avaliable on termux yet

What? Meson works inTermux without problem. Also it's very easy to build on device. Just 36 minutes on SDM662 with 4GB RAM.

Screenshot_20230818-222051_Termux
Screenshot_20230818-224140_Termux_X11

@rhjdvsgsgks
Copy link
Contributor Author

rhjdvsgsgks commented Aug 22, 2023

meson build system. which not avaliable on termux yet

What? Meson works inTermux without problem. Also it's very easy to build on device. Just 36 minutes on SDM662 with 4GB RAM.

did you built it from source? i didnt find meson in any termux repo

i just noticed that meson writen in python. and able to install from pip. sorry for my stupid 😂

@mistune
Copy link

mistune commented Mar 22, 2024

@romanovj can you share which tag version you used to build this? Recent versions does not compile properly.

@romanovj
Copy link

@romanovj can you share which tag version you used to build this? Recent versions does not compile properly.

0.7.1-0.8.1

@EDLLT
Copy link
Contributor

EDLLT commented Aug 19, 2024

Right now, I am compiling RNote for Termux as well.
Some issues I had faced
during the building of RNote, at some point it tries to find gettext, fails so it downloads it itself and tries to compile it(problem being that it's downloading the glibc version)
Simply exporting these variables before compiling fixes the issue

export GETTEXT_DIR=/data/data/com.termux/files/usr/lib/gettext
export GETTEXT_BIN_DIR=/data/data/com.termux/files/usr/bin
export GETTEXT_LIB_DIR=/data/data/com.termux/files/usr/lib
export GETTEXT_INCLUDE_DIR=/data/data/com.termux/files/usr/include

Also I learned the hard way that unlike debian's apt, if one package name is invalid in termux's apt, the whole installation process's cancelled(which is why I had missing dependencies back when I was first attempting to build

@EDLLT
Copy link
Contributor

EDLLT commented Aug 19, 2024

@romanovj can you share which tag version you used to build this? Recent versions does not compile properly.

0.7.1-0.8.1

I've been trying to compile termux the whole day literally
I tried the versions you mentioned, they all had some problem related with cargo, are you able to send me the compiled version or tell me how you managed to compile RNote for termux?

@romanovj
Copy link

@EDLLT read error - fix error, repeat.

@EDLLT
Copy link
Contributor

EDLLT commented Aug 22, 2024

@Doublonmousse made an rnote fork without gettext

https://github.com/Doublonmousse/rnote/blob/no_gettext

It still failed to build unfortunately

no_gettext_rnote.txt

@mistune
Copy link

mistune commented Aug 22, 2024

@EDLLT Are you building this on Termux or Debian proot?

@romanovj
Copy link

@EDLLT Have you read the errors??

@EDLLT
Copy link
Contributor

EDLLT commented Aug 22, 2024

@EDLLT Are you building this on Termux or Debian proot?

Termux, proot is too slow for this

@EDLLT
Copy link
Contributor

EDLLT commented Aug 22, 2024

@EDLLT Have you read the errors??

Of course, I've read the errors. It seems to be a linking problem due to termux's libstd++.
I really wonder how you managed to compile this within native termux

@mistune
Copy link

mistune commented Aug 22, 2024

@EDLLT I've found that rnote performs close to PC performance when used with hardware acceleration, where the best benchmarks come from using proot. I had it working in Fedora proot for a while but it broke after a mesa update. There are some modified builds of mesa drivers here for Debian. I tried compiling for Debian back then but for some reason Termux would just shutdown near the end.

@romanovj
Copy link

Termux would just shutdown near the end.

OOM because of LTO, I guess

@EDLLT
Copy link
Contributor

EDLLT commented Aug 22, 2024

@EDLLT I've found that rnote performs close to PC performance when used with hardware acceleration, where the best benchmarks come from using proot. I had it working in Fedora proot for a while but it broke after a mesa update. There are some modified builds of mesa drivers here for Debian. I tried compiling for Debian back then but for some reason Termux would just shutdown near the end.

I already managed to compile it for proot. I faced the same problem as you, after investigating, it appears that proot is using so much memory while compiling(over 12GB) that the whole OS crashes. I managed to compile it by using a docker container emulating arm64 on my x86_64 machine(took over 12 hours just compiling lol)

Then I tested it in my Ubuntu proot with turnip hardware acceleration and it wasnt a smooth experience although it worked(I have large mindmaps)

I also compared the performance of STK in proot vs native termux(both with hw acceleration) and the performance difference was huge(especially when it comes to reading data and overall performance)

@mistune
Copy link

mistune commented Aug 22, 2024

@EDLLT Can you share the deb file? I would like to try it on my tablet. If not I might try replicating it on a docker container if I am able to find the time.

I remember changing some of the flags for mesa that helped speed things up but it was more of a hack than understanding what was actually happening, hence giving up on rnote for termux. :D

EDIT: What device are you using?

@EDLLT
Copy link
Contributor

EDLLT commented Aug 22, 2024

@EDLLT Can you share the deb file? I would like to try it on my tablet. If not I might try replicating it on a docker container if I am able to find the time.

I remember changing some of the flags for mesa that helped speed things up but it was more of a hack than understanding what was actually happening, hence giving up on rnote for termux. :D

EDIT: What device are you using?

Sure, will do share it once I get on my pc
Xiaomi pad 6

@romanovj
Copy link

@EDLLT Have you read the errors??

Of course, I've read the errors. It seems to be a linking problem due to termux's libstd++. I really wonder how you managed to compile this within native termux

With nm you can find those symbols in libc++abi.a and in termux repo you can find that -lc++_static -lc++abi are happy to be together.

RUSTFLAGS='-C link-args=-lc++abi' meson compile -C _mesonbuild

Also, remove lto = "fat" from Cargo.toml If you don't have 16GB ram

@EDLLT
Copy link
Contributor

EDLLT commented Aug 22, 2024

@EDLLT Have you read the errors??

Of course, I've read the errors. It seems to be a linking problem due to termux's libstd++. I really wonder how you managed to compile this within native termux

With nm you can find those symbols in libc++abi.a and in termux repo you can find that -lc++_static -lc++abi are happy to be together.

RUSTFLAGS='-C link-args=-lc++abi' meson compile -C _mesonbuild

Also, remove lto = "fat" from Cargo.toml If you don't have 16GB ram

Ok I have two results

First, I tried compiling a fork of RNote that doesn't have gettext https://github.com/Doublonmousse/rnote/tree/no_gettext
It compiled successfully; However, when attempting to execute rnote, it gives the following error

~/.../target/release $ ./rnote
libc++abi: terminating due to uncaught exception of type std::bad_cast: std::bad_cast
Aborted

Since it's saying std bad_cast, I am assuming that removing gettext broke RNote somehow

So then, I tried to compile the original RNote main branch instead using the following

RUSTFLAGS='-C link-args=-lc++abi' CFLAGS="-Wno-error=incompatible-function-pointer-types -Wno-error=implicit-function-declaration -Wno-int-conversion" RUST_BACKTRACE=full CARGO_PROFILE_DEV_BUILD_OVERRIDE_DEBUG=true meson compile -C _mesonbuild --verbose

That failed to compile giving me the following error

error: linking with `cc` failed: exit status: 1
  |
  = note: LC_ALL="C" PATH="/data/data/com.termux/files/usr/lib/rustlib/aarch64-linux-android/bin:/data/data/com.termux/files/usr/lib/rustlib/aarch64-linux-android/bin:/data/data/com.termux/files/usr/lib/rustlib/aarch64-linux-android/bin:/data/data/com.termux/files/usr/bin" VSLANG="1033" "cc" "/data/data/com.termux/files/usr/tmp/rustcXb7LR0/symbols.o" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/rnote-14c1625c12089240.rnote.29b9b103ea186d-cgu.0.rcgu.o" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/rnote-14c1625c12089240.1g77xh5ixoi5p6pvt8bc53yyg.rcgu.o" "-Wl,--as-needed" "-L" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps" "-L" "/data/data/com.termux/files/usr/lib" "-L" "/data/data/com.termux/files/usr/lib" "-L" "/data/data/com.termux/files/usr/lib" "-L" "/data/data/com.termux/files/usr/lib" "-L" "/data/data/com.termux/files/usr/lib" "-L" "/data/data/com.termux/files/usr/lib" "-L" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/build/gettext-sys-f624cfbc3f13d011/out/lib" "-L" "/data/data/com.termux/files/usr/lib" "-L" "/data/data/com.termux/files/usr/lib" "-L" "/data/data/com.termux/files/usr/lib" "-L" "/data/data/com.termux/files/usr/lib" "-L" "/data/data/com.termux/files/usr/lib" "-L" "/data/data/com.termux/files/usr/lib" "-L" "/data/data/com.termux/files/usr/lib" "-L" "/data/data/com.termux/files/usr/lib" "-L" "/data/data/com.termux/files/usr/lib" "-L" "/data/data/com.termux/files/usr/lib" "-L" "/data/data/com.termux/files/usr/lib" "-L" "/data/data/com.termux/files/usr/lib" "-L" "/data/data/com.termux/files/usr/lib" "-L" "/data/data/com.termux/files/usr/lib" "-L" "/data/data/com.termux/files/usr/lib" "-L" "/data/data/com.termux/files/usr/lib" "-L" "/data/data/com.termux/files/usr/lib" "-L" "/data/data/com.termux/files/usr/lib" "-L" "/data/data/com.termux/files/usr/lib" "-L" "/data/data/com.termux/files/usr/lib" "-L" "/data/data/com.termux/files/usr/lib" "-L" "/data/data/com.termux/files/usr/lib" "-L" "/data/data/com.termux/files/usr/lib" "-L" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/build/oboe-sys-f9fa86aa30b94802/out/library" "-L" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/build/oboe-sys-f9fa86aa30b94802/out/library" "-L" "/data/data/com.termux/files/usr/lib/rustlib/aarch64-linux-android/lib" "-Wl,-Bstatic" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libtracing_subscriber-c33bd132297d77db.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libnu_ansi_term-a9270eef758c719e.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/liboverload-2e52aee8074850ae.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libsharded_slab-e18a395803ca538d.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libmatchers-07a00ad68d4700cd.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libregex_automata-1fcd5f7beedfcbc6.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libregex_syntax-3b6f774f2adf990f.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libthread_local-708ece2c20b455cd.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libtracing_log-6c6e9bb41cde8133.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libnumeric_sort-aee430a890fc12a5.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libfs_extra-2a369f2ec756f726.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libasync_fs-56ec89fe847ade4c.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libblocking-704dd69d5ca3728c.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libpiper-ce46264240650fc6.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libatomic_waker-d6263a07c98ab2aa.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libfutures_lite-7e92e962732432ce.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libfastrand-c0ae0ccb18498b10.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libasync_task-eba29d9ace20ca38.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libasync_channel-1c9dd217cce5ab4b.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libconcurrent_queue-dd17d1646992a5a3.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libasync_lock-29da5c49bb6dbd43.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libevent_listener_strategy-e67538b4414d5f3c.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libevent_listener-14d788cdf776c0e4.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libparking-27beef8b68863022.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libopen-8d5038cf028fa72c.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libpathdiff-3aad2790caaaa807.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libis_wsl-c6244286b3275e55.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libis_docker-203784a6c0f96d53.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libpath_absolutize-c7f5a7c00d190c44.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libpath_dedot-47e46313b0f01979.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libnotify_debouncer_full-8307872a0878933a.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libnotify-ce90f945012356f8.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libmio-eabe138737672ab1.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libcrossbeam_channel-ada5971a55ae416a.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libfiletime-5a29f3753a9af920.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libwalkdir-4a2c34422b499a03.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libsame_file-6993192e8097a653.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libinotify-f0ae43e5046e3dad.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libinotify_sys-5c137041f24e684d.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libfile_id-062337961441a8a0.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/librnote_engine-90317b0cb0e541f3.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libchrono-3ac3442b0b821336.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libandroid_tzdata-cc24a7260f787ff7.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libiana_time_zone-77be393c378b425d.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libandroid_system_properties-9df18fc918c33b42.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libpoppler-6a845f38b93a07e5.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libpoppler_sys-0286b936f3954d42.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/librsvg-154c10e0ca2f52e7.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/librctree-8884abce0e2fc9a3.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libimage-0e9cd85ccad4d9cb.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libxml5ever-c5eda7435c4b59a7.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libcast-c3fb886489d6943c.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libnalgebra-0d55eaaebd665082.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libsimba-52bd58d195f3cd21.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libselectors-42038dc2900de692.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libservo_arc-8d17c8dae1eb4cb0.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libstable_deref_trait-c8a11179ebe616c1.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libfxhash-3d47b40ad95fb162.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libmarkup5ever-bc022b0e5cabc188.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libstring_cache-ec15a37d387c494e.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libprecomputed_hash-17d171bb1fef0608.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libparking_lot-0c2eb94b2737c741.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libparking_lot_core-fd1b3b5cbf4490ec.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/liblock_api-a4a9ee495bc452ba.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libscopeguard-6dec8015ea1a9e10.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libphf-3e01b4854937a5d5.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libphf_shared-fb069f45470df2b2.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libtendril-c598e01c744cb9c1.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libutf8-86183d3a7f2e1a6b.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libfutf-cc658747c4efe0b3.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libmac-5f2603f249605fce.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/liburl-6e66f2d98b155714.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libidna-38214559118397a6.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libunicode_normalization-4ea3e023fe95e5fd.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libform_urlencoded-83d4a07eda40b7e2.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libpercent_encoding-4b5cf47cf2efb57f.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libcssparser-78e889b3c5a5f284.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libdtoa_short-1597efdb0dd02f28.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libdtoa-18fb0dcdf2fe5227.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/liblanguage_tags-3883cc1aa6f8bf48.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libusvg-8512084dc8a347f6.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libunicode_bidi-df6f78b8b04a1a80.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libunicode_vo-af3774273cc81193.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libimagesize-263894d618b8ea25.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libdata_url-fff2bd32da1c8826.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/librustybuzz-ccdb1285a82a5cae.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libunicode_bidi_mirroring-b9a7ea252b50cbb7.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libunicode_script-fec0d6b0c5723cb7.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libunicode_ccc-2d62a10baf2c6c18.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libunicode_properties-64105106b9232c73.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libsimplecss-785b2d60e733b37f.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libtiny_skia_path-d606e3bd4da39c22.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libarrayref-2752fe47828946a8.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libstrict_num-4705d2a81938fcc4.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libfloat_cmp-caf4d699c6f5f13b.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libsvgtypes-522448d2931d144b.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libkurbo-66a0225767cbab9d.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libsiphasher-ed9d8983f485fd3c.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libfontdb-a657b5b2315c76f6.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libmemmap2-3458d8d80db4642c.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libtinyvec-b3fde4800a4cbf5c.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libtinyvec_macros-60110a8f8216764c.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libttf_parser-b9c4e261dc17083d.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libxmlwriter-53e06086e72983fb.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libsemver-09edb8fe3887ea33.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libijson-16dc115157b110b0.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libserde_json-a40e9387f0ca1a92.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libitoa-8275ab89515fcd6d.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libryu-8598cd10dd71eb03.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libdashmap-7a20c7e38b040ceb.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libnum_cpus-14b85bf4abc29d17.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libitertools-fff70dee4287b233.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libgeo-47445cbb06ceae13.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libfloat_next_after-25ec1c9ad35e8031.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libearcutr-7135a3da5ae41511.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libitertools-9955a0ef2cc560b2.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libspade-48179711747d9e13.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libhashbrown-d47e4c20a880b0fc.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libahash-1b23d8142a455652.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/liballocator_api2-079cadd918fd23b5.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libgeographiclib_rs-52b53b181917c5c6.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/liblibm-b7365a45f1fafd00.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/librobust-b7c1d90a2993c6cd.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libgeo_types-9d04b07ff62ec1e5.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/librstar-4137c628bbd7e33d.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libheapless-41038efd7a6deefe.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libhash32-8d6ed4da25621fa6.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libimage-ecb3e9bb4620e6f0.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libimage_webp-c3a796365666e388.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libqoi-cef7c12287908cdf.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libpng-775a24488a380c92.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libfdeflate-68289e10d4b8e6c2.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libexr-a7be5a25c035d2f4.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libflume-69835ea2d450bd4c.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libminiz_oxide-6b960d1c5ca5cca4.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libzune_inflate-6d27e0388797f0b3.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libsimd_adler32-7a0c48b8b3f332b5.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libbit_field-f626f078004f015c.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/liblebe-a372db14ae53d45d.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libhalf-2c5ff7ed8de5a768.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libzune_jpeg-898965498f0b2be9.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libzune_core-ce07bdd43f77722d.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libgif-e10b770e90f96015.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libcolor_quant-4b4692671e56350a.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libbyteorder_lite-ef27f633b8d9a258.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libravif-25a87857ea8ec4b2.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libloop9-b6fbb6bcbb770d2a.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libavif_serialize-6c7b1cc40943410a.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libquick_error-3d6bbf987f91400e.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/librgb-173724212a8eb6e9.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/librav1e-5aa2770e7a485730.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libprofiling-c5ed5569714f51d6.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libav1_grain-aa64d0a4c730af3d.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libnom-0dd3aa4cdba078f1.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libdebug_unreachable-c6d5a1414a4ef001.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libmaybe_rayon-c3c4cabd56a0f7b1.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libv_frame-c50620dd38e32a35.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libaligned_vec-346e5f3a0ad13da1.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libbitstream_io-32e507cfcd71c2ba.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libitertools-c2ba4dd9ed38bdd7.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libimgref-e3081e6ea9203ed6.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libtiff-42c9ddefcec08069.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libflate2-5ea9c4b60ee43a38.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libminiz_oxide-b0f42a9d904ee76d.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libadler2-0b915648d889b959.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libcrc32fast-4a737f62e3a9dbb0.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libweezl-d336a2ccaf83035c.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libjpeg_decoder-364d6a25068797a8.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libunicode_segmentation-8ee46fcf7452aff4.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libroxmltree-867dd3fdf7431c99.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libslotmap-79531aa0cf4e1b79.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/librayon-f9f901dd7800e1c7.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/librayon_core-63b268463b279aec.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libcrossbeam_deque-ad1d9fd4b22027c0.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libcrossbeam_epoch-6475e7715622b3ee.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libcrossbeam_utils-94be7fc07175be2d.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libfutures-f214e41120ef5130.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/librodio-b5bfba9dac79e45f.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libsymphonia-0988e81dba65ff6d.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libsymphonia_format_riff-09f8bac09f3378ca.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libsymphonia_metadata-59818860aca0f161.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libencoding_rs-307377435bda0d36.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libsymphonia_codec_pcm-5944cbd75c302abc.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libsymphonia_codec_adpcm-e95861f3c182e1a9.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libsymphonia_core-60f5622f60cc1120.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libbitflags-8e570d66057ccd70.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libcpal-2b96f755e26427b0.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libdasp_sample-00dd4fcf9680314a.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/liboboe-d41ad39abd691be7.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libndk_context-4355ef0d8e2d65a2.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libjni-d296a962e1a6aca5.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libcesu8-5f9f84adfecacbd6.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libcombine-82f10940e2302f60.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libbytes-4428532bfc45ef5a.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libjni_sys-733f7098b966a53c.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/liboboe_sys-08dc9111bb786e7b.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/librnote_compose-1c9b719709e4d798.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/librand_pcg-b41fbc86fba72f14.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libsvg-d42e82c6a7556685.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/librough_piet-e438c641a4c211d3.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libpiet_cairo-c28ad45bcb6b6f6a.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libpangocairo-d3853f23e17aab94.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libpango_cairo_sys-ddd8086048105624.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/librand_distr-76733fdefb7b2e66.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libroughr-5627c0893ee4f550.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libsvg_path_ops-57aa1037ab8ca2b3.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libsvgtypes-7a7a042ec24d1b00.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libpoints_on_curve-73622d987a1cc9cf.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/librand-2464d5688992ecd8.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/librand_chacha-7e006c1b2af14aa8.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libppv_lite86-ca3b7037923162bc.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libzerocopy-98b7753fc7717da4.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libbyteorder-3887b89728383939.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/librand_core-c0eecdb977b10133.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libgetrandom-c21fce795b12385e.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libcfg_if-f5069ffde67b497c.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libeuclid-54a313b9f906cf7f.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libderive_builder-16c0a7305554732b.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libbase64-49ba3fc1aa609fb5.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libpalette-5a54f3653c72365c.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libfast_srgb8-7bf7132969daab04.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libphf-0321e5bc36d4e552.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libphf_shared-f42ed3066e4dc842.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libsiphasher-681e3d68bb03b884.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libanyhow-4a54fefffea1de04.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libtracing-8db335a7d4281fa1.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libtracing_core-12df4de97ad97276.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libonce_cell-a4903ba428a9dad3.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libink_stroke_modeler_rs-9c22b08a5d4235fc.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libpiet-7f200df1d3d1c0a8.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libunic_bidi-2612745deb6e2871.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libunic_ucd_bidi-48e75844175ff14d.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libunic_ucd_version-98596ba38c6ca4e5.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libunic_common-5b1dc734bf32ce77.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libunic_char_property-2e40eb491b68380f.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libunic_char_range-6203bfb9622bf546.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libmatches-3987469c2db2a684.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libkurbo-d78f56caa20df55a.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libgettextrs-e875dbb49daa79fb.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libgettext_sys-13fd19455b6968ec.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/liblocale_config-00700789bf630734.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libregex-cc86a2c5668f6e30.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libregex_automata-510c9994230fe520.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libaho_corasick-bfa2227f0a6907ff.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libregex_syntax-ccbbd0f53e39b1f1.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/liblazy_static-b012cada8738bb2d.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/liblibadwaita-5bbedf557b1a748d.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libgtk4-09308654af549325.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libgsk4-a7a4ad4d28aac52b.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libgraphene-6b43a7e0d67994d0.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libfield_offset-af2115fbfc4b7910.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libmemoffset-43ec2d28eb3a321b.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libgdk4-9a5a4d948f5472fa.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libpango-a5541e8909244953.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libgdk_pixbuf-19060fc42f9f8553.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libgio-31d6a4edba375b29.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libcairo-629bd42dca913438.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libglib-e974192f631b0652.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libfutures_executor-2d43c87278f88e2a.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libsmallvec-ed0ef81a95b9803d.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libfutures_util-c9f86bc4fae616a6.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libmemchr-380d0c0ea82bcd04.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libfutures_io-34d235f424ac8d67.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libslab-d503bd34fea343e3.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libpin_project_lite-f4c85ad23689c24a.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libpin_utils-9449b920fb1e0d65.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libfutures_task-e88cc2506fbf98d0.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libfutures_channel-a438b78766413860.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libfutures_sink-16e4f5ee9894deb0.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libfutures_core-72efa2819bdc0436.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/liblibadwaita_sys-d1a583cc707dcb25.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libgtk4_sys-8f77fd402e72d44e.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libgsk4_sys-86f7a91a54d743cc.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libgraphene_sys-ae6c06fdd7f8c326.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libgdk4_sys-0fa46852b3fd5c35.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libpango_sys-d9d2d65f6bffdcf8.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libgdk_pixbuf_sys-f297763e70a26c02.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libgio_sys-0e6d4b02a18b29a5.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libgobject_sys-99147fe1f7885b29.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libcairo_sys-6b8beef28cd64f85.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libglib_sys-2bd370fa7f3efb15.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/liblibc-9d52dede647b86f1.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libparry2d_f64-72202c2617d105e7.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libthiserror-1e89da6fab34956b.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libbitflags-5643f357b372aeb4.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/librustc_hash-c5981fc838a18e2a.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libordered_float-49bbea5c3230444a.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/liblog-7c2492a040af408c.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libdowncast_rs-2a60237fab53c89c.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libarrayvec-ab695ca0353f8d3f.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libeither-163fd7e07f17af3b.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libnalgebra-0f87b23eb88d3e02.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libmatrixmultiply-501bf9202dd9f45e.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/librawpointer-f573664a275bfa1c.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libnum_rational-a099ddd62fb02b32.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libnum_bigint-58d6627f11e7a332.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libnum_integer-fcd8ee44ec384f1b.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libtypenum-5306095b1915f6e9.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libsimba-21f926e45bdfabbb.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libwide-6a4d2137cc00690e.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libsafe_arch-32e9047d8255dcaa.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libbytemuck-bd91c096278e9f88.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libnum_complex-db9c1c8fdf0d3cb8.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libapprox-665f6c5c38b23fed.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libnum_traits-fe0733a966797bbc.rlib" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libserde-77b0b520b0ea6300.rlib" "/data/data/com.termux/files/usr/lib/rustlib/aarch64-linux-android/lib/libstd-69439589cd1c61a5.rlib" "/data/data/com.termux/files/usr/lib/rustlib/aarch64-linux-android/lib/libpanic_unwind-2caf8455bf41dd69.rlib" "/data/data/com.termux/files/usr/lib/rustlib/aarch64-linux-android/lib/libobject-afccce159b22e49c.rlib" "/data/data/com.termux/files/usr/lib/rustlib/aarch64-linux-android/lib/libmemchr-4da2f6148ba93c83.rlib" "/data/data/com.termux/files/usr/lib/rustlib/aarch64-linux-android/lib/libaddr2line-27d551c021052e76.rlib" "/data/data/com.termux/files/usr/lib/rustlib/aarch64-linux-android/lib/libgimli-fe5f12559aa93044.rlib" "/data/data/com.termux/files/usr/lib/rustlib/aarch64-linux-android/lib/librustc_demangle-b268a2c9d9717ed3.rlib" "/data/data/com.termux/files/usr/lib/rustlib/aarch64-linux-android/lib/libstd_detect-10d546ea063fc343.rlib" "/data/data/com.termux/files/usr/lib/rustlib/aarch64-linux-android/lib/libhashbrown-102697f00fd01586.rlib" "/data/data/com.termux/files/usr/lib/rustlib/aarch64-linux-android/lib/librustc_std_workspace_alloc-f567200e60526553.rlib" "/data/data/com.termux/files/usr/lib/rustlib/aarch64-linux-android/lib/libminiz_oxide-08fc0740e85cb37e.rlib" "/data/data/com.termux/files/usr/lib/rustlib/aarch64-linux-android/lib/libadler-eb95609d811acebe.rlib" "/data/data/com.termux/files/usr/lib/rustlib/aarch64-linux-android/lib/libunwind-5ff8a369886ea52e.rlib" "/data/data/com.termux/files/usr/lib/rustlib/aarch64-linux-android/lib/libcfg_if-3c682a0588a963ed.rlib" "/data/data/com.termux/files/usr/lib/rustlib/aarch64-linux-android/lib/liblibc-31cc6e8b4abaf9b6.rlib" "/data/data/com.termux/files/usr/lib/rustlib/aarch64-linux-android/lib/liballoc-b5f9bbe95c38863b.rlib" "/data/data/com.termux/files/usr/lib/rustlib/aarch64-linux-android/lib/librustc_std_workspace_core-2160ba0a2a5cfc99.rlib" "/data/data/com.termux/files/usr/lib/rustlib/aarch64-linux-android/lib/libcore-dd9c6a7cfbc57cfb.rlib" "/data/data/com.termux/files/usr/lib/rustlib/aarch64-linux-android/lib/libcompiler_builtins-8d60b659a29a5926.rlib" "-Wl,-Bdynamic" "-lpoppler" "-lpoppler-glib" "-lgobject-2.0" "-lglib-2.0" "-lcairo" "-lcairo-gobject" "-lz" "-lpng16" "-lgio-2.0" "-lxml2" "-lpangocairo-1.0" "-lcairo" "-lpangoft2-1.0" "-lpango-1.0" "-lgobject-2.0" "-lglib-2.0" "-lharfbuzz" "-lfontconfig" "-lfreetype" "-lc++_static" "-llog" "-lOpenSLES" "-lpangocairo-1.0" "-lpango-1.0" "-lgobject-2.0" "-lglib-2.0" "-lharfbuzz" "-lcairo" "-lgobject-2.0" "-ladwaita-1" "-lgtk-4" "-lpangocairo-1.0" "-lpango-1.0" "-lharfbuzz" "-lgdk_pixbuf-2.0" "-lcairo-gobject" "-lcairo" "-lgraphene-1.0" "-lgio-2.0" "-lgobject-2.0" "-lglib-2.0" "-lgtk-4" "-lpangocairo-1.0" "-lpango-1.0" "-lharfbuzz" "-lgdk_pixbuf-2.0" "-lcairo-gobject" "-lcairo" "-lgraphene-1.0" "-lgio-2.0" "-lgobject-2.0" "-lglib-2.0" "-lgtk-4" "-lpangocairo-1.0" "-lpango-1.0" "-lharfbuzz" "-lgdk_pixbuf-2.0" "-lcairo-gobject" "-lcairo" "-lgraphene-1.0" "-lgio-2.0" "-lgobject-2.0" "-lglib-2.0" "-lgraphene-1.0" "-lgobject-2.0" "-lglib-2.0" "-lgtk-4" "-lpangocairo-1.0" "-lpango-1.0" "-lharfbuzz" "-lgdk_pixbuf-2.0" "-lcairo-gobject" "-lcairo" "-lgraphene-1.0" "-lgio-2.0" "-lgobject-2.0" "-lglib-2.0" "-lpango-1.0" "-lgobject-2.0" "-lglib-2.0" "-lharfbuzz" "-lgdk_pixbuf-2.0" "-lgobject-2.0" "-lglib-2.0" "-lgio-2.0" "-lgobject-2.0" "-lglib-2.0" "-lgobject-2.0" "-lglib-2.0" "-lcairo-gobject" "-lcairo" "-lgobject-2.0" "-lglib-2.0" "-lgobject-2.0" "-lglib-2.0" "-ldl" "-llog" "-lunwind" "-ldl" "-lm" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-L" "/data/data/com.termux/files/usr/lib/rustlib/aarch64-linux-android/lib" "-o" "/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/rnote-14c1625c12089240" "-Wl,--gc-sections" "-pie" "-Wl,-z,relro,-z,now" "-Wl,-O1" "-nodefaultlibs" "-lc++abi"
  = note: ld.lld: error: undefined symbol: libiconv_open
          >>> referenced by dcigettext.c:0 (/data/data/com.termux/files/usr/tmp/t1062-0/gettext/gettext-tools/../gettext-runtime/intl/dcigettext.c:0)
          >>>               dcigettext.o:(_nl_find_msg) in archive /data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libgettext_sys-13fd19455b6968ec.rlib

          ld.lld: error: undefined symbol: libiconv
          >>> referenced by dcigettext.c:1384 (/data/data/com.termux/files/usr/tmp/t1062-0/gettext/gettext-tools/../gettext-runtime/intl/dcigettext.c:1384)
          >>>               dcigettext.o:(_nl_find_msg) in archive /data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/deps/libgettext_sys-13fd19455b6968ec.rlib
          cc: error: linker command failed with exit code 1 (use -v to see invocation)


error: could not compile `rnote` (bin "rnote") due to 1 previous error
cargo call failed, code 25856
[40/41] /data/data/com.termux/files/usr/bin/meson --internal msgfmthelper --msgfmt=/data/data/com.termux/files/usr/bin/msgfmt crates/rnote-ui/data/app.metainfo.xml.in crates/rnote-ui/data/com.github.flxzt.rnote.metainfo.xml xml ../crates/rnote-ui/data/../po
FAILED: rnote
/data/data/com.termux/files/usr/bin/python3.11 /data/data/com.termux/files/home/src/rnote/build-aux/cargo_build.py /data/data/com.termux/files/home/src/rnote/_mesonbuild /data/data/com.termux/files/home/src/rnote CARGO_HOME=/data/data/com.termux/files/home/src/rnote/_mesonbuild/cargo-home /data/data/com.termux/files/usr/bin/cargo '--manifest-path /data/data/com.termux/files/home/src/rnote/Cargo.toml --target-dir /data/data/com.termux/files/home/src/rnote/_mesonbuild/target -p rnote --release' /data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release/rnote /data/data/com.termux/files/home/src/rnote/_mesonbuild/rnote
ninja: build stopped: subcommand failed.

@EDLLT
Copy link
Contributor

EDLLT commented Aug 22, 2024

@EDLLT
RUSTFLAGS='-C link-args=-lc++abi -C link-args=-liconv'

For which RNote? The main RNote or the fork without gettext?

@romanovj
Copy link

@EDLLT wrote from second acc.

@EDLLT
RUSTFLAGS='-C link-args=-lc++abi -C link-args=-liconv'

For which RNote? The main RNote or the fork without gettext?

for standart rnote, because of ld.lld: error: undefined symbol: libiconv

@EDLLT
Copy link
Contributor

EDLLT commented Aug 23, 2024

@EDLLT wrote from second acc.

@EDLLT
RUSTFLAGS='-C link-args=-lc++abi -C link-args=-liconv'

For which RNote? The main RNote or the fork without gettext?

for standart rnote, because of ld.lld: error: undefined symbol: libiconv

Okay so, it compiled(main branch flxzt's rnote)
But it's giving me the same error std::bad_cast error

~/.../target/release $ ./rnote 
libc++abi: terminating due to uncaught exception of type std::bad_cast: std::bad_cast
Aborted
~/.../target/release $ pwd
/data/data/com.termux/files/home/src/rnote/_mesonbuild/target/release
~/.../target/release $ git branch
* main
~/.../target/release $ git remote -v
origin	https://github.com/flxzt/rnote (fetch)
origin	https://github.com/flxzt/rnote (push)

Full log of everything I had done:
main-branch_rnote_compilation.md

@romanovj
Copy link

maybe ndk-27 isn't good for this

@EDLLT
Copy link
Contributor

EDLLT commented Aug 23, 2024

maybe ndk-27 isn't good for this

If I try to build it using the termux package builder, do you think it'd work?

@Biswa96
Copy link
Member

Biswa96 commented Aug 23, 2024

I have added the rnote build script in above PR. Please feel free to modify it to fix the build issue.

@EDLLT
Copy link
Contributor

EDLLT commented Aug 29, 2024

@EDLLT Can you share the deb file? I would like to try it on my tablet. If not I might try replicating it on a docker container if I am able to find the time.

I remember changing some of the flags for mesa that helped speed things up but it was more of a hack than understanding what was actually happening, hence giving up on rnote for termux. :D

EDIT: What device are you using?

I don't know how to create a .deb file but I released it here with its binaries(Note: This is for proot ONLY)
https://github.com/EDLLT/rnote/releases/tag/rnote_0.11.0

@EDLLT
Copy link
Contributor

EDLLT commented Sep 10, 2024

@TomJo2000

with 27 ndk

./rnote
libc++abi: terminating due to uncaught exception of type std::bad_cast: std::bad_cast
Aborted

I think I have a shot at successfully compiling it. Right now, I managed to get termux-packages to work in native termux then installed all the dependencies that are unsafe to build on device through my pc
Now I'm trying to compile the non-gettext version of rnote using termux packages on my android device itself. Hopefully it'll work this time

Edit: Didn't work
I will try again using termux packages but this time with the liconv and abi variables you had told me earlier

@EDLLT
Copy link
Contributor

EDLLT commented Sep 10, 2024

So... how do I switch to this old ndk?

I'm gonna mention again that changing the NDK for a package is extremely uncommon, and should only be done if absolutely necessary.

We have a termux_setup_toolchain_23c utility function. https://github.com/termux/termux-packages/blob/master/scripts/build/toolchain/termux_setup_toolchain_23c.sh But it seems to be fully redundant at this point and is not used in any package builds.

Please just clearly and concisely state what issue(s) you are running into when trying to compile rnote so someone can take a look at that.

I have no idea what to try out next(I tried everything I know, building on pc using termux packages, building in proot, building in android, building in android with termux packages

In pc using termux packages it gives out these errors when trying to compile from #21218

  = note: ld: error: /data/data/com.termux/files/usr/lib/libgobject-2.0.so is incompatible with elf64-x86-64
          ld: error: /data/data/com.termux/files/usr/lib/libgio-2.0.so is incompatible with elf64-x86-64
          ld: error: /data/data/com.termux/files/usr/lib/libgobject-2.0.so is incompatible with elf64-x86-64
          ld: error: /data/data/com.termux/files/usr/lib/libglib-2.0.so is incompatible with elf64-x86-64
          ld: error: /data/data/com.termux/files/usr/lib/libgobject-2.0.so is incompatible with elf64-x86-64
          ld: error: /data/data/com.termux/files/usr/lib/libglib-2.0.so is incompatible with elf64-x86-64
          ld: error: /data/data/com.termux/files/usr/lib/libgobject-2.0.so is incompatible with elf64-x86-64
          ld: error: /data/data/com.termux/files/usr/lib/libglib-2.0.so is incompatible with elf64-x86-64
          collect2: error: ld returned 1 exit status

How do I make termux packages use the older NDK? Do I simply run that script you had supplied?

@EDLLT
Copy link
Contributor

EDLLT commented Sep 12, 2024

@TomJo2000

with 27 ndk

./rnote
libc++abi: terminating due to uncaught exception of type std::bad_cast: std::bad_cast
Aborted

I just made a breakthrough(I think)

Click to expand Context: I attempted to build in termux packages but this time for x86_64 architecture. from that experiment, I got the exact same set of errors I had faced back when I was compiling natively on termux The gettext issue resurfaced and it wasn't able to find the correct -lintl flag when compiling

So then I supplied it with the no gettext version then it gave me the same operator delete errors
If my prediction is correct, after I supply it with the correct flags to make it compile, it will give me the bad cast error but this time on my x86_64 avd

This means that compiling using termux packages has no inherent advantage(in terms of getting it working) instead of compiling natively.
This means that what I should investigate is why I am getting std bad cast(because even if I manage to get it to compile using termux packages, I am guessing that I will get that exact same error)

The TLDR is that I tried to compile for x86_64 architecture using termux packages to test on an x86_64 android virtual device. I faced the exact same errors(gettext lintl error, libc++ error, liconv error) then after I managed to compile it using what I had learnt earlier, I discovered that for some reason it's using a lot of libraries in /system/lib64 instead of termux's(at least on the x86_64 avd)

So I supplied it with LD_LIBRARY_PATH and now I am no longer getting the std badcast error

LD_LIBRARY_PATH=$PREFIX/lib ./rnote
CANNOT LINK EXECUTABLE "./rnote": cannot locate symbol "eglDestroySyncKHR" referenced by "/system/lib64/libgui.so"...

I tried doing the same in my arm64 device and I no longer get the std badcast error there either
So I am assuming that it was using the wrong libraries this whole time causing that std badcast error

@EDLLT
Copy link
Contributor

EDLLT commented Sep 12, 2024

@TomJo2000
with 27 ndk

./rnote
libc++abi: terminating due to uncaught exception of type std::bad_cast: std::bad_cast
Aborted

I just made a breakthrough(I think)

Click to expand
Context: I attempted to build in termux packages but this time for x86_64 architecture. from that experiment, I got the exact same set of errors I had faced back when I was compiling natively on termux The gettext issue resurfaced and it wasn't able to find the correct -lintl flag when compiling
So then I supplied it with the no gettext version then it gave me the same operator delete errors If my prediction is correct, after I supply it with the correct flags to make it compile, it will give me the bad cast error but this time on my x86_64 avd

This means that compiling using termux packages has no inherent advantage(in terms of getting it working) instead of compiling natively. This means that what I should investigate is why I am getting std bad cast(because even if I manage to get it to compile using termux packages, I am guessing that I will get that exact same error)

The TLDR is that I tried to compile for x86_64 architecture using termux packages to test on an x86_64 android virtual device. I faced the exact same errors(gettext lintl error, libc++ error, liconv error) then after I managed to compile it using what I had learnt earlier, I discovered that for some reason it's using a lot of libraries in /system/lib64 instead of termux's(at least on the x86_64 avd)

So I supplied it with LD_LIBRARY_PATH and now I am no longer getting the std badcast error

LD_LIBRARY_PATH=$PREFIX/lib ./rnote
CANNOT LINK EXECUTABLE "./rnote": cannot locate symbol "eglDestroySyncKHR" referenced by "/system/lib64/libgui.so"...

I tried doing the same in my arm64 device and I no longer get the std badcast error there either So I am assuming that it was using the wrong libraries this whole time causing that std badcast error

I think I get what the issue is now, this egl error is very similar to an error that I was facing back when I was trying to compile gioui from go for termux. Whenever I tried to build it for android, it was building it in such a waythat it would work only if it was compiled as part of an APK rendering as an android app instead of an X11 environment. I never really figured out how to get gioui to compile properly either but at least I think I know where the issue stems from
If someone knows how to fix this, please let me know

@TomJo2000
Copy link
Member

Right, I think we're getting somewhere.
Would you mind sharing your build.sh file so I can have a look at it?

From the error it sounds like we're just missing a dependency.

@EDLLT
Copy link
Contributor

EDLLT commented Sep 12, 2024

I think I get what the issue is now, this egl error is very similar to

build.sh

TERMUX_PKG_HOMEPAGE="https://github.com/flxzt/rnote"
TERMUX_PKG_DESCRIPTION="A simple drawing application to create handwritten notes"
TERMUX_PKG_LICENSE="GPL-3.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="0.11.0"
# TERMUX_PKG_SRCURL="https://github.com/flxzt/rnote/archive/v${TERMUX_PKG_VERSION}/v${TERMUX_PKG_VERSION}.tar.gz"
TERMUX_PKG_SRCURL="https://github.com/EDLLT/rnote/archive/refs/tags/rnote_nogettext_${TERMUX_PKG_VERSION}.tar.gz"
#TERMUX_PKG_SHA256=b133d4331963d3c09d3a7477f60fc4c5072471dcbf459379a593ca1724164af4
TERMUX_PKG_SHA256=0d80f22477321726593d5e9b044685e2d5f0cf1180f307eb940c3c2c8fb251ed
TERMUX_PKG_AUTO_UPDATE=true
TERMUX_PKG_DEPENDS="libiconv, gdk-pixbuf, glib, graphene, gtk4, hicolor-icon-theme, libadwaita, libcairo, pipewire, pango, poppler"

termux_step_pre_configure() {
	termux_setup_cmake

	local _WRAPPER_BIN="${TERMUX_PKG_BUILDDIR}/_wrapper/bin"
	mkdir -p "${_WRAPPER_BIN}"
	if [[ "${TERMUX_ON_DEVICE_BUILD}" == "false" ]]; then
		sed "s|^export PKG_CONFIG_LIBDIR=|export PKG_CONFIG_LIBDIR=${TERMUX_PREFIX}/opt/glib/cross/lib/x86_64-linux-gnu/pkgconfig:|" \
			"${TERMUX_STANDALONE_TOOLCHAIN}/bin/pkg-config" \
			> "${_WRAPPER_BIN}/pkg-config"
		chmod +x "${_WRAPPER_BIN}/pkg-config"
		export PKG_CONFIG="${_WRAPPER_BIN}/pkg-config"
	fi
	export PATH="${_WRAPPER_BIN}:${PATH}"
}

termux_step_post_make_install() {
	(
		cd "${TERMUX_PKG_SRCDIR}"

		termux_setup_rust

		# GETTEXT_SYSTEM=1 \
		# GETTEXT_DIR="${TERMUX_PREFIX}" \
		RUSTFLAGS='-C link-args=-lc++abi' \
		cargo build \
		--jobs "${TERMUX_PKG_MAKE_PROCESSES}" \
		--target "${CARGO_TARGET_NAME}" \
		--package rnote \
		--release
	)
}

meson.build.patch

Disable cargo commands

--- a/meson.build
+++ b/meson.build
@@ -1,6 +1,6 @@
 project(
     'rnote',
-    ['rust', 'cpp'],
+    ['cpp'],
     version: '0.11.0',
     meson_version: '>= 1.0',
 )
@@ -70,7 +70,6 @@
 dependency('gio-2.0', version: '>= 2.76')
 dependency('cairo', version: '>= 1.18')
 
-cargo = find_program('cargo', required: true)
 # cmake is needed by the "ink-stroke-modeler-rs" bindings crate to build the C++ library
 find_program('cmake', required: true)
 find_program('glib-compile-resources', required: true)
@@ -108,7 +107,7 @@
 subdir('crates/rnote-compose')
 subdir('crates/rnote-engine')
 
-
+if false
 # cargo fmt check
 run_target(
     'cargo-fmt-check',
@@ -157,6 +156,7 @@
     ],
     env: cargo_env,
 )
+endif
 
 # build/install the ui
 if build_ui == true
@@ -198,6 +198,7 @@
         ui_output = app_name
     endif
 
+if false
     # ui cargo check
     run_target(
         'ui-cargo-check',
@@ -251,6 +252,7 @@
             meson.project_build_root() / '@OUTPUT@',
         ],
     )
+endif
 
     meson.add_install_script(
         'build-aux/meson_post_install.py',
@@ -263,7 +265,7 @@
         glib_compile_schemas: true,
         gtk_update_icon_cache: true,
         update_desktop_database: true,
-        update_mime_database: true,
+        update_mime_database: false,
     )
 
     # Windows installer

It compiles when the architecture is set to x86_64

@EDLLT
Copy link
Contributor

EDLLT commented Sep 13, 2024

image

Well, I tried to manually copy over the shared object files from the android system libraries. Now I am back at getting the std bad_cast error but this time on x86_64 rnote that was built using termux packages...

At least I managed to reproduce the errors using the termux packages builder without building for arm64 which makes my previous assumption correct

Edit: Libraries copied from /system/lib64

libEGL.so
libGLESv1_CM.so
libheif.so
liblzma.so

I will now try to compile using the older NDK instead
Edit: Old ndk doesn't work
Applying ndk-patch: bits-struct_file.h.patch
1 out of 1 hunk FAILED -- saving rejects to file usr/include/bits/struct_file.h.rej

Fixed it by copying over these patches from NDK 27's patch directory to ndk 23c patch directory
modified: ndk-patches/23c/bits-struct_file.h.patch
modified: ndk-patches/23c/grp.h.patch
modified: ndk-patches/23c/pwd.h.patch
modified: ndk-patches/23c/semaphore.h.patch
modified: ndk-patches/23c/stdio.h.patch
modified: ndk-patches/23c/stdlib.h.patch

@EDLLT
Copy link
Contributor

EDLLT commented Sep 13, 2024

You haven't tried with old ndk (25c)

I have just managed to compile rnote using an old ndk (23c)
It gave out the same badcast error

NDK
INFO: READELF=llvm-readelf ... /home/builder/.termux-build/_cache/android-r23c-api-24-v8/

Running the binary
image

@EDLLT
Copy link
Contributor

EDLLT commented Sep 14, 2024

Using rust-gdb, this is the backtrace from the unoptimized debug build of the binary

rust-gdb ./rnote_unoptimized_debug

(gdb) catch throw
(gdb) run
Starting program: /data/data/com.termux/files/home/rnote/rnote_unoptimized_debug 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/data/data/com.termux/files/usr/lib/libthread_db.so".

Catchpoint 1.1 (exception thrown), 0x0000555558646800 in __cxa_throw ()
(gdb) bt full
#0  0x0000555558646800 in __cxa_throw ()
No symbol table info available.
#1  0x00005555586099bc in std::__ndk1::__throw_bad_cast[abi:ne180000]() ()
No symbol table info available.
#2  0x0000555558623553 in std::__ndk1::locale::use_facet(std::__ndk1::locale::id&) const ()
No symbol table info available.
#3  0x00007ffff6ba42b6 in ?? () from /data/data/com.termux/files/usr/lib/libc++_shared.so
No symbol table info available.
#4  0x00007ffff6ba3be7 in ?? () from /data/data/com.termux/files/usr/lib/libc++_shared.so
No symbol table info available.
#5  0x00007ffff6ba4223 in std::__ndk1::ios_base::Init::Init() () from /data/data/com.termux/files/usr/lib/libc++_shared.so
No symbol table info available.
#6  0x00007ffff6ba4d50 in ?? () from /data/data/com.termux/files/usr/lib/libc++_shared.so
No symbol table info available.
#7  0x00007ffff7f11809 in __dl__ZN6soinfo17call_constructorsEv () from /system/bin/linker64
No symbol table info available.
#8  0x00007ffff7f11629 in __dl__ZN6soinfo17call_constructorsEv () from /system/bin/linker64
No symbol table info available.
#9  0x00007ffff7f11629 in __dl__ZN6soinfo17call_constructorsEv () from /system/bin/linker64
No symbol table info available.
#10 0x00007ffff7f11629 in __dl__ZN6soinfo17call_constructorsEv () from /system/bin/linker64
No symbol table info available.
#11 0x00007ffff7f11629 in __dl__ZN6soinfo17call_constructorsEv () from /system/bin/linker64
No symbol table info available.
#12 0x00007ffff7f7838a in __dl__ZL29__linker_init_post_relocationR19KernelArgumentBlockR6soinfo () from /system/bin/linker64
No symbol table info available.
#13 0x00007ffff7f77086 in __dl___linker_init () from /system/bin/linker64
No symbol table info available.
#14 0x00007ffff7f14498 in __dl__start () from /system/bin/linker64
No symbol table info available.

I barely know how to use gdb to be honest

@EDLLT
Copy link
Contributor

EDLLT commented Sep 14, 2024

__ndk1::locale::use_facet(std::__ndk1::locale::id&) const (

Looking at this cargo.toml in rnote, there is this piet custom piet version

[patch.crates-io]
# once a new piet (current v0.6.2) is released with updated cairo and kurbo deps, this can be removed.
piet = { git = "https://github.com/linebender/piet", rev = "02eb5f0152e893626c43980bf37eeb0ccb1acb46" }
piet-cairo = { git = "https://github.com/linebender/piet", rev = "02eb5f0152e893626c43980bf37eeb0ccb1acb46" }

Maybe this custom piet version is the source of the issue

Edit: upon further investigation, it seems like the no gettext version that Doublnomousse had made still uses i18n which is for localization if my understanding is correct.
Maybe trying to get gettext to properly compile is the right approach.

@EDLLT
Copy link
Contributor

EDLLT commented Sep 17, 2024

Patched the systest crate to properly handle cross compilation and updated gettext to the latest version which fixed the clang errors previously seen
https://github.com/EDLLT/gettext-rs

I think the original gettext-rs repo is poorly maintained as the author is not merging PRs nor updating the gettext version

@TomJo2000
Copy link
Member

I think the original gettext-rs repo is poorly maintained as the author is not merging nor updating the gettext version

Even with that being the case - are you willing and able to maintain and develop a fork of the crate for this package?
Changes needed for making crates work correctly on Termux should be included as patches with the package.

See distant for an example.

local d
local p=termios-0.2.2.diff
for d in $CARGO_HOME/registry/src/*/termios-0.2.2; do
patch --silent -p1 -d ${d} \
< "$TERMUX_PKG_BUILDER_DIR/${p}" || :
done
p=service-manager-0.2.0.diff
for d in $CARGO_HOME/registry/src/*/service-manager-*; do
patch --silent -p1 -d ${d} \
< "$TERMUX_PKG_BUILDER_DIR/${p}" || :
done

This is bogus.
--- a/src/kind.rs
+++ b/src/kind.rs
@@ -38,6 +38,7 @@
/// Looks up the kind of service management platform native to the operating system
#[cfg(any(
+ target_os = "android",
target_os = "freebsd",
target_os = "dragonfly",
target_os = "openbsd",

@EDLLT
Copy link
Contributor

EDLLT commented Sep 17, 2024

meson build system. which not avaliable on termux yet

What? Meson works inTermux without problem. Also it's very easy to build on device. Just 36 minutes on SDM662 with 4GB RAM.

Did you use gcc or clang to compile this and what version?

What is the model of the android device and android version back when you compiled this?

Also are you positive that this was compiled against the bionic libraries?(not through a proot/chroot)?

I have patched the gettext-rs crate to compile properly but I still get the badcast error on the compiled binary

I will try a combination of older ndk + older rnote + older clang and try to isolate which variable is responsible through that
If that doesn't work either then I'm out

@romanovj
Copy link

meson build system. which not avaliable on termux yet

What? Meson works inTermux without problem. Also it's very easy to build on device. Just 36 minutes on SDM662 with 4GB RAM.
Screenshot_20230818-222051_Termux
Screenshot_20230818-224140_Termux_X11

Did you use gcc or clang to compile this and what version?

What is the model of the android device and android version back when you compiled this?

Also are you positive that this was compiled against the bionic libraries?(not through a proot/chroot)?

I have patched the gettext-rs crate to compile properly but I still get the badcast error on the compiled binary

I will try a combination of older ndk + older rnote + older clang and try to isolate which variable is responsible through that If that doesn't work either then I'm out

you can see the path, so it is default termux env.

25c NDK was at that time

@EDLLT
Copy link
Contributor

EDLLT commented Sep 17, 2024

meson build system. which not avaliable on termux yet

What? Meson works inTermux without problem. Also it's very easy to build on device. Just 36 minutes on SDM662 with 4GB RAM.
Screenshot_20230818-222051_Termux
Screenshot_20230818-224140_Termux_X11

Did you use gcc or clang to compile this and what version?

What is the model of the android device and android version back when you compiled this?

Also are you positive that this was compiled against the bionic libraries?(not through a proot/chroot)?

I have patched the gettext-rs crate to compile properly but I still get the badcast error on the compiled binary

I will try a combination of older ndk + older rnote + older clang and try to isolate which variable is responsible through that If that doesn't work either then I'm out

you can see the path, so it is default termux env.

25c NDK was at that time

What android version did you have on your device back then?

@EDLLT
Copy link
Contributor

EDLLT commented Sep 18, 2024

Managed to get an older rnote version 0.7.1 to compile, got the same badcast error.
So it isn't the NDK version nor the rnote version... interesting

It probably has to do something with locales given the gdb output from earlier
#2 0x0000555558623553 in std::__ndk1::locale::use_facet(std::__ndk1::locale::id&) const ()

@TomJo2000
Copy link
Member

That would make some sense since libbionic has no locale mechanism.

@EDLLT
Copy link
Contributor

EDLLT commented Sep 19, 2024

find . -name "*.o" -print0 | xargs -0 nm -A | grep -i locale

./target/x86_64-linux-android/debug/incremental/rnote-1mvefv92ykcpn/s-h02psi5rfw-0oiq87l-91r6w86he8a1pu2dwmwiiq6q9/00ts5llza33x28vggaxcoqfmz.o:                 U setlocale
./target/x86_64-linux-android/debug/incremental/rnote_engine-1qonz8e49dh0c/s-h02pse1sn4-12d40sn-e7vuiwd5fyxvq6h59a9z1ozh9/ea722g8c49ke25dbxrz7ue0hi.o:                 U _ZN6chrono6format7locales11unlocalized11long_months17h4affc6e51958ac7cE
./target/x86_64-linux-android/debug/incremental/rnote_engine-1qonz8e49dh0c/s-h02pse1sn4-12d40sn-e7vuiwd5fyxvq6h59a9z1ozh9/ea722g8c49ke25dbxrz7ue0hi.o:                 U _ZN6chrono6format7locales11unlocalized12short_months17he45638738d1c49d7E
./target/x86_64-linux-android/debug/incremental/rnote_engine-1qonz8e49dh0c/s-h02pse1sn4-12d40sn-e7vuiwd5fyxvq6h59a9z1ozh9/ea722g8c49ke25dbxrz7ue0hi.o:                 U _ZN6chrono6format7locales11unlocalized13decimal_point17h383cbb739c6ebceeE
./target/x86_64-linux-android/debug/incremental/rnote_engine-1qonz8e49dh0c/s-h02pse1sn4-12d40sn-e7vuiwd5fyxvq6h59a9z1ozh9/ea722g8c49ke25dbxrz7ue0hi.o:                 U _ZN6chrono6format7locales11unlocalized13long_weekdays17h2660fc09e703e027E
./target/x86_64-linux-android/debug/incremental/rnote_engine-1qonz8e49dh0c/s-h02pse1sn4-12d40sn-e7vuiwd5fyxvq6h59a9z1ozh9/ea722g8c49ke25dbxrz7ue0hi.o:                 U _ZN6chrono6format7locales11unlocalized14default_locale17hb1e81819f67ed26bE
./target/x86_64-linux-android/debug/incremental/rnote_engine-1qonz8e49dh0c/s-h02pse1sn4-12d40sn-e7vuiwd5fyxvq6h59a9z1ozh9/ea722g8c49ke25dbxrz7ue0hi.o:                 U _ZN6chrono6format7locales11unlocalized14short_weekdays17h9f82cb60c1e2b524E
./target/x86_64-linux-android/debug/incremental/rnote_engine-1qonz8e49dh0c/s-h02pse1sn4-12d40sn-e7vuiwd5fyxvq6h59a9z1ozh9/ea722g8c49ke25dbxrz7ue0hi.o:                 U _ZN6chrono6format7locales11unlocalized5am_pm17h6671ea497f9c53bbE
./target/x86_64-linux-android/debug/build/oboe-sys-f9d3f4424b593fc5/out/library/083f6a9c839ae21c-Utilities.o:                 U _ZNSt6__ndk16localeD1Ev
./target/x86_64-linux-android/debug/build/oboe-sys-f9d3f4424b593fc5/out/library/083f6a9c839ae21c-Utilities.o:                 U _ZNKSt6__ndk16locale9use_facetERNS0_2idE <-- use facet

./target/x86_64-linux-android/debug/build/oboe-sys-f9d3f4424b593fc5/out/library/083f6a9c839ae21c-Utilities.o:0000000000000000 W _ZNSt6__ndk19use_facetB8nn180000INS_5ctypeIcEEEERKT_RKNS_6localeE <-- use facet

After bashing my head out for a while, I found out the faulty crate that's calling use_facet
oboe-sys

Dependency tree

rodio v0.19.0
|   |   |-- cpal v0.15.3
|   |   |   |-- dasp_sample v0.11.0
|   |   |   |-- jni v0.21.1
|   |   |   |   |-- cesu8 v1.1.0
|   |   |   |   |-- cfg-if v1.0.0
|   |   |   |   |-- combine v4.6.7
|   |   |   |   |   |-- bytes v1.6.1
|   |   |   |   |   `-- memchr v2.7.4
|   |   |   |   |-- jni-sys v0.3.0
|   |   |   |   |-- log v0.4.22
|   |   |   |   `-- thiserror v1.0.63 (*)
|   |   |   |   [build-dependencies]
|   |   |   |   `-- walkdir v2.5.0 (*)
|   |   |   |-- ndk v0.8.0
|   |   |   |   |-- bitflags v2.6.0 (*)
|   |   |   |   |-- jni-sys v0.3.0
|   |   |   |   |-- log v0.4.22
|   |   |   |   |-- ndk-sys v0.5.0+25.2.9519653
|   |   |   |   |   `-- jni-sys v0.3.0
|   |   |   |   |-- num_enum v0.7.2
|   |   |   |   |   `-- num_enum_derive v0.7.2 (proc-macro)
|   |   |   |   |       |-- proc-macro-crate v3.1.0 (*)
|   |   |   |   |       |-- proc-macro2 v1.0.86 (*)
|   |   |   |   |       |-- quote v1.0.36 (*)
|   |   |   |   |       `-- syn v2.0.72 (*)
|   |   |   |   `-- thiserror v1.0.63 (*)
|   |   |   |-- ndk-context v0.1.1
|   |   |   `-- oboe v0.6.1
|   |   |       |-- jni v0.21.1 (*)
|   |   |       |-- ndk v0.8.0 (*)
|   |   |       |-- ndk-context v0.1.1
|   |   |       |-- num-derive v0.4.2 (proc-macro) (*)
|   |   |       |-- num-traits v0.2.19 (*)
|   |   |       `-- oboe-sys v0.6.1
|   |   |           [build-dependencies]
|   |   |           `-- cc v1.1.6
|   |   |               |-- jobserver v0.1.32
|   |   |               |   `-- libc v0.2.155
|   |   |               `-- libc v0.2.155

@EDLLT
Copy link
Contributor

EDLLT commented Sep 19, 2024

image
I finally made it 🫡
They say no pain no gain. I've learned a lot from this lol

Edit:
Here are my personal notes on how to resolve crashes

GNU Debugger

Using gdb/rust-gdb
This program allows you to go step by step with instructions or source code for a binary. It also allows you to modify the variables at runtime and a ton more.

rust-gdb BINARY
(gdb) catch throw
(gdb) break FUNCTION_NAME
(gdb) run
(gdb) bt full

Using LDD

Shows you all the shared libraries that a binary uses

ldd BINARY

Find symbols of a binary

Symbols are a powerful way to know what binary objects have what functions or other special keywords.

Shows dynamic libraries that a binary is using*

nm -D BINARY

Finds every object file and searches for the occurence of the word "locale"
This was mainly being used to find all object files in my compiled rnote to dictate which crate is responsible for the locale error

find . -name "*.o" -print0 | xargs -0 nm -A | grep -i locale

Show rust dependency tree

cargo tree

@EDLLT
Copy link
Contributor

EDLLT commented Sep 19, 2024

The only thing left to fix is cross compilation as it's using the wrong toolchain/linker for whatever reason.
On-device/same architecture builds work, cross compiling doesn't

Compiling rnote v0.11.0 (/home/builder/.termux-build/rnote/src/crates/rnote-ui)
     Running `/home/builder/.rustup/toolchains/1.80.0-x86_64-unknown-linux-gnu/bin/rustc --crate-name build_script_build --edition=2021 crates/rnote-ui/build.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=135 --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debuginfo=2 -C debug-assertions=off --check-cfg 'cfg(docsrs)' --check-cfg 'cfg(feature, values())' -C metadata=8b7f48c74841d903 -C extra-filename=-8b7f48c74841d903 --out-dir /home/builder/.termux-build/rnote/src/target/release/build/rnote-8b7f48c74841d903 -L dependency=/home/builder/.termux-build/rnote/src/target/release/deps --extern anyhow=/home/builder/.termux-build/rnote/src/target/release/deps/libanyhow-3ac73b91949d787c.rlib --extern glib_build_tools=/home/builder/.termux-build/rnote/src/target/release/deps/libglib_build_tools-2c631208f602ea58.rlib -L native=/data/data/com.termux/files/usr/lib -L native=/data/data/com.termux/files/usr/lib -L native=/data/data/com.termux/files/usr/lib -L native=/data/data/com.termux/files/usr/lib`
error: linking with `cc` failed: exit status: 1
  |
  = note: LC_ALL="C" PATH="/home/builder/.rustup/toolchains/1.80.0-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/bin:/home/builder/.rustup/toolchains/1.80.0-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/bin:/home/builder/.rustup/toolchains/1.80.0-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/bin:/home/builder/.cargo/bin:/home/builder/.termux-build/_cache/ninja-1.12.1:/home/builder/.termux-build/rnote/build/_wrapper/bin:/home/builder/.termux-build/_cache/cmake-3.29.3/bin:/home/builder/.termux-build/_cache/android-r27-api-24-v1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" VSLANG="1033" "cc" "-m64" "/tmp/rustc9cODRJ/symbols.o" "/home/builder/.termux-build/rnote/src/target/release/build/rnote-8b7f48c74841d903/build_script_build-8b7f48c74841d903.build_script_build.1fec9ada91832d77-cgu.0.rcgu.o" "/home/builder/.termux-build/rnote/src/target/release/build/rnote-8b7f48c74841d903/build_script_build-8b7f48c74841d903.e3hi0mxzsq5x7jaoy7uwkrn7j.rcgu.o" "-Wl,--as-needed" "-L" "/home/builder/.termux-build/rnote/src/target/release/deps" "-L" "/data/data/com.termux/files/usr/lib" "-L" "/data/data/com.termux/files/usr/lib" "-L" "/data/data/com.termux/files/usr/lib" "-L" "/data/data/com.termux/files/usr/lib" "-L" "/home/builder/.rustup/toolchains/1.80.0-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/home/builder/.termux-build/rnote/src/target/release/deps/libglib_build_tools-2c631208f602ea58.rlib" "/home/builder/.termux-build/rnote/src/target/release/deps/libgio-6f27d4bcb23daac4.rlib" "/home/builder/.termux-build/rnote/src/target/release/deps/libfutures_io-b52e8e4cf1115fae.rlib" "/home/builder/.termux-build/rnote/src/target/release/deps/libglib-af73e043d8f8248b.rlib" "/home/builder/.termux-build/rnote/src/target/release/deps/libfutures_executor-41090b1f0d7dcd8d.rlib" "/home/builder/.termux-build/rnote/src/target/release/deps/libmemchr-1d69502a51160c96.rlib" "/home/builder/.termux-build/rnote/src/target/release/deps/libsmallvec-a4340643a4f90233.rlib" "/home/builder/.termux-build/rnote/src/target/release/deps/libthiserror-27268a9b41d020ae.rlib" "/home/builder/.termux-build/rnote/src/target/release/deps/libfutures_util-36ed3e0dfd487c82.rlib" "/home/builder/.termux-build/rnote/src/target/release/deps/libslab-0e82e5682068df74.rlib" "/home/builder/.termux-build/rnote/src/target/release/deps/libpin_project_lite-f6b2f26fd9c9b716.rlib" "/home/builder/.termux-build/rnote/src/target/release/deps/libpin_utils-4594a3b34143379d.rlib" "/home/builder/.termux-build/rnote/src/target/release/deps/libfutures_task-aaeaddb5e4d9001e.rlib" "/home/builder/.termux-build/rnote/src/target/release/deps/libfutures_channel-15be244035db1983.rlib" "/home/builder/.termux-build/rnote/src/target/release/deps/libfutures_core-54b4d5ebfe20e74a.rlib" "/home/builder/.termux-build/rnote/src/target/release/deps/libbitflags-7d0831c16b4e8103.rlib" "/home/builder/.termux-build/rnote/src/target/release/deps/libgio_sys-95786d4aad73da0b.rlib" "/home/builder/.termux-build/rnote/src/target/release/deps/libgobject_sys-317da89ae50c481e.rlib" "/home/builder/.termux-build/rnote/src/target/release/deps/libglib_sys-37c72fb7737ec437.rlib" "/home/builder/.termux-build/rnote/src/target/release/deps/liblibc-05c4e04dbda0b9b3.rlib" "/home/builder/.termux-build/rnote/src/target/release/deps/libanyhow-3ac73b91949d787c.rlib" "/home/builder/.rustup/toolchains/1.80.0-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-0fbbe72b9e0d57dc.rlib" "/home/builder/.rustup/toolchains/1.80.0-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-4cbc28d57c85be7b.rlib" "/home/builder/.rustup/toolchains/1.80.0-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libobject-d583e13b4b2d89a2.rlib" "/home/builder/.rustup/toolchains/1.80.0-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libmemchr-5d2a1bfb1589ab43.rlib" "/home/builder/.rustup/toolchains/1.80.0-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libaddr2line-dcf90797fbd00d23.rlib" "/home/builder/.rustup/toolchains/1.80.0-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libgimli-3b6828d7a1725131.rlib" "/home/builder/.rustup/toolchains/1.80.0-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_demangle-f75bdd612dd19f44.rlib" "/home/builder/.rustup/toolchains/1.80.0-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd_detect-130d6997e9e34e6a.rlib" "/home/builder/.rustup/toolchains/1.80.0-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libhashbrown-c9c9da5b4611a660.rlib" "/home/builder/.rustup/toolchains/1.80.0-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_alloc-0f5b4153173c663b.rlib" "/home/builder/.rustup/toolchains/1.80.0-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libminiz_oxide-877178c8f84ba478.rlib" "/home/builder/.rustup/toolchains/1.80.0-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libadler-3907ca7c36d3c032.rlib" "/home/builder/.rustup/toolchains/1.80.0-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-e8b263070ac20a8a.rlib" "/home/builder/.rustup/toolchains/1.80.0-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcfg_if-d1969118c6f0c13e.rlib" "/home/builder/.rustup/toolchains/1.80.0-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-d48855f89c749535.rlib" "/home/builder/.rustup/toolchains/1.80.0-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-9a1cbc1305da137e.rlib" "/home/builder/.rustup/toolchains/1.80.0-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_core-d290b706bbcc90ac.rlib" "/home/builder/.rustup/toolchains/1.80.0-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-fd707bd9d5d3d672.rlib" "/home/builder/.rustup/toolchains/1.80.0-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-d4ebcca572002f93.rlib" "-Wl,-Bdynamic" "-lgobject-2.0" "-lgio-2.0" "-lgobject-2.0" "-lglib-2.0" "-lgobject-2.0" "-lglib-2.0" "-lgobject-2.0" "-lglib-2.0" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-L" "/home/builder/.rustup/toolchains/1.80.0-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "/home/builder/.termux-build/rnote/src/target/release/build/rnote-8b7f48c74841d903/build_script_build-8b7f48c74841d903" "-Wl,--gc-sections" "-pie" "-Wl,-z,relro,-z,now" "-nodefaultlibs"
  = note: ld: error: /data/data/com.termux/files/usr/lib/libgobject-2.0.so is incompatible with elf64-x86-64
          ld: error: /data/data/com.termux/files/usr/lib/libgio-2.0.so is incompatible with elf64-x86-64
          ld: error: /data/data/com.termux/files/usr/lib/libgobject-2.0.so is incompatible with elf64-x86-64
          ld: error: /data/data/com.termux/files/usr/lib/libglib-2.0.so is incompatible with elf64-x86-64
          ld: error: /data/data/com.termux/files/usr/lib/libgobject-2.0.so is incompatible with elf64-x86-64
          ld: error: /data/data/com.termux/files/usr/lib/libglib-2.0.so is incompatible with elf64-x86-64
          ld: error: /data/data/com.termux/files/usr/lib/libgobject-2.0.so is incompatible with elf64-x86-64
          ld: error: /data/data/com.termux/files/usr/lib/libglib-2.0.so is incompatible with elf64-x86-64
          collect2: error: ld returned 1 exit status
          

error: could not compile `rnote` (build script) due to 1 previous error

Caused by:
  process didn't exit successfully: `/home/builder/.rustup/toolchains/1.80.0-x86_64-unknown-linux-gnu/bin/rustc --crate-name build_script_build --edition=2021 crates/rnote-ui/build.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=135 --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debuginfo=2 -C debug-assertions=off --check-cfg 'cfg(docsrs)' --check-cfg 'cfg(feature, values())' -C metadata=8b7f48c74841d903 -C extra-filename=-8b7f48c74841d903 --out-dir /home/builder/.termux-build/rnote/src/target/release/build/rnote-8b7f48c74841d903 -L dependency=/home/builder/.termux-build/rnote/src/target/release/deps --extern anyhow=/home/builder/.termux-build/rnote/src/target/release/deps/libanyhow-3ac73b91949d787c.rlib --extern glib_build_tools=/home/builder/.termux-build/rnote/src/target/release/deps/libglib_build_tools-2c631208f602ea58.rlib -L native=/data/data/com.termux/files/usr/lib -L native=/data/data/com.termux/files/usr/lib -L native=/data/data/com.termux/files/usr/lib -L native=/data/data/com.termux/files/usr/lib` (exit status: 1)
warning: build failed, waiting for other jobs to finish...

edit: after passing in --verbose, I now understand the issue. It's trying to compile the gresources but glib_build_tools::compile_resources does not take cross compilation into account

@EDLLT
Copy link
Contributor

EDLLT commented Sep 19, 2024

The only thing left to fix is cross compilation as it's using the wrong toolchain/linker for whatever reason. On-device/same architecture builds work, cross compiling doesn't

Fixed it.
Seems like it was an issue with compiling .gresource files in crates/rnote-ui/build.rs (thanks to cargo build --verbose)
Simply making it use glib-compile-resources binary is the simplest fix for this

I also made a PR to upstream RNote to fix this cross compilation issue
flxzt/rnote#1223

image
The package has been successfully cross compiled.

All what's left now is to test it and also make the crate patches instead of using my gettext-rs github repo

@mistune
Copy link

mistune commented Sep 20, 2024

Wow, this is great! This means we can now also build this natively in Debian right?

@TomJo2000
Copy link
Member

Wow, this is great! This means we can now also build this natively in Debian right?

Termux's packaging environment is entirely unrelated to Debian aside from using the DEB package format/Apt package manager.

You can follow the upstream compilation instructions to do a build of rnote on Debian.
https://github.com/flxzt/rnote/blob/main/BUILDING.md

@EDLLT
Copy link
Contributor

EDLLT commented Sep 20, 2024

Wow, this is great! This means we can now also build this natively in Debian right?

Debian? Are you talking about a proot/chroot within termux?

@TomJo2000
Copy link
Member

The only thing left to fix is cross compilation as it's using the wrong toolchain/linker for whatever reason. On-device/same architecture builds work, cross compiling doesn't

Fixed it. Seems like it was an issue with compiling .gresource files in crates/rnote-ui/build.rs (thanks to cargo build --verbose) Simply making it use glib-compile-resources binary is the simplest fix for this

I also made a PR to upstream RNote to fix this cross compilation issue flxzt/rnote#1223

image The package has been successfully cross compiled.

All what's left now is to test it and also make the crate patches instead of using my gettext-rs github repo

By the way, it would be good if you could send me your final build script and patches for testing and review.

@mistune
Copy link

mistune commented Sep 20, 2024

Wow, this is great! This means we can now also build this natively in Debian right?

Debian? Are you talking about a proot/chroot within termux?

Yes, sorry I meant Debian in proot-distro within Termux

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
has build issues Package compilation fails package request A new package was requested x11 Issue is related to stuff requiring X11 environment or x11-packages
Projects
None yet
7 participants