From 73abd9fab23afef199ea7add203f9ba6f988de11 Mon Sep 17 00:00:00 2001 From: victoryang00 Date: Tue, 13 Feb 2024 04:53:29 -0800 Subject: [PATCH] gix mac compilation Signed-off-by: victoryang00 --- .github/workflows/build-macos.yml | 2 +- CMakeLists.txt | 6 +++--- lib/wasm-micro-runtime | 2 +- src/checkpoint.cpp | 2 +- src/wamr.cpp | 2 +- src/wamr_export.cpp | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index 7ed569a..f3d8c7e 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -27,7 +27,7 @@ jobs: run: sudo xcode-select -s /Applications/Xcode_15.1.app/Contents/Developer - name: Install Dependency - run: brew install cxxopts fmt llvm@14 ninja spdlog + run: brew install cxxopts fmt llvm@14 ninja spdlog openblas - name: Checkout run: | diff --git a/CMakeLists.txt b/CMakeLists.txt index c26cb35..d345336 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -136,7 +136,7 @@ add_library(MVVM_export ${SOURCE_FILES} ${UNCOMMON_SHARED_SOURCE}) add_executable(MVVM_restore src/restore.cpp ${UNCOMMON_SHARED_SOURCE}) add_executable(MVVM_checkpoint src/checkpoint.cpp ${UNCOMMON_SHARED_SOURCE}) -target_link_libraries(MVVM_export fmt::fmt spdlog::spdlog -lm -ldl -lpthread ${BLAS_LIBRARIES}) -target_link_libraries(MVVM_restore fmt::fmt spdlog::spdlog cxxopts::cxxopts -lm -ldl -lpthread ${BLAS_LIBRARIES} MVVM_export vmlib ${WIN_EXTRA_LIBS}) -target_link_libraries(MVVM_checkpoint fmt::fmt spdlog::spdlog cxxopts::cxxopts -lm -ldl -lpthread ${BLAS_LIBRARIES} MVVM_export vmlib ${WIN_EXTRA_LIBS}) +target_link_libraries(MVVM_export fmt::fmt spdlog::spdlog ${BLAS_LIBRARIES}) +target_link_libraries(MVVM_restore fmt::fmt spdlog::spdlog cxxopts::cxxopts ${BLAS_LIBRARIES} MVVM_export vmlib ${WIN_EXTRA_LIBS}) +target_link_libraries(MVVM_checkpoint fmt::fmt spdlog::spdlog cxxopts::cxxopts ${BLAS_LIBRARIES} MVVM_export vmlib ${WIN_EXTRA_LIBS}) add_definitions(-DCXXOPTS_NO_RTTI=1) diff --git a/lib/wasm-micro-runtime b/lib/wasm-micro-runtime index 533f27a..ab2148d 160000 --- a/lib/wasm-micro-runtime +++ b/lib/wasm-micro-runtime @@ -1 +1 @@ -Subproject commit 533f27afbb1f68e2cd8e9caab35f4a7bf3a1dfae +Subproject commit ab2148d9a913cd0a41ec6125a9c73e2b2ab78af8 diff --git a/src/checkpoint.cpp b/src/checkpoint.cpp index b702149..8572380 100644 --- a/src/checkpoint.cpp +++ b/src/checkpoint.cpp @@ -36,7 +36,7 @@ void serialize_to_file(WASMExecEnv *instance) { wamr->should_snapshot = true; } // If we're not all ready - SPDLOG_DEBUG("thread {}, with {} ready out of {} total", instance->handle, wamr->ready, all_count); + SPDLOG_DEBUG("thread {}, with {} ready out of {} total", ((uint64_t)instance->handle), wamr->ready, all_count); #endif #if !defined(_WIN32) if (!wamr->socket_fd_map_.empty() && wamr->should_snapshot) { diff --git a/src/wamr.cpp b/src/wamr.cpp index 08b1247..7ee3132 100644 --- a/src/wamr.cpp +++ b/src/wamr.cpp @@ -906,7 +906,7 @@ void wamr_wait(wasm_exec_env_t exec_env) { SPDLOG_DEBUG("finish child restore"); wakeup.acquire(); #if WASM_ENABLE_LIB_PTHREAD != 0 - SPDLOG_DEBUG("go child!! {}", exec_env->handle); + SPDLOG_DEBUG("go child!! {}", ((uint64_t)exec_env->handle)); wamr->replay_sync_ops(false, exec_env); SPDLOG_DEBUG("finish syncing"); #endif diff --git a/src/wamr_export.cpp b/src/wamr_export.cpp index d4a1a84..720b812 100644 --- a/src/wamr_export.cpp +++ b/src/wamr_export.cpp @@ -96,7 +96,7 @@ void insert_sock_recv_from_data(uint32_t sock, uint8 *ri_data, uint32 ri_data_le recvFromData.src_addr.ip.ip6[7] = src_addr->addr.ip6.addr.h3; recvFromData.src_addr.port = src_addr->addr.ip6.port; } - SPDLOG_ERROR("insert_sock_recv_from_data ", sock, " ", ((struct mvvm_op_data *)ri_data)->op); + SPDLOG_ERROR("insert_sock_recv_from_data {} {}", sock, ((int)((struct mvvm_op_data *)ri_data)->op)); if (((struct mvvm_op_data *)ri_data)->op == MVVM_SOCK_FIN) { wamr->socket_fd_map_[sock].is_collection = false; return;