Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. [SOLVED] Problem with macdeployqt on Qt 5.4 RC
Forum Update on Monday, May 27th 2025

[SOLVED] Problem with macdeployqt on Qt 5.4 RC

Scheduled Pinned Locked Moved QML and Qt Quick
5 Posts 3 Posters 19.6k 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.
  • S Offline
    S Offline
    shav
    wrote on 27 Nov 2014, 20:18 last edited by
    #1

    Today I've updated my Qt to Qt 5.4 RC and found the problem with macdeployqt tool. When I use this tool my application doesn't load and in console I see this error:
    @
    QQmlApplicationEngine failed to load component
    qrc:///qml/main.qml:1 module "QtQuick" plugin "qtquick2plugin" not found
    @

    I've checked the application bundle and found the problem. The problem is incorrect symlink to QML plugins libs from Resources/qml folder. Now I try to create a bash script to fix paths.

    Also I have a two more question about new version of macdeployqt tool.

    1. After call macdeployqt tool I can see errors with libz.1.dylib:
      @
      21:21:32: Starting: "/Volumes/Documents/Applications/Qt/Qt5.4.0/5.4/clang_64/bin/macdeployqt" QtForumReader/QtForumReader.app -qmldir=/Volumes/Documents/MyWork/PROJECTS/QtProjects/GIT/QtForumReader/Desktop/1.x/build-QtForumProject-Desktop_Qt_5_4_clang_64bit-Release/../QtForumProject/QtForumReader/qml '-codesign=3rd Party Mac Developer Application: <Team_ID>'
      ERROR: no file at "/opt/local/lib/libz.1.dylib"
      ERROR: no file at "/opt/local/lib/libz.1.dylib"
      ERROR: no file at "/opt/local/lib/libz.1.dylib"
      ERROR: no file at "/opt/local/lib/libz.1.dylib"
      ERROR: no file at "/opt/local/lib/libxslt.1.dylib"
      ERROR: no file at "/opt/local/lib/libz.1.dylib"
      ERROR: no file at "/opt/local/lib/libsqlite3.0.dylib"
      ERROR: "error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool: can't open file: QtForumReader/QtForumReader.app/Contents/Frameworks/libz.1.dylib (No such file or directory)
      "
      ERROR: Codesign signing error:
      ERROR: "Warning: usage of --preserve-metadata with option "resource-rules" (deprecated in Mac OS X >= 10.10)!
      QtForumReader/QtForumReader.app/Contents/Frameworks/libz.1.dylib: No such file or directory
      "
      ERROR: "error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool: can't open file: QtForumReader/QtForumReader.app/Contents/Frameworks/libsqlite3.0.dylib (No such file or directory)
      "
      ERROR: Codesign signing error:
      ERROR: "Warning: usage of --preserve-metadata with option "resource-rules" (deprecated in Mac OS X >= 10.10)!
      QtForumReader/QtForumReader.app/Contents/Frameworks/libsqlite3.0.dylib: No such file or directory
      "
      ERROR: "error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool: can't open file: QtForumReader/QtForumReader.app/Contents/Frameworks/libxslt.1.dylib (No such file or directory)
      "
      ERROR: Codesign signing error:
      ERROR: "Warning: usage of --preserve-metadata with option "resource-rules" (deprecated in Mac OS X >= 10.10)!
      QtForumReader/QtForumReader.app/Contents/Frameworks/libxslt.1.dylib: No such file or directory
      @

    2. In new version of macdeployqt exist argument with name "codesing". How I must use this argument? When I use codesign for application I should set path to *.entitlements. This file needs to set permissions for app. How I must set path to this file? Or tool will find it automaticaly if I've copied *.entitlements file to folder of my project?

    Thanks for any help!

    Mac OS and iOS Developer

    1 Reply Last reply
    0
    • T Offline
      T Offline
      tmurison
      wrote on 27 Nov 2014, 20:25 last edited by
      #2

      Thanks, I asked a question today about the plugin not loading. I've created a bug for the invalid symlink:

      https://bugreports.qt-project.org/browse/QTBUG-42954

      As for part 2 of your question, I'm manually calling codesign as a custom build step, as I've found that I cannot specify entitlements to macdeployqt, and I've also noticed that the icon and Info.plist aren't copied to the application bundle. Both of those files are needed before you can do codesign.

      1 Reply Last reply
      0
      • C Offline
        C Offline
        che1404
        wrote on 16 Dec 2014, 10:51 last edited by
        #3

        Hi, I'm having the same error "module "QtQuick" plugin "qtquick2plugin" not found" and can't make your script work in my case.
        The pasted script contains bad "" characters. Could you please add a link to a raw text version?

        Thanks for your help.

        1 Reply Last reply
        0
        • S Offline
          S Offline
          shav
          wrote on 16 Dec 2014, 11:30 last edited by
          #4

          Hi, che1404

          There are link to my "script":http://dshav.com/apps/script.sh.

          Mac OS and iOS Developer

          1 Reply Last reply
          0
          • C Offline
            C Offline
            che1404
            wrote on 16 Dec 2014, 11:34 last edited by
            #5

            Hey shav, that worked.
            Thanks!

            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