-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Comments
i just noticed that meson writen in python. and able to install from pip. sorry for my stupid 😂 |
@romanovj can you share which tag version you used to build this? Recent versions does not compile properly. |
0.7.1-0.8.1 |
Right now, I am compiling RNote for Termux as well.
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 |
I've been trying to compile termux the whole day literally |
@EDLLT read error - fix error, repeat. |
@Doublonmousse made an rnote fork without gettext https://github.com/Doublonmousse/rnote/blob/no_gettext It still failed to build unfortunately |
@EDLLT Are you building this on Termux or Debian proot? |
@EDLLT Have you read the errors?? |
Termux, proot is too slow for this |
Of course, I've read the errors. It seems to be a linking problem due to termux's libstd++. |
@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. |
OOM because of LTO, I guess |
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) |
@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 |
With
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
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
That failed to compile giving me the following error
|
For which RNote? The main RNote or the fork without gettext? |
Okay so, it compiled(main branch flxzt's rnote)
Full log of everything I had done: |
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? |
I have added the rnote build script in above PR. Please feel free to modify it to fix the build issue. |
I don't know how to create a .deb file but I released it here with its binaries(Note: This is for proot ONLY) |
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 Edit: Didn't work |
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
How do I make termux packages use the older NDK? Do I simply run that script you had supplied? |
I just made a breakthrough(I think) Click to expandContext: 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 compilingSo then I supplied it with the no gettext version then it gave me the same operator delete errors This means that compiling using termux packages has no inherent advantage(in terms of getting it working) instead of compiling natively. 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
I tried doing the same in my arm64 device and I no longer get the std badcast error there either |
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 |
Right, I think we're getting somewhere. From the error it sounds like we're just missing a dependency. |
build.sh
meson.build.patch
It compiles when the architecture is set to x86_64 |
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
I will now try to compile using the older NDK instead Fixed it by copying over these patches from NDK 27's patch directory to ndk 23c patch directory |
Using rust-gdb, this is the backtrace from the unoptimized debug build of the binary
I barely know how to use gdb to be honest |
Looking at this cargo.toml in rnote, there is this piet custom piet version
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. |
Patched the systest crate to properly handle cross compilation and updated gettext to the latest version which fixed the clang errors previously seen I think the original gettext-rs repo is poorly maintained as the author is not merging PRs 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? See termux-packages/packages/distant/build.sh Lines 27 to 37 in 3512688
termux-packages/packages/distant/service-manager-0.2.0.diff Lines 1 to 12 in 3512688
|
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 |
Managed to get an older rnote version 0.7.1 to compile, got the same badcast error. It probably has to do something with locales given the gdb output from earlier |
That would make some sense since libbionic has no locale mechanism. |
find . -name "*.o" -print0 | xargs -0 nm -A | grep -i locale
After bashing my head out for a while, I found out the faulty crate that's calling use_facet Dependency tree
|
The only thing left to fix is cross compilation as it's using the wrong toolchain/linker for whatever reason.
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 |
Fixed it. I also made a PR to upstream RNote to fix this cross compilation issue
All what's left now is to test it and also make the crate patches instead of using my gettext-rs github repo |
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 |
Debian? Are you talking about a proot/chroot within termux? |
By the way, it would be good if you could send me your final build script and patches for testing and review. |
Yes, sorry I meant Debian in proot-distro within Termux |
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
Additional information
seems like it using meson build system. which not avaliable on termux yet
The text was updated successfully, but these errors were encountered: