Closed akallabeth closed 3 years ago
Hi @akallabeth
Build aborts at ndk-build step in Task :android-database-sqlcipher:buildNative FAILED See build abort at sqlcipher step
What are the details provided in the error message specifically?
Using side-by-side NDK (version does not matter, tried from 16 up to 21)
You will need to use NDK version r20
.
20.0.5594570
or 20.1.5948944
from sdkmanager
? (Sorry, always get confused by google versioning) or are there actual differences between sdkmanager
and direct downloads?Hi @akallabeth
Is that 20.0.5594570 or 20.1.5948944 from sdkmanager? (Sorry, always get confused by google versioning) or are there actual differences between sdkmanager and direct downloads?
I believe you want 20b, which maps to "20.1.5948944"
how do I get the output of native build tools in a gradle build? (gradle is very verbose but tends to lack the information actually relevant)
Try running the following command to get further details. I agree Gradle can be verbose, but we need to start somewhere to further narrow down the cause of your build error. Is there a reason you need to build the library from source?
./gradlew android-database-sqlcipher:buildNative --debug
attached the output, but it only tells ndk-build
failed :/
@developernotes and yes, we try to minimize app footprint and our native code already uses openssl, so I need a version linked against that one.
Hi @akallabeth
Can you check to see if ndk-build
is available on your PATH
(i.e., execute which ndk-build
)?
@developernotes yes, added it manually. Can run it in bash, path in ndk dir used (I think I had the wrong one when I created the log). same result.
Hi @akallabeth
What happens when you run make build-openssl
?
@developernotes that one is building openssl, no issues.
Hi @akallabeth
After attempting a build of ./gradlew android-database-sqlcipher:buildNative
, navigate into the SQLCipher directory:
cd android-database-sqlcipher/src/main/external/sqlcipher/
Do you see a config.log
file present? If so, what is contained in the file? Do you see any errors?
some conftest
errors nothing I´d call suspicious, but attaching the file for review.
Hi @akallabeth
Do you have build-essential
installed? Also, it appears you are also missing Tcl.
@developernotes wait, what? This is a cross compile, build-essential are host compiler tools. Anyway, installed, compiling C related stuff every day. The tcl part I can check tomorrow (late here)
Also tried on another machine (fedora 31 host), sadly same result.
Hi @akallabeth
wait, what? This is a cross compile, build-essential are host compiler tools.
Correct, however a part of the build process is to prepare an amalgamation of SQLCipher which is compiled with the JNI layer.
Ok, ran the ndk-build
step manually with the environment
and workingdir
copied from the log.
Get these lines:
make: Entering directory '/home/nin/src/android-database-sqlcipher/android-database-sqlcipher/src/main/cpp'
/home/nin/Android/Sdk/ndk/21.0.6113669/build/gmsl/__gmsl:512: *** non-numeric second argument to 'wordlist' function: ''. Stop.
make: Leaving directory '/home/nin/src/android-database-sqlcipher/android-database-sqlcipher/src/main/cpp'
EDIT: Just seen I posted from the wrong terminal (NDK 21), also ran with NDK r20b, same result
Hi @akallabeth
Just to rule out a difference in what specific Android NDK was installed via sdkmanager
(I don't use that directly), would you try this archive provided by Google? It matches the exact NDK version in source.properties
that I am using. Thanks!
@developernotes same same :/
Hello, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "bug", "enhancement", or "security" and I will leave it open. Thank you for your contributions.
still not able to build with either 4.3.0
tag or 7d86f6bd702da7c4cb66e77b4543822fe89fe87a
Hi @akallabeth
same same :/
Would you mind clarifying what specific command and error message you received when running the command using the linked NDK?
@developernotes they are exactly the same, (maybe the line is different). (the non-numeric
message from above)
@developernotes I will retry this evening when I have time.
Hello, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "bug", "enhancement", or "security" and I will leave it open. Thank you for your contributions.
Ok, sorry, did forget about this.
Tested this again (also with v4.4.0
) on ubuntu 18.04 and 20.04:
tcl
and build-essentials
on hostANDROID_NDK_ROOT
, ANDROID_NDK_HOME
and ANDROID_HOME
, ANDROID_SDK_ROOT
(just to be sure we cover the most common variants out there)make init
and make build-debug
Hi @akallabeth
Would you rerun your android-database-sqlcipher:buildAmalgamation
task with the --debug
flag and provide the build output for review?
ran
./gradlew buildAmalgamation --debug 2>&1 |tee log.txt
./gradlew buildNative --debug 2>&1 |tee native-log.txt
Hi @akallabeth
Is it possible you sent an old log.txt.zip file? The output in the linked log file doesn't appear to have the usually verbose debug output.
@developernotes ok, that is embarrassing, yes, you´re right, uploaded the wrong zip :/ back on monday, currently only limited access to the test machine.
Ran the test again, this time the correct zip.
git clean -xdf
./gradlew buildAmalgamation --debug 2>&1 |tee log.txt
./gradlew buildNative --debug 2>&1 |tee native-log.txt
Hello, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "bug", "enhancement", or "security" and I will leave it open. Thank you for your contributions.
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to reopen with up-to-date information.
Hi @akallabeth
My apologizes for the delay in response. Reviewing your log, it appears this command fails. Would you try running it directly and let us know the output?
ndk-build V=1 NDK_DEBUG=0 --environment-overrides NDK_LIBS_OUT=/home/nin/src/android-database-sqlcipher/android-database-sqlcipher/src/main/libs32 -C /home/nin/src/android-database-sqlcipher/android-database-sqlcipher/src/main/cpp NDK_APPLICATION_MK=/home/nin/src/android-database-sqlcipher/android-database-sqlcipher/src/main/cpp/Application32.mk
@developernotes sorry, was on vacation, will try as soon as possible
Hello, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "bug", "enhancement", or "security" and I will leave it open. Thank you for your contributions.
Sorry, did forget.
Here:
ndk-build V=1 NDK_DEBUG=0 --environment-overrides NDK_LIBS_OUT=/home/nin/src/android-database-sqlcipher/android-database-sqlcipher/src/main/libs32 -C /home/nin/src/android-database-sqlcipher/android-database-sqlcipher/src/main/cpp NDK_APPLICATION_MK=/home/nin/src/android-database-sqlcipher/android-database-sqlcipher/src/main/cpp/Application32.mk
make: Entering directory '/home/nin/src/android-database-sqlcipher/android-database-sqlcipher/src/main/cpp'
/home/nin/Android/Sdk/ndk/21.3.6528147/build/gmsl/__gmsl:512: *** non-numeric second argument to 'wordlist' function: ''. Stop.
make: Leaving directory '/home/nin/src/android-database-sqlcipher/android-database-sqlcipher/src/main/cpp'
Same for other NDK versions.
Hi @akallabeth
What Linux distribution and version are you running this build on?
@developernotes ubuntu 20.04
Hello, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "bug", "enhancement", or "security" and I will leave it open. Thank you for your contributions.
Hi @akallabeth
I'm sorry for the delay, I've made a few changes to the build process necessary for building on Ubuntu 20.04. I am now able to successfully but on Ubuntu 20.04. Would you mind pulling the latest changes, then run the following and let us know your results?
make distclean
make build-debug
Thanks!
@developernotes thank you, commit 41bcfa9d4a05982c4e0c0076f90b0cb5ad56d1e0 does build, even with the most recent NDK
Hi @akallabeth
Excellent, that is great news, thank you for confirming on your end. I will close this issue now, thank you again for your report!
Expected Behavior
Build succeedes
Actual Behavior
Build aborts at
ndk-build
step inTask :android-database-sqlcipher:buildNative FAILED
Steps to Reproduce
16
up to21
)v4.3.0
(same is true for master)make init && make build-debug
sqlcipher
step