Mac OS X compilation with qt5 (and qt4) fails #5728

issue fflo opened this issue on January 31, 2015
  1. fflo commented at 8:49 AM on January 31, 2015: none

    Hi,

    using the latest sources from git I'm unable to compile bitcoin with qt5. Trying to compile with qt 5.4.0 or 5.3.2 fails with the following message:

    CXX qt/test/qt_test_test_bitcoin_qt-test_main.o In file included from qt/test/test_main.cpp:9: qt/test/uritests.h:8:10: fatal error: 'QObject' file not found

    include <QObject>

         ^
    

    CXX qt/test/qt_test_test_bitcoin_qt-uritests.o In file included from qt/test/uritests.cpp:5: qt/test/uritests.h:8:10: fatal error: 'QObject' file not found

    include <QObject>

         ^
    

    1 error generated. make[2]: *** [qt/test/qt_test_test_bitcoin_qt-test_main.o] Error 1 make[2]: *** Waiting for unfinished jobs.... 1 error generated. make[2]: *** [qt/test/qt_test_test_bitcoin_qt-uritests.o] Error 1 make[1]: *** [all-recursive] Error 1 make: *** [all-recursive] Error 1

    real 1m19.367s user 9m10.002s sys 0m31.861s

    Prior to compilation I've ran ./autogen.sh and ./configure

    Trying to compile the package with qt 4.8.6 fails with this message: CXXLD bitcoind CXXLD bitcoin-cli CXXLD bitcoin-tx CXXLD test/test_bitcoin clang: warning: argument unused during compilation: '-pthread' clang: warning: argument unused during compilation: '-pie' clang: warning: argument unused during compilation: '-pthread' clang: warning: argument unused during compilation: '-pthread' clang: warning: argument unused during compilation: '-pie' clang: warning: argument unused during compilation: '-pthread' clang: warning: argument unused during compilation: '-pthread' clang: warning: argument unused during compilation: '-pie' clang: warning: argument unused during compilation: '-pthread' clang: warning: argument unused during compilation: '-pthread' clang: warning: argument unused during compilation: '-pie' clang: warning: argument unused during compilation: '-pthread' AR qt/libbitcoinqt.a /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/u /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/u /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/u /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/u OBJCXXLD qt/bitcoin-qt CXXLD qt/test/test_bitcoin-qt clang: warning: argument unused during compilation: '-pthread' clang: warning: argument unused during compilation: '-pie' clang: warning: argument unused during compilation: '-pthread' clang: warning: argument unused during compilation: '-pthread' clang: warning: argument unused during compilation: '-pie' clang: warning: argument unused during compilation: '-pthread' Undefined symbols for architecture x86_64: "vtable for RPCExecutor", referenced from: RPCConsole::startExecutor() in libbitcoinqt.a(qt_libbitcoinqt_a-rpcconsole NOTE: a missing vtable usually means the first non-inline virtual member funct "vtable for RPCConsole", referenced from: RPCConsole::RPCConsole(QWidget_) in libbitcoinqt.a(qt_libbitcoinqt_a-rpcco NOTE: a missing vtable usually means the first non-inline virtual member funct "RPCConsole::staticMetaObject", referenced from: RPCConsole::RPCConsole(QWidget_) in libbitcoinqt.a(qt_libbitcoinqt_a-rpcco RPCConsole::clear() in libbitcoinqt.a(qt_libbitcoinqt_a-rpcconsole.o) RPCConsole::setNumConnections(int) in libbitcoinqt.a(qt_libbitcoinqt_a-rpc RPCConsole::FormatBytes(unsigned long long) in libbitcoinqt.a(qt_libbitcoi "BitcoinApplication::requestedShutdown()", referenced from: BitcoinApplication::requestShutdown() in qt_bitcoin_qt-bitcoin.o "BitcoinApplication::requestedInitialize()", referenced from: BitcoinApplication::requestInitialize() in qt_bitcoin_qt-bitcoin.o "vtable for BitcoinCore", referenced from: BitcoinCore::BitcoinCore() in qt_bitcoin_qt-bitcoin.o NOTE: a missing vtable usually means the first non-inline virtual member funct "vtable for BitcoinApplication", referenced from: BitcoinApplication::~BitcoinApplication() in qt_bitcoin_qt-bitcoin.o _main in qt_bitcoin_qt-bitcoin.o NOTE: a missing vtable usually means the first non-inline virtual member funct "BitcoinApplication::stopThread()", referenced from: BitcoinApplication::~BitcoinApplication() in qt_bitcoin_qt-bitcoin.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: *** [qt/bitcoin-qt] Error 1 make[1]: *** [all-recursive] Error 1 make: *** [all-recursive] Error 1

    real 1m51.749s user 12m50.340s sys 0m49.340s

    -Flo

  2. jonasschnelli commented at 8:59 AM on January 31, 2015: contributor

    It looks like you missing QT. How did you install QT? Do try install homebrew and install QT over brew. Works?

  3. fflo commented at 9:09 AM on January 31, 2015: none

    Hi jonas,

    I've installed qt4 (4.8.6) and qt5 (5.3.2) using mac ports, i.e. flo$ port installed | grep qt qt4-mac @4.8.6_0 (active)

    The qt library are located at the mac ports /opt/local/ prefix and are being detected correctly by the ./configure script.

    As an alternative I've also tried to compile this package with the original qt 5.4.0 package (http://qt-project.org/wiki/Qt-5.4-release) using this command: flo$ PKG_CONFIG_PATH=~/Qt5.4.0/5.4/clang_64/lib/pkgconfig ./configure --with-gui=qt5 checking build system type... x86_64-apple-darwin13.4.0 checking host system type... x86_64-apple-darwin13.4.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... 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 for g++... g++ 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 g++ accepts -g... yes checking for style of include used by make... GNU checking dependency style of g++... 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 how to print strings... printf checking for gcc... gcc checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking whether gcc understands -c and -o together... yes checking dependency style of gcc... gcc3 checking for a sed that does not truncate output... /usr/bin/sed checking for grep that handles long lines and -e... /usr/bin/grep checking for egrep... /usr/bin/grep -E checking for fgrep... /usr/bin/grep -F checking for ld used by gcc... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld checking if the linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) is GNU ld... no checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm checking the name lister (/usr/bin/nm) interface... BSD nm checking whether ln -s works... yes checking the maximum length of command line arguments... 196608 checking how to convert x86_64-apple-darwin13.4.0 file names to x86_64-apple-darwin13.4.0 format... func_convert_file_noop checking how to convert x86_64-apple-darwin13.4.0 file names to toolchain format... func_convert_file_noop checking for /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld option to reload object files.- checking for objdump... no checking how to recognize dependent libraries... pass_all checking for dlltool... no checking how to associate runtime and link libraries... printf %s\n checking for ar... ar checking for archiver @FILE support... no checking for strip... strip checking for ranlib... ranlib checking command to parse /usr/bin/nm output from gcc object... ok checking for sysroot... no checking for a working dd... /bin/dd checking how to truncate binary pipes... /bin/dd bs=4096 count=1 checking for mt... no checking if : is a manifest tool... no checking for dsymutil... dsymutil checking for nmedit... nmedit checking for lipo... lipo checking for otool... otool checking for otool64... no checking for -single_module linker flag... yes checking for -exported_symbols_list linker flag... yes checking for -force_load linker flag... yes checking how to run the C preprocessor... gcc -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 for dlfcn.h... yes checking for objdir... .libs checking if gcc supports -fno-rtti -fno-exceptions... yes checking for gcc option to produce PIC... -fno-common -DPIC checking if gcc PIC flag -fno-common -DPIC works... yes checking if gcc static flag -static works... no checking if gcc supports -c -o file.o... yes checking if gcc supports -c -o file.o... (cached) yes checking whether the gcc linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports y checking dynamic linker characteristics... darwin13.4.0 dyld checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... yes checking how to run the C++ preprocessor... g++ -E checking for ld used by g++... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld checking if the linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) is GNU ld... no checking whether the g++ linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports y checking for g++ option to produce PIC... -fno-common -DPIC checking if g++ PIC flag -fno-common -DPIC works... yes checking if g++ static flag -static works... no checking if g++ supports -c -o file.o... yes checking if g++ supports -c -o file.o... (cached) yes checking whether the g++ linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports y checking dynamic linker characteristics... darwin13.4.0 dyld checking how to hardcode library paths into programs... immediate 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 ccache... no checking for xgettext... /opt/local/bin/xgettext checking for hexdump... /usr/bin/hexdump checking for pkg-config... /opt/local/bin/pkg-config checking pkg-config is at least version 0.9.0... yes checking for port... port checking for brew... no checking whether the linker accepts -Wl,-headerpad_max_install_names... 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 strerror_r is declared... yes checking for strerror_r... yes checking whether strerror_r returns char ... no checking whether the linker accepts -Wl,--large-address-aware... no checking for attribute((visibility))... yes checking for attribute((dllexport))... no checking for attribute((dllimport))... no checking whether C++ compiler accepts -Wstack-protector... yes checking whether C++ compiler accepts -fstack-protector-all... yes checking whether C++ preprocessor accepts -D_FORTIFY_SOURCE=2... yes checking whether C++ preprocessor accepts -U_FORTIFY_SOURCE... 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 -fPIE... yes checking whether the linker accepts -pie... yes checking whether the linker accepts -Wl,-dead_strip... yes checking endian.h usability... no checking endian.h presence... no checking for endian.h... no 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 sys/select.h usability... yes checking sys/select.h presence... yes checking for sys/select.h... yes checking sys/prctl.h usability... no checking sys/prctl.h presence... no checking for sys/prctl.h... no checking for library containing getaddrinfo_a... no checking for library containing inet_pton... none required checking whether strnlen is declared... yes checking whether le32toh is declared... no checking whether le64toh is declared... no checking whether htole32 is declared... no checking whether htole64 is declared... no checking whether be32toh is declared... no checking whether be64toh is declared... no checking whether htobe32 is declared... no checking whether htobe64 is declared... no checking for MSG_NOSIGNAL... no checking for library containing clock_gettime... no checking for visibility attribute... yes checking whether C++ compiler accepts -fvisibility=hidden... yes checking for Berkeley DB C++ headers... /opt/local/include/db48/ checking for main in -ldb_cxx-4.8... yes checking miniupnpc/miniwget.h usability... yes checking miniupnpc/miniwget.h presence... yes checking for miniupnpc/miniwget.h... yes checking for main in -lminiupnpc... yes checking miniupnpc/miniupnpc.h usability... yes checking miniupnpc/miniupnpc.h presence... yes checking for miniupnpc/miniupnpc.h... yes checking for main in -lminiupnpc... (cached) yes checking miniupnpc/upnpcommands.h usability... yes checking miniupnpc/upnpcommands.h presence... yes checking for miniupnpc/upnpcommands.h... yes checking for main in -lminiupnpc... (cached) yes checking miniupnpc/upnperrors.h usability... yes checking miniupnpc/upnperrors.h presence... yes checking for miniupnpc/upnperrors.h... yes checking for main in -lminiupnpc... (cached) yes checking for QT... yes checking for QT_TEST... yes checking for QT_DBUS... yes checking for static Qt... no checking for moc-qt5... no checking for moc5... no checking for moc... /Users/flo/Qt5.4.0/5.4/clang_64/bin/moc checking for uic-qt5... no checking for uic5... no checking for uic... /Users/flo/Qt5.4.0/5.4/clang_64/bin/uic checking for rcc-qt5... no checking for rcc5... no checking for rcc... /Users/flo/Qt5.4.0/5.4/clang_64/bin/rcc checking for lrelease-qt5... no checking for lrelease5... no checking for lrelease... /Users/flo/Qt5.4.0/5.4/clang_64/bin/lrelease checking for lupdate-qt5... no checking for lupdate5... no checking for lupdate... /Users/flo/Qt5.4.0/5.4/clang_64/bin/lupdate checking whether the linker accepts -framework Foundation -framework ApplicationServices -framework AppKit... yes checking whether to build Bitcoin Core GUI... yes (Qt5) checking for boostlib >= 1.20.0... yes checking whether the Boost::System library is available... yes checking for exit in -lboost_system-mt... yes checking whether the Boost::Filesystem library is available... yes checking for exit in -lboost_filesystem-mt... 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 for working boost reduced exports... yes checking whether the linker accepts -Wl,--exclude-libs,ALL... no checking whether the Boost::Unit_Test_Framework library is available... yes checking for dynamic linked boost test... yes checking for SSL... yes checking for CRYPTO... yes checking for PROTOBUF... yes checking for QR... yes checking openssl/ec.h usability... yes checking openssl/ec.h presence... yes checking for openssl/ec.h... yes checking for protoc... /opt/local/bin/protoc checking whether to build bitcoind... yes checking whether to build utils (bitcoin-cli bitcoin-tx)... yes checking whether to build libraries... yes checking if ccache should be used... no checking if wallet should be enabled... yes checking whether to build with support for UPnP... yes checking whether to build with UPnP enabled by default... no checking whether to build GUI with support for D-Bus... yes checking whether to build GUI with support for QR codes... yes checking whether to build test_bitcoin-qt... yes checking whether to build test_bitcoin... yes checking whether to reduce exports... yes checking that generated files are newer than configure... done configure: creating ./config.status config.status: creating libbitcoinconsensus.pc config.status: creating Makefile config.status: creating src/Makefile config.status: creating share/setup.nsi config.status: creating share/qt/Info.plist config.status: creating src/test/buildenv.py config.status: creating qa/pull-tester/run-bitcoind-for-test.sh config.status: creating qa/pull-tester/tests-config.sh config.status: creating src/config/bitcoin-config.h config.status: src/config/bitcoin-config.h is unchanged config.status: executing depfiles commands config.status: executing libtool commands === configuring in src/secp256k1 (/Users/flo/Downloads/bitcoin.qt/bitcoin/src/secp256k1) configure: running /bin/sh ./configure --disable-option-checking '--prefix=/usr/local' '--with-gui=qt5' 'PKG_CONFIG_PATH=/Users/flo/Q checking build system type... x86_64-apple-darwin13.4.0 checking host system type... x86_64-apple-darwin13.4.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... 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 how to print strings... printf checking for style of include used by make... GNU checking for gcc... gcc 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 gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking whether gcc understands -c and -o together... yes checking dependency style of gcc... gcc3 checking for a sed that does not truncate output... /usr/bin/sed checking for grep that handles long lines and -e... /usr/bin/grep checking for egrep... /usr/bin/grep -E checking for fgrep... /usr/bin/grep -F checking for ld used by gcc... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld checking if the linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) is GNU ld... no checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm checking the name lister (/usr/bin/nm) interface... BSD nm checking whether ln -s works... yes checking the maximum length of command line arguments... 196608 checking how to convert x86_64-apple-darwin13.4.0 file names to x86_64-apple-darwin13.4.0 format... func_convert_file_noop checking how to convert x86_64-apple-darwin13.4.0 file names to toolchain format... func_convert_file_noop checking for /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld option to reload object files.- checking for objdump... no checking how to recognize dependent libraries... pass_all checking for dlltool... no checking how to associate runtime and link libraries... printf %s\n checking for ar... ar checking for archiver @FILE support... no checking for strip... strip checking for ranlib... ranlib checking command to parse /usr/bin/nm output from gcc object... ok checking for sysroot... no checking for a working dd... /bin/dd checking how to truncate binary pipes... /bin/dd bs=4096 count=1 checking for mt... no checking if : is a manifest tool... no checking for dsymutil... dsymutil checking for nmedit... nmedit checking for lipo... lipo checking for otool... otool checking for otool64... no checking for -single_module linker flag... yes checking for -exported_symbols_list linker flag... yes checking for -force_load linker flag... yes checking how to run the C preprocessor... gcc -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 for dlfcn.h... yes checking for objdir... .libs checking if gcc supports -fno-rtti -fno-exceptions... yes checking for gcc option to produce PIC... -fno-common -DPIC checking if gcc PIC flag -fno-common -DPIC works... yes checking if gcc static flag -static works... no checking if gcc supports -c -o file.o... yes checking if gcc supports -c -o file.o... (cached) yes checking whether the gcc linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports y checking dynamic linker characteristics... darwin13.4.0 dyld checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking if libtool supports shared libraries... yes checking whether to build shared libraries... no checking whether to build static libraries... yes checking whether make supports nested variables... (cached) yes checking for pkg-config... /opt/local/bin/pkg-config checking pkg-config is at least version 0.9.0... yes checking for ar... /usr/bin/ar checking for ranlib... /usr/bin/ranlib checking for strip... /usr/bin/strip checking for gcc option to accept ISO C99... none needed checking for brew... no checking for port... /opt/local/bin/port checking if gcc supports -Wall -Wextra -Wcast-align -Wnested-externs -Wshadow -Wstrict-prototypes -Wno-unused-function... yes checking for __int128... yes checking for __builtin_expect... yes checking for x86_64 assembly availability... no checking gmp.h usability... yes checking gmp.h presence... yes checking for gmp.h... yes checking for __gmpz_init in -lgmp... yes checking for CRYPTO... yes checking for main in -lcrypto... yes checking for EC functions in libcrypto... yes configure: Using assembly optimizations: no configure: Using field implementation: 64bit configure: Using bignum implementation: gmp configure: Using scalar implementation: 64bit configure: Using endomorphism optimizations: no checking that generated files are newer than configure... done configure: creating ./config.status config.status: creating Makefile config.status: creating libsecp256k1.pc config.status: creating src/libsecp256k1-config.h config.status: src/libsecp256k1-config.h is unchanged config.status: executing depfiles commands config.status: executing libtool commands flo$ flo$ time make -j8 Making all in src [...] Removed plural forms as the target language has less forms. If this sounds wrong, possibly the target language is not set or recognized. GEN qt/locale/bitcoin_vi.qm GEN qt/locale/bitcoin_uz@Cyrl.qm GEN qt/locale/bitcoin_vi_VN.qm GEN qt/locale/bitcoin_zh_TW.qm GEN qt/locale/bitcoin_zh_HK.qm GEN qt/locale/bitcoin_zh_CN.qm CXX qt/test/qt_test_test_bitcoin_qt-test_main.o CXX qt/test/qt_test_test_bitcoin_qt-uritests.o CXX qt/test/qt_test_test_bitcoin_qt-paymentservertests.o In file included from qt/test/test_main.cpp:9: qt/test/uritests.h:8:10: fatal error: 'QObject' file not found #include <QObject> ^ In file included from qt/test/uritests.cpp:5: qt/test/uritests.h:8:10: fatal error: 'QObject' file not found #include <QObject> ^ GEN qt/test/moc_uritests.cpp GEN qt/test/moc_paymentservertests.cpp CXXLD libbitcoinconsensus.la AR libbitcoin_server.a AR libbitcoin_common.a In file included from qt/test/paymentservertests.cpp:5: In file included from qt/test/paymentservertests.h:8: In file included from qt/test/../paymentserver.h:35: ./qt/paymentrequestplus.h:12:10: fatal error: 'QByteArray' file not found #include <QByteArray> ^ 1 error generated. make[2]: **\ [qt/test/qt_test_test_bitcoin_qt-test_main.o] Error 1 make[2]: *** Waiting for unfinished jobs.... 1 error generated. 1 error generated. make[2]: *** [qt/test/qt_test_test_bitcoin_qt-uritests.o] Error 1 make[2]: *** [qt/test/qt_test_test_bitcoin_qt-paymentservertests.o] Error 1 make[1]: *** [all-recursive] Error 1 make: *** [all-recursive] Error 1

    real 1m7.531s user 6m38.760s sys 0m23.777s

  4. jonasschnelli commented at 11:49 AM on January 31, 2015: contributor

    Hmm... It looks like after a linker problem. Did you installed correct 64bit QT version? Your 2nd try with direct install QT looks like after a missing make clean?

    I don't know if building with Qt installed directly form the Qt binaries or over macports work our of the box because nowadays most of OSX users who build bitcoin-qt use homebrew. I personally never had problem while building bitcoin-qt after installing all dependencies over homebrew.

  5. fflo commented at 2:25 PM on January 31, 2015: none

    Hi jonas,

    yes - I've downloaded and installed qt-opensource-mac-x64-clang-5.4.0.dmg. I prefer macports over homebrew, because all the binaries installed my macports are clearly seperatly located at the /opt/local directory. In case anything get's broken I simply need to remove or take care on the /opt directory.

    Until October/November compilation worked fine with macports, too. Seems there has been some change in the code breaking the compilation since December.

    -Flo

  6. jonasschnelli commented at 2:33 PM on January 31, 2015: contributor

    Yes. It would be nice if you could try to find the root cause of this issue. If you have a solution, feel free to contribute to the https://github.com/bitcoin/bitcoin/blob/master/doc/build-osx.md doc.

  7. theuni commented at 11:30 PM on January 31, 2015: member

    I'll have a go at this with the vanilla 5.4.0 dmg.

  8. paveljanik commented at 7:06 PM on February 1, 2015: contributor

    I have just tried it. Downloaded Qt5.4 for Mac DMG, installed to ~/Qt (default location).

    Pavels-MacBook-Pro:~ pavel$ PKG_CONFIG_PATH=/Users/pavel/Qt/5.4/clang_64/lib/pkgconfig pkg-config --cflags Qt5Gui 
    -I/Users/pavel/Qt/5.4/clang_64/include/QtGui -I/Users/pavel/Qt/5.4/clang_64/include -I/Users/pavel/Qt/5.4/clang_64/include/QtCore -I/Users/pavel/Qt/5.4/clang_64/include 
    Pavels-MacBook-Pro:~ pavel$ 
    

    But there is no include/QtGui directory... No include/QtCore. And no files at all in include, only subdirectories...

    Thus the build itself ends with:

    /Applications/Xcode.app/Contents/Developer/usr/bin/make -C .. bitcoin_qt test_bitcoin_qt
      CXX      qt/qt_bitcoin_qt-bitcoin.o
    In file included from qt/bitcoin.cpp:9:
    ./qt/bitcoingui.h:14:10: fatal error: 'QLabel' file not found
    #include <QLabel>
             ^
    1 error generated.
    make[1]: *** [qt/qt_bitcoin_qt-bitcoin.o] Error 1
    

    This is the same problem as MacPorts' Qt5... Looks like we should compare homebrew's and original/macport's pkgconfig files/directory structures.

  9. fflo commented at 3:03 AM on February 2, 2015: none

    Hey,

    finally I've found a solution on how to compile bitcoin-qt with Qt5 (5.4.0), today.

    The ./configure script expects the qt5_module include files to reside within the qt5 include directory. Actually these files are located at the qt5 lib ... headers subdirectories with newer qt5 versions :-/

    In order to resolve this issue I've created symlinks to the include directory running these simple commands: cd ~/Qt5.4.0/5.4/clang_64/include for MODULE in $(find ../lib -type d -name Headers); do ln -s $MODULE $(echo $MODULE | cut -d"/" -f3 | cut -d"." -f1) ; done

    Et voilĂ , now the compilation with qt5 works as expected: PKG_CONFIG_PATH=~/Qt5.4.0/5.4/clang_64/lib/pkgconfig ./configure time make -j8 time make deploy

    Probably I'm going to take a copy of the latest MAC OS X v0.10.99.0-6af674e (64-bit) snapshot to my wordpress blog https://flo.sh/category/bitcoin/ tomorrow.

    Thanks for your feedback :)

    -Flo

  10. paveljanik commented at 5:59 AM on February 2, 2015: contributor

    Confirmed. I used the same hack to "solve" this. Hmm, how does homebrew' Qt5 include directory look like? They did this hack in the distribution?

  11. theuni commented at 5:08 PM on February 2, 2015: member

    Ok, there are a few problems here. The first of which is that our PKG_CONFIG flags priority is probably not optimal for most people. The second is that brew's qt4 install is not prefixed (grr), so conflicts can arise there. The third is that QT does not install symlinks as necessary @fflo's fix is exactly correct. That wasn't the case last time i tested (5.2 maybe?) so this is an upstream regression.

    Here's the fix for part1 which only affects those with qt5 installed from brew as well:

    diff --git a/configure.ac b/configure.ac
    index adcd1c0..5b04fdd 100644
    --- a/configure.ac
    +++ b/configure.ac
    @@ -260,19 +260,19 @@ case $host in
              dnl It's safe to add these paths even if the functionality is disabled by
              dnl the user (--without-wallet or --without-gui for example).
    
    -         openssl_prefix=`$BREW --prefix openssl 2>/dev/null`
              bdb_prefix=`$BREW --prefix berkeley-db4 2>/dev/null`
              qt5_prefix=`$BREW --prefix qt5 2>/dev/null`
    -         if test x$openssl_prefix != x; then
    -           PKG_CONFIG_PATH="$openssl_prefix/lib/pkgconfig:$PKG_CONFIG_PATH"
    -           export PKG_CONFIG_PATH
    -         fi
    +         openssl_prefix=`$BREW --prefix openssl 2>/dev/null`
              if test x$bdb_prefix != x; then
                CPPFLAGS="$CPPFLAGS -I$bdb_prefix/include"
                LIBS="$LIBS -L$bdb_prefix/lib"
              fi
              if test x$qt5_prefix != x; then
    -           PKG_CONFIG_PATH="$qt5_prefix/lib/pkgconfig:$PKG_CONFIG_PATH"
    +           PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$qt5_prefix/lib/pkgconfig"
    +           export PKG_CONFIG_PATH
    +         fi
    +         if test x$openssl_prefix != x; then
    +           PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$openssl_prefix/lib/pkgconfig"
                export PKG_CONFIG_PATH
              fi
            fi
    

    I'll PR that after a bit more testing. For #2, just be sure that qt4 isn't installed by homebrew. That should be reasonable enough by now I think. For #3, that needs to be reported upstream if it hasn't already been.

  12. paveljanik commented at 5:26 PM on February 2, 2015: contributor

    brew contains this hackery (problem number 3) already (https://github.com/Homebrew/homebrew/blob/8d8bca72437591b37907b5ee2f5a1979fbe9c181/Library/Formula/qt5.rb):

    # The pkg-config files installed suggest that headers can be found in the
    # `include` directory. Make this so by creating symlinks from `include` to
    # the Frameworks' Headers folders.
    Pathname.glob("#{lib}/*.framework/Headers") do |path|
      include.install_symlink path => path.parent.basename(".framework")
    end
    
  13. paveljanik commented at 5:40 PM on February 2, 2015: contributor

    This is Qt5 bug P2 https://bugreports.qt.io/browse/QTBUG-35256

    brew has "fixed" it by hackery mentioned above. macports do not contain a fix. Upstream Qt5 installer contains this bug.

  14. laanwj added the label Mac on Feb 3, 2015
  15. laanwj added the label Upstream on Feb 3, 2015
  16. paveljanik commented at 12:48 PM on February 5, 2015: contributor

    I suggest to close this issue as upstream bug. Workaround is known.

  17. paveljanik commented at 10:54 AM on February 6, 2015: contributor

    @fflo Can you please close this issue, as the solution/cause is known? Thank you.

    BTW - when you update macports, you'll receive new boost which breaks macports' qt4 compilation:

    https://bugreports.qt.io/browse/QTBUG-22829

  18. fflo commented at 12:17 AM on February 7, 2015: none

    @paveljanik sorry, I've not the right to commit to this repository and close this issue. Or does there exist an other way for me to close #5728 we've kind of resolved by work around already?

  19. paveljanik commented at 7:13 AM on February 7, 2015: contributor

    @fflo author of the issue can close it even without Contributor role.

  20. fflo renamed this:
    Mac OS X compilation with qt5 (and qt4) fails
    Close: Mac OS X compilation with qt5 (and qt4) fails
    on Feb 7, 2015
  21. fflo renamed this:
    Close: Mac OS X compilation with qt5 (and qt4) fails
    Mac OS X compilation with qt5 (and qt4) fails
    on Feb 7, 2015
  22. fflo commented at 6:34 PM on February 7, 2015: none

    @paveljanik Sorry off topic; but how my I close this issue as the author? I've no gearwheel next to Labels, Milestone, etc.

  23. sipa commented at 6:36 PM on February 7, 2015: member

    There is a button "Close issue" at the bottom of the page.

  24. fflo commented at 6:42 PM on February 7, 2015: none

    @sipa Ahhh - great. So I'm gonna close this ticket, now. Thanks you guys very much!

  25. fflo closed this on Feb 7, 2015

  26. paveljanik commented at 8:07 AM on June 7, 2015: contributor

    MacPorts probably fixed their problem: https://trac.macports.org/ticket/44204#comment:12

  27. DrahtBot locked this on Sep 8, 2021

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-13 15:15 UTC

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