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. Error no file at “/usr/lib/<libs>” when executing macdeployqt

Error no file at “/usr/lib/<libs>” when executing macdeployqt

Scheduled Pinned Locked Moved Unsolved General and Desktop
mac osdeploy
11 Posts 3 Posters 4.8k Views
  • 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.
  • R Offline
    R Offline
    Rondog
    wrote on 11 Aug 2016, 12:39 last edited by Rondog 8 Nov 2016, 12:43
    #2

    I ran into this problem as well. The location '/usr/lib' is treated in a special way. Anything that starts with this path is excluded automatically.

    I install my copy of Qt in '/usr/lib/qt5/...'. It is probably not the right place for OSX but it is a left-over from where I usually install Qt in GNU/Linux. I found this path causes problems for macdeployqt as it won't use anything that starts with this path.

    The reason they exclude this path is so that parts of the OS don't get included with your app. Some dependencies should be excluded as these are always provided by the OS.

    My work around (solution) was to modify the source code for macdeployqt and add an exception to the excluded path for '/usr/lib/qt5'.

    There are command line options that might help. I did look at these and they didn't work in my case but they might solve your problem.

    1 Reply Last reply
    0
    • A Offline
      A Offline
      Amott
      wrote on 11 Aug 2016, 14:52 last edited by
      #3

      Hi Rondog, thanks for your response

      I have try to create a copy into /usr/lib/ but it says that the operation is not permitted. Since OSX 10.11, it is not possible to write on this directory.

      The thing is I am trying to relink my dependense with install_name_tool but it seems that it's not working.

      I will take a look on the source code of macdeployqt

      1 Reply Last reply
      0
      • S Offline
        S Offline
        SGaist
        Lifetime Qt Champion
        wrote on 11 Aug 2016, 21:19 last edited by
        #4

        Hi,

        You calls are indeed wrong. Don't put ../build/debug/ in your path. It won't be valid at all once you move the bundle around.

        While having these libs in Contents/tx is wrong from a bundle point of view, if you put these libs there then the @executable_path/../tx/libname.tx path is correct because @executable_path will be something/Contents/MacOS/.

        What I would correct is the libTD path to also point to the folder were they are located.

        Note that if you have to pass the original path you want to modify to install_name_tool -change

        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
        • A Offline
          A Offline
          Amott
          wrote on 12 Aug 2016, 07:50 last edited by Amott 8 Dec 2016, 08:00
          #5

          The thing is if I remove ../build/debug on the first or third call of install_name_tool, it tells me that there is no such file or directory for my libs.
          I wrote my script according to a thread found on ODA forum that said :

          1. Copy all required libraries to TeighaViewer.app/Contents/tx/ folder.
          2. For each library ($odalib) in tx folder perform following commands from the bin/macOsX_x64_*dll folder:
           install_name_tool -id $odalib TeighaViewer.app/Contents/tx/$odalib
           install_name_tool -change $odalib @executable_path/../tx/$odalib TeighaViewer.app/Contents/MacOS/TeighaViewer
          
          1. For each library from tx folder update dependency to each library.
          for lib in `ls TeighaViewer.app/Contents/tx`
          do
              for libdep in `ls TeighaViewer.app/Contents/tx`
              do
                   install_name_tool -change $libdep @executable_path/../tx/$libdep TeighaViewer.app/Contents/tx/$lib
              done
          done
          
          1. Run macdeployqt for application to remove absolute path from Qt dependencies macdeployqt TeighaViewer.app

          for the second step I don't perform the command from the folder they ask, should I do this or move my script into my .app folder ?

          1 Reply Last reply
          0
          • A Offline
            A Offline
            Amott
            wrote on 12 Aug 2016, 13:55 last edited by
            #6

            I have tried to move my .app to the corresponding folder, and made every steps one by one on terminal, but it still doesn't work. Now I have two hours left to try to fix this problem, after that I will finish my internship

            1 Reply Last reply
            0
            • S Offline
              S Offline
              SGaist
              Lifetime Qt Champion
              wrote on 12 Aug 2016, 14:09 last edited by SGaist 8 Dec 2016, 14:52
              #7

              Try the following:

              1. Build your app from scratch to have new bundle.
              2. Run macdeployqt on it
              3. Copy your .tx files in Contents/Frameworks
              4. Copy the dependencies of your .tx files in Contents/Frameworks
              5. Run install_name_tool -id @executable_path/../Frameworks/name_of_your.tx on all your .tx files
              6. Run install_name_tool -id @executable_path/../Frameworks/name_of_dependency.dylib on all the dependencies of your .tx files (unless I'm mistaken they are all .dylib files).
              7. Run install_name_tool -change XXX.dylib @executable_path/../Frameworks/XXX.dylib on all the .tx and their dependencies. XXX.dylib are the ones not coming from the system so the libTD_XXX libraries and libsisl etc.

              [edit] fixed example SGaist

              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
              • A Offline
                A Offline
                Amott
                wrote on 12 Aug 2016, 14:40 last edited by
                #8

                for the last call, is it install_name_tool -change XXX.dylib @executable_path/../Frameworks/XXX.tx instead of install_name_tool change XXX.dylib @executable_path/../Frameworks/XXX.dylib or something like that ? It needs at least one .tx as argument

                1 Reply Last reply
                0
                • S Offline
                  S Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on 12 Aug 2016, 14:51 last edited by
                  #9

                  No, XXX.something must be the same. The only .tx argument you need there is the name of the file you call install_name_tool on.

                  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
                  • A Offline
                    A Offline
                    Amott
                    wrote on 12 Aug 2016, 15:15 last edited by
                    #10

                    So, I made every dependence like that :

                    install_name_tool -change libTD_SpatialIndex.dylib @executable_path/../Frameworks/libTD_SpatialIndex.dylib RecomputeDimBlock.tx 
                    install_name_tool -change libTD_SpatialIndex.dylib @executable_path/../Frameworks/libTD_SpatialIndex.dylib PlotSettingsValidator.tx 
                    install_name_tool -change libsisl.dylib @executable_path/../Frameworks/libsisl.dylib PlotSettingsValidator.tx 
                    install_name_tool -change libsisl.dylib @executable_path/../Frameworks/libsisl.dylib RecomputeDimBlock.tx 
                    

                    and still got the same error :

                    ERROR: no file at "/usr/lib/libTD_Alloc.dylib"
                    ERROR: no file at "/usr/lib/libTD_DbRoot.dylib"
                    ERROR: no file at "/usr/lib/libTD_Gi.dylib"
                    ERROR: no file at "/usr/lib/libTD_Ge.dylib"
                    ERROR: no file at "/usr/lib/libTD_Root.dylib"
                    ERROR: no file at "/usr/lib/libTD_SpatialIndex.dylib"
                    ERROR: no file at "/usr/lib/libsisl.dylib"
                    

                    Maybe what I'm trying to do is not the solution of my initial problem (the app can't find .tx). Maybe the problem comes from the ODA library on this version, I don't know... It works well on Windows but it's so strange and specific on Mac, I think I'm not enough experienced to face this kind of problem, and I never touched a Mac before, so it's very hard to get used to it

                    I have 45min left, I don't think I have time to try something else, thanks for your time and your answers, for each thread I wrote !

                    1 Reply Last reply
                    0
                    • S Offline
                      S Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on 12 Aug 2016, 15:44 last edited by
                      #11

                      If you mean that macdeployqt still gives you the same error, then that's normal. We run it before modifying these libraries.

                      If you want macdeployqt to not scream at these libraries, you can change the original files and put the whole path to them with -change.

                      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

                      11/11

                      12 Aug 2016, 15:44

                      • Login

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