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. @rpath is empty and libs are not found OSX
Forum Updated to NodeBB v4.3 + New Features

@rpath is empty and libs are not found OSX

Scheduled Pinned Locked Moved Solved Installation and Deployment
5 Posts 3 Posters 1.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
    chips and fish
    wrote on last edited by chips and fish
    #1

    after succesful compilation, running completed app fails

    Library not loaded: @rpath/QtPrintSupport.framework/Versions/5/QtPrintSupport
    

    seemingly rpath is an unknown

    otool -l myapp.app/Contents/MacOS/myapp | grep -A2 LC_RPATH
    

    gives an empty response

    so seemingly qt libraries are not usefully linked by app.

    using

    QMAKE_LFLAGS += -Wl,-rpath,@executable_path/../Frameworks
    

    doesnt help, again opening fails as lib not found
    as the deps are not in that location, rather they are in
    Users/User/Qt5.7.0/5.7/clang_64/lib/QtWidgets.framework/Versions/5/QtWidgets

    ..
    osx 10.10.5
    qtcreator 5.7.0

    P 1 Reply Last reply
    0
    • C chips and fish

      after succesful compilation, running completed app fails

      Library not loaded: @rpath/QtPrintSupport.framework/Versions/5/QtPrintSupport
      

      seemingly rpath is an unknown

      otool -l myapp.app/Contents/MacOS/myapp | grep -A2 LC_RPATH
      

      gives an empty response

      so seemingly qt libraries are not usefully linked by app.

      using

      QMAKE_LFLAGS += -Wl,-rpath,@executable_path/../Frameworks
      

      doesnt help, again opening fails as lib not found
      as the deps are not in that location, rather they are in
      Users/User/Qt5.7.0/5.7/clang_64/lib/QtWidgets.framework/Versions/5/QtWidgets

      ..
      osx 10.10.5
      qtcreator 5.7.0

      P Offline
      P Offline
      PSI_lbc
      wrote on last edited by
      #2

      @chips-and-fish

      Probably a dumb question..

      Have you used macdeployqt to move the Frameworks used by your app into the My.app bundle?

      If you did, the

      @executable_path/../Frameworks
      

      should then point to the location they would be at run-time.

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

        Hi,

        It's otool -l with lowercase L and you should call it on your executable not your bundle.

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        C 1 Reply Last reply
        0
        • SGaistS SGaist

          Hi,

          It's otool -l with lowercase L and you should call it on your executable not your bundle.

          C Offline
          C Offline
          chips and fish
          wrote on last edited by
          #4

          @SGaist said in @rpath is empty and libs are not found OSX:

          Hi,

          It's otool -l with lowercase L and you should call it on your executable not your bundle.

          haha yes, typos on my part. i've fixed the post above thanks

          1 Reply Last reply
          0
          • P PSI_lbc

            @chips-and-fish

            Probably a dumb question..

            Have you used macdeployqt to move the Frameworks used by your app into the My.app bundle?

            If you did, the

            @executable_path/../Frameworks
            

            should then point to the location they would be at run-time.

            C Offline
            C Offline
            chips and fish
            wrote on last edited by
            #5

            @PSI_lbc said in @rpath is empty and libs are not found OSX:

            @chips-and-fish

            Probably a dumb question..

            Have you used macdeployqt to move the Frameworks used by your app into the My.app bundle?

            If you did, the

            @executable_path/../Frameworks
            

            should then point to the location they would be at run-time.

            cool thanks,
            running macdeployqt does result in a working app.

            i guess then the only way to avoid this is to build qtcreator myself with the "-no-rpath-" switch

            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