From 16b794f2b22377a987c7382f435bdbe5186d45f8 Mon Sep 17 00:00:00 2001 From: such-gitea Date: Tue, 10 Feb 2026 16:44:39 -0500 Subject: [PATCH] Update .gitea/workflows/build.yaml --- .gitea/workflows/build.yaml | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index e3a3a7c..2c304cf 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -1,4 +1,4 @@ -name: Build Wownero LWS (Golden Config) +name: Build Wownero LWS (Fixed Linker) on: push: branches: [ master, main ] @@ -7,7 +7,7 @@ on: env: NODE_TLS_REJECT_UNAUTHORIZED: '0' - CORE_TAG: 'v0.11.4.2' # The Complete SDK + CORE_TAG: 'v0.11.4.2' jobs: # ================================================================== @@ -22,7 +22,7 @@ jobs: - name: Fix DNS run: echo "192.168.88.230 git.such.software" >> /etc/hosts - # We only need libc6-dev. We rely on the SDK for libevent now. + # We need libc6-dev for system headers - name: Install Static System Libs run: apt-get update && apt-get install -y libc6-dev @@ -53,25 +53,22 @@ jobs: mkdir -p /opt/wownero-sdk tar -xf sdk.tar.gz -C /opt/wownero-sdk - - name: Normalize SDK & Symlink RT + - name: Normalize SDK & Symlink System Libs run: | cd /opt/wownero-sdk/lib find . -name "libzstd*.a" -exec cp -n {} libzstd.a \; || true find . -name "libz*.a" ! -name "*zmq*" -exec cp -n {} libz.a \; || true find . -name "libhidapi*.a" -exec cp -n {} libhidapi.a \; || true - # CRITICAL FIX: Symlink system librt.a into the SDK. - # This forces CMake to pick the static version from our "SDK" folder - # instead of finding the dynamic .so in /usr/lib. + # FIX: Symlink system librt.a (System Requirement) SYSTEM_RT=$(find /usr -name "librt.a" | head -n 1) if [ -n "$SYSTEM_RT" ]; then - echo "Symlinking $SYSTEM_RT to $(pwd)/librt.a" ln -s "$SYSTEM_RT" librt.a + echo "Symlinked $SYSTEM_RT" else echo "FATAL: System librt.a not found" exit 1 fi - ls -lh *.a - name: Install Modern CMake @@ -85,7 +82,8 @@ jobs: mkdir build && cd build SDK_DIR="/opt/wownero-sdk" - # -DRT_LIBRARY=rt works because we symlinked it into the SDK lib folder + # FIX: Explicitly chain libhidapi -> libusb -> libudev in HIDAPI_LIBRARY + # This tells the linker exactly what to do. cmake .. -DCMAKE_BUILD_TYPE=Release \ -DBUILD_STATIC=ON \ -DCMAKE_PREFIX_PATH="$SDK_DIR" \ @@ -104,14 +102,13 @@ jobs: -DLIBUSB_INCLUDE_DIR="$SDK_DIR/include" \ -DLIBUSB_LIBRARY="$SDK_DIR/lib/libusb-1.0.a" \ -DHIDAPI_INCLUDE_DIR="$SDK_DIR/include" \ - -DHIDAPI_LIBRARY="$SDK_DIR/lib/libhidapi.a" \ + -DHIDAPI_LIBRARY="$SDK_DIR/lib/libhidapi.a;$SDK_DIR/lib/libusb-1.0.a;$SDK_DIR/lib/libudev.a" \ -DZSTD_LIBRARY="$SDK_DIR/lib/libzstd.a" \ -DZSTD_INCLUDE_DIR="$SDK_DIR/include" \ -DZLIB_LIBRARY="$SDK_DIR/lib/libz.a" \ -DZLIB_INCLUDE_DIR="$SDK_DIR/include" \ -DLIBEVENT_LIBRARY=$SDK_DIR/lib/libevent.a \ -DLIBEVENT_INCLUDE_DIR=$SDK_DIR/include \ - -DRT_LIBRARY=rt \ -DUSE_READLINE=OFF \ -DCMAKE_EXE_LINKER_FLAGS="-static" @@ -228,7 +225,7 @@ jobs: -DLIBUSB_INCLUDE_DIR="$SDK_DIR/include" \ -DLIBUSB_LIBRARY="$SDK_DIR/lib/libusb-1.0.a" \ -DHIDAPI_INCLUDE_DIR="$SDK_DIR/include" \ - -DHIDAPI_LIBRARY="$SDK_DIR/lib/libhidapi.a" \ + -DHIDAPI_LIBRARY="$SDK_DIR/lib/libhidapi.a;$SDK_DIR/lib/libusb-1.0.a;$SDK_DIR/lib/libudev.a" \ -DZSTD_LIBRARY="$SDK_DIR/lib/libzstd.a" \ -DZSTD_INCLUDE_DIR="$SDK_DIR/include" \ -DZLIB_LIBRARY="$SDK_DIR/lib/libz.a" \ @@ -382,7 +379,7 @@ jobs: path: release/*.zip # ================================================================== - # JOB 4: MACOS + # JOB 4: MACOS - Manual Checkout # ================================================================== macos: runs-on: macos-latest @@ -433,6 +430,7 @@ jobs: mkdir build && cd build SDK_DIR="$(pwd)/../wownero-sdk" + # Explicitly set ZSTD and ZLIB to ensure we don't accidentally link system dylibs cmake .. -DCMAKE_BUILD_TYPE=Release \ -DBUILD_STATIC=ON \ -DBoost_USE_STATIC_RUNTIME=OFF \