Native Android Build Relies on CPP
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Domain
- build-system, documentation, mobile-dev
Research direction
Start at build.xml around line 1141 and reproduce the native Android build with NDK 21.4.7075529, focusing on the failed aarch64-linux-android-cpp check and the reported CC= requirement. Review the Android documentation in /www/ as well. Done means the build no longer fails the C preprocessor sanity check and the documentation explains how to pass the correct compiler to Ant.
Written by the indexing model from the issue text.
Description
The newer android NDKS (I'm using 21.4.7075529) do not include a CPP binary. It's replaced by passing -E to CC (so, something like aarch64-linux-android21-clang -E).
native:
[exec] Generating configure
[exec] autoreconf: Entering directory `.'
[exec] autoreconf: configure.ac: not using Gettext
[exec] autoreconf: running: aclocal -I m4
[exec] autoreconf: configure.ac: tracing
[exec] autoreconf: running: libtoolize --copy
[exec] libtoolize: putting auxiliary files in '.'.
[exec] libtoolize: copying file './ltmain.sh'
[exec] libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
[exec] libtoolize: copying file 'm4/libtool.m4'
[exec] libtoolize: copying file 'm4/ltoptions.m4'
[exec] libtoolize: copying file 'm4/ltsugar.m4'
[exec] libtoolize: copying file 'm4/ltversion.m4'
[exec] libtoolize: copying file 'm4/lt~obsolete.m4'
[exec] autoreconf: running: /usr/bin/autoconf
[exec] autoreconf: running: /usr/bin/autoheader
[exec] autoreconf: running: automake --add-missing --copy --no-force
[exec] configure.ac:31: installing './compile'
[exec] configure.ac:19: installing './install-sh'
[exec] configure.ac:19: installing './missing'
[exec] Makefile.am: installing './depcomp'
[exec] doc/Makefile.am:3: installing 'doc/mdate-sh'
[exec] doc/Makefile.am:3: installing 'doc/texinfo.tex'
[exec] Configuring libffi (aarch64)
[exec] autoreconf: Leaving directory `.'
[exec] checking build system type... x86_64-pc-linux-gnu
[exec] checking host system type... aarch64-unknown-linux-android
[exec] checking target system type... aarch64-unknown-linux-android
[exec] checking for gsed... sed
[exec] checking for a BSD-compatible install... /usr/local/bin/install -c
[exec] checking whether build environment is sane... yes
[exec] checking for aarch64-linux-android-strip... aarch64-linux-android-strip
[exec] checking for a thread-safe mkdir -p... /usr/local/bin/mkdir -p
[exec] checking for gawk... gawk
[exec] checking whether make sets $(MAKE)... yes
[exec] checking whether make supports nested variables... yes
[exec] checking for aarch64-linux-android-gcc... aarch64-linux-android21-clang
[exec] checking whether the C compiler works... yes
[exec] checking for C compiler default output file name... a.out
[exec] checking for suffix of executables...
[exec] checking whether we are cross compiling... yes
[exec] checking for suffix of object files... o
[exec] checking whether we are using the GNU C compiler... yes
[exec] checking whether aarch64-linux-android21-clang accepts -g... yes
[exec] checking for aarch64-linux-android21-clang option to accept ISO C89... none needed
[exec] checking whether aarch64-linux-android21-clang understands -c and -o together... yes
[exec] checking whether make supports the include directive... yes (GNU style)
[exec] configure: WARNING: using cross tools not prefixed with host triplet
[exec] checking dependency style of aarch64-linux-android21-clang... gcc3
[exec] checking for aarch64-linux-android-g++... no
[exec] checking for aarch64-linux-android-c++... no
[exec] checking for aarch64-linux-android-gpp... no
[exec] checking for aarch64-linux-android-aCC... no
[exec] checking for aarch64-linux-android-CC... no
[exec] checking for aarch64-linux-android-cxx... no
[exec] checking for aarch64-linux-android-cc++... no
[exec] checking for aarch64-linux-android-cl.exe... no
[exec] checking for aarch64-linux-android-FCC... no
[exec] checking for aarch64-linux-android-KCC... no
[exec] checking for aarch64-linux-android-RCC... no
[exec] checking for aarch64-linux-android-xlC_r... no
[exec] checking for aarch64-linux-android-xlC... no
[exec] checking for g++... g++
[exec] checking whether we are using the GNU C++ compiler... yes
[exec] checking whether g++ accepts -g... yes
[exec] checking dependency style of g++... gcc3
[exec] checking dependency style of aarch64-linux-android21-clang... gcc3
[exec] checking how to print strings... printf
[exec] checking for a sed that does not truncate output... /bin/sed
[exec] checking for grep that handles long lines and -e... /bin/grep
[exec] checking for egrep... /bin/grep -E
[exec] checking for fgrep... /bin/grep -F
[exec] checking for ld used by aarch64-linux-android21-clang... /opt/android/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/aarch64-linux-android/bin/ld
[exec] checking if the linker (/opt/android/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/aarch64-linux-android/bin/ld) is GNU ld... yes
[exec] checking for BSD- or MS-compatible name lister (nm)... /opt/android/ndk/21.4.7075529/platforms/android-21/../../toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin//aarch64-linux-android-nm -B
[exec] checking the name lister (/opt/android/ndk/21.4.7075529/platforms/android-21/../../toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin//aarch64-linux-android-nm -B) interface... BSD nm
[exec] checking whether ln -s works... yes
[exec] checking the maximum length of command line arguments... 1572864
[exec] checking how to convert x86_64-pc-linux-gnu file names to aarch64-unknown-linux-android format... func_convert_file_noop
[exec] checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
[exec] checking for /opt/android/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/aarch64-linux-android/bin/ld option to reload object files... -r
[exec] checking for aarch64-linux-android-objdump... aarch64-linux-android-objdump
[exec] checking how to recognize dependent libraries... pass_all
[exec] checking for aarch64-linux-android-dlltool... no
[exec] checking for dlltool... no
[exec] checking how to associate runtime and link libraries... printf %s\n
[exec] checking for aarch64-linux-android-ar... aarch64-linux-android-ar
[exec] checking for archiver @FILE support... @
[exec] checking for aarch64-linux-android-strip... (cached) aarch64-linux-android-strip
[exec] checking for aarch64-linux-android-ranlib... aarch64-linux-android-ranlib
[exec] checking command to parse /opt/android/ndk/21.4.7075529/platforms/android-21/../../toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin//aarch64-linux-android-nm -B output from aarch64-linux-android21-clang object... ok
[exec] checking for sysroot... no
[exec] checking for a working dd... /usr/local/bin/dd
[exec] checking how to truncate binary pipes... /usr/local/bin/dd bs=4096 count=1
[exec] checking for aarch64-linux-android-mt... no
[exec] checking for mt... no
[exec] checking if : is a manifest tool... no
[exec] checking how to run the C preprocessor... aarch64-linux-android-cpp
[exec] configure: error: in `/shared/src/jna/build/native-android-aarch64/libffi':
[exec] configure: error: C preprocessor "aarch64-linux-android-cpp" fails sanity check
[exec] See `config.log' for more details
[exec] make: *** [/shared/src/jna/build/native-android-aarch64/libffi/.libs/libffi.a] Error 1
BUILD FAILED
/shared/src/jna/build.xml:1141: exec returned: 2
Additionally the need to pass the correct compiler to ant via CC= should be added to the android documentation in the /www/ subfolder.
- Dominant language
- Java
- Stars
- 8.9k
- Forks
- 1.7k
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 1
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from java-native-access/jna
-
Difficulty 4/5 3-5 days Newbie friendliness 66/100
java-native-access/jna#1738 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
java-native-access/jna#1736 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 65/100
java-native-access/jna#1717 ·
-
Windows32Exception - The parameter is incorrectPossibly taken @marktech0813 claimed this 333 days ago. Open
Difficulty 4/5 3-5 days Newbie friendliness 35/100
java-native-access/jna#1700 · 11 comments ·
-
feature request
Difficulty 4/5 3-5 days Newbie friendliness 35/100
java-native-access/jna#1698 · 1 comment ·
All issues in java-native-access/jna
Similar issues
-
[BUG] 订单:会员凭订单号即可取消其他会员的待付款订单(取消接口不校验订单归属)Possibly taken @dadiyang claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
macrozheng/mall#1016 ·
-
[Bug] The producer summary counts an unreported client version as a second version and warns about a version mixPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
apache/rocketmq-dashboard#6110 ·
Maintainers usually reply within 4 days
-
Feature:Resolution
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
intellij-elixir/intellij-elixir#4396 ·
Maintainers usually reply within 1 day
-
Python 3.15 supportPossibly taken @amnesiaof claimed this today. OpenL: python L: python:uv
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
dependabot/dependabot-core#16524 · 1 comment ·
Maintainers usually reply within 1 day
-
`Processing lsp` never exits and leaves orphaned processesPossibly taken @overcast302 claimed this today. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
processing/processing4#1578 · 1 comment ·