Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. macdeployqt again

macdeployqt again

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
5 Posts 2 Posters 234 Views 2 Watching
  • 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.
  • DuBuD Offline
    DuBuD Offline
    DuBu
    wrote on last edited by DuBu
    #1

    Hi all,

    I'm trying to use macdeployqt on my Qt app (Qt 5.15.18), but it seems to have issues with transitive dependencies. It copies libraries into my bundle, but not libraries the library itself depends on. Is that a known issue?
    For example It finds out libwebpmux.3.dylib is needed and copies it from /usr/local/lib/ into the bundle. (Surprisingly under Contents/Frameworks but anyway.)
    Now, when I start my bundled app it crashes and in the Console app I see a crash log with the following lines:

    Termination Reason:    Namespace DYLD, Code 1 Library missing
    Library not loaded: @rpath/libsharpyuv.0.dylib
    Referenced from: MyApp.app/Contents/Frameworks/libwebpmux.3.dylib
    Reason: tried: 'MyApp.app/Contents/Frameworks/../lib/libsharpyuv.0.dylib' (no such file), 'MyApp.app/Contents/Frameworks/../lib/libsharpyuv.0.dylib' (no such file), 'MyApp.app/Contents/Frameworks/libsharpyuv.0.dylib' (no such file), 'MyApp.app/Contents/Frameworks/libsharpyuv.0.dylib' (no such file), '/usr/lib/libsharpyuv.0.dylib' (no such file, not in dyld cache)
    

    When I execute otool -L MyApp.app/Contents/Frameworks/libwebpmux.3.dylib it says:

    MyApp.app/Contents/Frameworks/libwebpmux.3.dylib:
    	@executable_path/../Frameworks/libwebpmux.3.dylib (compatibility version 5.0.0, current version 5.0.0)
    	@rpath/libwebp.7.dylib (compatibility version 9.0.0, current version 9.9.0)
    	@rpath/libsharpyuv.0.dylib (compatibility version 2.0.0, current version 2.0.0)
    	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1319.100.3)
    

    So it seems libwebpmux.3.dylib depends on libsharpyuv.0.dylib. But that didn't find its way into the bundle. How can I fix this?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      The first thing you can do is try with a more recent version of macdeployqt from Qt 6 to check if it does things better.
      Otherwise, use a bash script to copy and update the dependencies.

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

      DuBuD 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi,

        The first thing you can do is try with a more recent version of macdeployqt from Qt 6 to check if it does things better.
        Otherwise, use a bash script to copy and update the dependencies.

        DuBuD Offline
        DuBuD Offline
        DuBu
        wrote on last edited by
        #3

        @SGaist Hi, I already did. But it doesn't work, it says:

        dyld[50080]: Library not loaded: @rpath/QtCore.framework/Versions/A/QtCore
          Referenced from: <66AAD100-9E8A-35A8-B6DD-D1509FAEBAE6> ./macdeployqt
          Reason: tried: '../lib/QtCore.framework/Versions/A/QtCore' (no such file), '../lib/QtCore.framework/Versions/A/QtCore' (no such file)
        [1]    50080 abort      ./macdeployqt
        

        In Qt 6 the QtCore framework is in ../lib/QtCore.framework/Versions/A/, but unfortunately in Qt 5 its in ../lib/QtCore.framework/Versions/5/ or ../lib/QtCore.framework/Versions/Current/.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Worth a shot.

          Did you run macdeployqt in verbose mode to check if there was any error message regarding the missing libraries ?

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

          DuBuD 1 Reply Last reply
          0
          • SGaistS SGaist

            Worth a shot.

            Did you run macdeployqt in verbose mode to check if there was any error message regarding the missing libraries ?

            DuBuD Offline
            DuBuD Offline
            DuBu
            wrote last edited by
            #5

            @SGaist Yes, it said libwebpmux depends on libsharpyuv but it didn't try to copy that one over. I found out libwebpmux is a dependency of a freerdp3 we use. So it seems macdeployqt either wasn't made for 3rd party libraries or it fails to handle them. It looks like I need to handle those dependencies by myself somehow.

            1 Reply Last reply
            0

            • Login

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