cypherstack / flutter_libsparkmobile

firo-org/sparkmobile for cross-platform Flutter applications.
MIT License
0 stars 2 forks source link

macOS build error in Boost #27

Closed sneurlax closed 5 months ago

sneurlax commented 7 months ago

When building for macOS on Sonoma, I get

Installing flutter_libsparkmobile (0.0.1)
[!] /bin/bash -c 
set -e
"./run_build.sh"

-- Fetching Boost
-- Fetching Boost - done
-- Boost found: 1.71.0 /Users/user/.pub-cache/git/flutter_libsparkmobile-3f986ca1a94bdac5d31373454c989cc2f5842de8/scripts/macos/build/_deps/boost-src
-- The following ICU libraries were not found:
--   uc (required)
--   dt (required)
--   i18n (required)
-- Failed to find all ICU components (missing: ICU_LIBRARY _ICU_REQUIRED_LIBS_FOUND) (found version "72.1")
-- Found iconv library: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk/usr/lib/libiconv.tbd
-- Checking for module 'mpi-c'
--   No package 'mpi-c' found
-- Checking for module 'mpi-cxx'
--   No package 'mpi-cxx' found
-- OpenSSL version 1.1.1w
-- Configuring done (1.0s)
-- Generating done (0.2s)
-- Build files have been written to: /Users/user/.pub-cache/git/flutter_libsparkmobile-3f986ca1a94bdac5d31373454c989cc2f5842de8/scripts/macos/build
[  0%] Built target Boost_chrono
[  0%] Building CXX object deps/boost-cmake/CMakeFiles/Boost_thread.dir/__/__/_deps/boost-src/libs/thread/src/pthread/thread.cpp.o
[  0%] Building C object deps/openssl-cmake/crypto/CMakeFiles/crypto.dir/cversion.c.o
[  0%] Linking C static library libcrypto.a
[ 86%] Built target crypto
[ 94%] Built target ssl
[ 95%] Built target secp256k1_spark
CMake Warning (dev) at /opt/homebrew/Cellar/cmake/3.28.3/share/cmake/Modules/FetchContent.cmake:1331 (message):
  The DOWNLOAD_EXTRACT_TIMESTAMP option was not given and policy CMP0135 is
  not set.  The policy's OLD behavior will be used.  When using a URL
  download, the timestamps of extracted files should preferably be that of
  the time of extraction, otherwise code that depends on the extracted
  contents might not be rebuilt if the URL changes.  The OLD behavior
  preserves the timestamps from the archive instead, but this is usually not
  what you want.  Update your project to the NEW behavior or specify the
  DOWNLOAD_EXTRACT_TIMESTAMP option with a value of true to avoid this
  robustness issue.
Call Stack (most recent call first):
  deps/boost-cmake/CMakeLists.txt:10 (FetchContent_Declare)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Deprecation Warning at deps/openssl-cmake/CMakeLists.txt:26 (cmake_minimum_required):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.

CMake Deprecation Warning at deps/sparkmobile/secp256k1/CMakeLists.txt:3 (cmake_minimum_required):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.

In file included from /Users/user/.pub-cache/git/flutter_libsparkmobile-3f986ca1a94bdac5d31373454c989cc2f5842de8/scripts/macos/build/_deps/boost-src/libs/thread/src/pthread/thread.cpp:11:
In file included from /Users/user/.pub-cache/git/flutter_libsparkmobile-3f986ca1a94bdac5d31373454c989cc2f5842de8/scripts/macos/build/_deps/boost-src/boost/thread/thread_only.hpp:22:
In file included from /Users/user/.pub-cache/git/flutter_libsparkmobile-3f986ca1a94bdac5d31373454c989cc2f5842de8/scripts/macos/build/_deps/boost-src/boost/thread/detail/thread.hpp:41:
In file included from /Users/user/.pub-cache/git/flutter_libsparkmobile-3f986ca1a94bdac5d31373454c989cc2f5842de8/scripts/macos/build/_deps/boost-src/boost/functional/hash.hpp:6:
/Users/user/.pub-cache/git/flutter_libsparkmobile-3f986ca1a94bdac5d31373454c989cc2f5842de8/scripts/macos/build/_deps/boost-src/boost/container_hash/hash.hpp:130:33: error: no template named 'unary_function' in namespace 'std'; did you mean '__unary_function'?
        struct hash_base : std::unary_function<T, std::size_t> {};
                           ~~~~~^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk/usr/include/c++/v1/__functional/unary_function.h:46:1: note: '__unary_function' declared here
using __unary_function = __unary_function_keep_layout_base<_Arg, _Result>;
^
1 error generated.
make[2]: *** [deps/boost-cmake/CMakeFiles/Boost_thread.dir/__/__/_deps/boost-src/libs/thread/src/pthread/thread.cpp.o] Error 1
make[1]: *** [deps/boost-cmake/CMakeFiles/Boost_thread.dir/all] Error 2
make: *** [all] Error 2