Compiler warnings from capnproto when building via add_subdirectory #138

issue ryanofsky opened this issue on January 28, 2025
  1. ryanofsky commented at 4:15 PM on January 28, 2025: collaborator

    Originally posted by @Sjors in https://github.com/bitcoin/bitcoin/pull/31741#pullrequestreview-2577588200

    On (M4) macOS 15.2 I get a flood of warnings, which means I can't use -DWERROR=ON:

    In file included from /opt/homebrew/include/capnp/common.h:31:
    /opt/homebrew/include/kj/windows-sanity.h:39:6: warning: '_WIN32' is not defined, evaluates to 0 [-Wundef]
       39 | #if !_WIN32 && !__CYGWIN__
          |      ^
    /opt/homebrew/include/kj/windows-sanity.h:39:17: warning: '__CYGWIN__' is not defined, evaluates to 0 [-Wundef]
       39 | #if !_WIN32 && !__CYGWIN__
          |     
    
    /opt/homebrew/include/capnp/common.h:33:5: warning: 'CAPNP_DEBUG_TYPES' is not defined, evaluates to 0 [-Wundef]
    
    /opt/homebrew/include/capnp/raw-schema.h:26:5: warning: '_MSC_VER' is not defined, evaluates to 0 [-Wundef]
    
    /opt/homebrew/include/kj/async-prelude.h:34:6: warning: 'KJ_NO_EXCEPTIONS' is not defined, evaluates to 0 [-Wundef]
    
  2. ryanofsky commented at 4:23 PM on January 28, 2025: collaborator

    Using https://github.com/bitcoin/bitcoin/pull/31741 (https://github.com/ryanofsky/bitcoin/commits/pr/subtree.3) I don't see any warnings on my sstem, so help to provide more steps to reproduce.

    If you can try building with make -C build VERBOSE=1 ... that would also help show the compiler comment lines so we can see if there's something wrong with -I -isystem -Wno-system-headers options that are being passed might be causing this issue.

  3. Sjors commented at 5:30 PM on January 28, 2025: member

    On 93ba80b3d78fa1c4e7f614df6517b9cb492d05d7 (build directory deleted)

    macOS 15.2 with Xcode 16.2

    cmake -B build -DWERROR=OFF -DBUILD_MULTIPROCESS=ON
    

    <details> <summary>log</summary>

    -- The CXX compiler identification is AppleClang 16.0.0.16000026
    -- Detecting CXX compiler ABI info
    -- Detecting CXX compiler ABI info - done
    -- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
    -- Detecting CXX compile features
    -- Detecting CXX compile features - done
    -- Found SQLite3: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.2.sdk/usr/include (found suitable version "3.43.2", minimum required is "3.7.17")
    -- Performing Test CXX_SUPPORTS__WERROR
    -- Performing Test CXX_SUPPORTS__WERROR - Success
    -- Setting build type to "RelWithDebInfo" as none was specified
    -- Performing Test CXX_SUPPORTS__G3
    -- Performing Test CXX_SUPPORTS__G3 - Success
    -- Performing Test LINKER_SUPPORTS__G3
    -- Performing Test LINKER_SUPPORTS__G3 - Success
    -- Performing Test CXX_SUPPORTS__FTRAPV
    -- Performing Test CXX_SUPPORTS__FTRAPV - Success
    -- Performing Test LINKER_SUPPORTS__FTRAPV
    -- Performing Test LINKER_SUPPORTS__FTRAPV - 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: /opt/homebrew/include (found suitable version "1.87.0", minimum required is "1.73.0")
    -- Performing Test NO_DIAGNOSTICS_BOOST_NO_CXX98_FUNCTION_BASE
    -- Performing Test NO_DIAGNOSTICS_BOOST_NO_CXX98_FUNCTION_BASE - Failed
    -- Found PkgConfig: /opt/homebrew/bin/pkg-config (found version "2.3.0")
    -- Found Libevent: /opt/homebrew/Cellar/libevent/2.1.12_1/lib (found suitable version "2.1.12-stable", minimum required is "2.1.8")
    -- Performing Test HAVE_EVHTTP_CONNECTION_GET_PEER_CONST_CHAR
    -- Performing Test HAVE_EVHTTP_CONNECTION_GET_PEER_CONST_CHAR - Failed
    -- 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 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
    -- 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
    -- 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_SSE41
    -- Performing Test HAVE_SSE41 - Failed
    -- Performing Test HAVE_AVX2
    -- Performing Test HAVE_AVX2 - Failed
    -- Performing Test HAVE_X86_SHANI
    -- Performing Test HAVE_X86_SHANI - Failed
    -- Performing Test HAVE_ARM_SHANI
    -- Performing Test HAVE_ARM_SHANI - 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__WSELF_ASSIGN
    -- Performing Test CXX_SUPPORTS__WSELF_ASSIGN - Success
    -- Performing Test CXX_SUPPORTS__WBIDI_CHARS_ANY
    -- Performing Test CXX_SUPPORTS__WBIDI_CHARS_ANY - Failed
    -- Performing Test CXX_SUPPORTS__WUNDEF
    -- Performing Test CXX_SUPPORTS__WUNDEF - Success
    -- Performing Test CXX_SUPPORTS__WUNUSED_PARAMETER
    -- Performing Test CXX_SUPPORTS__WUNUSED_PARAMETER - Success
    -- Performing Test CXX_SUPPORTS__FNO_EXTENDED_IDENTIFIERS
    -- Performing Test CXX_SUPPORTS__FNO_EXTENDED_IDENTIFIERS - Failed
    -- Performing Test CXX_SUPPORTS__FDEBUG_PREFIX_MAP_A_B
    -- Performing Test CXX_SUPPORTS__FDEBUG_PREFIX_MAP_A_B - Success
    -- Performing Test CXX_SUPPORTS__FMACRO_PREFIX_MAP_A_B
    -- Performing Test CXX_SUPPORTS__FMACRO_PREFIX_MAP_A_B - Success
    -- Performing Test CXX_SUPPORTS__FSTACK_REUSE_NONE
    -- Performing Test CXX_SUPPORTS__FSTACK_REUSE_NONE - Failed
    -- Performing Test CXX_SUPPORTS__U_FORTIFY_SOURCE__D_FORTIFY_SOURCE_3_cc10
    -- Performing Test CXX_SUPPORTS__U_FORTIFY_SOURCE__D_FORTIFY_SOURCE_3_cc10 - Success
    -- Performing Test LINKER_SUPPORTS__U_FORTIFY_SOURCE__D_FORTIFY_SOURCE_3_cc10
    -- Performing Test LINKER_SUPPORTS__U_FORTIFY_SOURCE__D_FORTIFY_SOURCE_3_cc10 - Success
    -- 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 LINKER_SUPPORTS__FSTACK_PROTECTOR_ALL
    -- Performing Test LINKER_SUPPORTS__FSTACK_PROTECTOR_ALL - Success
    -- Performing Test CXX_SUPPORTS__FCF_PROTECTION_FULL
    -- Performing Test CXX_SUPPORTS__FCF_PROTECTION_FULL - Failed
    -- Performing Test CXX_SUPPORTS__FSTACK_CLASH_PROTECTION
    -- Performing Test CXX_SUPPORTS__FSTACK_CLASH_PROTECTION - Failed
    -- Performing Test CXX_SUPPORTS__MBRANCH_PROTECTION_BTI
    -- Performing Test CXX_SUPPORTS__MBRANCH_PROTECTION_BTI - Success
    -- 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__FIXUP_CHAINS
    -- Performing Test LINKER_SUPPORTS__WL__FIXUP_CHAINS - Success
    -- Found Python3: /opt/homebrew/Frameworks/Python.framework/Versions/3.13/bin/python3.13 (found suitable version "3.13.1", minimum required is "3.10") found components: Interpreter
    -- Found Doxygen: /opt/homebrew/bin/doxygen (found version "1.13.2") found components: doxygen dot
    -- Performing Test HAVE_BUILTIN_PREFETCH
    -- Performing Test HAVE_BUILTIN_PREFETCH - Success
    -- Performing Test HAVE_MM_PREFETCH
    -- Performing Test HAVE_MM_PREFETCH - Failed
    -- Performing Test HAVE_SSE42
    -- Performing Test HAVE_SSE42 - Failed
    -- Performing Test HAVE_ARM64_CRC32C
    -- Performing Test HAVE_ARM64_CRC32C - Success
    -- Looking for F_FULLFSYNC
    -- Looking for F_FULLFSYNC - found
    -- Performing Test HAVE_CLMUL
    -- Performing Test HAVE_CLMUL - Failed
    CMake Deprecation Warning at src/ipc/libmultiprocess/CMakeLists.txt:5 (cmake_minimum_required):
      Compatibility with CMake < 3.10 will be removed from a future version of
      CMake.
    
      Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
      to tell CMake that the project requires at least <min> but has been updated
      to work with policies introduced by <max> or earlier.
    
    
    -- Found ZLIB: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.2.sdk/usr/lib/libz.tbd (found version "1.2.12")
    -- Performing Test HAVE_PTHREAD_GETNAME_NP
    -- Performing Test HAVE_PTHREAD_GETNAME_NP - Success
    -- Performing Test HAVE_PTHREAD_THREADID_NP
    -- Performing Test HAVE_PTHREAD_THREADID_NP - Success
    -- Performing Test HAVE_PTHREAD_GETTHREADID_NP
    -- Performing Test HAVE_PTHREAD_GETTHREADID_NP - Failed
    
    Configuring secp256k1 subtree...
    -- The C compiler identification is AppleClang 16.0.0.16000026
    -- Detecting C compiler ABI info
    -- Detecting C compiler ABI info - done
    -- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped
    -- Detecting C compile features
    -- Detecting C compile features - done
    -- Performing Test HAVE_X86_64_ASM
    -- Performing Test HAVE_X86_64_ASM - Failed
    -- Could NOT find Valgrind (missing: Valgrind_INCLUDE_DIR Valgrind_WORKS) 
    -- Performing Test C_SUPPORTS__PEDANTIC
    -- Performing Test C_SUPPORTS__PEDANTIC - Success
    -- Performing Test C_SUPPORTS__WALL
    -- Performing Test C_SUPPORTS__WALL - Success
    -- Performing Test C_SUPPORTS__WCAST_ALIGN
    -- Performing Test C_SUPPORTS__WCAST_ALIGN - Success
    -- Performing Test C_SUPPORTS__WCAST_ALIGN_STRICT
    -- Performing Test C_SUPPORTS__WCAST_ALIGN_STRICT - Failed
    -- Performing Test C_SUPPORTS__WCONDITIONAL_UNINITIALIZED
    -- Performing Test C_SUPPORTS__WCONDITIONAL_UNINITIALIZED - Success
    -- Performing Test C_SUPPORTS__WEXTRA
    -- Performing Test C_SUPPORTS__WEXTRA - Success
    -- Performing Test C_SUPPORTS__WNESTED_EXTERNS
    -- Performing Test C_SUPPORTS__WNESTED_EXTERNS - Success
    -- Performing Test C_SUPPORTS__WNO_LONG_LONG
    -- Performing Test C_SUPPORTS__WNO_LONG_LONG - Success
    -- Performing Test C_SUPPORTS__WNO_OVERLENGTH_STRINGS
    -- Performing Test C_SUPPORTS__WNO_OVERLENGTH_STRINGS - Success
    -- Performing Test C_SUPPORTS__WNO_UNUSED_FUNCTION
    -- Performing Test C_SUPPORTS__WNO_UNUSED_FUNCTION - Success
    -- Performing Test C_SUPPORTS__WRESERVED_IDENTIFIER
    -- Performing Test C_SUPPORTS__WRESERVED_IDENTIFIER - Success
    -- Performing Test C_SUPPORTS__WSHADOW
    -- Performing Test C_SUPPORTS__WSHADOW - Success
    -- Performing Test C_SUPPORTS__WSTRICT_PROTOTYPES
    -- Performing Test C_SUPPORTS__WSTRICT_PROTOTYPES - Success
    -- Performing Test C_SUPPORTS__WUNDEF
    -- Performing Test C_SUPPORTS__WUNDEF - Success
    
    
    secp256k1 configure summary
    ===========================
    Build artifacts:
      library type ........................ Static
    Optional modules:
      ECDH ................................ OFF
      ECDSA pubkey recovery ............... ON
      extrakeys ........................... ON
      schnorrsig .......................... ON
      musig ............................... OFF
      ElligatorSwift ...................... ON
    Parameters:
      ecmult window size .................. 15
      ecmult gen table size ............... 86 KiB
    Optional features:
      assembly ............................ OFF
      external callbacks .................. OFF
    Optional binaries:
      benchmark ........................... OFF
      noverify_tests ...................... ON
      tests ............................... ON
      exhaustive tests .................... ON
      ctime_tests ......................... OFF
      examples ............................ OFF
    
    Cross compiling ....................... FALSE
    Valgrind .............................. OFF
    Preprocessor defined macros ........... ENABLE_MODULE_ELLSWIFT=1 ENABLE_MODULE_SCHNORRSIG=1 ENABLE_MODULE_EXTRAKEYS=1 ENABLE_MODULE_RECOVERY=1 ECMULT_WINDOW_SIZE=15 COMB_BLOCKS=43 COMB_TEETH=6
    C compiler ............................ AppleClang 16.0.0.16000026, /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
    CFLAGS ................................ 
    Compile options ....................... -pedantic -Wall -Wcast-align -Wconditional-uninitialized -Wextra -Wnested-externs -Wno-long-long -Wno-overlength-strings -Wno-unused-function -Wreserved-identifier -Wshadow -Wstrict-prototypes -Wundef
    Build type:
     - CMAKE_BUILD_TYPE ................... RelWithDebInfo
     - CFLAGS ............................. -O2 -g 
     - LDFLAGS for executables ............ 
     - LDFLAGS for shared libraries ....... 
    
    
    
    Configure summary
    =================
    Executables:
      bitcoind ............................ ON
      bitcoin-node (multiprocess) ......... ON
      bitcoin-qt (GUI) .................... OFF
      bitcoin-gui (GUI, multiprocess) ..... OFF
      bitcoin-cli ......................... ON
      bitcoin-tx .......................... ON
      bitcoin-util ........................ ON
      bitcoin-wallet ...................... ON
      bitcoin-chainstate (experimental) ... OFF
      libbitcoinkernel (experimental) ..... OFF
    Optional features:
      wallet support ...................... ON
       - descriptor wallets (SQLite) ...... ON
       - legacy wallets (Berkeley DB) ..... OFF
      external signer ..................... ON
      ZeroMQ .............................. OFF
      USDT tracing ........................ OFF
      QR code (GUI) ....................... OFF
      DBus (GUI, Linux only) .............. OFF
    Tests:
      test_bitcoin ........................ ON
      test_bitcoin-qt ..................... OFF
      bench_bitcoin ....................... OFF
      fuzz binary ......................... OFF
    
    Cross compiling ....................... FALSE
    C++ compiler .......................... AppleClang 16.0.0.16000026, /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
    CMAKE_BUILD_TYPE ...................... RelWithDebInfo
    Preprocessor defined macros ........... OBJC_OLD_DISPATCH_PROTOTYPES=0
    C++ compiler flags .................... -O2 -g -std=c++20 -fPIC -fdebug-prefix-map=/Users/sjors/dev/bitcoin/src=. -fmacro-prefix-map=/Users/sjors/dev/bitcoin/src=. -Wall -Wextra -Wgnu -Wformat -Wformat-security -Wvla -Wshadow-field -Wthread-safety -Wloop-analysis -Wredundant-decls -Wunused-member-function -Wdate-time -Wconditional-uninitialized -Woverloaded-virtual -Wsuggest-override -Wimplicit-fallthrough -Wunreachable-code -Wdocumentation -Wself-assign -Wundef -Wno-unused-parameter -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -Wstack-protector -fstack-protector-all -mbranch-protection=bti
    Linker flags .......................... -O2 -g -Wl,-dead_strip -Wl,-dead_strip_dylibs -Wl,-headerpad_max_install_names -fstack-protector-all -Wl,-fixup_chains -fPIE -Xlinker -pie
    
    NOTE: The summary above may not exactly match the final applied build flags
          if any additional CMAKE_* or environment variables have been modified.
          To see the exact flags applied, build with the --verbose option.
    
    Attempt to harden executables ......... ON
    Treat compiler warnings as errors ..... OFF
    Use ccache for compiling .............. ON
    
    
    -- Configuring done (8.9s)
    -- Generating done (0.2s)
    -- Build files have been written to: /Users/sjors/dev/bitcoin/build
    

    </details>

    cmake --build build -j 15 --verbose
    

    That's so verbose it doesn't fit in a comment :-)

    https://gist.githubusercontent.com/Sjors/2307c73a2db59ca802f5c32d73d175d1/raw/52766be20a47be34447e9bfb87e86d5780e541ed/gistfile1.txt

  4. Sjors commented at 8:02 AM on January 30, 2025: member
  5. ryanofsky commented at 3:11 PM on January 30, 2025: collaborator

    @hebasto do you have any ideas on how to fix these warning: 'XXXXX' is not defined, evaluates to 0 [-Wundef] errors?

    I know in the old build system we had a SUPPRESS_WARNINGS workaround for this that used -isystem instead of -I to avoid them: 79e197b from https://github.com/bitcoin/bitcoin/pull/29876

    But I can't find an equivalent workaround in the cmake build. I would expect -Wundef problem didn't disappear so we much be working around it somehow?

  6. sedited commented at 3:21 PM on January 30, 2025: collaborator

    Shouldn't these be wrapped in defined(...)?

  7. ryanofsky commented at 3:25 PM on January 30, 2025: collaborator

    Shouldn't these be wrapped in defined(...)?

    These warnings are coming from capnproto. I think in most projects using #if UNDEFINED_SYMBOL is very common and using -Wundef is more rare, and in general we shouldn't be enforcing warnings in external headers.

  8. ryanofsky commented at 3:27 PM on January 30, 2025: collaborator

    Not to mention that if defined(SYMBOL) can cause problems because -DSYMBOL=0 will not work.

  9. ryanofsky commented at 4:07 PM on January 30, 2025: collaborator

    I feel like I'm pretty stuck here. I've been trying to make a similar failure happen on my system, but not getting anywhere. I think maybe following changes would be more correct and might get rid of the errors from boost and capnproto here, but this is a bit of a shot in the dark:

    --- a/src/ipc/libmultiprocess/CMakeLists.txt
    +++ b/src/ipc/libmultiprocess/CMakeLists.txt
    @@ -93,10 +93,10 @@ target_include_directories(multiprocess PUBLIC
       $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
       $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
       ${CAPNP_INCLUDE_DIRECTORY})
    -target_link_libraries(multiprocess PRIVATE CapnProto::capnp)
    -target_link_libraries(multiprocess PRIVATE CapnProto::capnp-rpc)
    -target_link_libraries(multiprocess PRIVATE CapnProto::kj)
    -target_link_libraries(multiprocess PRIVATE CapnProto::kj-async)
    +target_link_libraries(multiprocess PUBLIC CapnProto::capnp)
    +target_link_libraries(multiprocess PUBLIC CapnProto::capnp-rpc)
    +target_link_libraries(multiprocess PUBLIC CapnProto::kj)
    +target_link_libraries(multiprocess PUBLIC CapnProto::kj-async)
     set_target_properties(multiprocess PROPERTIES
         PUBLIC_HEADER "${MP_PUBLIC_HEADERS}")
     install(TARGETS multiprocess EXPORT LibTargets
    --- a/src/test/CMakeLists.txt
    +++ b/src/test/CMakeLists.txt
    @@ -164,6 +164,7 @@ endif()
     if(BUILD_MULTIPROCESS)
       target_link_libraries(bitcoin_ipc_test
         PRIVATE
    +      Boost::headers
           core_interface
           univalue
       )
    
    
  10. Sjors commented at 4:23 PM on January 30, 2025: member

    I'll give them a try, waiting for the Windows job on the last push: https://github.com/bitcoin/bitcoin/actions/runs/13054985470/job/36423710000?pr=30975

    (actually there's no use in waiting for Windows with multiprocess)

  11. Sjors referenced this in commit f3f4685bc4 on Jan 30, 2025
  12. ryanofsky commented at 11:18 AM on January 31, 2025: collaborator

    The diff suggested in https://github.com/chaincodelabs/libmultiprocess/issues/138#issuecomment-2624919124 did seem to successfully fix the header warnings in the macos 14 native job here: https://github.com/bitcoin/bitcoin/pull/30975#issuecomment-2625235833

  13. ryanofsky referenced this in commit 434fcb859b on Feb 3, 2025
  14. ryanofsky referenced this in commit 65c7048251 on Feb 3, 2025
  15. ryanofsky closed this on Feb 3, 2025

  16. ryanofsky referenced this in commit 3d83c7aef1 on Feb 3, 2025
  17. ryanofsky referenced this in commit 9217d71ebb on Feb 3, 2025
  18. ryanofsky referenced this in commit 7bbb1caf92 on Feb 3, 2025
  19. ryanofsky referenced this in commit 177e285fff on Feb 4, 2025
  20. ryanofsky referenced this in commit aba72ceb0c on Feb 4, 2025
  21. ryanofsky referenced this in commit 5b73974a9a on Feb 5, 2025
  22. ryanofsky referenced this in commit c8239c5d30 on Feb 5, 2025
  23. ryanofsky referenced this in commit 29629eadca on Feb 7, 2025
  24. ryanofsky referenced this in commit 64ee50632b on Feb 7, 2025
  25. ryanofsky referenced this in commit bb37124dd5 on Feb 7, 2025
  26. ryanofsky referenced this in commit 8ca1cc4285 on Feb 7, 2025
  27. ryanofsky referenced this in commit cfdfd9a082 on Feb 10, 2025
  28. ryanofsky referenced this in commit 1b3613505d on Feb 10, 2025
  29. ryanofsky referenced this in commit cfe493a35b on Feb 10, 2025
  30. ryanofsky referenced this in commit 351615e6f4 on Feb 10, 2025
  31. ryanofsky referenced this in commit 76abe4a87d on Feb 10, 2025
  32. ryanofsky referenced this in commit 6b350f593f on Feb 13, 2025
  33. ryanofsky referenced this in commit 7da301054d on Feb 13, 2025
  34. ryanofsky referenced this in commit ab0c98bb16 on Feb 24, 2025
  35. ryanofsky referenced this in commit 4332cbe3a0 on Feb 24, 2025
  36. ryanofsky referenced this in commit c2eb40a809 on Feb 25, 2025
  37. ryanofsky referenced this in commit 20cf6ff0d0 on Feb 25, 2025
  38. ryanofsky referenced this in commit a36912427a on Feb 25, 2025
  39. ryanofsky referenced this in commit 2fe506867e on Feb 25, 2025
  40. ryanofsky referenced this in commit 7d1cae0a38 on Mar 11, 2025
  41. ryanofsky referenced this in commit bf530ec394 on Mar 11, 2025
  42. ryanofsky referenced this in commit 3b7025a26f on Mar 12, 2025
  43. ryanofsky referenced this in commit bcd45c290b on Mar 12, 2025
  44. ryanofsky referenced this in commit b0506c8e5a on Mar 17, 2025
  45. ryanofsky referenced this in commit 2a640e1f71 on Mar 17, 2025
  46. ryanofsky referenced this in commit 0ac2cf5990 on Mar 17, 2025
  47. ryanofsky referenced this in commit b4ed0bb265 on Mar 18, 2025
  48. ryanofsky referenced this in commit b5813cf553 on Mar 18, 2025
  49. ryanofsky referenced this in commit 7c0ed88b8b on Mar 31, 2025
  50. ryanofsky referenced this in commit 066d5c4931 on Mar 31, 2025
  51. ryanofsky referenced this in commit a7a92f8441 on Mar 31, 2025
  52. ryanofsky referenced this in commit abdf3cb645 on Apr 2, 2025
  53. ryanofsky referenced this in commit 9f41c688f1 on Apr 2, 2025
  54. janus referenced this in commit 8caec90ca0 on Sep 7, 2025
  55. bitcoin-core locked this on Feb 3, 2026

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin-core/libmultiprocess. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-15 00:30 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me