diff --git a/.cargo/config.toml b/.cargo/config.toml index 4fcaf44..6714d9b 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -20,19 +20,17 @@ ICEBUG_DIR = { value = "icebug", relative = true } # - macOS .app bundles stage them under Contents/Frameworks # - cargo dev/test binaries resolve ../../../ entries # (target/{debug,release}/deps/ -> repo root) -# Absolute well-known rpaths (macOS only): the algo extension is downloaded -# at runtime and its own LC_RPATHs point at its build machine, so its -# @rpath deps (libarrow, libomp, libnetworkit) expand against *this* -# binary's rpaths. These entries let it resolve from Homebrew / system -# locations with no DYLD_LIBRARY_PATH. Missing dirs are harmless. +# Vendored dirs come first so the pinned prebuilts (./liblbug, +# ./icebug/lib) always win over ambient copies (e.g. a Homebrew +# ladybug/libnetworkit): an incompatible ambient lib resolved first +# segfaults (lbug) or fails LOAD (algo extension) with no graceful +# error. Absolute well-known rpaths (macOS only) follow: the algo +# extension is downloaded at runtime and its own LC_RPATHs point at its +# build machine, so its @rpath deps (libarrow, libomp) expand against +# *this* binary's rpaths. These entries let it resolve from Homebrew / +# system locations with no DYLD_LIBRARY_PATH. Missing dirs are harmless. [target.aarch64-apple-darwin] rustflags = [ - "-C", "link-arg=-Wl,-rpath,/opt/homebrew/lib", - "-C", "link-arg=-Wl,-rpath,/opt/homebrew/opt/apache-arrow/lib", - "-C", "link-arg=-Wl,-rpath,/opt/homebrew/opt/libomp/lib", - "-C", "link-arg=-Wl,-rpath,/usr/local/lib", - "-C", "link-arg=-Wl,-rpath,/usr/local/opt/apache-arrow/lib", - "-C", "link-arg=-Wl,-rpath,/usr/local/opt/libomp/lib", "-C", "link-arg=-Wl,-rpath,@executable_path", "-C", "link-arg=-Wl,-rpath,@executable_path/icebug/lib", "-C", "link-arg=-Wl,-rpath,@executable_path/liblbug", @@ -44,16 +42,16 @@ rustflags = [ "-C", "link-arg=-Wl,-rpath,@executable_path/../../../../liblbug", "-C", "link-arg=-Wl,-rpath,@executable_path/../../../icebug/lib", "-C", "link-arg=-Wl,-rpath,@executable_path/../../../../icebug/lib", -] - -[target.x86_64-apple-darwin] -rustflags = [ "-C", "link-arg=-Wl,-rpath,/opt/homebrew/lib", "-C", "link-arg=-Wl,-rpath,/opt/homebrew/opt/apache-arrow/lib", "-C", "link-arg=-Wl,-rpath,/opt/homebrew/opt/libomp/lib", "-C", "link-arg=-Wl,-rpath,/usr/local/lib", "-C", "link-arg=-Wl,-rpath,/usr/local/opt/apache-arrow/lib", "-C", "link-arg=-Wl,-rpath,/usr/local/opt/libomp/lib", +] + +[target.x86_64-apple-darwin] +rustflags = [ "-C", "link-arg=-Wl,-rpath,@executable_path", "-C", "link-arg=-Wl,-rpath,@executable_path/icebug/lib", "-C", "link-arg=-Wl,-rpath,@executable_path/liblbug", @@ -65,6 +63,12 @@ rustflags = [ "-C", "link-arg=-Wl,-rpath,@executable_path/../../../../liblbug", "-C", "link-arg=-Wl,-rpath,@executable_path/../../../icebug/lib", "-C", "link-arg=-Wl,-rpath,@executable_path/../../../../icebug/lib", + "-C", "link-arg=-Wl,-rpath,/opt/homebrew/lib", + "-C", "link-arg=-Wl,-rpath,/opt/homebrew/opt/apache-arrow/lib", + "-C", "link-arg=-Wl,-rpath,/opt/homebrew/opt/libomp/lib", + "-C", "link-arg=-Wl,-rpath,/usr/local/lib", + "-C", "link-arg=-Wl,-rpath,/usr/local/opt/apache-arrow/lib", + "-C", "link-arg=-Wl,-rpath,/usr/local/opt/libomp/lib", ] [target.aarch64-unknown-linux-gnu] diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e39175d..464efed 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -36,13 +36,14 @@ jobs: wget -qO- --timeout=60 --tries=3 https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/llvm-snapshot.asc echo "deb http://apt.llvm.org/jammy llvm-toolchain-jammy-20 main" | sudo tee /etc/apt/sources.list.d/llvm20.list # Apache Arrow repo (icebug's cxx bridge needs arrow headers). - # Pinned to 25.0.1: the icebug prebuilt links libarrow.so.2500; the - # repo now defaults to 26.x, which breaks test/runtime loads. + # Pinned to 26.0.0 to match the Linux icebug 13.5 prebuilt, which + # links libarrow.so.2600 (macOS/Windows 13.5 builds link + # libarrow.2500, so they stay on the Arrow 25 setup). wget --timeout=60 --tries=3 https://apache.jfrog.io/artifactory/arrow/ubuntu/apache-arrow-apt-source-latest-jammy.deb sudo apt-get install -y ./apache-arrow-apt-source-latest-jammy.deb # Bound mirror stalls: fail fast instead of hanging the run for hours. sudo apt-get -o Acquire::Retries=3 -o Acquire::http::Timeout=60 -o Acquire::https::Timeout=60 update - sudo apt-get -o Acquire::Retries=3 -o Acquire::http::Timeout=60 -o Acquire::https::Timeout=60 install -y --no-install-recommends gcc-13 g++-13 cmake pkg-config libssl-dev libxkbcommon-dev libxkbcommon-x11-dev libwayland-dev libarrow-dev=25.0.1-1 libarrow2500=25.0.1-1 libomp-20-dev + sudo apt-get -o Acquire::Retries=3 -o Acquire::http::Timeout=60 -o Acquire::https::Timeout=60 install -y --no-install-recommends gcc-13 g++-13 cmake pkg-config libssl-dev libxkbcommon-dev libxkbcommon-x11-dev libwayland-dev libarrow-dev=26.0.0-1 libarrow2600=26.0.0-1 libomp-20-dev echo "CC=gcc-13" >> "$GITHUB_ENV" echo "CXX=g++-13" >> "$GITHUB_ENV" @@ -95,14 +96,7 @@ jobs: run: cargo clippy --all-targets -- -D warnings - name: Run tests - run: | - # The algo extension served by INSTALL algo is currently ABI- - # incompatible with pinned lbug 0.21.2: its GDS calls segfault - # inside native code (signal 11, no graceful error), killing the - # whole test harness. Skip those tests until upstream publishes - # compatible bits; re-enable by dropping the --skip flags. - # local_leiden_two_cliques (in-process icebug) still runs. - cargo test -- --skip gds_leiden_two_cliques --skip gds_page_rank_star --skip gds_page_rank_stale_projection_serves_live_storage + run: cargo test build: needs: lint @@ -160,13 +154,14 @@ jobs: wget -qO- --timeout=60 --tries=3 https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/llvm-snapshot.asc echo "deb http://apt.llvm.org/jammy llvm-toolchain-jammy-20 main" | sudo tee /etc/apt/sources.list.d/llvm20.list # Apache Arrow repo (icebug's cxx bridge needs arrow headers). - # Pinned to 25.0.1: the icebug prebuilt links libarrow.so.2500; the - # repo now defaults to 26.x, which breaks test/runtime loads. + # Pinned to 26.0.0 to match the Linux icebug 13.5 prebuilt, which + # links libarrow.so.2600 (macOS/Windows 13.5 builds link + # libarrow.2500, so they stay on the Arrow 25 setup). wget --timeout=60 --tries=3 https://apache.jfrog.io/artifactory/arrow/ubuntu/apache-arrow-apt-source-latest-jammy.deb sudo apt-get install -y ./apache-arrow-apt-source-latest-jammy.deb # Bound mirror stalls: fail fast instead of hanging the run for hours. sudo apt-get -o Acquire::Retries=3 -o Acquire::http::Timeout=60 -o Acquire::https::Timeout=60 update - sudo apt-get -o Acquire::Retries=3 -o Acquire::http::Timeout=60 -o Acquire::https::Timeout=60 install -y --no-install-recommends gcc-13 g++-13 cmake pkg-config libssl-dev libxkbcommon-dev libxkbcommon-x11-dev libwayland-dev libarrow-dev=25.0.1-1 libarrow2500=25.0.1-1 libomp-20-dev + sudo apt-get -o Acquire::Retries=3 -o Acquire::http::Timeout=60 -o Acquire::https::Timeout=60 install -y --no-install-recommends gcc-13 g++-13 cmake pkg-config libssl-dev libxkbcommon-dev libxkbcommon-x11-dev libwayland-dev libarrow-dev=26.0.0-1 libarrow2600=26.0.0-1 libomp-20-dev echo "CC=gcc-13" >> "$GITHUB_ENV" echo "CXX=g++-13" >> "$GITHUB_ENV" @@ -299,9 +294,6 @@ jobs: # The test INSTALLs the algo extension from the official repo and # LOADs it at runtime: its libarrow dep resolves via our rpaths # (vendored above) on Unix, via PATH (vcpkg) on Windows. - # NOTE: the currently served algo builds segfault inside native - # code against pinned lbug 0.21.2 (see lint job) — same skip here - # until upstream publishes compatible bits. if [ "$RUNNER_OS" = "Windows" ]; then # NB: networkit_state.dll lives in the icebug/lib/networkit # subdir (the win prebuilt splits GlobalState out of the static @@ -314,7 +306,15 @@ jobs: fi # --lib --test selects only these targets so the GUI binary # itself is not linked here (it gets built in the next step). - cargo test --release --target ${{ matrix.target }} --lib --test gds_page_rank -- --skip gds_page_rank_star --skip gds_page_rank_stale_projection_serves_live_storage + # The served 0.22.0 extension needs NetworKit symbols + Arrow 26: + # satisfiable on Linux (icebug 13.5 prebuilt + apt libarrow2600). + # macOS/Windows stay on the Arrow 25-era stack, where the extension + # can't LOAD (clean failure, but it fails the gate all the same), + # so those platforms skip the extension tests. + SKIP_ARGS="--skip gds_page_rank_star --skip gds_page_rank_stale_projection_serves_live_storage" + if [ "$RUNNER_OS" = "Linux" ]; then SKIP_ARGS=""; fi + # shellcheck disable=SC2086 + cargo test --release --target ${{ matrix.target }} --lib --test gds_page_rank -- $SKIP_ARGS - name: Build release binary run: cargo build --release --target ${{ matrix.target }} diff --git a/Cargo.lock b/Cargo.lock index 4cf5e7a..cb1f8e2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3568,9 +3568,9 @@ dependencies = [ [[package]] name = "lbug" -version = "0.21.2" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "862a51324bf4785f3f1e4dca9b86d38745b543c0f06b1a5731956e66979879c3" +checksum = "ba8edc9b2a2efaed69ae879971a7d9690e771b10492b6a4082aeea88acf3c84b" dependencies = [ "arrow 55.2.0", "cmake", diff --git a/Cargo.toml b/Cargo.toml index 2d83f3d..eebd32d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,9 +9,9 @@ icebug-analytics = ["dep:icebug"] [dependencies] gpui = "0.2" -lbug = { version = "0.21.2", features = ["arrow"] } +lbug = { version = "0.22.0", features = ["arrow"] } icebug = { version = "=13.2.0", optional = true } -# Pinned to 55 to match lbug's `arrow` (0.21.x uses arrow 55): lbug hands us +# Pinned to 55 to match lbug's `arrow` (0.21.x/0.22.x use arrow 55): lbug hands us # Arrow batches built with its own arrow, so our decode types must be the # same crate version or every `downcast_ref` silently yields nothing. arrow = { version = "55", default-features = false, features = ["ffi", "prettyprint"] } diff --git a/scripts/download_icebug.sh b/scripts/download_icebug.sh index e13e62f..6ab1977 100755 --- a/scripts/download_icebug.sh +++ b/scripts/download_icebug.sh @@ -12,11 +12,17 @@ PROJECT_DIR="$(cd "$SCRIPT_DIR/.." && pwd)" REPOSITORY="${ICEBUG_GITHUB_REPOSITORY:-Ladybug-Memory/icebug}" TARGET_DIR="${ICEBUG_TARGET_DIR:-$PROJECT_DIR/icebug}" -VERSION="${ICEBUG_VERSION:-13.4}" OS="$(uname -s)" ARCH="$(uname -m)" +# 13.5 pairs with the served 0.22.0 algo extension (its GDS entry points +# need NetworKit symbols added after 13.2). The macOS/Windows 13.5 builds +# link libarrow.2500, so the Arrow 25 setup there is unchanged; the Linux +# 13.5 build links libarrow.so.2600 (a release-pipeline mistake upstream, +# hence the Arrow 26 apt pin in CI). Overridable per run via ICEBUG_VERSION. +VERSION="${ICEBUG_VERSION:-13.5}" + case "$OS" in Darwin) ASSET_OS="macos"