Depends built QT isn't being properly picked up on OS X #9126

issue fanquake opened this issue on November 11, 2016
  1. fanquake commented at 5:30 AM on November 11, 2016: member

    If you do a depends build on OS X (10.12), and plug the result into configure ./configure --prefix=/Users/xxx/Github/bitcoin/depends/x86_64-apple-darwin16.1.0 no bitcoin-qt is built.

    checking for QT... yes
    checking for QT_TEST... yes
    checking for QT_DBUS... yes
    checking for static Qt... yes
    checking for QTPLATFORM... yes
    checking for QTPRINT... yes
    checking for Qt < 5.4... no
    checking whether the linker accepts -framework IOKit... yes
    checking for static Qt plugins: -lqcocoa... no
    configure: WARNING: Could not resolve: -lqcocoa; bitcoin-qt frontend will not be built
    checking whether to build Bitcoin Core GUI... no (Qt5)
    

    QT parts from config.log are below. config.txt

  2. fanquake added the label Build system on Nov 11, 2016
  3. fanquake added the label MacOSX on Nov 11, 2016
  4. fanquake commented at 9:41 AM on January 12, 2017: member

    Retested this on OSX 10.12.2, still seeing the same result.

    ./configure --prefix=/Users/xxx/Github/bitcoin/depends/x86_64-apple-darwin16.3.0
    
    Options used to compile and link:
      with wallet   = yes
      with gui / qt = no
      with zmq      = yes
      with test     = yes
      with bench    = yes
      with upnp     = yes
      debug enabled = no
    
      target os     = darwin
      build os      = darwin
    
      CC            = /Users/xxx/Github/bitcoin/depends/x86_64-apple-darwin16.3.0/share/../native/bin/ccache /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -mmacosx-version-min=10.8
      CFLAGS        = -pipe -O2 
      CPPFLAGS      = -Qunused-arguments -I/Users/xxx/Github/bitcoin/depends/x86_64-apple-darwin16.3.0/share/../include/  -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS -DMAC_OSX
      CXX           = /Users/xxx/Github/bitcoin/depends/x86_64-apple-darwin16.3.0/share/../native/bin/ccache /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -mmacosx-version-min=10.8 -stdlib=libc++ -std=c++11
      CXXFLAGS      = -pipe -O2 
      LDFLAGS       = -L/Users/xxx/Github/bitcoin/depends/x86_64-apple-darwin16.3.0/share/../lib  -Wl,-headerpad_max_install_names -Wl,-dead_strip
    
  5. theuni commented at 11:03 PM on January 16, 2017: member

    Is this still an issue with qt5.7.1 ?

  6. fanquake commented at 11:12 PM on January 16, 2017: member

    @theuni Looks like it is. This is with master on 10.12.2:

    ./configure --prefix=/Users/xxx/Github/bitcoin/depends/x86_64-apple-darwin16.3.0
    
    checking for QT... yes
    checking for QT_TEST... yes
    checking for QT_DBUS... yes
    checking for static Qt... yes
    checking for QTPLATFORM... yes
    checking for QTPRINT... yes
    checking for Qt < 5.4... no
    checking whether the linker accepts -framework IOKit... yes
    checking for static Qt plugins: -lqcocoa... no
    configure: WARNING: Could not resolve: -lqcocoa; bitcoin-qt frontend will not be built
    checking whether to build Bitcoin Core GUI... no (Qt5)
    
    Options used to compile and link:
      with wallet   = yes
      with gui / qt = no
      with zmq      = yes
      with test     = yes
      with bench    = yes
      with upnp     = yes
      debug enabled = no
    
      target os     = darwin
      build os      = darwin
    
      CC            = /Users/xxx/Github/bitcoin/depends/x86_64-apple-darwin16.3.0/share/../native/bin/ccache /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -mmacosx-version-min=10.8
      CFLAGS        = -pipe -O2 
      CPPFLAGS      = -Qunused-arguments -I/Users/xxx/Github/bitcoin/depends/x86_64-apple-darwin16.3.0/share/../include/  -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS -DMAC_OSX
      CXX           = /Users/xxx/Github/bitcoin/depends/x86_64-apple-darwin16.3.0/share/../native/bin/ccache /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -mmacosx-version-min=10.8 -stdlib=libc++ -std=c++11
      CXXFLAGS      = -pipe -O2 
      LDFLAGS       = -L/Users/xxx/Github/bitcoin/depends/x86_64-apple-darwin16.3.0/share/../lib  -Wl,-headerpad_max_install_names -Wl,-dead_strip
    
  7. theuni commented at 12:52 AM on January 17, 2017: member

    Ok, I'm having trouble navigate the qt buildsystem maze, but the issue is that the plugin isn't getting installed where we expect it to. Sadly, I added a hack rather than fixing properly for Linux, so we're seeing it for some reason here now too.

    See https://github.com/bitcoin/bitcoin/blob/master/depends/packages/qt.mk#L170

    I think if we add the same thing for plugins/platforms/libqcocoa.a, it should work.

  8. fanquake commented at 4:10 AM on January 17, 2017: member

    Had tried a build with this patch:

      if `test -f qtbase/src/plugins/platforms/libqcocoa.a`; then \
    	cp qtbase/src/plugins/platforms/libqcocoa.a $($(package)_staging_prefix_dir)/lib; \
      fi
    

    liqcocoa.a does get put into src/plugins/platforms, but that doesn't seem to fix the build. Will investigate further shortly.

    Looking at this in bitcoin_qt.m4

          elif test x$TARGET_OS = xdarwin; then
            AX_CHECK_LINK_FLAG([[-framework IOKit]],[QT_LIBS="$QT_LIBS -framework IOKit"],[AC_MSG_ERROR(could not iokit framework)])
            _BITCOIN_QT_CHECK_STATIC_PLUGINS([Q_IMPORT_PLUGIN(QCocoaIntegrationPlugin)],[-lqcocoa])
            AC_DEFINE(QT_QPA_PLATFORM_COCOA, 1, [Define this symbol if the qt platform is cocoa])
          fi
    
  9. theuni commented at 3:41 AM on January 18, 2017: member
  10. fanquake commented at 11:18 AM on January 18, 2017: member

    @theuni on-top of my libcocoa patch?

  11. laanwj closed this on Jan 26, 2017

  12. pavik referenced this in commit 4322da312c on Mar 1, 2018
  13. 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-21 18:15 UTC

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