-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Android: NDK update #13985
Comments
I´m using NDK 26.1.10909125 and build-tools 34.0.0
Also I´m using Ti.SDK Master (12.3.0) --> build from source gradle-wrapper.properties
and in source-sdk/android/titanium/build.gradle with CMAKE 3.22.1
when doing this it work on my Mac M1..... |
that's a very customized version 😄 I'll test that soon, thanks for the info! Most users are fine with the current ndk version otherwise we would see more user issues. We had a few so I've added a post in the FAQ: https://titaniumsdk.com/guide/Titanium_SDK/Titanium_SDK_FAQ.html#android-ndk-error-non-system-libraries-in-linker-flags So it doesn't happen to all users. But it happened to Mac users too |
on Mac with Apple Silicon building modules with lover NDK 26... is shitty.... -> |
What will lead to an needed update for Ti-SDK in the next time! |
even with ndk 26, new buildtools and cmake I'm still seeing this error:
|
ok, what about going static libs? |
tried it with the help of chatgpt but that wasn't really helpful. I just don't know how to rewrite the file to be be static. The big change in NDK19 was
and that breaks my tooling. btw: I have a PR for the cmake part at #13966 - going a bit more granular here so everything else still works. E.g. not jumping to SDK 34 right away (also a different PR). |
about your PR I know.. already using this in my local build.... |
I also got some changes for the SDK for Android, that does the apps make fly.... (your optimizations lead me to that) |
awesome, sounds great 🤩 |
ah, what Linux do you run? |
Fedora Linux 39, 6.7.3-200.fc39.x86_64 |
Ubuntu 22.04
ok, I forced to use this setting in the module build.gradle
because else Ti want to install other resources, but except the kotlin-compiler error with fallback... looks good for me.... |
for the ia32 libs it did this: |
maybe a fresh clean gradle in your home will do the job? --> rm -r .gradle/ |
oh, I also linked tools -> cmdline-tools/latest |
After I set gradle to 7.5.1 in gradle-wrapper.properties and gradle-plugin to 7.1.1 in _cli/commands/buildModule.js
|
Thank you for all the infos! A lot to test here on my site :) Quick question as you patch everything already: did you see the actual error at some point? I've also installed 32bit libs (https://gist.github.com/DroidPulkit/fd5206e49c3e663203588a08d0dd7f09#file-androiddevlinux-L99-L100 and also tried all these https://gist.github.com/szeswee/bfbf8eea4e19fddb91d8) I'm using openjdk 17, cmake 3.27.7 (installed on my system), I've recently cleaned my .gradle folder after updating it in the SDK and I have that error for a few years now so I've updated my base system a lot during that time :) I'll download a vanilla installation of Ubuntu so I can start at 0 and have a clean snapshot to go back to. Let's see if it works on a fresh install too 👍 |
Building with the settings in my previous comment with tools 26.1.1 will lead to
I suggest, not only because building on Apple Silicon without build-tools 34.0.0, cmake 3.22.1 and ndk 26.1.10909125 is not possible (for compiling modules) to update the TiSDK to this... it works from my opinion for Linux and Mac...but that needs to be well tested! |
No, I did not get your error.... but I believe I got something like that on my Apple Silicon last week (after I had to setup a fresh maschine, as my X86 MacBook died) and thats why I was fast in your topic... ;-) |
normally I would had answered to ask @m1ga for help, but it was you... so that card was not possible to play... |
aaahhh, never mind the kotlin error.... It´s only because my VM did not got enough memory... so, that can be ignored... |
man this is driving me crazy! I've installed a fresh Ubuntu VM and a fresh Fedora VM:
I didn't install any other package or made a config change and it worked with ndk v21 👍 So I went ahead and deleted my local Android SDK/NDK folders and reinstalled everything as I did in the VM. Not working 😞 So I guess it is some tool I have installed on my normal system that is interfering with the build system somehow. That sucks. I guess I have to check fedora VM vs fedora local now to see what might be the issue here. And one thing that is also strange: there was another Slack user who had the original issue on a Mac and we fixed it by going back to ndk18 too. The good thing: the virtual machines worked with ndk21 so I'm a bit relieved that the Ti SDK is not broken! |
maybe you could track that down by |
I think I've fixed it! Turns out: DON'T install the i686 (32bit) libraries! I've removed all of them and after that I can use ndk21 without an issue. Thank you so much for your help and the whole testing part. I was running the same install script every time I've setup a new system and that included the 32bit libraries as they were needed before. Never thought about changing that script 😄 That said: I've made another small PR to update ndk to 22.1.7171670 (PR #13992). Small steps but it's safer for everyone like this. |
I have searched and made sure there are no existing issues for the issue I am filing
Description
Currently Titanium is using ndk
21.4.7075529
to build modules. On Linux I have the issue that I can't use anything greater than ndk 18.When I try to build with anything > ndk18 I receive the following error:
and errors like
In the NDK changelogs https://github.com/android/ndk/wiki/Changelog-r19 you can see that they switched to include all tools with the NDK instead of relying on system tools.
Android.mk: https://github.com/tidev/titanium-sdk/blob/b3256959bf84a6fb2e3e86554cdc0867f0d533c3/android/templates/module/generated/Android.mk
build.gradle: https://github.com/tidev/titanium-sdk/blob/b3256959bf84a6fb2e3e86554cdc0867f0d533c3/android/templates/module/generated/build.gradle
Some more infos in my stackoverflow post: https://stackoverflow.com/questions/73941535/android-ndk-18-is-not-building-module-in-fedora-36-incompatible-with-elf32-i3
It would be great to finally be able to use the latest NDK and not need to keep ndk 18.
How to test it:
sudo npm i -g titanium
ti sdk install
ti.map/android
folder and runti build -p android -b
This will install the NDK and tries to build the module.
Solution
Being able to use NDK>18
Alternatives
Workaround to keep NDK18:
21.4.7075529
so Ti thinks it is using NDK21 to build appsandroid/templates/module/generated/build.gradle
and uncomment'--output-sync=none'
Platforms
Android
The text was updated successfully, but these errors were encountered: