-
I'm trying to build my project (Godot extension) for Android from Fedora 41. I followed the instructions on gdal.org to build gdal for Android and after some wrangling, I got this to work:
sudo dnf install automake bison flex libtool perl-CPAN
cpan IPC::Cmd
git clone https://github.com/microsoft/vcpkg.git
cd vcpkg
./bootstrap-vcpkg.sh -disableMetrics
./vcpkg integrate install
unset CC CXX
export ANDROID_NDK_HOME=<path/to/android_ndk_home>
./vcpkg install gdal:arm64-android Then I build my project using: LIBRARY_PATH=<path/to/ndk/libs> GDAL_HOME=<path/to/vcpkg/gdal/stuff> GDAL_VERSION=<x.y.z> GDAL_STATIC=1 cargo build --target=aarch64-linux-android --release
I got past my previous errors but have other link issues. See below. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 7 replies
-
I needed to do the following: rustup target add aarch64-linux-android
cargo install cargo-ndk
ANDROID_NDK_HOME=<path/to/android/ndk> GDAL_HOME=<path/to/vcpkg/gdal/stuff> GDAL_VERSION=<x.y.z> GDAL_STATIC=1 cargo ndk -t arm64-v8a build --target=aarch64-linux-android --release This almost works but now I get these link errors:
Anyone have an idea of what the problem might be? Cound it be that the linker is just missing openjpeg (which is actually named libopenjp2.a)? |
Beta Was this translation helpful? Give feedback.
Success! Using this vspkg build line, building my project works:
It looks like
core
includes everything I need.