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 and how to configure libraries
Forum Updated to NodeBB v4.3 + New Features

macdeployqt and how to configure libraries

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
7 Posts 2 Posters 1.5k 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.
  • V Offline
    V Offline
    vyau
    wrote on 24 Nov 2018, 23:36 last edited by
    #1

    Dear All: I am learning how to use "macdeployqt" to make a "dmg".
    The binary I build originally (and needed to be bundled under MacOS/<binary>) was
    dynamically linked and needed a library under /opt/local/Lib... I can use it under "otool -L".
    And that library is indeed copied under Content/Frameworks after I ran "macdeployqt".

    When I install the DMG to test, the resulting binary is still looking for /opt/local/Lib...for that binary rather than under Content/Frameworks within ".app".

    Sorry if this is a newbie question. I like to know how to configure this properly?
    I have that library inside the ".app/Contents/Framework", should I copied to /usr/local/Lib...
    in the deployed machine? Or should I do something else?
    thanks

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 25 Nov 2018, 19:25 last edited by
      #2

      Hi,

      What version of Qt are you using ?
      On what version of macOS ?
      With which version of Xcode ?

      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
      • V Offline
        V Offline
        vyau
        wrote on 25 Nov 2018, 19:32 last edited by
        #3

        Qt version -- 5.11.2
        Mac OS -- High Sierra 10.13.6
        Xcode -- 9.4.1

        Are any of these a bit too old?

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 25 Nov 2018, 20:06 last edited by
          #4

          If you want to nitpick, current version of macOS is Mojave so 10.14 and Xcode is 10.1 but that should not play too much of a role right now.

          What library is giving you trouble ?

          Did you also try to run macdeployqt with verbosity to see if there are some additional information given about your library ?

          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
          • V Offline
            V Offline
            vyau
            wrote on 25 Nov 2018, 22:15 last edited by vyau
            #5

            It is Python.

            I am using cython and gcc to compile my python (python-qt) script to a binary.

            The destination machine does have python installed and working. The binary was compiled by gcc with "-lpython3.6m". The destination machine also has that exact version. The when I do "otool -L" on the binary, it is referencing /opt/lib/.../libpython3.6m. That's the path on the original machine where python shared lib is installed. It is still looking at this place in the destination machine?

            Does macdeployqt auto-convert the shared lib to look for them on the deployed machine?

            1 Reply Last reply
            0
            • V Offline
              V Offline
              vyau
              wrote on 25 Nov 2018, 23:01 last edited by
              #6

              I have more data (and error). I got a newer DMG package.

              On the deployed machine, if I run MyProg.app/Contents/MacOs/MyProg from command line, it works fine.

              If I click on MyProg.app with my mouse and try to run it,
              it would crash and produce the following errors.
              I cannot make of the errors below. Why is there a difference between
              command line vs clicking from the Mac Desktop GUI? I did not set
              any special environment variable

              Process: InspectorBee [96693]
              Path: /Users/USER/Desktop/InspectorBee.app/Contents/MacOS/InspectorBee
              Identifier: InspectorBee
              Version: 0
              Code Type: X86-64 (Native)
              Parent Process: ??? [1]
              Responsible: InspectorBee [96693]
              User ID: 502

              Date/Time: 2018-11-25 14:58:56.642 -0800
              OS Version: Mac OS X 10.14.1 (18B75)
              Report Version: 12
              Anonymous UUID: A1DD61AE-4507-085C-4EA2-36BEFFD2ABC6

              Sleep/Wake UUID: 242C3E45-61C4-490B-841F-4D51E9F7E481

              Time Awake Since Boot: 22000 seconds
              Time Since Wake: 3400 seconds

              System Integrity Protection: enabled

              Crashed Thread: 0 Dispatch queue: com.apple.main-thread

              Exception Type: EXC_CRASH (SIGABRT)
              Exception Codes: 0x0000000000000000, 0x0000000000000000
              Exception Note: EXC_CORPSE_NOTIFY

              Application Specific Information:
              abort() called

              Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
              0 libsystem_kernel.dylib 0x00007fff7c809b86 __pthread_kill + 10
              1 libsystem_pthread.dylib 0x00007fff7c8bfc50 pthread_kill + 285
              2 libsystem_c.dylib 0x00007fff7c7731c9 abort + 127
              3 QtCore 0x000000010cc758a9 qt_message_fatal(QtMsgType, QMessageLogContext const&, QString const&) + 9
              4 QtCore 0x000000010cc7708f QMessageLogger::fatal(char const*, ...) const + 213
              5 QtGui 0x000000010d82bfe1 QGuiApplicationPrivate::createPlatformIntegration() + 7745
              6 QtGui 0x000000010d82c00b QGuiApplicationPrivate::createEventDispatcher() + 27
              7 QtCore 0x000000010ce3b75a QCoreApplicationPrivate::init() + 1754
              8 QtGui 0x000000010d827309 QGuiApplicationPrivate::init() + 57
              9 QtWidgets 0x000000010de2003a QApplicationPrivate::init() + 26
              10 QtWidgets.so 0x000000010d3ddd88 init_type_QApplication(_sipSimpleWrapper*, _object*, _object*, _object**, _object**, _object**) + 168
              11 sip.so 0x000000010d1fec4d sipSimpleWrapper_init + 175
              12 org.python.python 0x000000010c32fce9 type_call + 184
              13 InspectorBee 0x000000010c2bacfa 0x10c2b6000 + 19706
              14 InspectorBee 0x000000010c2ba057 0x10c2b6000 + 16471
              15 org.python.python 0x000000010c32065f PyModule_ExecDef + 119
              16 InspectorBee 0x000000010c2b7235 0x10c2b6000 + 4661
              17 InspectorBee 0x000000010c2b7078 main + 823
              18 libdyld.dylib 0x00007fff7c6cb08d start + 1

              Thread 1:
              0 libsystem_pthread.dylib 0x00007fff7c8bc428 start_wqthread + 0
              1 ??? 0x0000000054485244 0 + 1414025796

              Thread 2:
              0 libsystem_pthread.dylib 0x00007fff7c8bc428 start_wqthread + 0
              1 ??? 0x0000000054485244 0 + 1414025796

              Thread 0 crashed with X86 Thread State (64-bit):
              rax: 0x0000000000000000 rbx: 0x000000010ddeb5c0 rcx: 0x00007ffee39491f8 rdx: 0x0000000000000000

              1 Reply Last reply
              0
              • S Offline
                S Offline
                SGaist
                Lifetime Qt Champion
                wrote on 26 Nov 2018, 22:52 last edited by
                #7

                Are you using PyQt ?

                IIRC, both don't necessarily start with the same working path but it should make your application crash like that in any case.

                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

                1/7

                24 Nov 2018, 23:36

                • Login

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