Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. macdeployqt: specify framework location?
QtWS25 Last Chance

macdeployqt: specify framework location?

Scheduled Pinned Locked Moved General and Desktop
macdeployingmacdeployqt
8 Posts 3 Posters 3.7k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    Braden
    wrote on 18 Mar 2015, 21:22 last edited by
    #1

    When I run macdeployqt (using Qt 4.8.6), I get the following errors:

    ERROR: no file at "/Library/Frameworks/QtWebKit.framework/Versions/4/QtWebKit" 
    ERROR: no file at "/Library/Frameworks/QtGui.framework/Versions/4/QtGui" 
    ERROR: no file at "/Library/Frameworks/QtNetwork.framework/Versions/4/QtNetwork" 
    ERROR: no file at "/Library/Frameworks/QtCore.framework/Versions/4/QtCore" 
    

    The frameworks are not installed under /Library/Frameworks; I have them installed elsewhere.

    I suspect the problem is related to the fact that the references to these frameworks in the executable are not absolute:

    $ otool -L Foo.app/Contents/MacOS/Foo
    Foo.app/Contents/MacOS/Foo:
    	/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit (compatibility version 1.0.0, current version 275.0.0)
    	/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1151.16.0)
    	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1213.0.0)
    	/usr/lib/libiconv.2.dylib (compatibility version 7.0.0, current version 7.0.0)
    	/usr/lib/libpam.2.dylib (compatibility version 3.0.0, current version 3.0.0)
    	/usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5)
    	/usr/lib/libbz2.1.0.dylib (compatibility version 1.0.0, current version 1.0.5)
    	QtWebKit.framework/Versions/4/QtWebKit (compatibility version 4.9.0, current version 4.9.4)
    	QtGui.framework/Versions/4/QtGui (compatibility version 4.8.0, current version 4.8.6)
    	QtNetwork.framework/Versions/4/QtNetwork (compatibility version 4.8.0, current version 4.8.6)
    	QtCore.framework/Versions/4/QtCore (compatibility version 4.8.0, current version 4.8.6)
    	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0)
    

    How do I tell macdeployqt that these frameworks live somewhere else?

    Alternatively, how might I get absolute references to these frameworks in the executable?

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 18 Mar 2015, 21:24 last edited by
      #2

      Hi and welcome to devnet,

      Maybe a silly question but are you sure you are using the correct macdeployqt ?
      Did you build Qt yourself ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • B Offline
        B Offline
        Braden
        wrote on 19 Mar 2015, 02:24 last edited by
        #3

        @SGaist Yes, I built Qt myself. And, yes, I am certain that the macdeployqt I built is the one I'm using.

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 19 Mar 2015, 23:41 last edited by
          #4

          Where is your self-built Qt 4 installed ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          B 1 Reply Last reply 22 Mar 2015, 05:17
          0
          • S SGaist
            19 Mar 2015, 23:41

            Where is your self-built Qt 4 installed ?

            B Offline
            B Offline
            Braden
            wrote on 22 Mar 2015, 05:17 last edited by
            #5

            @SGaist Wherever I want it to be.

            I tar up the output of make install and I have a script that calls install_name_tool and adjusts the dependency references for the executables and frameworks in the distribution to point to the installation location (i.e., where the tarball is extracted). Also, qtinstalldir/bin/qt.conf is written to point to the installation location.

            1 Reply Last reply
            0
            • N Offline
              N Offline
              napajejenunedk0
              wrote on 22 Mar 2015, 11:28 last edited by
              #6

              I could give you an upgraded version of macdeployqt which could deploy any kind of Mac OS modules - executables, frameworks, bundles, dynamically linked libraries (dylibs), statically linked such. It could help.

              1 Reply Last reply
              0
              • B Offline
                B Offline
                Braden
                wrote on 23 Mar 2015, 13:11 last edited by
                #7

                @napajejenunedk0 Thank you for the offer. Is this something that's part of a newer Qt distribution, or something you've customized?

                At this point, I've more-or-less reimplemented macdeployqt myself as a CMake script. It probably doesn't cover all the bases that your macdeployqt does; but it does what I need it to do.

                As noted, I'm using Qt 4.8.6. I should have the opportunity to upgrade to something more recent soon. I'll revisit "official" macdeployqt then and file a bug report if I still encounter problems. It does seem to me the inability to tell macdeployqt where to look for the Qt frameworks is a rather significant missing feature; and the fact that it's looking for those frameworks somewhere other than where the tool itself is using them seems like a bug.

                1 Reply Last reply
                0
                • N Offline
                  N Offline
                  napajejenunedk0
                  wrote on 26 Mar 2015, 08:42 last edited by
                  #8

                  "Is this something that's part of a newer Qt distribution, or something you've customized?"
                  My customization that I wanted to contribute as well but there were obstacles that prevented this. The customized macdeployqt could be given additional include paths where to search for dependencies, so I think it could help you solve your case.

                  1 Reply Last reply
                  0

                  1/8

                  18 Mar 2015, 21:22

                  • Login

                  • Login or register to search.
                  1 out of 8
                  • First post
                    1/8
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • Users
                  • Groups
                  • Search
                  • Get Qt Extensions
                  • Unsolved