Mavericks compile with clang: build warnings and test fail. #3396

issue da2ce7 opened this issue on December 12, 2013
  1. da2ce7 commented at 1:07 AM on December 12, 2013: none

    Using latest xcode, and homebrew.

    config output:

    Camerons-MacBook-Pro:bitcoin camerongarnham$ ./configure --prefix=$HOMEBREW_PREFIX 
    checking build system type... x86_64-apple-darwin13.0.0
    checking host system type... x86_64-apple-darwin13.0.0
    checking for a BSD-compatible install... /usr/bin/install -c
    checking whether build environment is sane... yes
    checking for a thread-safe mkdir -p... src/build-aux/install-sh -c -d
    checking for gawk... no
    checking for mawk... no
    checking for nawk... no
    checking for awk... awk
    checking whether make sets $(MAKE)... yes
    checking whether make supports nested variables... yes
    checking whether to enable maintainer-specific portions of Makefiles... yes
    checking whether make supports nested variables... (cached) yes
    checking whether the C++ compiler works... yes
    checking for C++ compiler default output file name... a.out
    checking for suffix of executables... 
    checking whether we are cross compiling... no
    checking for suffix of object files... o
    checking whether we are using the GNU C++ compiler... yes
    checking whether clang++ accepts -g... yes
    checking for style of include used by make... GNU
    checking dependency style of clang++... gcc3
    checking for gcc... clang
    checking whether we are using the GNU C compiler... yes
    checking whether clang accepts -g... yes
    checking for clang option to accept ISO C89... none needed
    checking whether clang understands -c and -o together... yes
    checking dependency style of clang... gcc3
    checking how to run the C preprocessor... cpp
    checking how to run the C++ preprocessor... clang++ -E
    checking for gcc... gcc
    checking whether we are using the GNU Objective C compiler... yes
    checking whether gcc accepts -g... yes
    checking dependency style of gcc... gcc3
    checking for g++... g++
    checking whether we are using the GNU Objective C++ compiler... yes
    checking whether g++ accepts -g... yes
    checking dependency style of g++... gcc3
    checking for a sed that does not truncate output... /usr/bin/sed
    checking for ar... /usr/bin/ar
    checking for ranlib... /usr/bin/ranlib
    checking for strip... /usr/bin/strip
    checking for gcov... /usr/bin/gcov
    checking for lcov... no
    checking for java... /usr/bin/java
    checking for genhtml... no
    checking for git... /usr/bin/git
    checking for moc-qt4... no
    checking for moc4... no
    checking for moc... /Users/camerongarnham/Qt5.2.0/5.2.0-rc1/clang_64/bin/moc
    checking for uic-qt4... no
    checking for uic4... no
    checking for uic... /Users/camerongarnham/Qt5.2.0/5.2.0-rc1/clang_64/bin/uic
    checking for rcc-qt4... no
    checking for rcc4... no
    checking for rcc... /Users/camerongarnham/Qt5.2.0/5.2.0-rc1/clang_64/bin/rcc
    checking for lrelease-qt4... no
    checking for lrelease4... no
    checking for lrelease... /Users/camerongarnham/Qt5.2.0/5.2.0-rc1/clang_64/bin/lrelease
    checking for protoc... /usr/local/bin/protoc
    checking for ccache... no
    checking for lupdate-qt4... no
    checking for lupdate4... no
    checking for lupdate... /Users/camerongarnham/Qt5.2.0/5.2.0-rc1/clang_64/bin/lupdate
    checking for xgettext... no
    checking for hexdump... /usr/bin/hexdump
    checking for pkg-config... /usr/local/bin/pkg-config
    checking pkg-config is at least version 0.9.0... yes
    checking for port... no
    checking for brew... brew
    checking whether the linker accepts -framework Foundation -framework ApplicationServices -framework AppKit... yes
    checking for grep that handles long lines and -e... /usr/bin/grep
    checking for egrep... /usr/bin/grep -E
    checking for ANSI C header files... yes
    checking for sys/types.h... yes
    checking for sys/stat.h... yes
    checking for stdlib.h... yes
    checking for string.h... yes
    checking for memory.h... yes
    checking for strings.h... yes
    checking for inttypes.h... yes
    checking for stdint.h... yes
    checking for unistd.h... yes
    checking whether byte ordering is bigendian... no
    checking if compiler needs -Werror to reject unknown flags... yes
    checking whether pthreads work with -pthread... yes
    checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
    checking if more special flags are required for pthreads... -D_THREAD_SAFE
    checking for PTHREAD_PRIO_INHERIT... yes
    checking for special C compiler options needed for large files... no
    checking for _FILE_OFFSET_BITS value needed for large files... no
    checking whether the linker accepts -Wl,--large-address-aware... no
    checking whether C++ compiler accepts -Wstack-protector... yes
    checking whether C++ compiler accepts -fPIE... yes
    checking whether C++ preprocessor accepts -D_FORTIFY_SOURCE=2... yes
    checking whether the linker accepts -Wl,--dynamicbase... no
    checking whether the linker accepts -Wl,--nxcompat... no
    checking whether the linker accepts -Wl,-z,relro... no
    checking whether the linker accepts -Wl,-z,now... no
    checking whether C++ compiler accepts -fno-stack-protector... yes
    checking whether C++ compiler accepts -fstack-protector-all... yes
    checking whether the linker accepts -pie... yes
    checking whether the linker accepts -Wl,-dead_strip... yes
    checking stdio.h usability... yes
    checking stdio.h presence... yes
    checking for stdio.h... yes
    checking for stdlib.h... (cached) yes
    checking for unistd.h... (cached) yes
    checking for strings.h... (cached) yes
    checking for sys/types.h... (cached) yes
    checking for sys/stat.h... (cached) yes
    checking for MSG_NOSIGNAL... no
    checking for Berkeley DB C++ headers... default
    checking for main in -ldb_cxx-4.8... yes
    checking miniupnpc/miniwget.h usability... no
    checking miniupnpc/miniwget.h presence... no
    checking for miniupnpc/miniwget.h... no
    checking miniupnpc/miniupnpc.h usability... no
    checking miniupnpc/miniupnpc.h presence... no
    checking for miniupnpc/miniupnpc.h... no
    checking miniupnpc/upnpcommands.h usability... no
    checking miniupnpc/upnpcommands.h presence... no
    checking for miniupnpc/upnpcommands.h... no
    checking miniupnpc/upnperrors.h usability... no
    checking miniupnpc/upnperrors.h presence... no
    checking for miniupnpc/upnperrors.h... no
    checking for boostlib >= 1.20.0... yes
    checking whether the Boost::System library is available... yes
    checking for exit in -lboost_system... yes
    checking whether the Boost::Filesystem library is available... yes
    checking for exit in -lboost_filesystem... yes
    checking whether the Boost::Program_Options library is available... yes
    checking for exit in -lboost_program_options-mt... yes
    checking whether the Boost::Thread library is available... yes
    checking for exit in -lboost_thread-mt... yes
    checking whether the Boost::Chrono library is available... yes
    checking for exit in -lboost_chrono-mt... yes
    checking whether the Boost::Unit_Test_Framework library is available... yes
    checking for SSL... yes
    checking for CRYPTO... yes
    checking for QT... no
    configure: WARNING: Qt dependencies not found; bitcoin-qt frontend will not be built
    checking for QT_TEST... no
    checking for QT_DBUS... no
    checking for QR... no
    checking for PROTOBUF... yes
    checking for IPV6 build support... yes
    checking if ccache should be enabled... configure: ccache not found. Falling back to default CC
    no
    checking if wallet should be enabled... yes
    checking if ipv6 should be enabled... yes
    checking if upnp should be enabled... no
    checking if qt should be enabled... no
    checking that generated files are newer than configure... done
    configure: creating ./config.status
    config.status: creating Makefile
    config.status: creating src/Makefile
    config.status: creating src/test/Makefile
    config.status: creating src/qt/Makefile
    config.status: creating src/qt/test/Makefile
    config.status: creating share/setup.nsi
    config.status: creating share/qt/Info.plist
    config.status: creating qa/pull-tester/run-bitcoind-for-test.sh
    config.status: creating qa/pull-tester/build-tests.sh
    config.status: creating src/bitcoin-config.h
    config.status: executing depfiles commands
    

    warning output: (many times)

    In file included from bloom.cpp:7:
    In file included from ./core.h:9:
    In file included from ./script.h:11:
    ./util.h:135:5: warning: 'format' attribute argument not supported: gnu_printf [-Wignored-attributes]
    int ATTR_WARN_PRINTF(2,3) LogPrint(const char* category, const char* pszFormat, ...);
        ^
    ./util.h:107:46: note: expanded from macro 'ATTR_WARN_PRINTF'
    #define ATTR_WARN_PRINTF(X,Y) __attribute__((format(gnu_printf,X,Y)))
                                                 ^
    ./util.h:146:13: warning: 'format' attribute argument not supported: gnu_printf [-Wignored-attributes]
    std::string ATTR_WARN_PRINTF(1,3) real_strprintf(const char *format, int dummy, ...);
                ^
    ./util.h:107:46: note: expanded from macro 'ATTR_WARN_PRINTF'
    #define ATTR_WARN_PRINTF(X,Y) __attribute__((format(gnu_printf,X,Y)))
                                                 ^
    ./util.h:154:6: warning: 'format' attribute argument not supported: gnu_printf [-Wignored-attributes]
    bool ATTR_WARN_PRINTF(1,2) error(const char *format, ...);
         ^
    ./util.h:107:46: note: expanded from macro 'ATTR_WARN_PRINTF'
    #define ATTR_WARN_PRINTF(X,Y) __attribute__((format(gnu_printf,X,Y)))
                                                 ^
    

    test-suite.log:

    =============================================
       Bitcoin 0.8.99: src/test/test-suite.log
    =============================================
    
    # TOTAL: 1
    # PASS:  0
    # SKIP:  0
    # XFAIL: 0
    # FAIL:  1
    # XPASS: 0
    # ERROR: 0
    
    .. contents:: :depth: 2
    
    FAIL: test_bitcoin
    ==================
    
    Running 104 test cases...
    serialize_tests.cpp:76: error in "noncanonical": incorrect exception std::ios_base::failure is caught
    serialize_tests.cpp:80: error in "noncanonical": incorrect exception std::ios_base::failure is caught
    serialize_tests.cpp:89: error in "noncanonical": incorrect exception std::ios_base::failure is caught
    serialize_tests.cpp:93: error in "noncanonical": incorrect exception std::ios_base::failure is caught
    serialize_tests.cpp:97: error in "noncanonical": incorrect exception std::ios_base::failure is caught
    serialize_tests.cpp:101: error in "noncanonical": incorrect exception std::ios_base::failure is caught
    
    *** 6 failures detected in test suite "Bitcoin Test Suite"
    
  2. laanwj commented at 6:18 AM on December 12, 2013: member

    The warning is just that, a warning that the printf arguments will not be checked. You may want to #ifdef those lines out to be GCC only.

    The test failure is more serious... not sure what is happening there. Can you git bisect at which commit this starts happening?

  3. laanwj commented at 4:21 PM on January 23, 2014: member

    #3549 should solve the warnings.

  4. laanwj closed this on Dec 29, 2014

  5. MarcoFalke locked this on Sep 8, 2021
Contributors

github-metadata-mirror

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

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