Results 1 to 5 of 5

Thread: Qt 4.7.2 - Definitely something wrong with macdeployqt

  1. #1
    Join Date
    Mar 2010
    Posts
    319
    Thanks
    1
    Thanked 14 Times in 12 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Qt 4.7.2 - Definitely something wrong with macdeployqt

    After installing Qt SDK 1.1 Beta (I am only interested in Qt Creator 2.1.0 and Qt 4.7.2), I have been experiencing some problems with my application. I have now established the cause of the problem: macdeployqt.

    Here is a very simple reproducible scenario:
    1. Create a new folder;
    2. Create a file called Test.pro with the following contents (notice that webkit has been added to the default core and gui components:
      Qt Code:
      1. QT += core gui webkit
      2.  
      3. TARGET = Test
      4. TEMPLATE = app
      5.  
      6. SOURCES += main.cpp
      To copy to clipboard, switch view to plain text mode 
    3. Create a file called main.cpp with the following contents:
      Qt Code:
      1. #include <QApplication>
      2. #include <QWebView>
      3.  
      4. int main(int argc, char *argv[])
      5. {
      6. QApplication a(argc, argv);
      7.  
      8. QWebView w;
      9.  
      10. w.show();
      11.  
      12. return a.exec();
      13. }
      To copy to clipboard, switch view to plain text mode 
    4. From the terminal, do the following:
      $ qmake
      Everything is fine here. So, let's build our application:
      $ make
      g++ -c -pipe -O2 -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5 -Wall -W -DQT_NO_DEBUG -DQT_WEBKIT_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/Developer/QtSDK/Desktop/Qt/472/gcc/mkspecs/default -I. -I/Developer/QtSDK/Desktop/Qt/472/gcc/lib/QtCore.framework/Versions/4/Headers -I/Developer/QtSDK/Desktop/Qt/472/gcc/include/QtCore -I/Developer/QtSDK/Desktop/Qt/472/gcc/lib/QtGui.framework/Versions/4/Headers -I/Developer/QtSDK/Desktop/Qt/472/gcc/include/QtGui -I/Developer/QtSDK/Desktop/Qt/472/gcc/lib/QtWebKit.framework/Versions/4/Headers -I/Developer/QtSDK/Desktop/Qt/472/gcc/include/QtWebKit -I/Developer/QtSDK/Desktop/Qt/472/gcc/include -I. -F/Developer/QtSDK/Desktop/Qt/472/gcc/lib -o main.o main.cpp
      g++ -headerpad_max_install_names -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5 -o Test.app/Contents/MacOS/Test main.o -F/Developer/QtSDK/Desktop/Qt/472/gcc/lib -L/Developer/QtSDK/Desktop/Qt/472/gcc/lib -framework QtWebKit -framework QtGui -framework QtCore
      Things are still fine, so we can try running our test application:
      $ open Test.app
      As expected, everything is fine: our test application opens and runs without any problem. So, let's get it ready for deployment by using macdeployqt:
      $ macdeployqt Test.app
      ERROR: file copy failed from "/Developer/QtSDK/Desktop/Qt/472/gcc/lib/QtGui.framework/Resources/qt_menu.nib/classes.nib"
      ERROR: to "Test.app/Contents/Frameworks/QtGui.framework/Resources/qt_menu.nib/classes.nib"
      ERROR: file copy failed from "/Developer/QtSDK/Desktop/Qt/472/gcc/lib/QtGui.framework/Resources/qt_menu.nib/info.nib"
      ERROR: to "Test.app/Contents/Frameworks/QtGui.framework/Resources/qt_menu.nib/info.nib"
      ERROR: file copy failed from "/Developer/QtSDK/Desktop/Qt/472/gcc/lib/QtGui.framework/Resources/qt_menu.nib/keyedobjects.nib"
      ERROR: to "Test.app/Contents/Frameworks/QtGui.framework/Resources/qt_menu.nib/keyedobjects.nib"
      Amazingly enough, despite the above error messages, the reported files have been properly copied! Anyway, let's carry on and try to run our test application:
      $ open Test.app
      Unfortunately, this time round, we get a message box that reads:
      Test quit unexpectedly.
      Click Reopen to open the application again. Click Report to see more detailed information and send a report to Apple.
      <Ignore> <Report...> <Reopen>
    This is most frustrating, but now if you remove webkit from our Test.pro file, i.e.
    Qt Code:
    1. QT += core gui
    2.  
    3. TARGET = Test
    4. TEMPLATE = app
    5.  
    6. SOURCES += main.cpp
    To copy to clipboard, switch view to plain text mode 
    and have our main.cpp file to read:
    Qt Code:
    1. #include <QApplication>
    2. #include <QMainWindow>
    3.  
    4. int main(int argc, char *argv[])
    5. {
    6. QApplication a(argc, argv);
    7.  
    8.  
    9. w.show();
    10.  
    11. return a.exec();
    12. }
    To copy to clipboard, switch view to plain text mode 
    then, macdeployqt still generates the aforementioned error messages, but at least the resulting application still works.

    Now, could someone confirm all of the above? If what I am reporting was to be proven correct, then there is definitely something wrong with macdeployqt, and I will see about reporting this to the trolls.

    Otherwise, I couldn't help but notice that, as a result of macdeployqt, two sets of QtCore and QtGui binaries are deployed: one under Test.app/Contents/Frameworks/QtXXX.framework/Versions/4 and another under Test.app/Contents/Frameworks/QtXXX.framework/Versions/Current. Other Qt components only have Test.app/Contents/Frameworks/QtXXX.framework/Versions/4, but QtWebKit (i.e. in the failing scenario) has Test.app/Contents/Frameworks/QtXXX.framework/Versions/Current! Gosh, things really seem to be messed up in this version of macdeployqt.

  2. #2
    Join Date
    Mar 2010
    Posts
    319
    Thanks
    1
    Thanked 14 Times in 12 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Qt 4.7.2 - Definitely something wrong with macdeployqt

    I have posted the same message on the Qt Developer Network forum and it would seem that this is a bug. So, I have filed it here.

  3. The following user says thank you to agarny for this useful post:

    MattPhillips (19th March 2011)

  4. #3
    Join Date
    Mar 2010
    Posts
    319
    Thanks
    1
    Thanked 14 Times in 12 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Qt 4.7.2 - Definitely something wrong with macdeployqt

    For what it is worth, the problem still hasn’t been fixed in the final release of Qt SDK 1.1.

  5. #4
    Join Date
    Jul 2011
    Posts
    3
    Qt products
    Qt4 Qt/Embedded Qt Jambi
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Qt 4.7.2 - Definitely something wrong with macdeployqt

    yes , I also meet such problem , and I didn't know why , and tried to find the answers , but still failed . do you guys already find the solutions for this ? If you have , please let me know , thanks very much

  6. #5
    Join Date
    Aug 2011
    Location
    India
    Posts
    4
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Qt 4.7.2 - Definitely something wrong with macdeployqt

    I am using Qt Creator 2.1.0 and Qt libraries 4.7.4. I can confirm that this problem still exists. Guess I'll have to manually do what macdeployqt does so it doesn't mess up the application.
    There are no stupid questions, but there are lots of inquisitive idiots.

Similar Threads

  1. Issues with macdeployqt on OSX 10.5
    By My3rdGradeShirt in forum Qt Programming
    Replies: 0
    Last Post: 28th November 2010, 16:25
  2. macdeployqt and third party libraries
    By calumcjr in forum Installation and Deployment
    Replies: 0
    Last Post: 10th May 2010, 22:20
  3. macdeployqt not found in my system
    By jay in forum Installation and Deployment
    Replies: 0
    Last Post: 25th February 2010, 06:41
  4. Crash after macdeployqt
    By stefandetter in forum Installation and Deployment
    Replies: 1
    Last Post: 8th January 2010, 12:15
  5. macdeployqt doesn't work at all.
    By pherthyl in forum Installation and Deployment
    Replies: 1
    Last Post: 10th July 2009, 01:42

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.