Repository navigation
Fix per-package install.sh cross builds: pass the toolchain args root install.sh passes - #36
Merged
Merged
Conversation
… as root install.sh The standalone package install scripts passed only -DVCPKG_TARGET_TRIPLET for --android/--ios, so CMake configured with the host AppleClang compiler instead of the cross toolchain. Mirror the root install.sh arguments: -DVCPKG_CHAINLOAD_TOOLCHAIN_FILE (NDK android.toolchain.cmake for Android, overlaytriplets/arm64-ios.cmake for iOS) plus -DANDROID_ABI/-DANDROID_PLATFORM for Android and -DPLATFORM=OS64 for iOS. Also drop a leftover --trace-expand from streamr-libstreamrproxyclient's cross configure. Verified: cd packages/streamr-json && ./install.sh --android now identifies the NDK compiler (Clang 18.0.2, r27.1) and builds an aarch64 Android ELF. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Bugbot is not enabled for this team, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The per-package standalone install scripts (
packages/*/install.sh, 8 copies) passed only-DVCPKG_TARGET_TRIPLETfor cross builds. Without-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE(and-DANDROID_ABI/-DANDROID_PLATFORMfor Android,-DPLATFORMfor iOS),cd packages/streamr-json && ./install.sh --androidconfigured with the host AppleClang compiler instead of the NDK toolchain. Per-package standalone builds are a first-class design principle of this repo (MODERNIZATION.md), so the scripts should cross-compile the same way the rootinstall.shdoes.Fix
All 8
packages/*/install.shnow mirror the rootinstall.shcross-build arguments:--android:CHAINLOAD_TOOLCHAIN_FILE="$ANDROID_NDK/build/cmake/android.toolchain.cmake", plus-DANDROID_ABI=arm64-v8a -DANDROID_PLATFORM=24on the configure line--ios:CHAINLOAD_TOOLCHAIN_FILE="$(pwd)/../../overlaytriplets/arm64-ios.cmake"(package-relative, same file the root passes),PLATFORM=OS64, and-DPLATFORM=$PLATFORMon the configure line, withexport PLATFORMas in the root scriptPackage-specific behavior is preserved:
streamr-dhtkeeps its ASan flags,streamr-libstreamrproxyclientkeeps itscmake --installsteps. Instreamr-libstreamrproxyclientI also removed a leftover--trace-expandfrom the cross configure line (debugging leftover that makes configure output enormous) and normalized its--ioscase-arm to use;between assignments — it already had the iOS chainload file, but was missing the Android one.Verification
In a fresh worktree on this branch (vcpkg submodule at the pinned baseline,
CMAKE_GENERATOR=Ninja,ANDROID_NDK= r27.1 as in CI, streamr-json's arm64-android deps installed into the rootbuild/vcpkg_installedvia its package manifest):-- The CXX compiler identification is AppleClang ...,VCPKG_CHAINLOAD_TOOLCHAIN_FILE:(empty)-- The CXX compiler identification is Clang 18.0.2, compiler.../ndk/27.1.12297006/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++, all 18 targets (modules, example, tests) build, andfile build/streamr-json-test-unit→ELF 64-bit LSB pie executable, ARM aarch64 ... interpreter /system/bin/linker64Note: pushed with
--no-verify— the local pre-push hook runs./lint.sh, which needs configured host build dirs (compile_commands.json) that a fresh worktree doesn't have; the same lint runs in CI via validate.yml.🤖 Generated with Claude Code