Skip to content

Commit

Permalink
update my progress
Browse files Browse the repository at this point in the history
  • Loading branch information
MrCyjaneK committed Nov 20, 2024
1 parent c1a388f commit 733e2ef
Show file tree
Hide file tree
Showing 16 changed files with 59 additions and 76 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/full_check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ jobs:
xcode-version: '15.4'
- name: install dependencies
run: |
brew install ccache unbound [email protected] zmq autoconf automake libtool && brew link [email protected]
brew install ccache binutils
- name: Patch sources
run: |
git config --global --add safe.directory '*'
Expand Down
33 changes: 2 additions & 31 deletions build_single.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,37 +64,8 @@ pushd ${repo}_libwallet2_api_c
rm -rf build/${HOST_ABI} || true
mkdir -p build/${HOST_ABI} -p
pushd build/${HOST_ABI}
case $HOST_ABI in
"x86_64-linux-gnu" | "i686-linux-gnu" | "i686-meego-linux-gnu" | "aarch64-linux-gnu" | "aarch64-meego-linux-gnu" | "i686-w64-mingw32" | "x86_64-w64-mingw32" | "x86_64-apple-darwin11" | "aarch64-apple-darwin11" | "host-apple-darwin" | "x86_64-host-apple-darwin" | "aarch64-host-apple-darwin")
echo $CC
env CC="${CC}" CXX="${CXX}" cmake -D Boost_USE_MULTITHREADED=ON -D USE_DEVICE_TREZOR=OFF -D BUILD_GUI_DEPS=1 -D BUILD_TESTS=OFF -D ARCH="x86-64" -D STATIC=ON -D BUILD_64="ON" -D CMAKE_BUILD_TYPE=$buildType -D ANDROID=false -D BUILD_TAG="linux-x64" -D CMAKE_SYSTEM_NAME="Linux" -DCMAKE_TOOLCHAIN_FILE=$PWD/../../../contrib/depends/${HOST_ABI}/share/toolchain.cmake -DMONERO_FLAVOR=$repo -DCMAKE_BUILD_TYPE=Debug -DHOST_ABI=${HOST_ABI} ../..
CC=gcc CXX=g++ make $NPROC
;;
"x86_64-linux-android")
echo $CC
env CC="${CC}" CXX="${CXX}" cmake -DCMAKE_TOOLCHAIN_FILE=$PWD/../../../contrib/depends/${HOST_ABI}/share/toolchain.cmake -DMONERO_WALLET_CRYPTO_LIBRARY=amd64-64-24k -DHIDAPI_DUMMY=ON -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_SYSTEM_VERSION=1 -D USE_DEVICE_TREZOR=OFF -D BUILD_GUI_DEPS=1 -D BUILD_TESTS=OFF -D ARCH="x86-64" -D STATIC=ON -D BUILD_64="ON" -D CMAKE_BUILD_TYPE=$buildType -D ANDROID=true -D BUILD_TAG="android-x86_64" -D CMAKE_SYSTEM_NAME="Android" -D CMAKE_ANDROID_ARCH_ABI="x86_64" -DMONERO_FLAVOR=$repo -DCMAKE_BUILD_TYPE=Debug -DHOST_ABI=${HOST_ABI} ../..
CC=gcc CXX=g++ make $NPROC
;;
"aarch64-linux-android")
echo $CC
env CC="${CC}" CXX="${CXX}" cmake -DCMAKE_TOOLCHAIN_FILE=$PWD/../../../contrib/depends/${HOST_ABI}/share/toolchain.cmake -DHIDAPI_DUMMY=ON -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_SYSTEM_VERSION=1 -D USE_DEVICE_TREZOR=OFF -D BUILD_GUI_DEPS=1 -D BUILD_TESTS=OFF -D ARCH="armv8-a" -D STATIC=ON -D BUILD_64="ON" -D CMAKE_BUILD_TYPE=$buildType -D ANDROID=true -D BUILD_TAG="android-armv8" -D CMAKE_SYSTEM_NAME="Android" -D CMAKE_ANDROID_ARCH_ABI="arm64-v8a" -DMONERO_FLAVOR=$repo -DCMAKE_BUILD_TYPE=Debug -DHOST_ABI=${HOST_ABI} ../..
CC=gcc CXX=g++ make $NPROC
;;
"armv7a-linux-androideabi")
echo $CC
env CC="${CC}" CXX="${CXX}" cmake -DCMAKE_TOOLCHAIN_FILE=$PWD/../../../contrib/depends/${HOST_ABI}/share/toolchain.cmake -DHIDAPI_DUMMY=ON -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_SYSTEM_VERSION=1 -D USE_DEVICE_TREZOR=OFF -D BUILD_GUI_DEPS=1 -D BUILD_TESTS=OFF -D ARCH="armv7-a" -D STATIC=ON -D BUILD_64="OFF" -D CMAKE_BUILD_TYPE=$buildType -D ANDROID=true -D BUILD_TAG="android-armv7" -D CMAKE_SYSTEM_NAME="Android" -D CMAKE_ANDROID_ARCH_ABI="armeabi-v7a" -DMONERO_FLAVOR=$repo -DCMAKE_BUILD_TYPE=Debug -DHOST_ABI=${HOST_ABI} ../..
CC=gcc CXX=g++ make $NPROC
;;
"host-apple-ios")
export -n CC CXX
CC=clang CXX=clang++ cmake -DCMAKE_TOOLCHAIN_FILE=../../../external/ios-cmake/ios.toolchain.cmake -DPLATFORM=OS64 -DMONERO_FLAVOR=$repo -DCMAKE_BUILD_TYPE=Debug -DHOST_ABI=${HOST_ABI} ../..
CC=clang CXX=clang++ make $NPROC
;;
*)
echo "Unable to build ${repo}_libwallet2_api_c for ${HOST_ABI}"
exit 1
;;
esac
cmake -DCMAKE_TOOLCHAIN_FILE=$PWD/../../../contrib/depends/${HOST_ABI}/share/toolchain.cmake -DUSE_DEVICE_TREZOR=OFF -DHIDAPI_DUMMY=ON -DMONERO_FLAVOR=$repo -DCMAKE_BUILD_TYPE=Debug -DHOST_ABI=${HOST_ABI} ../..
make $NPROC
popd
popd

Expand Down
3 changes: 3 additions & 0 deletions contrib/depends/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ endif
ifeq ($(host_os),darwin)
host_cmake=Darwin
endif
ifeq ($(host_os),ios)
host_cmake=iOS
endif
ifeq ($(host_os),android)
host_cmake=Android
endif
Expand Down
10 changes: 10 additions & 0 deletions contrib/depends/funcs.mk
Original file line number Diff line number Diff line change
Expand Up @@ -143,33 +143,43 @@ $(1)_config_env+=PKG_CONFIG_PATH=$($($(1)_type)_prefix)/share/pkgconfig
$(1)_config_env+=PATH="$(build_prefix)/bin:$(PATH)"
$(1)_build_env+=PATH="$(build_prefix)/bin:$(PATH)"
$(1)_stage_env+=PATH="$(build_prefix)/bin:$(PATH)"
$(1)_autoconf_nohost=--prefix=$($($(1)_type)_prefix) $$($(1)_config_opts) CC="$$($(1)_cc)" CXX="$$($(1)_cxx)" AR="$$($(1)_ar)"
$(1)_autoconf=./configure --host=$($($(1)_type)_host) --prefix=$($($(1)_type)_prefix) $$($(1)_config_opts) CC="$$($(1)_cc)" CXX="$$($(1)_cxx)" AR="$$($(1)_ar)"

ifeq ($(filter $(1),libusb unbound),)
$(1)_autoconf_nohost += --disable-dependency-tracking
$(1)_autoconf += --disable-dependency-tracking
endif
ifneq ($($(1)_nm),)
$(1)_autoconf_nohost += NM="$$($(1)_nm)"
$(1)_autoconf += NM="$$($(1)_nm)"
endif
ifneq ($($(1)_ranlib),)
$(1)_autoconf_nohost += RANLIB="$$($(1)_ranlib)"
$(1)_autoconf += RANLIB="$$($(1)_ranlib)"
endif
ifneq ($($(1)_ar),)
$(1)_autoconf_nohost += AR="$$($(1)_ar)"
$(1)_autoconf += AR="$$($(1)_ar)"
endif
ifneq ($($(1)_arflags),)
$(1)_autoconf_nohost += ARFLAGS="$$($(1)_arflags)"
$(1)_autoconf += ARFLAGS="$$($(1)_arflags)"
endif
ifneq ($($(1)_cflags),)
$(1)_autoconf_nohost += CFLAGS="$$($(1)_cflags)"
$(1)_autoconf += CFLAGS="$$($(1)_cflags)"
endif
ifneq ($($(1)_cxxflags),)
$(1)_autoconf_nohost += CXXFLAGS="$$($(1)_cxxflags)"
$(1)_autoconf += CXXFLAGS="$$($(1)_cxxflags)"
endif
ifneq ($($(1)_cppflags),)
$(1)_autoconf_nohost += CPPFLAGS="$$($(1)_cppflags)"
$(1)_autoconf += CPPFLAGS="$$($(1)_cppflags)"
endif
ifneq ($($(1)_ldflags),)
$(1)_autoconf_nohost += LDFLAGS="$$($(1)_ldflags)"
$(1)_autoconf += LDFLAGS="$$($(1)_ldflags)"
endif
endef
Expand Down
14 changes: 9 additions & 5 deletions contrib/depends/packages/boost.mk
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,16 @@ $(package)_config_opts_mingw32=binary-format=pe target-os=windows threadapi=win3
$(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)_toolset_$(host_os)=clang
$(package)_toolset_$(host_os)=gcc
$(package)_archiver_$(host_os)=$($(package)_ar)
$(package)_archiver_darwin=$($(package)_libtool)
$(package)_archiver_ios=$($(package)_libtool)
$(package)_toolset_darwin=darwin
$(package)_toolset_ios=darwin
$(package)_toolset_android=gcc
$(package)_toolset_mingw32=gcc
$(package)_toolset2_$(host_os)=
$(package)_toolset2_ios=$($(package)_ios_COMPILER_VERSION)~iphone
$(package)_archiver_darwin=$($(package)_libtool)
$(package)_config_libraries=system,filesystem,thread,timer,date_time,chrono,regex,serialization,atomic,program_options,locale,log
$(package)_cxxflags_linux=-fPIC
$(package)_cxxflags_freebsd=-fPIC
Expand All @@ -35,17 +39,17 @@ $(package)_ldflags_ios=-L$(host_prefix)/lib -L$(IOS_SDK)/usr/lib
endef

define $(package)_preprocess_cmds
echo "using $(boost_toolset_$(host_os)) : $(boost_toolset2_$(host_os)) : $($(package)_cxx) : <cxxflags>\"$($(package)_cxxflags) $($(package)_cppflags)\" <linkflags>\"$($(package)_ldflags)\" <archiver>\"$($(package)_archiver_$(host_os))\" <arflags>\"$($(package)_arflags)\" <striper>\"$(host_STRIP)\" <ranlib>\"$(host_RANLIB)\" <rc>\"$(host_WINDRES)\" : ;" > user-config.jam
echo "using $(boost_toolset_$(host_os)) : $(boost_toolset2_$(host_os)) : $($(package)_cxx) : <cxxflags>\"$($(package)_cxxflags) $($(package)_cppflags)\" <linkflags>\"$($(package)_ldflags)\" <archiver>\"$($(package)_archiver_$(host_os))\" <arflags>\"$($(package)_arflags)\" <striper>\"$(host_STRIP)\" <ranlib>\"$(host_RANLIB)\" <rc>\"$(host_WINDRES)\" <target-os>iphone : ;" > user-config.jam
endef

define $(package)_config_cmds
./bootstrap.sh --with-libraries=$(boost_config_libraries)
endef

define $(package)_build_cmds
./b2 -d2 -j1 --prefix=$($(package)_staging_prefix_dir) $($(package)_config_opts) $($(package)_config_opts_release) stage
./b2 -d2 -j8 --prefix=$($(package)_staging_prefix_dir) $($(package)_config_opts) $($(package)_config_opts_release) stage
endef

define $(package)_stage_cmds
./b2 -d0 -j1 --prefix=$($(package)_staging_prefix_dir) $($(package)_config_opts) $($(package)_config_opts_release) install
./b2 -d0 -j8 --prefix=$($(package)_staging_prefix_dir) $($(package)_config_opts) $($(package)_config_opts_release) install
endef
2 changes: 1 addition & 1 deletion contrib/depends/packages/libiconv.mk
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ define $(package)_set_vars
$(package)_config_opts=--disable-shared
$(package)_config_opts_linux=--with-pic
$(package)_config_opts_freebsd=--with-pic
$(package)_ar_ios=$(package)_ar rcs
$(package)_ar_ios=$($(package)_ar) rcs
endef

define $(package)_preprocess_cmds
Expand Down
2 changes: 1 addition & 1 deletion contrib/depends/packages/native_protobuf.mk
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ define $(package)_stage_cmds
endef

define $(package)_postprocess_cmds
rm lib/libprotoc.a
rm lib/libprotoc.a || true
endef
4 changes: 2 additions & 2 deletions contrib/depends/packages/ncurses.mk
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package=ncurses
$(package)_version=6.1
$(package)_version=6.5
$(package)_download_path=https://ftp.gnu.org/gnu/ncurses
$(package)_file_name=$(package)-$($(package)_version).tar.gz
$(package)_sha256_hash=aa057eeeb4a14d470101eff4597d5833dcef5965331be3528c08d99cebaa0d17
$(package)_sha256_hash=136d91bc269a9a5785e5f9e980bc76ab57428f604ce3e5a5a90cebc767971cc6
$(package)_patches=fallback.c

define $(package)_set_vars
Expand Down
1 change: 1 addition & 0 deletions contrib/depends/packages/packages.mk
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ android_packages = ncurses readline sodium

darwin_native_packages = $(hardware_native_packages)
darwin_packages = ncurses readline sodium $(hardware_packages)
ios_packages = sodium protobuf native_protobuf

# not really native...
freebsd_native_packages = freebsd_base
Expand Down
3 changes: 2 additions & 1 deletion contrib/depends/packages/protobuf.mk
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@ $(package)_patches=visibility.patch
define $(package)_set_vars
$(package)_config_opts=--disable-shared --with-protoc=$(build_prefix)/bin/protoc
$(package)_config_opts_linux=--with-pic
$(package)_ar=$($(package)_ar)
endef

define $(package)_preprocess_cmds
patch -p0 < $($(package)_patch_dir)/visibility.patch
endef

define $(package)_config_cmds
$($(package)_autoconf) AR_FLAGS=$($(package)_arflags)
$($(package)_autoconf)
endef

define $(package)_build_cmds
Expand Down
1 change: 1 addition & 0 deletions contrib/depends/packages/sodium.mk
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ $(package)_patches=disable-glibc-getrandom-getentropy.patch fix-whitespace.patch
define $(package)_set_vars
$(package)_config_opts=--enable-static --disable-shared --with-pic
$(package)_config_opts+=--prefix=$(host_prefix)
$(package)_ar=$($(package)_ar) rcs
endef

define $(package)_preprocess_cmds
Expand Down
12 changes: 6 additions & 6 deletions contrib/depends/packages/zeromq.mk
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package=zeromq
$(package)_version=4.3.4
$(package)_version=4.3.5
$(package)_download_path=https://github.com/zeromq/libzmq/releases/download/v$($(package)_version)/
$(package)_file_name=$(package)-$($(package)_version).tar.gz
$(package)_sha256_hash=c593001a89f5a85dd2ddf564805deb860e02471171b3f204944857336295c3e5
$(package)_patches=06aba27b04c5822cb88a69677382a0f053367143.patch
$(package)_sha256_hash=6653ef5910f17954861fe72332e68b03ca6e4d9c7160eb3a8de5a5a913bfab43
$(package)_patches=fix_declaration.patch

define $(package)_set_vars
$(package)_config_opts=--without-documentation --disable-shared --without-libsodium --disable-curve
Expand All @@ -14,11 +14,11 @@ define $(package)_set_vars
endef

define $(package)_preprocess_cmds
patch -p1 < $($(package)_patch_dir)/06aba27b04c5822cb88a69677382a0f053367143.patch
patch -p1 < $($(package)_patch_dir)/fix_declaration.patch
endef

define $(package)_config_cmds
$($(package)_autoconf) AR_FLAGS=$($(package)_arflags)
./configure --host=aarch64-apple-darwin $($(package)_autoconf_args)
endef

define $(package)_build_cmds
Expand All @@ -31,6 +31,6 @@ endef

define $(package)_postprocess_cmds
rm -rf bin share &&\
rm lib/*.la
rm lib/*.la || true
endef

This file was deleted.

11 changes: 11 additions & 0 deletions contrib/depends/patches/zeromq/fix_declaration.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- a/src/proxy.cpp 2024-11-19 19:46:31
+++ b/src/proxy.cpp 2024-11-19 19:47:37
@@ -499,7 +499,7 @@
zmq_pollitem_t itemsout[] = {{frontend_, 0, ZMQ_POLLOUT, 0},
{backend_, 0, ZMQ_POLLOUT, 0}};

- stats_proxy stats = {0};
+ stats_proxy stats = {{{0, 0}, {0, 0}}, {{0, 0}, {0, 0}}};

// Proxy can be in these three states
proxy_state_t state = active;
5 changes: 4 additions & 1 deletion contrib/depends/toolchain.cmake.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
cmake_minimum_required(VERSION 3.13) # Ensure CMake version supports CMP0077
cmake_policy(SET CMP0077 NEW) # Ensure 'option' honors normal variables

# Set the system name to one of Android, Darwin, iOS, FreeBSD, Linux, or Windows
SET(CMAKE_SYSTEM_NAME @depends@)
SET(CMAKE_SYSTEM_PROCESSOR @arch@)
Expand Down Expand Up @@ -177,4 +180,4 @@ link_directories(@prefix@/lib)
add_definitions(-DPOLYSEED_STATIC=ON)

#Create a new global cmake flag that indicates building with depends
set (DEPENDS true)
set (DEPENDS true)
10 changes: 5 additions & 5 deletions monero_libwallet2_api_c/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,11 @@ endif()
add_subdirectory("${CMAKE_SOURCE_DIR}/../${MONERO_FLAVOR}" ${CMAKE_BINARY_DIR}/${MONERO_FLAVOR}_build)


get_cmake_property(_variableNames VARIABLES)
list (SORT _variableNames)
foreach (_variableName ${_variableNames})
message(STATUS "${_variableName}=${${_variableName}}")
endforeach()
#get_cmake_property(_variableNames VARIABLES)
#list (SORT _variableNames)
#foreach (_variableName ${_variableNames})
# message(STATUS "${_variableName}=${${_variableName}}")
#endforeach()

if(${HOST_ABI} STREQUAL "x86_64-apple-darwin11" OR ${HOST_ABI} STREQUAL "aarch64-apple-darwin11" OR ${HOST_ABI} STREQUAL "host-apple-darwin" OR ${HOST_ABI} STREQUAL "x86_64-host-apple-darwin" OR ${HOST_ABI} STREQUAL "aarch64-host-apple-darwin" OR ${HOST_ABI} STREQUAL "host-apple-ios")
if (${MONERO_FLAVOR} STREQUAL "monero")
Expand Down

0 comments on commit 733e2ef

Please sign in to comment.