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. QNetworkAccessManager::NetworkAccessibility contains different value after macdeployqt
Forum Updated to NodeBB v4.3 + New Features

QNetworkAccessManager::NetworkAccessibility contains different value after macdeployqt

Scheduled Pinned Locked Moved General and Desktop
13 Posts 2 Posters 3.2k 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.
  • M Offline
    M Offline
    mark_in_gr
    wrote on last edited by
    #4

    I found this link pertaining to the patch you mentioned: https://qt.gitorious.org/qt/qttools/commit/33b79808bdce641a06b4cc8e4f1aa6e332742bf3

    I am assuming that "manually deploying" requires more than just a copy of the plugins directory. Is that correct?

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mark_in_gr
      wrote on last edited by
      #5

      I think I found the thread with the solution: http://qt-project.org/forums/viewthread/26887

      The one thing that is a bit unclear yet is pertaining to this statement in the thread:
      [quote]it worked…. i copied the contents of bearer into Plugin and changed the path using install_name_tool -change command . Thanks you !![/quote]

      How do you use "install_name_tool -change for a plugin? I have only used this for a Framework.

      1 Reply Last reply
      0
      • M Offline
        M Offline
        mark_in_gr
        wrote on last edited by
        #6

        I tried the following after copying the /usr/local/Qt-5.2.1/plugins/bearer directory to myApp.app/Contents/Plugins, but it still didn't fix the problem.

        [code]
        install_name_tool -id @executable_path/../Plugins/bearer/libqcorewlanbearer.dylib "myApp.app"/Contents/Plugins/bearer/libqcorewlanbearer.dylib

        install_name_tool -change /usr/local/Qt-5.3.1/plugins/bearer/libqcorewlanbearer.dylib @executable_path/../Plugins/bearer/libqcorewlanbearer.dylib "myApp.app/Contents/MacOS/myApp"

        install_name_tool -id @executable_path/../Plugins/bearer/libqgenericbearer.dylib "myApp.app"/Contents/Plugins/bearer/libqgenericbearer.dylib

        install_name_tool -change /usr/local/Qt-5.3.1/plugins/bearer/libqgenericbearer.dylib @executable_path/../Plugins/bearer/libqgenericbearer.dylib "myApp.app/Contents/MacOS/myApp"
        [/code]

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

          You call it the same in on the dylib file.

          However you can also clone the qttool repository and build macdeployqt yourself

          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
          • M Offline
            M Offline
            mark_in_gr
            wrote on last edited by
            #8

            I guess I don't understand what's wrong with the "install_name" statements in my prior post. Shouldn't that direct the app to where the plugins are found?

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

              To see how it should look like, run otool -L on another plugin. You only have to update the paths to the Qt libraries

              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
              • M Offline
                M Offline
                mark_in_gr
                wrote on last edited by
                #10

                I think I'm beginning to understand a bit better. My app uses SQLite. So, if I run otool -L ../PlugIns/sqldrivers/libqsqlite.dylib, I see the following output:

                [quote]libqsqlite.dylib (compatibility version 0.0.0, current version 0.0.0)
                @executable_path/../Frameworks/QtSql.framework/Versions/5/QtSql (compatibility version 5.3.0, current version 5.3.1)
                @executable_path/../Frameworks/QtCore.framework/Versions/5/QtCore (compatibility version 5.3.0, current version 5.3.1)
                /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0)
                /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)[/quote]

                Whereas if I run otool on libqgenericbearer.dylib in the manually copied "bearer" PlugIns directory, I see the following output:

                [quote]libqgenericbearer.dylib (compatibility version 0.0.0, current version 0.0.0)
                /usr/local/Qt-5.3.1/lib/QtNetwork.framework/Versions/5/QtNetwork (compatibility version 5.3.0, current version 5.3.1)
                /usr/local/Qt-5.3.1/lib/QtCore.framework/Versions/5/QtCore (compatibility version 5.3.0, current version 5.3.1)
                /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0)
                /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)[/quote]

                This verifies that the manually copied bearer plugins are still pointing to the local filesystem shared libraries.

                So I am assuming that for the install_name_tool commands for the two bearer plugins, the old and new would be the /usr/local/... and @executable_path/... and the file would be the actually bearer dylib instead of my application's executable binary.

                Something like this(if I execute it from the PlugIns/bearer directory in my .app file)?

                install_name_tool -change /usr/local/Qt-5.3.1/lib/QtNetwork.framework/Versions/5/QtNetwork @executable_path/../Frameworks/QtNetwork.framework/Versions/5/QtNetwork ../libqcorewlanbearer.dylib

                I would have to do this for QtCore as well for both the libqcorewlanbearer.dylib and libqgenericbearer.dylib plugins.

                Do you concur with this?

                1 Reply Last reply
                0
                • M Offline
                  M Offline
                  mark_in_gr
                  wrote on last edited by
                  #11

                  I think I am still missing a step. It sounds like I have to run install_name_tool -id before install_name_tool -change, but I don't quite understand the sequence.

                  I have used these commands in the past to do things like change @rpath to @executable_path. But how do you change the path of a certain .dylib's shared .dylibs?

                  1 Reply Last reply
                  0
                  • M Offline
                    M Offline
                    mark_in_gr
                    wrote on last edited by
                    #12

                    I was finally able to get this to work with the following commands:

                    install_name_tool -change /usr/local/Qt-5.3.1/lib/QtNetwork.framework/Versions/5/QtNetwork @executable_path/../Frameworks/QtNetwork.framework/Versions/5/QtNetwork libqcorewlanbearer.dylib

                    install_name_tool -change /usr/local/Qt-5.3.1/lib/QtCore.framework/Versions/5/QtCore @executable_path/../Frameworks/QtCore.framework/Versions/5/QtCore libqcorewlanbearer.dylib

                    install_name_tool -change /usr/local/Qt-5.3.1/lib/QtNetwork.framework/Versions/5/QtNetwork @executable_path/../Frameworks/QtNetwork.framework/Versions/5/QtNetwork libqgenericbearer.dylib

                    install_name_tool -change /usr/local/Qt-5.3.1/lib/QtCore.framework/Versions/5/QtCore @executable_path/../Frameworks/QtCore.framework/Versions/5/QtCore libqgenericbearer.dylib

                    Thank you for the help.

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

                      Very good !

                      You're welcome !

                      Now that you have it working, please update the thread title prepending [solved] so other forum users may know a solution has been found :)

                      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

                      • Login

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