Compare commits

..

3 Commits

Author SHA1 Message Date
jwinterm
5584536ecd Build: Add static libevent as well for all platforms
All checks were successful
Build Wownero Core (Libevent FailSafe) / build-all (aarch64-apple-darwin11) (push) Successful in 18m20s
Build Wownero Core (Libevent FailSafe) / build-all (aarch64-linux-gnu) (push) Successful in 9m22s
Build Wownero Core (Libevent FailSafe) / build-all (riscv64-linux-gnu) (push) Successful in 12m1s
Build Wownero Core (Libevent FailSafe) / build-all (x86_64-apple-darwin11) (push) Successful in 12m45s
Build Wownero Core (Libevent FailSafe) / build-all (x86_64-linux-gnu) (push) Successful in 9m14s
Build Wownero Core (Libevent FailSafe) / build-all (x86_64-w64-mingw32) (push) Successful in 10m31s
Build Wownero Core (Libevent FailSafe) / release (push) Successful in 27s
2026-02-10 12:56:33 -05:00
jwinterm
9b1d2d6388 Build: Fix static lib packaging for Zlib/Zstd (Win/Mac/Linux)
All checks were successful
Build Wownero Core (Windows Filename Fix) / build-all (aarch64-apple-darwin11) (push) Successful in 11m59s
Build Wownero Core (Windows Filename Fix) / build-all (aarch64-linux-gnu) (push) Successful in 8m30s
Build Wownero Core (Windows Filename Fix) / build-all (riscv64-linux-gnu) (push) Successful in 10m59s
Build Wownero Core (Windows Filename Fix) / build-all (x86_64-apple-darwin11) (push) Successful in 12m40s
Build Wownero Core (Windows Filename Fix) / build-all (x86_64-linux-gnu) (push) Successful in 8m41s
Build Wownero Core (Windows Filename Fix) / build-all (x86_64-w64-mingw32) (push) Successful in 10m7s
Build Wownero Core (Windows Filename Fix) / release (push) Successful in 22s
2026-02-09 20:36:33 -05:00
9224f14d75 Build: Upgrade to Boost 1.90 and Fix Static Cross-Compilation
All checks were successful
Build Wownero Core (Portable Mac Fix) / build-all (aarch64-apple-darwin11) (push) Successful in 12m36s
Build Wownero Core (Portable Mac Fix) / build-all (aarch64-linux-gnu) (push) Successful in 8m56s
Build Wownero Core (Portable Mac Fix) / build-all (riscv64-linux-gnu) (push) Successful in 11m38s
Build Wownero Core (Portable Mac Fix) / build-all (x86_64-apple-darwin11) (push) Successful in 13m8s
Build Wownero Core (Portable Mac Fix) / build-all (x86_64-linux-gnu) (push) Successful in 9m13s
Build Wownero Core (Portable Mac Fix) / build-all (x86_64-w64-mingw32) (push) Successful in 10m9s
Build Wownero Core (Portable Mac Fix) / release (push) Successful in 26s
- Upgrade dependencies: Boost 1.90.0, OpenSSL 3.0.13, Zlib 1.3.1, Zstd 1.5.5
- Fix macOS ARM/Intel builds by relaxing static runtime requirements in CMake
- Add missing Boost libraries (context, coroutine) for LWS support
- Sanitize depends system to prevent Makefile corruption
- Enable full static linking for Linux and Windows targets
2026-02-01 17:35:29 -05:00
5 changed files with 282 additions and 31 deletions

View File

@@ -1,4 +1,4 @@
name: Build Wownero Core (Clean / Boost 1.90 / CMake 3.28)
name: Build Wownero Core (Libevent FailSafe)
on:
push:
branches: [ master, main ]
@@ -29,27 +29,18 @@ jobs:
run: echo "192.168.88.230 git.such.software" >> /etc/hosts
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
token: ${{ secrets.GITHUB_TOKEN }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Configure Git URLs
run: |
rm -rf *
git config --global --add safe.directory '*'
# --- CRITICAL FIX: FORCE LOCAL MIRRORS ---
# These lines tell Git: "If you try to go to Codeberg, GO HERE INSTEAD."
# We use the internal port 3000 and the token to ensure access.
# 1. Catch 'https://codeberg.org/wownero/RandomWOW' (no .git)
git config --global url."http://oauth2:${GITHUB_TOKEN}@git.such.software:3000/Builds/RandomWOW.git".insteadOf "https://codeberg.org/wownero/RandomWOW"
# 2. Catch 'https://codeberg.org/wownero/RandomWOW.git' (with .git)
git config --global url."http://oauth2:${GITHUB_TOKEN}@git.such.software:3000/Builds/RandomWOW.git".insteadOf "https://codeberg.org/wownero/RandomWOW.git"
# 3. Main Clone
git clone http://oauth2:$GITHUB_TOKEN@git.such.software:3000/${{ github.repository }}.git .
# 4. Now update submodules (It will use the re-written URLs above)
git submodule update --init --recursive
git config --global url."http://oauth2:${GITHUB_TOKEN}@git.such.software:3000/Builds/wownero.git".insteadOf "https://codeberg.org/wownero/wownero.git"
- name: Download macOS SDK
if: contains(matrix.target, 'apple')
@@ -60,16 +51,132 @@ jobs:
- name: Install Modern CMake
run: |
echo "Installing CMake 3.28.1..."
curl -L -o cmake.tar.gz https://github.com/Kitware/CMake/releases/download/v3.28.1/cmake-3.28.1-linux-x86_64.tar.gz
tar -xf cmake.tar.gz
# Add new cmake to PATH
echo "$(pwd)/cmake-3.28.1-linux-x86_64/bin" >> $GITHUB_PATH
# -----------------------------------------------------------------------
# 1. BUILD CONFIGURATION
# -----------------------------------------------------------------------
- name: Sanitize Makefiles (Stable + Mac Compat)
run: |
curl -L -o contrib/depends/funcs.mk https://codeberg.org/wownero/wownero/raw/branch/master/contrib/depends/funcs.mk
curl -L -o contrib/depends/packages/packages.mk https://codeberg.org/wownero/wownero/raw/branch/master/contrib/depends/packages/packages.mk
# Inject packages: libevent added before unbound
sed -i 's/^packages :=.*/packages := boost openssl expat libusb hidapi protobuf libiconv sodium zeromq libevent unbound zlib zstd/' contrib/depends/packages/packages.mk
# GENERATE LIBEVENT.MK (Attempt 1: Makefiles)
cat <<'EOF' > contrib/depends/packages/libevent.mk
package=libevent
$(package)_version=2.1.12-stable
$(package)_download_path=https://github.com/libevent/libevent/releases/download/release-$($(package)_version)/
$(package)_file_name=$(package)-$($(package)_version).tar.gz
$(package)_sha256_hash=92e6de1be9ec176428fd2367677e61ecedc2fc1cb11bc61069461ea910c1d4d7
define $(package)_set_vars
$(package)_config_opts=--disable-shared --disable-openssl --disable-libenc --disable-samples --disable-debug-mode --prefix=$($(package)_staging_prefix_dir)
endef
define $(package)_config_cmds
./configure $($(package)_config_opts) --host=${host}
endef
define $(package)_build_cmds
$(MAKE)
endef
define $(package)_stage_cmds
$(MAKE) install
endef
EOF
sed -i 's/^ /\t/' contrib/depends/packages/libevent.mk
# GENERATE ZLIB.MK
cat <<'EOF' > contrib/depends/packages/zlib.mk
package=zlib
$(package)_version=1.3.1
$(package)_download_path=https://zlib.net/
$(package)_file_name=$(package)-$($(package)_version).tar.gz
$(package)_sha256_hash=9a93b2b7dfdac77ceba5a558a580e74667dd6fede4585b91eefb60f03b72df23
define $(package)_set_vars
$(package)_config_opts=--static
endef
define $(package)_config_cmds
CHOST=${host} ./configure $($(package)_config_opts) --prefix=$($(package)_staging_prefix_dir)
endef
define $(package)_build_cmds
$(MAKE) libz.a
endef
define $(package)_stage_cmds
$(MAKE) install
endef
EOF
sed -i 's/^ /\t/' contrib/depends/packages/zlib.mk
# GENERATE ZSTD.MK
cat <<'EOF' > contrib/depends/packages/zstd.mk
package=zstd
$(package)_version=1.5.5
$(package)_download_path=https://github.com/facebook/zstd/releases/download/v$($(package)_version)/
$(package)_file_name=$(package)-$($(package)_version).tar.gz
$(package)_sha256_hash=9c4396cc829cfae319a6e2615202e82aad41372073482fce286fac78646d3ee4
define $(package)_build_cmds
$(MAKE) -C lib libzstd.a
endef
define $(package)_stage_cmds
cp lib/libzstd.a $($(package)_staging_prefix_dir)/lib/
cp lib/zstd.h $($(package)_staging_prefix_dir)/include/
endef
EOF
sed -i 's/^ /\t/' contrib/depends/packages/zstd.mk
# GENERATE BOOST.MK
cat <<'EOF' > contrib/depends/packages/boost.mk
package=boost
$(package)_version=1.90.0
$(package)_download_path=https://archives.boost.io/release/$($(package)_version)/source/
$(package)_file_name=$(package)_$(subst .,_,$($(package)_version)).tar.bz2
$(package)_sha256_hash=49551aff3b22cbc5c5a9ed3dbc92f0e23ea50a0f7325b0d198b705e8ee3fc305
$(package)_dependencies=libiconv
define $(package)_set_vars
$(package)_config_opts_release=variant=release
$(package)_config_opts_debug=variant=debug
$(package)_config_opts+=--layout=system --user-config=user-config.jam
$(package)_config_opts+=threading=multi link=static -sNO_BZIP2=1 -sNO_ZLIB=1
$(package)_config_opts_linux=threadapi=pthread runtime-link=static
$(package)_config_opts_darwin=target-os=darwin runtime-link=shared
$(package)_config_opts_mingw32=binary-format=pe target-os=windows threadapi=win32 runtime-link=static
$(package)_config_opts_x86_64_mingw32=address-model=64
$(package)_config_opts_i686_mingw32=address-model=32
$(package)_config_opts_i686_linux=address-model=32 architecture=x86
$(package)_config_opts_x86_64_darwin=address-model=64
$(package)_config_opts_aarch64_darwin=address-model=64 architecture=arm binary-format=mach-o abi=aapcs
$(package)_toolset_$(host_os)=gcc
$(package)_archiver_$(host_os)=$($(package)_ar)
$(package)_toolset_darwin=darwin
$(package)_archiver_darwin=$($(package)_libtool)
$(package)_config_libraries=atomic,chrono,date_time,filesystem,program_options,regex,serialization,system,thread,locale,context,coroutine
$(package)_cxxflags=-std=c++17 -fPIC
endef
define $(package)_preprocess_cmds
echo "using $(boost_toolset_$(host_os)) : : $($(package)_cxx) : <cxxflags>\"$($(package)_cxxflags) $($(package)_cppflags)\" <linkflags>\"$($(package)_ldflags)\" <archiver>\"$(boost_archiver_$(host_os))\" <arflags>\"$($(package)_arflags)\" <striper>\"$(host_STRIP)\" <ranlib>\"$(host_RANLIB)\" <rc>\"$(host_WINDRES)\" : ;" > user-config.jam
endef
define $(package)_config_cmds
./bootstrap.sh --without-icu --with-libraries=$(boost_config_libraries)
endef
define $(package)_build_cmds
./b2 -d2 -j2 -d1 --prefix=$($(package)_staging_prefix_dir) $($(package)_config_opts) stage
endef
define $(package)_stage_cmds
./b2 -d0 -j4 --prefix=$($(package)_staging_prefix_dir) $($(package)_config_opts) install
endef
EOF
sed -i 's/^ /\t/' contrib/depends/packages/boost.mk
- name: Build Dependencies
run: |
cd contrib/depends
# This builds Boost 1.90.0 using your updated boost.mk
make HOST=${{ matrix.target }} -j$(nproc)
- name: Build Wownero Core
@@ -77,24 +184,127 @@ jobs:
PREFIX=$(pwd)/contrib/depends/${{ matrix.target }}
mkdir build && cd build
# Use the new 'cmake' (v3.28)
export CXXFLAGS="-D_GNU_SOURCE"
export CFLAGS="-D_GNU_SOURCE"
STATIC_RUNTIME="ON"
if [[ "${{ matrix.target }}" == *"apple"* ]]; then
STATIC_RUNTIME="OFF"
perl -pi -e 's/locale//g' ../CMakeLists.txt
perl -pi -e 's/locale//g' ../external/monero/CMakeLists.txt
fi
cmake .. \
-DCMAKE_TOOLCHAIN_FILE=../contrib/depends/${{ matrix.target }}/share/toolchain.cmake \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_STATIC=ON
-DBUILD_STATIC=ON \
-DBoost_USE_STATIC_RUNTIME=$STATIC_RUNTIME
make -j$(nproc)
# -----------------------------------------------------------------------
# 2. FAIL-SAFE (Now includes Libevent)
# -----------------------------------------------------------------------
- name: Ensure Static Libs Exist
run: |
LIB_DIR="$(pwd)/contrib/depends/${{ matrix.target }}/lib"
INC_DIR="$(pwd)/contrib/depends/${{ matrix.target }}/include"
TOOLCHAIN="$(pwd)/contrib/depends/${{ matrix.target }}/share/toolchain.cmake"
mkdir -p "$LIB_DIR"
mkdir -p "$INC_DIR"
# --- FAIL-SAFE 1: ZSTD ---
if [ ! -f "$LIB_DIR/libzstd.a" ]; then
echo "Zstd missing! Activating Fail-Safe Build..."
mkdir -p temp_zstd && cd temp_zstd
curl -L -o zstd.tar.gz https://github.com/facebook/zstd/releases/download/v1.5.5/zstd-1.5.5.tar.gz
tar -xf zstd.tar.gz && cd zstd-1.5.5/build/cmake
cmake . -DCMAKE_TOOLCHAIN_FILE="$TOOLCHAIN" \
-DCMAKE_INSTALL_PREFIX="$(pwd)/../../inst" \
-DCMAKE_BUILD_TYPE=Release \
-DZSTD_BUILD_STATIC=ON -DZSTD_BUILD_SHARED=OFF \
-DZSTD_BUILD_PROGRAMS=OFF -DZSTD_BUILD_TESTS=OFF
make -j$(nproc)
if [ -f lib/libzstd.a ]; then cp lib/libzstd.a "$LIB_DIR/"; fi
if [ -f lib/libzstdstatic.a ]; then cp lib/libzstdstatic.a "$LIB_DIR/libzstd.a"; fi
cp ../../lib/zstd.h "$INC_DIR/"
cd ../../..
fi
# --- FAIL-SAFE 2: ZLIB ---
if [ ! -f "$LIB_DIR/libz.a" ]; then
echo "Zlib missing! Activating Fail-Safe Build..."
mkdir -p temp_zlib && cd temp_zlib
curl -L -o zlib.tar.gz https://zlib.net/zlib-1.3.1.tar.gz
tar -xf zlib.tar.gz && cd zlib-1.3.1
cmake . -DCMAKE_TOOLCHAIN_FILE="$TOOLCHAIN" \
-DCMAKE_INSTALL_PREFIX="$(pwd)/inst" \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=OFF
make -j$(nproc)
if [ -f libz.a ]; then cp libz.a "$LIB_DIR/"; fi
if [ -f libzlibstatic.a ]; then cp libzlibstatic.a "$LIB_DIR/libz.a"; fi
cp zlib.h "$INC_DIR/"
cp zconf.h "$INC_DIR/"
cd ../..
fi
# --- FAIL-SAFE 3: LIBEVENT (The Fix) ---
if [ ! -f "$LIB_DIR/libevent.a" ]; then
echo "Libevent missing! Activating Fail-Safe Build..."
mkdir -p temp_event && cd temp_event
curl -L -o libevent.tar.gz https://github.com/libevent/libevent/releases/download/release-2.1.12-stable/libevent-2.1.12-stable.tar.gz
tar -xf libevent.tar.gz && cd libevent-2.1.12-stable
cmake . -DCMAKE_TOOLCHAIN_FILE="$TOOLCHAIN" \
-DCMAKE_INSTALL_PREFIX="$(pwd)/inst" \
-DCMAKE_BUILD_TYPE=Release \
-DEVENT__DISABLE_OPENSSL=ON \
-DEVENT__DISABLE_MBEDTLS=ON \
-DEVENT__DISABLE_TESTS=ON \
-DEVENT__DISABLE_SAMPLES=ON \
-DEVENT__LIBRARY_TYPE=STATIC
make -j$(nproc)
# Locate and copy the static lib (name might vary, grab any .a)
find . -name "libevent.a" -exec cp {} "$LIB_DIR/" \;
find . -name "libevent_core.a" -exec cp {} "$LIB_DIR/" \;
find . -name "libevent_extra.a" -exec cp {} "$LIB_DIR/" \;
# Also copy headers
mkdir -p "$INC_DIR/event2"
cp -r include/event2/* "$INC_DIR/event2/"
cd ../..
fi
- name: Package Artifacts
run: |
LIB_DIR="contrib/depends/${{ matrix.target }}/lib"
INC_DIR="contrib/depends/${{ matrix.target }}/include"
mkdir -p output/lib output/include output/bin
find build/bin -type f -exec cp {} output/bin/ \;
cp $LIB_DIR/*.a output/lib/
find build -name "*.a" -exec cp {} output/lib/ \;
find build/bin -type f -exec cp -v {} output/bin/ \;
cp -v $LIB_DIR/*.a output/lib/
# Final Verification (The "Stop if Fucked" check)
ls -l output/lib/libz*.a
if [ ! -f output/lib/libzstd.a ]; then echo "FATAL: libzstd.a missing"; exit 1; fi
if [ ! -f output/lib/libz.a ]; then echo "FATAL: libz.a missing"; exit 1; fi
# Check for ANY libevent static lib (it might be libevent_core.a etc)
if [ -z "$(find output/lib -name 'libevent*.a')" ]; then
echo "FATAL: libevent.a missing (checked libevent*.a)"
exit 1
fi
cp -r src output/include/wownero-src
cp -r $INC_DIR/* output/include/
tar -czf wownero-core-${{ matrix.target }}.tar.gz -C output .
- name: Upload Artifact

View File

@@ -9,25 +9,31 @@ define $(package)_set_vars
$(package)_config_opts_release=variant=release
$(package)_config_opts_debug=variant=debug
# KEY FIX: Use 'system' layout to avoid weird naming (libboost_filesystem.a vs libboost_filesystem-mt-x64.a)
$(package)_config_opts+=--layout=system --user-config=user-config.jam
$(package)_config_opts+=threading=multi link=static -sNO_BZIP2=1 -sNO_ZLIB=1
# CRITICAL: Force static runtime for Linux to fix "Wrong Format" linker errors
$(package)_config_opts_linux=threadapi=pthread runtime-link=static
$(package)_config_opts_darwin=target-os=darwin address-model=64 runtime-link=shared
# Darwin (macOS) Defaults
$(package)_config_opts_darwin=target-os=darwin runtime-link=shared
# Windows Defaults
$(package)_config_opts_mingw32=binary-format=pe target-os=windows threadapi=win32 runtime-link=static
# Architecture Specifics
$(package)_config_opts_x86_64_mingw32=address-model=64
$(package)_config_opts_i686_mingw32=address-model=32
$(package)_config_opts_i686_linux=address-model=32 architecture=x86
# MACOS ARM64 FIX: Explicitly tell B2 this is ARM + Mach-O
$(package)_config_opts_x86_64_darwin=address-model=64
$(package)_config_opts_aarch64_darwin=address-model=64 architecture=arm binary-format=mach-o abi=aapcs
$(package)_toolset_$(host_os)=gcc
$(package)_archiver_$(host_os)=$($(package)_ar)
$(package)_toolset_darwin=darwin
$(package)_archiver_darwin=$($(package)_libtool)
# CRITICAL: Added context, coroutine (for LWS) and C++17 (for Monero v18)
# Added 'atomic' and 'chrono' just to be safe for all platforms.
$(package)_config_libraries=atomic,chrono,date_time,filesystem,program_options,regex,serialization,system,thread,locale,context,coroutine
$(package)_cxxflags=-std=c++17 -fPIC
endef

View File

@@ -1,4 +1,4 @@
packages:=boost openssl zeromq libiconv expat unbound
packages:=boost openssl expat libusb hidapi protobuf libiconv sodium zeromq unbound zlib zstd
# ccache is useless in gitian builds
ifneq ($(GITIAN),1)

View File

@@ -0,0 +1,21 @@
package=zlib
$(package)_version=1.3.1
$(package)_download_path=https://zlib.net/
$(package)_file_name=$(package)-$($(package)_version).tar.gz
$(package)_sha256_hash=9a93b2b7dfdac77ceba5a558a580e74667dd6fede4585b91eefb60f03b72df23
define $(package)_set_vars
$(package)_config_opts=--static
endef
define $(package)_config_cmds
CHOST=${host} ./configure $($(package)_config_opts) --prefix=$($(package)_staging_prefix_dir)
endef
define $(package)_build_cmds
$(MAKE) libz.a
endef
define $(package)_stage_cmds
$(MAKE) install
endef

View File

@@ -0,0 +1,14 @@
package=zstd
$(package)_version=1.5.5
$(package)_download_path=https://github.com/facebook/zstd/releases/download/v$($(package)_version)/
$(package)_file_name=$(package)-$($(package)_version).tar.gz
$(package)_sha256_hash=9c4396cc829cfae319a6e2615202e82aad41372073482fce286fac78646d3ee4
define $(package)_build_cmds
$(MAKE) -C lib libzstd.a
endef
define $(package)_stage_cmds
cp lib/libzstd.a $($(package)_staging_prefix_dir)/lib/
cp lib/zstd.h $($(package)_staging_prefix_dir)/include/
endef