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

Glitches in Android build system #2569

Open
ghost opened this issue Oct 22, 2017 · 2 comments
Open

Glitches in Android build system #2569

ghost opened this issue Oct 22, 2017 · 2 comments

Comments

@ghost
Copy link

ghost commented Oct 22, 2017

Hi,

came across some glitches in 'nit/share/libgc/android-setup-libgc.sh' :

  • linux-x86_64 is hardcoded in the line 'path="$ANDROID_NDK/toolchains/$tools_dir/prebuilt/linux-x86_64/bin/"' - does not work on 686
  • gcc release version is hardcoded in the line 'tools_dirs=( arm-linux-androideabi-4.9 x86-4.9 mipsel-linux-android-4.9)'

The tool_dirs should be obtainable by glob expansion.

Also, there was an unfriendly warning when the source was not from git:
'
$ make android
mkdir -p bin
../../bin/nitc -o bin/calculator14.apk src/android14.nit -D debug
fatal: Not a git repository (or any parent up to mount point /home)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
src/calculator.nit:18,2--32: Warning: git_revision used outside of a git repository or git binaries not available (git_revision)
app_version(0, 2, git_revision)
^
'
After adjusting the paths the resulting apk works.

@xymus
Copy link
Contributor

xymus commented Nov 7, 2017

The PR #2575 removes the script android-setup-libgc.sh, so the first issue should be "fixed". But sadly, the newer Android NDKs have dropped support for 32 bits platforms. You may be able to get it working by using an older NDK that still supports the new gradle and CMake toolchain.

The second issue is a git error caused by the use of git_revision in client code. You can simply remove git_revision to get rid of it. The original error is scary but useful for developers, I'm not sure how it could be improved, but I'm open to suggestions and PRs.

@ghost
Copy link
Author

ghost commented Nov 9, 2017 via email

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

No branches or pull requests

1 participant