Meanwhile I tried to build the master branch code and I was able to generate lite core binary files. But then it failed since couldn’t find cmake with 3.23.0 version.
[CXX1300] CMake '3.23.0' was not found in SDK, PATH, or by cmake.dir property.
[CXX1301] - CMake '3.24.1' found in PATH did not satisfy requested version.
[CXX1301] - CMake '3.10.2' found in SDK did not satisfy requested version.
[CXX1301] - CMake '3.18.1' found in SDK did not satisfy requested version.
[CXX1301] - CMake '3.22.1' found in SDK did not satisfy requested version.
[CXX1301] - CMake '3.6.0' found in SDK did not satisfy requested version.
The latest android studio chipmunk supports cmake 3.22.1 as latest version
Full build log for master branch but failed at ./gradlew assemble
step
koppisetty@Ajay couchbase-lite-core % export SDK_HOME="/Users/koppisetty/Library/Android/sdk"
koppisetty@Ajay couchbase-lite-core % export NDK_VER="25.1.8937393"
koppisetty@Ajay couchbase-lite-core % export CMAKE_VER="3.22.1"
koppisetty@Ajay couchbase-lite-core % export CMAKE_PATH="${SDK_HOME}/cmake/${CMAKE_VER}/bin"
koppisetty@Ajay couchbase-lite-core % mkdir -p build_cmake/android/lib/armeabi-v7a
koppisetty@Ajay couchbase-lite-core % cd build_cmake/android/lib/armeabi-v7a
koppisetty@Ajay armeabi-v7a % git status
On branch master
Your branch is up to date with 'origin/master'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
(commit or discard the untracked or modified content in submodules)
modified: ../../../../vendor/zlib (modified content, untracked content)
no changes added to commit (use "git add" and/or "git commit -a")
koppisetty@Ajay armeabi-v7a % ${CMAKE_PATH}/cmake \
-G Ninja \
-DCMAKE_TOOLCHAIN_FILE="${SDK_HOME}/ndk/${NDK_VER}/build/cmake/android.toolchain.cmake" \
-DCMAKE_MAKE_PROGRAM="ninja" \
-DANDROID_NATIVE_API_LEVEL=22 \
-DANDROID_ABI=armeabi-v7a \
-DCMAKE_BUILD_TYPE=MinSizeRel \
../../../..
-- The C compiler identification is Clang 14.0.6
-- The CXX compiler identification is Clang 14.0.6
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Users/koppisetty/Library/Android/sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Users/koppisetty/Library/Android/sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Check if compiler accepts -pthread
-- Check if compiler accepts -pthread - yes
-- Found Threads: TRUE
-- Looking for pthread_getname_np in pthread
-- Looking for pthread_getname_np in pthread - not found
-- Looking for pthread_threadid_np in pthread
-- Looking for pthread_threadid_np in pthread - not found
-- Looking for sys/prctl.h
-- Looking for sys/prctl.h - found
-- Looking for prctl
-- Looking for prctl - found
-- Looking for sys/syscall.h
-- Looking for sys/syscall.h - found
-- Looking for SYS_gettid
-- Looking for SYS_gettid - found
-- Looking for linux/unistd.h
-- Looking for linux/unistd.h - found
-- Looking for __NR_gettid
-- Looking for __NR_gettid - found
-- Found Python3: /usr/local/Frameworks/Python.framework/Versions/3.10/bin/python3.10 (found version "3.10.6") found components: Interpreter
get_repo_version.sh: Updated /Users/koppisetty/Documents/couchbase-lite-core/build_cmake/android/lib/armeabi-v7a/generated_headers/repo_version.h
CMake Deprecation Warning at vendor/zlib/CMakeLists.txt:1 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.
Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of off64_t
-- Check size of off64_t - done
-- Looking for fseeko
-- Looking for fseeko - found
-- Looking for unistd.h
-- Looking for unistd.h - found
-- Check size of socklen_t
-- Check size of socklen_t - done
-- Configuring done
CMake Warning (dev) at vendor/mbedtls/library/CMakeLists.txt:191 (add_library):
Policy CMP0063 is not set: Honor visibility properties for all target
types. Run "cmake --help-policy CMP0063" for policy details. Use the
cmake_policy command to set the policy and suppress this warning.
Target "mbedcrypto" of type "STATIC_LIBRARY" has the following visibility
properties set for C:
C_VISIBILITY_PRESET
For compatibility CMake is not honoring them for this target.
This warning is for project developers. Use -Wno-dev to suppress it.
CMake Warning (dev) at vendor/mbedtls/library/CMakeLists.txt:195 (add_library):
Policy CMP0063 is not set: Honor visibility properties for all target
types. Run "cmake --help-policy CMP0063" for policy details. Use the
cmake_policy command to set the policy and suppress this warning.
Target "mbedx509" of type "STATIC_LIBRARY" has the following visibility
properties set for C:
C_VISIBILITY_PRESET
For compatibility CMake is not honoring them for this target.
This warning is for project developers. Use -Wno-dev to suppress it.
CMake Warning (dev) at vendor/mbedtls/library/CMakeLists.txt:199 (add_library):
Policy CMP0063 is not set: Honor visibility properties for all target
types. Run "cmake --help-policy CMP0063" for policy details. Use the
cmake_policy command to set the policy and suppress this warning.
Target "mbedtls" of type "STATIC_LIBRARY" has the following visibility
properties set for C:
C_VISIBILITY_PRESET
For compatibility CMake is not honoring them for this target.
This warning is for project developers. Use -Wno-dev to suppress it.
CMake Warning (dev) at vendor/zlib/CMakeLists.txt:187 (add_library):
Policy CMP0063 is not set: Honor visibility properties for all target
types. Run "cmake --help-policy CMP0063" for policy details. Use the
cmake_policy command to set the policy and suppress this warning.
Target "zlibstatic" of type "STATIC_LIBRARY" has the following visibility
properties set for C:
C_VISIBILITY_PRESET
For compatibility CMake is not honoring them for this target.
This warning is for project developers. Use -Wno-dev to suppress it.
CMake Warning (dev) at vendor/zlib/CMakeLists.txt:233 (add_executable):
Policy CMP0063 is not set: Honor visibility properties for all target
types. Run "cmake --help-policy CMP0063" for policy details. Use the
cmake_policy command to set the policy and suppress this warning.
Target "example" of type "EXECUTABLE" has the following visibility
properties set for C:
C_VISIBILITY_PRESET
For compatibility CMake is not honoring them for this target.
This warning is for project developers. Use -Wno-dev to suppress it.
CMake Warning (dev) at vendor/zlib/CMakeLists.txt:237 (add_executable):
Policy CMP0063 is not set: Honor visibility properties for all target
types. Run "cmake --help-policy CMP0063" for policy details. Use the
cmake_policy command to set the policy and suppress this warning.
Target "minigzip" of type "EXECUTABLE" has the following visibility
properties set for C:
C_VISIBILITY_PRESET
For compatibility CMake is not honoring them for this target.
This warning is for project developers. Use -Wno-dev to suppress it.
CMake Warning (dev) at vendor/zlib/CMakeLists.txt:241 (add_executable):
Policy CMP0063 is not set: Honor visibility properties for all target
types. Run "cmake --help-policy CMP0063" for policy details. Use the
cmake_policy command to set the policy and suppress this warning.
Target "example64" of type "EXECUTABLE" has the following visibility
properties set for C:
C_VISIBILITY_PRESET
For compatibility CMake is not honoring them for this target.
This warning is for project developers. Use -Wno-dev to suppress it.
CMake Warning (dev) at vendor/zlib/CMakeLists.txt:246 (add_executable):
Policy CMP0063 is not set: Honor visibility properties for all target
types. Run "cmake --help-policy CMP0063" for policy details. Use the
cmake_policy command to set the policy and suppress this warning.
Target "minigzip64" of type "EXECUTABLE" has the following visibility
properties set for C:
C_VISIBILITY_PRESET
For compatibility CMake is not honoring them for this target.
This warning is for project developers. Use -Wno-dev to suppress it.
-- Generating done
-- Build files have been written to: /Users/koppisetty/Documents/couchbase-lite-core/build_cmake/android/lib/armeabi-v7a
koppisetty@Ajay armeabi-v7a % ninja LiteCore
[329/329] Linking CXX shared library libLiteCore.so
koppisetty@Ajay armeabi-v7a % cd ../../../..
koppisetty@Ajay couchbase-lite-core % cd ..
koppisetty@Ajay Documents % git clone https://github.com/couchbase/couchbase-lite-java-ce-root --recurse-submodules
Cloning into 'couchbase-lite-java-ce-root'...
remote: Enumerating objects: 132, done.
remote: Counting objects: 100% (91/91), done.
remote: Compressing objects: 100% (42/42), done.
remote: Total 132 (delta 40), reused 90 (delta 40), pack-reused 41
Receiving objects: 100% (132/132), 144.42 KiB | 18.05 MiB/s, done.
Resolving deltas: 100% (51/51), done.
Submodule 'ce' (https://github.com/couchbase/couchbase-lite-java-ce) registered for path 'ce'
Submodule 'common' (https://github.com/couchbase/couchbase-lite-java-common) registered for path 'common'
Cloning into '/Users/koppisetty/Documents/couchbase-lite-java-ce-root/ce'...
remote: Enumerating objects: 36376, done.
remote: Counting objects: 100% (1787/1787), done.
remote: Compressing objects: 100% (558/558), done.
remote: Total 36376 (delta 971), reused 1691 (delta 889), pack-reused 34589
Receiving objects: 100% (36376/36376), 62.38 MiB | 16.95 MiB/s, done.
Resolving deltas: 100% (16132/16132), done.
Cloning into '/Users/koppisetty/Documents/couchbase-lite-java-ce-root/common'...
remote: Enumerating objects: 46732, done.
remote: Counting objects: 100% (9402/9402), done.
remote: Compressing objects: 100% (2206/2206), done.
remote: Total 46732 (delta 5288), reused 9056 (delta 5070), pack-reused 37330
Receiving objects: 100% (46732/46732), 64.66 MiB | 17.06 MiB/s, done.
Resolving deltas: 100% (21952/21952), done.
Submodule path 'ce': checked out '590b50a179438ff097053c86b28c163750a48c8e'
Submodule path 'common': checked out '9fe884878fb97892f6be612b829327abfdba17f9'
koppisetty@Ajay Documents % cd couchbase-lite-java-ce-root
koppisetty@Ajay couchbase-lite-java-ce-root % etc/install_lite_core.sh
Usage: etc/install_lite_core.sh <abi> <core root> <liteCore bin path>
koppisetty@Ajay couchbase-lite-java-ce-root % etc/install_lite_core.sh android/armeabi-v7a ../couchbase-lite-core ../couchbase-lite-core/build_cmake/android/lib/armeabi-v7a/libLiteCore.so
koppisetty@Ajay couchbase-lite-java-ce-root % cd ce/android
koppisetty@Ajay android % ./gradlew assemble
Starting a Gradle Daemon, 2 incompatible Daemons could not be reused, use --status for details
> Configure project :lib
Checking the license for package NDK (Side by side) 25.0.8775105 in /Users/koppisetty/Library/Android/sdk/licenses
License for package NDK (Side by side) 25.0.8775105 accepted.
Preparing "Install NDK (Side by side) 25.0.8775105 (revision: 25.0.8775105)".
"Install NDK (Side by side) 25.0.8775105 (revision: 25.0.8775105)" ready.
Installing NDK (Side by side) 25.0.8775105 in /Users/koppisetty/Library/Android/sdk/ndk/25.0.8775105
"Install NDK (Side by side) 25.0.8775105 (revision: 25.0.8775105)" complete.
"Install NDK (Side by side) 25.0.8775105 (revision: 25.0.8775105)" finished.
C/C++: Could not execute cmake at '/Users/koppisetty/Library/Android/sdk' to get version. Skipping.
[CXX1300] CMake '3.23.0' was not found in SDK, PATH, or by cmake.dir property.
[CXX1301] - CMake '3.24.1' found in PATH did not satisfy requested version.
[CXX1301] - CMake '3.10.2' found in SDK did not satisfy requested version.
[CXX1301] - CMake '3.18.1' found in SDK did not satisfy requested version.
[CXX1301] - CMake '3.22.1' found in SDK did not satisfy requested version.
[CXX1301] - CMake '3.6.0' found in SDK did not satisfy requested version.
C/C++: Could not execute cmake at '/Users/koppisetty/Library/Android/sdk' to get version. Skipping.
[CXX1300] CMake '3.23.0' was not found in SDK, PATH, or by cmake.dir property.
[CXX1301] - CMake '3.24.1' found in PATH did not satisfy requested version.
[CXX1301] - CMake '3.10.2' found in SDK did not satisfy requested version.
[CXX1301] - CMake '3.18.1' found in SDK did not satisfy requested version.
[CXX1301] - CMake '3.22.1' found in SDK did not satisfy requested version.
[CXX1301] - CMake '3.6.0' found in SDK did not satisfy requested version.
WARNING:C/C++: Could not execute cmake at '/Users/koppisetty/Library/Android/sdk' to get version. Skipping.
C/C++: Could not execute cmake at '/Users/koppisetty/Library/Android/sdk' to get version. Skipping.
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':lib'.
> Failed to notify project evaluation listener.
> [CXX1300] CMake '3.23.0' was not found in SDK, PATH, or by cmake.dir property.
> Could not get unknown property 'compileReleaseKotlin' for task ':lib:javadoc' of type org.gradle.api.tasks.javadoc.Javadoc.
> Could not get unknown property 'compileDebugKotlin' for task ':lib:spotbugsHtml' of type com.github.spotbugs.snom.SpotBugsTask.
> Could not get unknown property 'compileDebugKotlin' for task ':lib:spotbugsXml' of type com.github.spotbugs.snom.SpotBugsTask.
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
* Get more help at https://help.gradle.org
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
See https://docs.gradle.org/7.3.3/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 1m 15s
koppisetty@Ajay android %