-
-
Notifications
You must be signed in to change notification settings - Fork 438
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 compilation error #137
Comments
Hi bartek, and thank you for trying minizip. A search on
Well, no Android in the list. Maybe adding this would fix your issue:
But will it be compatible with |
@bartekkr I made a branch on my fork with such macro added, can you test it? https://github.com/Coeur/minizip/tree/android |
Hi, thank you for reply |
It should be OK actually, as either you're not using Unified Headers (and you're not concerned by the issue), or you're using Unified Headers but building for 32 bits only (and you're not concerned by the issue), or you're in a configuration that won't build at all and with Android specific errors. Well, that's what I understood from aosp-mirror/platform_bionic@00fedf5. Please note that I have never developed for Android yet. |
That works (project can be built), thanks! (maybe merge master to android?) |
i will use libminizip in my project and will let you know if it works |
I turned it into a pull request. It's in the hands of @nmoinvaz now. |
works on android correctly |
See zlib-ng/minizip-ng#137 for the detail.
Hi, I am using following NDK:
builder@dev-workstation:~/minizip-scratchpad$ arm-linux-androideabi-gcc -v
Using built-in specs.
COLLECT_GCC=arm-linux-androideabi-gcc
COLLECT_LTO_WRAPPER=/work/android-sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/../libexec/gcc/arm-linux-androideabi/4.9.x/lto-wrapper
Target: arm-linux-androideabi
Configured with: /usr/local/google/buildbot/src/android/gcc/toolchain/build/../gcc/gcc-4.9/configure --prefix=/tmp/59719db9ae19ff43aef46bbcb79596b6 --target=arm-linux-androideabi --host=x86_64-linux-gnu --build=x86_64-linux-gnu --with-gnu-as --with-gnu-ld --enable-languages=c,c++ --with-gmp=/buildbot/tmp/build/toolchain/temp-install --with-mpfr=/buildbot/tmp/build/toolchain/temp-install --with-mpc=/buildbot/tmp/build/toolchain/temp-install --with-cloog=/buildbot/tmp/build/toolchain/temp-install --with-isl=/buildbot/tmp/build/toolchain/temp-install --with-ppl=/buildbot/tmp/build/toolchain/temp-install --disable-ppl-version-check --disable-cloog-version-check --disable-isl-version-check --enable-cloog-backend=isl --with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm' --disable-libssp --enable-threads --disable-nls --disable-libmudflap --disable-libgomp --disable-libstdc__-v3 --disable-sjlj-exceptions --disable-shared --disable-tls --disable-libitm --with-float=soft --with-fpu=vfp --with-arch=armv5te --enable-target-optspace --enable-bionic-libs --enable-libatomic-ifuncs=no --enable-initfini-array --disable-nls --prefix=/tmp/59719db9ae19ff43aef46bbcb79596b6 --with-sysroot=/tmp/59719db9ae19ff43aef46bbcb79596b6/sysroot --with-binutils-version=2.25 --with-mpfr-version=3.1.1 --with-mpc-version=1.0.1 --with-gmp-version=5.0.5 --with-gcc-version=4.9 --with-gdb-version=none --with-gxx-include-dir=/tmp/59719db9ae19ff43aef46bbcb79596b6/include/c++/4.9.x --with-bugurl=http://source.android.com/source/report-bugs.html --enable-languages=c,c++ --disable-bootstrap --enable-plugins --enable-libgomp --enable-gnu-indirect-function --disable-libsanitizer --enable-gold --enable-threads --enable-eh-frame-hdr-for-static --enable-graphite=yes --with-isl-version=0.11.1 --with-cloog-version=0.18.0 --with-arch=armv5te --program-transform-name='s&^&arm-linux-androideabi-&' --enable-gold=default
Thread model: posix
gcc version 4.9.x 20150123 (prerelease) (GCC)
when i configure minizip, using cmake command:
cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=/work/libextern/android_armv7-a_gcc_4.9.0/minizip-1-1 -DDEF_ZLIB_ROOT=/work/libextern/android_armv7-a_gcc_4.9.0/zlib-1-2-11 -DBUILD_TEST=ON -DCMAKE_TOOLCHAIN_FILE=/work/libextern/android_armv7-a_gcc_4.9.0/toolchain.file.cmake ../minizip
with following toolchain file:
set(CMAKE_SYSTEM_NAME Android)
set(CMAKE_ANDROID_ARCH_ABI armeabi-v7a)
set(CMAKE_ANDROID_NDK $ENV{ANDROID_NDK_BIN}/../../../../..)
set(CMAKE_SYSROOT $ENV{ANDROID_NDK_BIN}/../../../../../platforms/android-16/arch-arm)
set(CMAKE_FIND_ROOT_PATH /work/libextern/android_armv7-a_gcc_4.9.0 $ENV{ANDROID_NDK_BIN}/../../../../../platforms/android-16/arch-arm)
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
cmake version: 3.8.0
and built it, then i have following linker errors:
/home/builder/minizip/miniunz.c:221: error: undefined reference to 'fopen64'
/home/builder/minizip/miniunz.c:230: error: undefined reference to 'fopen64'
/home/builder/minizip/minishared.c:219: error: undefined reference to 'fopen64'
/home/builder/minizip/minishared.c:229: error: undefined reference to 'fopen64'
/home/builder/minizip/minishared.c:234: error: undefined reference to 'fseeko64'
/home/builder/minizip/minishared.c:235: error: undefined reference to 'ftello64'
/home/builder/minizip/ioapi.c:297: error: undefined reference to 'fseeko64'
/home/builder/minizip/ioapi.c:239: error: undefined reference to 'ftello64'
it would be nice to fix it ;)
(zlib exists and is correctly built)
bartek
The text was updated successfully, but these errors were encountered: