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

Android: latest build failed for armeabi #324

Open
Tolsi opened this issue Jan 24, 2022 · 1 comment
Open

Android: latest build failed for armeabi #324

Tolsi opened this issue Jan 24, 2022 · 1 comment

Comments

@Tolsi
Copy link

Tolsi commented Jan 24, 2022

Looks like after release 3.1.2-33 there was an update to the Android NDK, which in version 17+ lost support for the armeabi architecture. I am the owner of Nook Simple Touch (armeabi, Android 2.1) and I wanted to try and build the latest version of Coolreader for this platform and wanted to ask for help with this. I work on this here

So far I've run into two problems:

  1. Last <17 NDK version (16.1.3379499) contains zlib 1.2.3, but third-party libpng 1.6.37 requires zlib 1.2.7. Most likely I can't use a newer version of NDK/zlib, but should I rollback libpng?
In file included from coolreader/thirdparty/libpng-1.6.37/pngwio.c:21:
../../../../../../thirdparty/libpng-1.6.37/pngpriv.h:920:4: error: ZLIB_VERNUM != PNG_ZLIB_VERNUM       "-I (include path) error: see the notes in pngpriv.h"

#define ZLIB_VERNUM 0x1230 from .../ndk/16.1.3379499/sysroot/usr/include/zlib.h and #define PNG_ZLIB_VERNUM 0x1270 from app/thirdparty_libs/libpng/lib/pnglibconf.h. What can I do?

  1. If I comment the first zlib version check then I got some libpng PIC Level error:
C/C++: /home/tolsi/android/sdk/ndk/16.1.4479499/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: fatal error: Failed to link module thirdparty_libs/libpng/liblocal_png.a.llvm.9556.png.c: linking module flags 'PIC Level': IDs have conflicting values

I have no idea how to fix it. Perhaps this is a consequence of the first problem

@virxkane
Copy link
Collaborator

Theoretically there is a complicated workaround:

  • build zlib statically with zprefix
  • when build libpng specify this zlib prefix.

I've never done this, so I can't say more.

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

2 participants