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. Build on Mac OS X 10.8 for targets >= 10.6 (Snow Leopard)
Forum Updated to NodeBB v4.3 + New Features

Build on Mac OS X 10.8 for targets >= 10.6 (Snow Leopard)

Scheduled Pinned Locked Moved General and Desktop
9 Posts 3 Posters 5.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.
  • C Offline
    C Offline
    cle1109
    wrote on last edited by
    #1

    Hello,

    I want to build my Qt application on Mac OS X 10.8. However, I want my application to run on Mac OS X 10.6 (Snow Leopard) or higher. My .pro file contains the lines

    @QMAKE_CXXFLAGS_X86_64 += -mmacosx-version-min=10.6
    QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.6@

    However, my application only runs on 10.8 and not on 10.6, where it crashes immediately (I haven't tried 10.7 yet).

    I'm using macdeployqt to create an application bundle, but I do get an error (although the .dmg is built):
    @ERROR: "install_name_tool: changing install names or rpaths can't be redone for: sigviewer.app/Contents/Frameworks//libtiff.5.dylib (for architecture x86_64) because larger updated load commands do not fit (the program must be relinked, and you may need to use -headerpad or -headerpad_max_install_names)
    "
    ERROR: ""
    ERROR: "install_name_tool: changing install names or rpaths can't be redone for: sigviewer.app/Contents/Frameworks//libtiff.5.dylib (for architecture x86_64) because larger updated load commands do not fit (the program must be relinked, and you may need to use -headerpad or -headerpad_max_install_names)
    "
    ERROR: ""@

    I'd appreciate any hints on how to build my app for 10.6. The source code is available at: http://sourceforge.net/projects/sigviewer/files/0.5.2/sigviewer-0.5.2-src.tar.gz/download
    To build the app, you need to extract the following file into the source tree:
    http://sourceforge.net/projects/sigviewer/files/0.5.2/external-0.5.2-macx.zip/download

    Thanks,
    Clemens

    1 Reply Last reply
    0
    • H Offline
      H Offline
      hardcodes.de
      wrote on last edited by
      #2

      It looks like you use an additional library (libtiff.5.dylib) in your project. Your executable and the library itself need an install name so that the dynamic linker can find the library at program startup time.
      If the library is not present on the 10.6 system but for sure is on your development system, program start will fail on 10.6 and succeed on 10.8.
      macdeployqt starts the commandline tool install_name_tool to change the information inside the library but there is not enough space to fill in the complete information (AKA path). Therefore you must recompile the library with -headerpad or -headerpad_max_install_names. If you got the sources...

      while(!sleep){++sheep;}

      1 Reply Last reply
      0
      • C Offline
        C Offline
        cle1109
        wrote on last edited by
        #3

        So you think this might be the reason why my program is not starting on 10.6? I always thought that Qt shipped this library, because I never added it to my project. I'm not even sure why it is needed. I don't think that I can recompile it either -- I would prefer to find out why it is linked in the first place. Is there a way how I can find out? I'm totally confused...

        1 Reply Last reply
        0
        • H Offline
          H Offline
          hardcodes.de
          wrote on last edited by
          #4

          Hm, maybe it's even part of Qt, if you didn't add it in your .PRO file.
          You can look with otool on wich libraries your executable depends.
          For this specific one: look it up in the filesystem. That could show to whom it belongs.

          while(!sleep){++sheep;}

          1 Reply Last reply
          0
          • C Offline
            C Offline
            cle1109
            wrote on last edited by
            #5

            Interestingly, this lib is nowhere to be seen in the output of otool -L:

            @% otool -L bin/release/sigviewer.app/Contents/MacOS/sigviewer
            bin/release/sigviewer.app/Contents/MacOS/sigviewer:
            /opt/local/Library/Frameworks/QtXml.framework/Versions/4/QtXml (compatibility version 4.8.0, current version 4.8.4)
            /opt/local/Library/Frameworks/QtCore.framework/Versions/4/QtCore (compatibility version 4.8.0, current version 4.8.4)
            /opt/local/Library/Frameworks/QtGui.framework/Versions/4/QtGui (compatibility version 4.8.0, current version 4.8.4)
            /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 56.0.0)
            /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 169.3.0)@

            The lib is located in /opt/local/lib, therefore it is part of my MacPorts tree (provided by the tiff package). The qt4-mac package depends on tiff.

            1 Reply Last reply
            0
            • H Offline
              H Offline
              hardcodes.de
              wrote on last edited by
              #6

              So your Qt package is also from MacPorts? I'm just asking because of the /opt/local/ path and the dependency to the library from MacPorts.
              Any chance to use an official pre-compiled package or to compile it on your own?

              while(!sleep){++sheep;}

              1 Reply Last reply
              0
              • C Offline
                C Offline
                cle1109
                wrote on last edited by
                #7

                Yes, I'm using the Qt package from MacPorts. I'll try to build my app with the official binary package and see if that works. If yes, this is likely a bug in the MacPorts package. I'll keep you updated.

                1 Reply Last reply
                0
                • C Offline
                  C Offline
                  cle1109
                  wrote on last edited by
                  #8

                  OK, everything's fine with the official version. Will write a bug report for this port right now...

                  1 Reply Last reply
                  0
                  • M Offline
                    M Offline
                    MaximAlien
                    wrote on last edited by
                    #9

                    Hi,

                    Please check this "link":http://qt-project.org/wiki/Qt500KnownIssues.
                    If you want to deploy your Qt5 application on Mac OS X 10.6 you'll have to build Qt5 yourself on Snow Leopard.

                    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