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. Errors in deploying Mac app using macdeployqt

Errors in deploying Mac app using macdeployqt

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
10 Posts 2 Posters 2.7k Views 1 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.
  • Y Offline
    Y Offline
    yyang005
    wrote on last edited by yyang005
    #1

    I try to run macdeployqt to deploy my qt application on mac. I got the following error message:

    ERROR: Unexpected prefix "@loader_path"
    ERROR: Unexpected prefix "@loader_path"
    ERROR: Unexpected prefix "@loader_path"
    ERROR: Unexpected prefix "@loader_path"
    ERROR: Unexpected prefix "@loader_path"
    ERROR: Unexpected prefix "@loader_path"
    ERROR: Unexpected prefix "@loader_path"
    ERROR: Unexpected prefix "@loader_path"
    ERROR: Unexpected prefix "@loader_path"
    File exists, skip copy: "sample.app/Contents/PlugIns/platforms/libqcocoa.dylib"
    File exists, skip copy: "sample.app/Contents/PlugIns/printsupport/libcocoaprintersupport.dylib"
    File exists, skip copy: "sample.app/Contents/PlugIns/imageformats/libqdds.dylib"
    File exists, skip copy: "sample.app/Contents/PlugIns/imageformats/libqgif.dylib"
    File exists, skip copy: "sample.app/Contents/PlugIns/imageformats/libqicns.dylib"
    File exists, skip copy: "sample.app/Contents/PlugIns/imageformats/libqico.dylib"
    File exists, skip copy: "sample.app/Contents/PlugIns/imageformats/libqjpeg.dylib"
    File exists, skip copy: "sample.app/Contents/PlugIns/imageformats/libqtga.dylib"
    File exists, skip copy: "sample.app/Contents/PlugIns/imageformats/libqtiff.dylib"
    File exists, skip copy: "sample.app/Contents/PlugIns/imageformats/libqwbmp.dylib"
    File exists, skip copy: "sample.app/Contents/PlugIns/imageformats/libqwebp.dylib"
    WARNING:
    WARNING: "sample.app/Contents/Resources/qt.conf" already exists, will not overwrite.
    WARNING: To make sure the plugins are loaded from the correct location,
    WARNING: please make sure qt.conf contains the following lines:
    WARNING: [Paths]
    WARNING: Plugins = PlugIns

    My Qt version is 5.12.0
    Does anyone know how to resolve it? Thanks.

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

      Hi and welcome to devnet,

      Are you getting that the first time you run macdeployqt on your application bundle ?
      What does your .pro file look like ?

      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
      • Y Offline
        Y Offline
        yyang005
        wrote on last edited by
        #3

        Not sure if I'm getting that the first time I run macdeployqt. I have ran it several times, the errors are the same.

        Here is my .pro file,

        QT       += core gui
        QT       += xml
        
        greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
        
        TARGET = sample
        TEMPLATE = app
        
        # The following define makes your compiler emit warnings if you use
        # any feature of Qt which has been marked as deprecated (the exact warnings
        # depend on your compiler). Please consult the documentation of the
        # deprecated API in order to know how to port your code away from it.
        DEFINES += QT_DEPRECATED_WARNINGS
        
        # You can also make your code fail to compile if you use deprecated APIs.
        # In order to do so, uncomment the following line.
        # You can also select to disable deprecated APIs only up to a certain version of Qt.
        #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0
        
        CONFIG += c++11
        
        SOURCES += \
                main.cpp \
                mainwindow.cpp \
            actionlistdialog.cpp \
            customtreewidget.cpp \
            filterparameters.cpp \
            actionlist.cpp \
            actionlistmanager.cpp \
            action.cpp \
            savexmldialog.cpp
        
        HEADERS += \
                mainwindow.h \
            actionlistdialog.h \
            customtreewidget.h \
            filterparameters.h \
            actionlist.h \
            actionlistmanager.h \
            action.h \
            savexmldialog.h
        
        FORMS += \
                mainwindow.ui \
            actionlistdialog.ui \
            savexmldialog.ui
        
        # Default rules for deployment.
        qnx: target.path = /tmp/$${TARGET}/bin
        else: unix:!android: target.path = /opt/$${TARGET}/bin
        !isEmpty(target.path): INSTALLS += target
        
        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          The .pro file looks fine.

          How did you install Qt ?

          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
          • Y Offline
            Y Offline
            yyang005
            wrote on last edited by
            #5

            I downloaded qt-unified-mac-x64-3.0.6-online.dmg file and run the installation.

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

              Can you rebuild your project from scratch and run macdeployqt with the verbose option on a higher level ?

              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
              • Y Offline
                Y Offline
                yyang005
                wrote on last edited by
                #7

                It is interesting. When I tried to run from pathToQt/clang_64/bin

                ./macdeployqt <path to project.app>
                

                everything is working. But when I run from the same location

                macdeployqt <path to project.app>
                

                I got the ERROR: Unexpected prefix "@loader_path".

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

                  It means you are likely not running the macdeployqt version you think you are running.

                  What does which macdeployqt return ?

                  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
                  1
                  • Y Offline
                    Y Offline
                    yyang005
                    wrote on last edited by
                    #9

                    which macdeployqt returns
                    /anaconda3/bin/macdeployqt

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

                      So it looks like you are not using the correct version of macdeployqt. Use the full path to the Qt 5.12 version.

                      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
                      1

                      • Login

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