Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmake, doc: Update build-osx.md #163

Merged
merged 3 commits into from
Apr 23, 2024
Merged

cmake, doc: Update build-osx.md #163

merged 3 commits into from
Apr 23, 2024

Conversation

hebasto
Copy link
Owner

@hebasto hebasto commented Apr 22, 2024

No description provided.

@hebasto hebasto force-pushed the 240422-cmake-DX branch 2 times, most recently from b883fde to 507c5e0 Compare April 22, 2024 11:08
@hebasto
Copy link
Owner Author

hebasto commented Apr 22, 2024

A bug with the deploy target has been fixed.

@hebasto
Copy link
Owner Author

hebasto commented Apr 22, 2024

cc @Sjors :)

@Sjors
Copy link

Sjors commented Apr 22, 2024

When I build with the GUI on my Intel macOS 13.6.6 machine, I get (amongst other things):

-- Could NOT find MiniUPnPc (missing: MiniUPnPc_LIBRARY MiniUPnPc_INCLUDE_DIR MiniUPnPc_API_VERSION_OK) 
CMake Warning at cmake/optional.cmake:71 (message):
  libminiupnpc not found, disabling.

  To skip libminiupnpc check, use "-DWITH_MINIUPNPC=OFF".

Call Stack (most recent call first):
  CMakeLists.txt:406 (include)

I don't think MiniUPnPc should be switched on by default, but this is probably not macOS specific.

Ditto for libzmq

When I try to turn some things off I get a rather cryptic error:

% cmake -S .. -DWITH_GUI=Qt5 -DWITH_NATPMP=OFF -DWITH_MINIUPNPC=OFF -DWITH_ZMQ=OFF -DWITH_BDB=OFF 
CMake Error at /usr/local/Cellar/cmake/3.29.2/share/cmake/Modules/FindPkgConfig.cmake:859 (if):
  if given arguments:

    "NOT" "DEFINED" "__pkg_config_checked_libqrencode" "OR" "__pkg_config_checked_libqrencode" "LESS" "OR" "NOT" "libqrencode_FOUND" "OR" "(" "NOT" "IMPORTED_TARGET" "STREQUAL" "" "AND" "NOT" "" "STREQUAL" "libqrencode;IMPORTED_TARGET" ")" "OR" "(" "IMPORTED_TARGET" "STREQUAL" "" "AND" "NOT" "" "STREQUAL" "libqrencode" ")"

  Unknown arguments specified
Call Stack (most recent call first):
  cmake/module/CrossPkgConfig.cmake:19 (pkg_check_modules)
  cmake/optional.cmake:197 (cross_pkg_check_modules)
  CMakeLists.txt:406 (include)

If I install libqrencode via homebrew and I wipe the build folder and try again:

% cmake -S .. -DWITH_GUI=Qt5 -DWITH_NATPMP=OFF -DWITH_MINIUPNPC=OFF -DWITH_ZMQ=OFF -DWITH_BDB=OFF
-- The CXX compiler identification is AppleClang 15.0.0.15000100
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test CXX_SUPPORTS__WERROR
-- Performing Test CXX_SUPPORTS__WERROR - Success
-- Performing Test LINKER_SUPPORTS__WL__FATAL_WARNINGS
-- Performing Test LINKER_SUPPORTS__WL__FATAL_WARNINGS - Success
-- Performing Test LINKER_SUPPORTS__WL__DEAD_STRIP
-- Performing Test LINKER_SUPPORTS__WL__DEAD_STRIP - Success
-- Performing Test LINKER_SUPPORTS__WL__DEAD_STRIP_DYLIBS
-- Performing Test LINKER_SUPPORTS__WL__DEAD_STRIP_DYLIBS - Success
-- Performing Test LINKER_SUPPORTS__WL__HEADERPAD_MAX_INSTALL_NAMES
-- Performing Test LINKER_SUPPORTS__WL__HEADERPAD_MAX_INSTALL_NAMES - Success
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Found Boost: /usr/local/include (found suitable version "1.84.0", minimum required is "1.73.0")
-- Performing Test HAVE_BOOST_INCLUDED_UNIT_TEST_H
-- Performing Test HAVE_BOOST_INCLUDED_UNIT_TEST_H - Success
-- Performing Test HAVE_BOOST_UNIT_TEST_H
-- Performing Test HAVE_BOOST_UNIT_TEST_H - Success
-- Performing Test HAVE_BOOST_PROCESS
-- Performing Test HAVE_BOOST_PROCESS - Success
-- Found PkgConfig: /usr/local/bin/pkg-config (found version "0.29.2")
-- Checking for module 'libevent>=2.1.8'
--   Found libevent, version 2.1.12-stable
-- Performing Test HAVE_EVHTTP_CONNECTION_GET_PEER_CONST_CHAR
-- Performing Test HAVE_EVHTTP_CONNECTION_GET_PEER_CONST_CHAR - Failed
-- Checking for module 'libevent_pthreads>=2.1.8'
--   Found libevent_pthreads, version 2.1.12-stable
-- Looking for C++ include sys/prctl.h
-- Looking for C++ include sys/prctl.h - not found
-- Looking for C++ include sys/resources.h
-- Looking for C++ include sys/resources.h - not found
-- Looking for C++ include sys/vmmeter.h
-- Looking for C++ include sys/vmmeter.h - found
-- Looking for C++ include vm/vm_param.h
-- Looking for C++ include vm/vm_param.h - not found
-- Looking for O_CLOEXEC
-- Looking for O_CLOEXEC - found
-- Looking for C++ include unistd.h
-- Looking for C++ include unistd.h - found
-- Looking for fdatasync
-- Looking for fdatasync - not found
-- Looking for fork
-- Looking for fork - found
-- Looking for pipe2
-- Looking for pipe2 - not found
-- Looking for setsid
-- Looking for setsid - found
-- Looking for C++ include sys/types.h
-- Looking for C++ include sys/types.h - found
-- Looking for C++ include ifaddrs.h
-- Looking for C++ include ifaddrs.h - found
-- Looking for freeifaddrs
-- Looking for freeifaddrs - found
-- Looking for getifaddrs
-- Looking for getifaddrs - found
-- Performing Test IFADDR_LINKS_WITHOUT_LIBSOCKET
-- Performing Test IFADDR_LINKS_WITHOUT_LIBSOCKET - Success
-- Performing Test STD_ATOMIC_LINKS_WITHOUT_LIBATOMIC
-- Performing Test STD_ATOMIC_LINKS_WITHOUT_LIBATOMIC - Success
-- Looking for std::system
-- Looking for std::system - found
-- Looking for ::_wsystem
-- Looking for ::_wsystem - not found
-- Looking for C++ include string.h
-- Looking for C++ include string.h - found
-- Performing Test STRERROR_R_CHAR_P
-- Performing Test STRERROR_R_CHAR_P - Failed
-- Looking for malloc_info
-- Looking for malloc_info - not found
-- Performing Test HAVE_MALLOPT_ARENA_MAX
-- Performing Test HAVE_MALLOPT_ARENA_MAX - Failed
-- Performing Test HAVE_POSIX_FALLOCATE
-- Performing Test HAVE_POSIX_FALLOCATE - Failed
-- Performing Test HAVE_STRONG_GETAUXVAL
-- Performing Test HAVE_STRONG_GETAUXVAL - Failed
-- Performing Test HAVE_SOCKADDR_UN
-- Performing Test HAVE_SOCKADDR_UN - Success
-- Performing Test HAVE_GETRANDOM
-- Performing Test HAVE_GETRANDOM - Failed
-- Performing Test HAVE_GETENTROPY_RAND
-- Performing Test HAVE_GETENTROPY_RAND - Success
-- Performing Test HAVE_SYSCTL
-- Performing Test HAVE_SYSCTL - Success
-- Performing Test HAVE_SYSCTL_ARND
-- Performing Test HAVE_SYSCTL_ARND - Failed
-- Performing Test HAVE_DEFAULT_VISIBILITY_ATTRIBUTE
-- Performing Test HAVE_DEFAULT_VISIBILITY_ATTRIBUTE - Success
-- Performing Test HAVE_DLLEXPORT_ATTRIBUTE
-- Performing Test HAVE_DLLEXPORT_ATTRIBUTE - Failed
-- Performing Test HAVE_BUILTIN_PREFETCH
-- Performing Test HAVE_BUILTIN_PREFETCH - Success
-- Performing Test HAVE_MM_PREFETCH
-- Performing Test HAVE_MM_PREFETCH - Success
-- Performing Test HAVE_SSE42
-- Performing Test HAVE_SSE42 - Success
-- Performing Test HAVE_ARM64_CRC32C
-- Performing Test HAVE_ARM64_CRC32C - Failed
-- Looking for F_FULLFSYNC
-- Looking for F_FULLFSYNC - found
-- Performing Test HAVE_CLMUL
-- Performing Test HAVE_CLMUL - Success
-- The C compiler identification is AppleClang 15.0.0.15000100
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Performing Test HAVE_64BIT_ASM
-- Performing Test HAVE_64BIT_ASM - Success
-- Performing Test CXX_SUPPORTS__WALL
-- Performing Test CXX_SUPPORTS__WALL - Success
-- Performing Test CXX_SUPPORTS__WEXTRA
-- Performing Test CXX_SUPPORTS__WEXTRA - Success
-- Performing Test CXX_SUPPORTS__WGNU
-- Performing Test CXX_SUPPORTS__WGNU - Success
-- Performing Test CXX_SUPPORTS__WFORMAT__WFORMAT_SECURITY
-- Performing Test CXX_SUPPORTS__WFORMAT__WFORMAT_SECURITY - Success
-- Performing Test CXX_SUPPORTS__WVLA
-- Performing Test CXX_SUPPORTS__WVLA - Success
-- Performing Test CXX_SUPPORTS__WSHADOW_FIELD
-- Performing Test CXX_SUPPORTS__WSHADOW_FIELD - Success
-- Performing Test CXX_SUPPORTS__WTHREAD_SAFETY
-- Performing Test CXX_SUPPORTS__WTHREAD_SAFETY - Success
-- Performing Test CXX_SUPPORTS__WLOOP_ANALYSIS
-- Performing Test CXX_SUPPORTS__WLOOP_ANALYSIS - Success
-- Performing Test CXX_SUPPORTS__WREDUNDANT_DECLS
-- Performing Test CXX_SUPPORTS__WREDUNDANT_DECLS - Success
-- Performing Test CXX_SUPPORTS__WUNUSED_MEMBER_FUNCTION
-- Performing Test CXX_SUPPORTS__WUNUSED_MEMBER_FUNCTION - Success
-- Performing Test CXX_SUPPORTS__WDATE_TIME
-- Performing Test CXX_SUPPORTS__WDATE_TIME - Success
-- Performing Test CXX_SUPPORTS__WCONDITIONAL_UNINITIALIZED
-- Performing Test CXX_SUPPORTS__WCONDITIONAL_UNINITIALIZED - Success
-- Performing Test CXX_SUPPORTS__WDUPLICATED_BRANCHES
-- Performing Test CXX_SUPPORTS__WDUPLICATED_BRANCHES - Failed
-- Performing Test CXX_SUPPORTS__WDUPLICATED_COND
-- Performing Test CXX_SUPPORTS__WDUPLICATED_COND - Failed
-- Performing Test CXX_SUPPORTS__WLOGICAL_OP
-- Performing Test CXX_SUPPORTS__WLOGICAL_OP - Failed
-- Performing Test CXX_SUPPORTS__WOVERLOADED_VIRTUAL
-- Performing Test CXX_SUPPORTS__WOVERLOADED_VIRTUAL - Success
-- Performing Test CXX_SUPPORTS__WSUGGEST_OVERRIDE
-- Performing Test CXX_SUPPORTS__WSUGGEST_OVERRIDE - Success
-- Performing Test CXX_SUPPORTS__WIMPLICIT_FALLTHROUGH
-- Performing Test CXX_SUPPORTS__WIMPLICIT_FALLTHROUGH - Success
-- Performing Test CXX_SUPPORTS__WUNREACHABLE_CODE
-- Performing Test CXX_SUPPORTS__WUNREACHABLE_CODE - Success
-- Performing Test CXX_SUPPORTS__WDOCUMENTATION
-- Performing Test CXX_SUPPORTS__WDOCUMENTATION - Success
-- Performing Test CXX_SUPPORTS__WUNUSED_PARAMETER
-- Performing Test CXX_SUPPORTS__WUNUSED_PARAMETER - Success
-- Performing Test CXX_SUPPORTS__WSELF_ASSIGN
-- Performing Test CXX_SUPPORTS__WSELF_ASSIGN - Success
-- Setting build type to "RelWithDebInfo" as none was specified
-- Performing Test CXX_SUPPORTS__G3
-- Performing Test CXX_SUPPORTS__G3 - Success
-- Performing Test CXX_SUPPORTS__FTRAPV
-- Performing Test CXX_SUPPORTS__FTRAPV - Success
-- Performing Test HAVE_USDT_H
-- Performing Test HAVE_USDT_H - Failed
-- Found SQLite3: /Library/Developer/CommandLineTools/SDKs/MacOSX14.2.sdk/usr/include (found suitable version "3.43.2", minimum required is "3.7.17")
CMake Error at /usr/local/Cellar/cmake/3.29.2/share/cmake/Modules/FindPkgConfig.cmake:859 (if):
  if given arguments:

    "NOT" "DEFINED" "__pkg_config_checked_libqrencode" "OR" "__pkg_config_checked_libqrencode" "LESS" "OR" "NOT" "libqrencode_FOUND" "OR" "(" "NOT" "IMPORTED_TARGET" "STREQUAL" "" "AND" "NOT" "" "STREQUAL" "libqrencode;IMPORTED_TARGET" ")" "OR" "(" "IMPORTED_TARGET" "STREQUAL" "" "AND" "NOT" "" "STREQUAL" "libqrencode" ")"

  Unknown arguments specified
Call Stack (most recent call first):
  cmake/module/CrossPkgConfig.cmake:19 (pkg_check_modules)
  cmake/optional.cmake:197 (cross_pkg_check_modules)
  CMakeLists.txt:406 (include)


-- Configuring incomplete, errors occurred!

I added -DWITH_QRENCODE=OFF and then it got a bit further:

% cmake -S .. -DWITH_GUI=Qt5 -DWITH_NATPMP=OFF -DWITH_MINIUPNPC=OFF -DWITH_ZMQ=OFF -DWITH_BDB=OFF -DWITH_QRENCODE=OFF
-- Performing Test CXX_SUPPORTS__FNO_EXTENDED_IDENTIFIERS
-- Performing Test CXX_SUPPORTS__FNO_EXTENDED_IDENTIFIERS - Failed
-- Performing Test CXX_SUPPORTS__FSTACK_REUSE_NONE
-- Performing Test CXX_SUPPORTS__FSTACK_REUSE_NONE - Failed
-- Performing Test CXX_SUPPORTS__WSTACK_PROTECTOR
-- Performing Test CXX_SUPPORTS__WSTACK_PROTECTOR - Success
-- Performing Test CXX_SUPPORTS__FSTACK_PROTECTOR_ALL
-- Performing Test CXX_SUPPORTS__FSTACK_PROTECTOR_ALL - Success
-- Performing Test CXX_SUPPORTS__FCF_PROTECTION_FULL
-- Performing Test CXX_SUPPORTS__FCF_PROTECTION_FULL - Success
-- Performing Test CXX_SUPPORTS__FSTACK_CLASH_PROTECTION
-- Performing Test CXX_SUPPORTS__FSTACK_CLASH_PROTECTION - Failed
-- Performing Test LINKER_SUPPORTS__WL___ENABLE_RELOC_SECTION
-- Performing Test LINKER_SUPPORTS__WL___ENABLE_RELOC_SECTION - Failed
-- Performing Test LINKER_SUPPORTS__WL___DYNAMICBASE
-- Performing Test LINKER_SUPPORTS__WL___DYNAMICBASE - Failed
-- Performing Test LINKER_SUPPORTS__WL___NXCOMPAT
-- Performing Test LINKER_SUPPORTS__WL___NXCOMPAT - Failed
-- Performing Test LINKER_SUPPORTS__WL___HIGH_ENTROPY_VA
-- Performing Test LINKER_SUPPORTS__WL___HIGH_ENTROPY_VA - Failed
-- Performing Test LINKER_SUPPORTS__WL__Z_RELRO
-- Performing Test LINKER_SUPPORTS__WL__Z_RELRO - Failed
-- Performing Test LINKER_SUPPORTS__WL__Z_NOW
-- Performing Test LINKER_SUPPORTS__WL__Z_NOW - Failed
-- Performing Test LINKER_SUPPORTS__WL__Z_SEPARATE_CODE
-- Performing Test LINKER_SUPPORTS__WL__Z_SEPARATE_CODE - Failed
-- Performing Test LINKER_SUPPORTS__WL__BIND_AT_LOAD
-- Performing Test LINKER_SUPPORTS__WL__BIND_AT_LOAD - Failed
-- Performing Test LINKER_SUPPORTS__WL__FIXUP_CHAINS
-- Performing Test LINKER_SUPPORTS__WL__FIXUP_CHAINS - Success
-- Found Python3: /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/bin/python3.9 (found suitable version "3.9.6", minimum required is "3.9") found components: Interpreter
-- Performing Test HAVE_SSE41
-- Performing Test HAVE_SSE41 - Success
-- Performing Test HAVE_AVX2
-- Performing Test HAVE_AVX2 - Success
-- Performing Test HAVE_X86_SHANI
-- Performing Test HAVE_X86_SHANI - Success
-- Performing Test HAVE_ARM_SHANI
-- Performing Test HAVE_ARM_SHANI - Failed
CMake Error at src/qt/CMakeLists.txt:48 (find_package):
  Could not find a package configuration file provided by "Qt5" (requested
  version 5.11.3) with any of the following names:

    Qt5Config.cmake
    qt5-config.cmake

  Add the installation prefix of "Qt5" to CMAKE_PREFIX_PATH or set "Qt5_DIR"
  to a directory containing one of the above files.  If "Qt5" provides a
  separate development package or SDK, be sure it has been installed.


-- Configuring incomplete, errors occurred!

QT 5.15.13 is installed via homebrew.

on macOS 14.4.1 I'm able to build just fine. Given that this older iMac has had other weird build problems lately, I wouldn't rule out a problem with the machine.

@hebasto
Copy link
Owner Author

hebasto commented Apr 22, 2024

When I try to turn some things off I get a rather cryptic error:

That error has been addressed in #160.

@hebasto
Copy link
Owner Author

hebasto commented Apr 22, 2024

I don't think MiniUPnPc should be switched on by default, but this is probably not macOS specific.

Ditto for libzmq

In the staging branch we are currently moving from the tri-state options -- ON/OFF/AUTO, which mirrors Autotools behaviour -- to the boolean ones (ON/OFF).

And both WITH_UPNP and WITH_ZMQ will be disabled by default.

@hebasto
Copy link
Owner Author

hebasto commented Apr 22, 2024

@Sjors

When I build with the GUI on my Intel macOS 13.6.6 machine...

QT 5.15.13 is installed via homebrew.

Could you please provide the output of tree $(brew --prefix qt@5) (might be verbose)?

@hebasto
Copy link
Owner Author

hebasto commented Apr 22, 2024

When I try to turn some things off I get a rather cryptic error:

That error has been addressed in #160.

Rebased on top of the merged #160.

@Sjors
Copy link

Sjors commented Apr 22, 2024

@hebasto I'm going to nuke the macOS install and try again, probably tomorrow.

@hebasto
Copy link
Owner Author

hebasto commented Apr 22, 2024

When I build with the GUI on my Intel macOS 13.6.6 machine...

QT 5.15.13 is installed via homebrew.

I can't reproduce this issue on Intel macOS 12.7.4:

<snip>
-- Found Qt: /usr/local/opt/qt@5/lib/cmake/Qt5 (found suitable version "5.15.13", minimum required is "5.11.3")
-- Performing Test QT_IS_STATIC
-- Performing Test QT_IS_STATIC - Failed
</snip>

@Sjors
Copy link

Sjors commented Apr 23, 2024

tACK 2dc664c

Tried again on the freshly reinstalled macOS 13.6.6 machine and it worked fine.

@hebasto hebasto merged commit f9b43f7 into cmake-staging Apr 23, 2024
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants