Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Errors deploying on macOS
Qt 6.12 LTS is out! See what's new in the release blog

Errors deploying on macOS

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
7 Posts 2 Posters 107 Views 2 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.
  • PerdrixP Offline
    PerdrixP Offline
    Perdrix
    wrote last edited by
    #1

    When I deploy my application on macOS, using macdeployqt, I see errors reported like this:

    ERROR: Unexpected prefix "@executable_path"
    

    repeated many times. I've just started seeing this with Qt 6.12.1 but that my be a red herring.

    Any ideas?
    Thanks, David

    1 Reply Last reply
    0
    • PerdrixP Offline
      PerdrixP Offline
      Perdrix
      wrote last edited by
      #2

      It seems this only happens if I try to deploy a debug build (which happened as the result of a stale Cmake cache). Should these errors be expected in that case?

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

        Hi,

        Can you share the entries where you have these ?

        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
        • PerdrixP Offline
          PerdrixP Offline
          Perdrix
          wrote last edited by
          #4

          @SGaist I'm not quite sure what you are asking for (am I being dense today?), so please could you clarify this.

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

            You can use otool to grab these information (rpath, found libraries, etc.) from your executable and libraries.
            I want check which one has these entries

            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
            • PerdrixP Offline
              PerdrixP Offline
              Perdrix
              wrote last edited by
              #6

              @SGaist I guess I don't know enough about otool!

              • I imagine that I need to run it against the application in DeepSkyStacker.app/Contents/MacOS/DeepSkyStacker

              • What option(s) should I use please?

              Thanks, David

              1 Reply Last reply
              0
              • PerdrixP Offline
                PerdrixP Offline
                Perdrix
                wrote last edited by Perdrix
                #7

                @SGaist I experimented a bit and suspect you want the -l output:

                DeepSkyStacker.app/Contents/MacOS/DeepSkyStacker:
                Load command 0
                      cmd LC_SEGMENT_64
                  cmdsize 72
                  segname __PAGEZERO
                   vmaddr 0x0000000000000000
                   vmsize 0x0000000100000000
                  fileoff 0
                 filesize 0
                  maxprot 0x00000000
                 initprot 0x00000000
                   nsects 0
                    flags 0x0
                Load command 1
                      cmd LC_SEGMENT_64
                  cmdsize 872
                  segname __TEXT
                   vmaddr 0x0000000100000000
                   vmsize 0x0000000002b80000
                  fileoff 0
                 filesize 45613056
                  maxprot 0x00000005
                 initprot 0x00000005
                   nsects 10
                    flags 0x0
                Section
                  sectname __text
                   segname __TEXT
                      addr 0x0000000100007688
                      size 0x000000000215e0d4
                    offset 30344
                     align 2^2 (4)
                    reloff 0
                    nreloc 0
                     flags 0x80000400
                 reserved1 0
                 reserved2 0
                Section
                  sectname __stubs
                   segname __TEXT
                      addr 0x000000010216575c
                      size 0x0000000000021690
                    offset 35018588
                     align 2^2 (4)
                    reloff 0
                    nreloc 0
                     flags 0x80000408
                 reserved1 0 (index into indirect symbol table)
                 reserved2 12 (size of stubs)
                Section
                  sectname __init_offsets
                   segname __TEXT
                      addr 0x0000000102186dec
                      size 0x000000000000069c
                    offset 35155436
                     align 2^2 (4)
                    reloff 0
                    nreloc 0
                     flags 0x00000016
                 reserved1 0
                 reserved2 0
                Section
                  sectname __gcc_except_tab
                   segname __TEXT
                      addr 0x0000000102187488
                      size 0x00000000000d80b0
                    offset 35157128
                     align 2^2 (4)
                    reloff 0
                    nreloc 0
                     flags 0x00000000
                 reserved1 0
                 reserved2 0
                Section
                  sectname __asan_cstring
                   segname __TEXT
                      addr 0x000000010225f540
                      size 0x00000000000dce40
                    offset 36042048
                     align 2^5 (32)
                    reloff 0
                    nreloc 0
                     flags 0x00000000
                 reserved1 0
                 reserved2 0
                Section
                  sectname __const
                   segname __TEXT
                      addr 0x000000010233c380
                      size 0x00000000004e7330
                    offset 36946816
                     align 2^5 (32)
                    reloff 0
                    nreloc 0
                     flags 0x00000000
                 reserved1 0
                 reserved2 0
                Section
                  sectname __cstring
                   segname __TEXT
                      addr 0x00000001028236b0
                      size 0x000000000013c65d
                    offset 42088112
                     align 2^0 (1)
                    reloff 0
                    nreloc 0
                     flags 0x00000002
                 reserved1 0
                 reserved2 0
                Section
                  sectname __ustring
                   segname __TEXT
                      addr 0x000000010295fd0e
                      size 0x0000000000000008
                    offset 43384078
                     align 2^1 (2)
                    reloff 0
                    nreloc 0
                     flags 0x00000000
                 reserved1 0
                 reserved2 0
                Section
                  sectname __unwind_info
                   segname __TEXT
                      addr 0x000000010295fd18
                      size 0x0000000000067188
                    offset 43384088
                     align 2^2 (4)
                    reloff 0
                    nreloc 0
                     flags 0x00000000
                 reserved1 0
                 reserved2 0
                Section
                  sectname __eh_frame
                   segname __TEXT
                      addr 0x00000001029c6ea0
                      size 0x00000000001b6d58
                    offset 43806368
                     align 2^3 (8)
                    reloff 0
                    nreloc 0
                     flags 0x6800000b
                 reserved1 0
                 reserved2 0
                Load command 2
                      cmd LC_SEGMENT_64
                  cmdsize 312
                  segname __DATA_CONST
                   vmaddr 0x0000000102b80000
                   vmsize 0x00000000000a8000
                  fileoff 45613056
                 filesize 688128
                  maxprot 0x00000003
                 initprot 0x00000003
                   nsects 3
                    flags 0x10
                Section
                  sectname __mod_term_func
                   segname __DATA_CONST
                      addr 0x0000000102b80000
                      size 0x00000000000004f0
                    offset 45613056
                     align 2^3 (8)
                    reloff 0
                    nreloc 0
                     flags 0x0000000a
                 reserved1 0
                 reserved2 0
                Section
                  sectname __const
                   segname __DATA_CONST
                      addr 0x0000000102b80500
                      size 0x000000000008faf0
                    offset 45614336
                     align 2^5 (32)
                    reloff 0
                    nreloc 0
                     flags 0x00000000
                 reserved1 0
                 reserved2 0
                Section
                  sectname __got
                   segname __DATA_CONST
                      addr 0x0000000102c0fff0
                      size 0x0000000000017ea8
                    offset 46202864
                     align 2^3 (8)
                    reloff 0
                    nreloc 0
                     flags 0x00000006
                 reserved1 11404 (index into indirect symbol table)
                 reserved2 0
                Load command 3
                      cmd LC_SEGMENT_64
                  cmdsize 792
                  segname __DATA
                   vmaddr 0x0000000102c28000
                   vmsize 0x0000000000954000
                  fileoff 46301184
                 filesize 8192000
                  maxprot 0x00000003
                 initprot 0x00000003
                   nsects 9
                    flags 0x0
                Section
                  sectname .qtversion
                   segname __DATA
                      addr 0x0000000102c28000
                      size 0x0000000000000010
                    offset 46301184
                     align 2^3 (8)
                    reloff 0
                    nreloc 0
                     flags 0x00000000
                 reserved1 0
                 reserved2 0
                Section
                  sectname __data
                   segname __DATA
                      addr 0x0000000102c28020
                      size 0x000000000070cc58
                    offset 46301216
                     align 2^5 (32)
                    reloff 0
                    nreloc 0
                     flags 0x00000000
                 reserved1 0
                 reserved2 0
                Section
                  sectname __asan_globals
                   segname __DATA
                      addr 0x0000000103334c80
                      size 0x000000000009a240
                    offset 53693568
                     align 2^4 (16)
                    reloff 0
                    nreloc 0
                     flags 0x00000000
                 reserved1 0
                 reserved2 0
                Section
                  sectname __asan_liveness
                   segname __DATA
                      addr 0x00000001033ceec0
                      size 0x0000000000026890
                    offset 54324928
                     align 2^3 (8)
                    reloff 0
                    nreloc 0
                     flags 0x00000000
                 reserved1 0
                 reserved2 0
                Section
                  sectname __thread_vars
                   segname __DATA
                      addr 0x00000001033f5750
                      size 0x00000000000001c8
                    offset 54482768
                     align 2^3 (8)
                    reloff 0
                    nreloc 0
                     flags 0x00000013
                 reserved1 0
                 reserved2 0
                Section
                  sectname __thread_data
                   segname __DATA
                      addr 0x00000001033f5918
                      size 0x000000000000000c
                    offset 54483224
                     align 2^3 (8)
                    reloff 0
                    nreloc 0
                     flags 0x00000011
                 reserved1 0
                 reserved2 0
                Section
                  sectname __thread_bss
                   segname __DATA
                      addr 0x00000001033f5928
                      size 0x00000000000006d0
                    offset 0
                     align 2^3 (8)
                    reloff 0
                    nreloc 0
                     flags 0x00000012
                 reserved1 0
                 reserved2 0
                Section
                  sectname __common
                   segname __DATA
                      addr 0x00000001033f8000
                      size 0x000000000001f520
                    offset 0
                     align 2^14 (16384)
                    reloff 0
                    nreloc 0
                     flags 0x00000001
                 reserved1 0
                 reserved2 0
                Section
                  sectname __bss
                   segname __DATA
                      addr 0x0000000103417520
                      size 0x0000000000162bc8
                    offset 0
                     align 2^5 (32)
                    reloff 0
                    nreloc 0
                     flags 0x00000001
                 reserved1 0
                 reserved2 0
                Load command 4
                      cmd LC_SEGMENT_64
                  cmdsize 72
                  segname __LINKEDIT
                   vmaddr 0x000000010357c000
                   vmsize 0x00000000011b4000
                  fileoff 54493184
                 filesize 18551088
                  maxprot 0x00000001
                 initprot 0x00000001
                   nsects 0
                    flags 0x0
                Load command 5
                      cmd LC_DYLD_CHAINED_FIXUPS
                  cmdsize 16
                  dataoff 54493184
                 datasize 1188864
                Load command 6
                      cmd LC_DYLD_EXPORTS_TRIE
                  cmdsize 16
                  dataoff 55682048
                 datasize 895280
                Load command 7
                     cmd LC_SYMTAB
                 cmdsize 24
                  symoff 56686072
                   nsyms 453549
                  stroff 64037456
                 strsize 8440448
                Load command 8
                            cmd LC_DYSYMTAB
                        cmdsize 80
                      ilocalsym 0
                      nlocalsym 430920
                     iextdefsym 430920
                     nextdefsym 20402
                      iundefsym 451322
                      nundefsym 2227
                         tocoff 0
                           ntoc 0
                      modtaboff 0
                        nmodtab 0
                   extrefsymoff 0
                    nextrefsyms 0
                 indirectsymoff 63942856
                  nindirectsyms 23649
                      extreloff 0
                        nextrel 0
                      locreloff 0
                        nlocrel 0
                Load command 9
                          cmd LC_LOAD_DYLINKER
                      cmdsize 32
                         name /usr/lib/dyld (offset 12)
                Load command 10
                     cmd LC_UUID
                 cmdsize 24
                    uuid 81B89824-45E1-3D6E-A73D-C823626314B5
                Load command 11
                      cmd LC_BUILD_VERSION
                  cmdsize 32
                 platform 1
                    minos 13.4
                      sdk 27.2
                   ntools 1
                     tool 3
                  version 27106.1
                Load command 12
                      cmd LC_SOURCE_VERSION
                  cmdsize 16
                  version 0.0
                Load command 13
                       cmd LC_MAIN
                   cmdsize 24
                  entryoff 6008484
                 stacksize 0
                Load command 14
                          cmd LC_LOAD_DYLIB
                      cmdsize 56
                         name /usr/lib/libcurl.4.dylib (offset 24)
                   time stamp 2 Thu Jan  1 01:00:02 1970
                      current version 9.0.0
                compatibility version 7.0.0
                Load command 15
                          cmd LC_LOAD_DYLIB
                      cmdsize 72
                         name @rpath/QtNetwork.framework/Versions/A/QtNetwork (offset 24)
                   time stamp 2 Thu Jan  1 01:00:02 1970
                      current version 6.12.1
                compatibility version 6.0.0
                Load command 16
                          cmd LC_LOAD_DYLIB
                      cmdsize 56
                         name /usr/lib/libiconv.2.dylib (offset 24)
                   time stamp 2 Thu Jan  1 01:00:02 1970
                      current version 7.0.0
                compatibility version 7.0.0
                Load command 17
                          cmd LC_LOAD_DYLIB
                      cmdsize 56
                         name /usr/lib/libcharset.1.dylib (offset 24)
                   time stamp 2 Thu Jan  1 01:00:02 1970
                      current version 1.0.0
                compatibility version 1.0.0
                Load command 18
                          cmd LC_LOAD_DYLIB
                      cmdsize 56
                         name /usr/lib/libSystem.B.dylib (offset 24)
                   time stamp 2 Thu Jan  1 01:00:02 1970
                      current version 1359.40.3
                compatibility version 1.0.0
                Load command 19
                          cmd LC_LOAD_DYLIB
                      cmdsize 88
                         name @rpath/QtOpenGLWidgets.framework/Versions/A/QtOpenGLWidgets (offset 24)
                   time stamp 2 Thu Jan  1 01:00:02 1970
                      current version 6.12.1
                compatibility version 6.0.0
                Load command 20
                          cmd LC_LOAD_DYLIB
                      cmdsize 72
                         name @rpath/QtOpenGL.framework/Versions/A/QtOpenGL (offset 24)
                   time stamp 2 Thu Jan  1 01:00:02 1970
                      current version 6.12.1
                compatibility version 6.0.0
                Load command 21
                          cmd LC_LOAD_DYLIB
                      cmdsize 80
                         name @rpath/QtConcurrent.framework/Versions/A/QtConcurrent (offset 24)
                   time stamp 2 Thu Jan  1 01:00:02 1970
                      current version 6.12.1
                compatibility version 6.0.0
                Load command 22
                          cmd LC_LOAD_DYLIB
                      cmdsize 64
                         name @rpath/QtSvg.framework/Versions/A/QtSvg (offset 24)
                   time stamp 2 Thu Jan  1 01:00:02 1970
                      current version 6.12.1
                compatibility version 6.0.0
                Load command 23
                          cmd LC_LOAD_DYLIB
                      cmdsize 88
                         name @rpath/QtPrintSupport.framework/Versions/A/QtPrintSupport (offset 24)
                   time stamp 2 Thu Jan  1 01:00:02 1970
                      current version 6.12.1
                compatibility version 6.0.0
                Load command 24
                          cmd LC_LOAD_DYLIB
                      cmdsize 72
                         name @rpath/QtWidgets.framework/Versions/A/QtWidgets (offset 24)
                   time stamp 2 Thu Jan  1 01:00:02 1970
                      current version 6.12.1
                compatibility version 6.0.0
                Load command 25
                          cmd LC_LOAD_DYLIB
                      cmdsize 64
                         name @rpath/QtGui.framework/Versions/A/QtGui (offset 24)
                   time stamp 2 Thu Jan  1 01:00:02 1970
                      current version 6.12.1
                compatibility version 6.0.0
                Load command 26
                          cmd LC_LOAD_DYLIB
                      cmdsize 88
                         name /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit (offset 24)
                   time stamp 2 Thu Jan  1 01:00:02 1970
                      current version 2775.20.133
                compatibility version 45.0.0
                Load command 27
                          cmd LC_LOAD_DYLIB
                      cmdsize 88
                         name /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (offset 24)
                   time stamp 2 Thu Jan  1 01:00:02 1970
                      current version 1.0.0
                compatibility version 1.0.0
                Load command 28
                          cmd LC_LOAD_DYLIB
                      cmdsize 88
                         name /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO (offset 24)
                   time stamp 2 Thu Jan  1 01:00:02 1970
                      current version 1.0.0
                compatibility version 1.0.0
                Load command 29
                          cmd LC_LOAD_DYLIB
                      cmdsize 88
                         name /System/Library/Frameworks/Metal.framework/Versions/A/Metal (offset 24)
                   time stamp 2 Thu Jan  1 01:00:02 1970
                      current version 383.1.0
                compatibility version 1.0.0
                Load command 30
                          cmd LC_LOAD_DYLIB
                      cmdsize 72
                         name @rpath/QtCore.framework/Versions/A/QtCore (offset 24)
                   time stamp 2 Thu Jan  1 01:00:02 1970
                      current version 6.12.1
                compatibility version 6.0.0
                Load command 31
                          cmd LC_LOAD_DYLIB
                      cmdsize 88
                         name /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit (offset 24)
                   time stamp 2 Thu Jan  1 01:00:02 1970
                      current version 275.0.0
                compatibility version 1.0.0
                Load command 32
                          cmd LC_LOAD_DYLIB
                      cmdsize 104
                         name /System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration (offset 24)
                   time stamp 2 Thu Jan  1 01:00:02 1970
                      current version 1.0.0
                compatibility version 1.0.0
                Load command 33
                          cmd LC_LOAD_DYLIB
                      cmdsize 120
                         name /System/Library/Frameworks/UniformTypeIdentifiers.framework/Versions/A/UniformTypeIdentifiers (offset 24)
                   time stamp 2 Thu Jan  1 01:00:02 1970
                      current version 709.0.0
                compatibility version 1.0.0
                Load command 34
                          cmd LC_LOAD_DYLIB
                      cmdsize 112
                         name /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (offset 24)
                   time stamp 2 Thu Jan  1 01:00:02 1970
                      current version 66.0.0
                compatibility version 1.0.0
                Load command 35
                          cmd LC_LOAD_DYLIB
                      cmdsize 56
                         name /usr/lib/libcups.2.dylib (offset 24)
                   time stamp 2 Thu Jan  1 01:00:02 1970
                      current version 2.14.0
                compatibility version 2.0.0
                Load command 36
                          cmd LC_LOAD_DYLIB
                      cmdsize 56
                         name /usr/local/lib/libomp.dylib (offset 24)
                   time stamp 2 Thu Jan  1 01:00:02 1970
                      current version 5.0.0
                compatibility version 5.0.0
                Load command 37
                          cmd LC_LOAD_DYLIB
                      cmdsize 48
                         name /usr/lib/libc++.1.dylib (offset 24)
                   time stamp 2 Thu Jan  1 01:00:02 1970
                      current version 2200.32.0
                compatibility version 1.0.0
                Load command 38
                          cmd LC_LOAD_DYLIB
                      cmdsize 72
                         name @rpath/libclang_rt.asan_osx_dynamic.dylib (offset 24)
                   time stamp 2 Thu Jan  1 01:00:02 1970
                      current version 0.0.0
                compatibility version 0.0.0
                Load command 39
                          cmd LC_RPATH
                      cmdsize 48
                         path @executable_path/../Frameworks (offset 12)
                Load command 40
                          cmd LC_RPATH
                      cmdsize 32
                         path /usr/local/lib (offset 12)
                Load command 41
                          cmd LC_RPATH
                      cmdsize 40
                         path /opt/Qt/6.12.1/macos/lib (offset 12)
                Load command 42
                          cmd LC_RPATH
                      cmdsize 32
                         path @executable_path (offset 12)
                Load command 43
                          cmd LC_RPATH
                      cmdsize 120
                         path /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/21/lib/darwin (offset 12)
                Load command 44
                      cmd LC_FUNCTION_STARTS
                  cmdsize 16
                  dataoff 56577328
                 datasize 108744
                Load command 45
                      cmd LC_DATA_IN_CODE
                  cmdsize 16
                  dataoff 56686072
                 datasize 0
                Load command 46
                      cmd LC_CODE_SIGNATURE
                  cmdsize 16
                  dataoff 72477904
                 datasize 566368
                

                Is that what you wanted?

                Now I do have this in my CMake file:

                if(APPLE)
                    set_target_properties(DeepSkyStacker PROPERTIES
                        MACOSX_BUNDLE ON
                        MACOSX_BUNDLE_BUNDLE_NAME "DeepSkyStacker"
                        MACOSX_BUNDLE_ICON_FILE "DeepSkyStacker.icns"
                        MACOSX_BUNDLE_GUI_IDENTIFIER "com.github.deepskystacker.deepskystacker"
                        MACOSX_BUNDLE_COPYRIGHT "Copyright © 2018-2026, David C. Partridge; Copyright © 2006-2019, Luc Coiffier"
                		MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/MacOSXBundleInfo.plist.in"
                        INSTALL_RPATH "@executable_path/../Frameworks"
                )
                endif()
                

                Should that INSTALL_RPATH only be specified for Release builds and omitted for Debug builds? Or is that correct?

                Thanks, David

                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
                • Unsolved