-
Notifications
You must be signed in to change notification settings - Fork 85
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
Guide in readme doesnt work #468
Comments
Yay, the README is outdated. We switched from ndk15c to ndk23c in 9f0853c Please try again with that and tell me if the issue is fixed, so I can update the instructions. Thanks! |
UPD: Removed log. My fault. Fixed error via installing glibc-devel-32bit |
Instructions for installing NDK would also be useful. Not all people want to set up a studio for this, and it’s hard to find information on how to do without studio.
export JAVA_HOME=/usr/lib/jvm/openjdk17/ # If default java is not 17
./bin/sdkmanager --sdk_root=$pwd "ndk;23.2.8568313"
./bin/sdkmanager --sdk_root=$pwd "platforms;android-28" |
Now have: Updating sources
git submodule init
git submodule sync
Synchronizing submodule url for 'jni/luajit/luajit'
Synchronizing submodule url for 'jni/lzma/7z'
git submodule update
using sdk in path ~/dev/android-luajit-launcher/cmdline-tools/platforms/android-28/
using ndk in path ~/dev/android-luajit-launcher/cmdline-tools/ndk/23.2.8568313/
Building LuaJIT for all supported ABIs
cd jni/luajit && \
./mk-luajit.sh clean && \
./mk-luajit.sh x86 && \
./mk-luajit.sh clean && \
./mk-luajit.sh armeabi-v7a
Using NDKABI .
Detected NDK version 23...
Using NDKABI .
Detected NDK version 23...
make -C ~/dev/android-luajit-launcher/jni/luajit/build/x86 amalg install HOST_LDFLAGS= DESTDIR=~/dev/android-luajit-launcher/jni/luajit/build/x86 PREFIX= TARGET_LDFLAGS= TARGET_CFLAGS=-O2\ -pipe TARGET_AR=llvm-ar\ rcus LDFLAGS= TARGET_SYS=Linux INSTALL_SONAME=libluajit.so TARGET_FLAGS= TARGET_LIBS= HOST_CFLAGS=-O2\ -pipe\ -mtune=generic TARGET_SONAME=libluajit.so TARGET_RANLIB=llvm-ranlib TARGET_STRIP=llvm-strip CC=clang CFLAGS=-O2\ -pipe HOST_CC=\ clang\ -m32 CROSS=\ i686-linux-android18-
make[1]: Entering directory '~/dev/android-luajit-launcher/jni/luajit/build/x86'
==== Building LuaJIT 2.1 (amalgamation) ====
make -C src amalg
make[2]: Entering directory '~/dev/android-luajit-launcher/jni/luajit/build/x86/src'
make all "LJCORE_O=ljamalg.o"
make[3]: Entering directory '~/dev/android-luajit-launcher/jni/luajit/build/x86/src'
HOSTLINK host/minilua
/usr/bin/x86_64-unknown-linux-gnu-ld:~/dev/android-luajit-launcher/cmdline-tools/ndk/23.2.8568313//toolchains/llvm/prebuilt/linux-x86_64/bin/../lib/gcc/i686-linux-android/4.9.x/crtbegin.o: file format not recognized; treating as linker script
/usr/bin/x86_64-unknown-linux-gnu-ld:~/dev/android-luajit-launcher/cmdline-tools/ndk/23.2.8568313//toolchains/llvm/prebuilt/linux-x86_64/bin/../lib/gcc/i686-linux-android/4.9.x/crtbegin.o:1: syntax error
clang-12: error: linker command failed with exit code 1 (use -v to see invocation)
make[3]: *** [Makefile:656: host/minilua] Error 1
make[3]: Leaving directory '~/dev/android-luajit-launcher/jni/luajit/build/x86/src'
make[2]: *** [Makefile:625: amalg] Error 2
make[2]: Leaving directory '~/dev/android-luajit-launcher/jni/luajit/build/x86/src'
make[1]: *** [Makefile:165: amalg] Error 2
make[1]: Leaving directory '~/dev/android-luajit-launcher/jni/luajit/build/x86'
make: *** [Makefile:74: prepare] Error 2 |
Thanks for the feedback. I will look at it when I have some time :)
The kind of people that would be able to benefit from this repo for something else than building KOReader for android shouldn't have any problems. Support for the standalone thing, this repo, isn't a priority. AFAIK there's no single project that uses this repo beyond KOReader. And KOReader pulls the SDK and NDK automatically. tl;dr: There's no excuse to have a Readme / Makefile that doesn't produce the "hello, world" example APK. So it will be fixed eventually. |
Indeed, guide is wrong. We shouldn't have building steps given it is an advanced topic to get something usable with the APK barebones. Anyhow, to build the APK of the standalone example:
export ANDROID_NDK_HOME=/path/to/your/ndk/folder
make example
ANDROID_ARCH=arm64 make example
ANDROID_ARCH=x86 make example
ANDROID_ARCH=x86_64 make example |
The text was updated successfully, but these errors were encountered: