Details
-
Bug
-
Resolution: Out of scope
-
P3: Somewhat important
-
None
-
6.3.2
-
None
Description
I'm using Qt as a dependency of a c++ native library that is used in .Net Framework. The integration is using P/Invoke in .Net, which probably is more or less based on dlopen: Library methods are imported via DllImport.
My app works fine on Linux and Windows. To resolve native libraries, I set the rpath where required. It is set to something like @rpath/libQt6Gui_debug.6.dylib in all the libraries and the plugins. Furthermore I set the plugin path explicitly in C++ before accessing Qt methods, and set it to the correct plugins subdirectory.
When I start the application on macOS, I get an error:
objc[75989]: Class QMacAutoReleasePoolTracker is implemented in both /System/Volumes/Data/data/bdaci01/ci-tmp-m1015Iv64c1316/Debug/NetAppTest/csharp_test/bin/libQt6Core_debug.6.3.2.dylib (0x1a3b1bcb8) and /System/Volumes/Data/data/bdaci01/ci-dst-m1015Iv64c1316/Debug/lib/libQt6Core_debug.6.3.2.dylib (0x1ab16dcb8). One of the two will be used. Which one is undefined. objc[75989]: Class QT_ROOT_LEVEL_POOL__THESE_OBJECTS_WILL_BE_RELEASED_WHEN_QAPP_GOES_OUT_OF_SCOPE is implemented in both /System/Volumes/Data/data/bdaci01/ci-tmp-m1015Iv64c1316/Debug/NetAppTest/csharp_test/bin/libQt6Core_debug.6.3.2.dylib (0x1a3b1bd30) and /System/Volumes/Data/data/bdaci01/ci-dst-m1015Iv64c1316/Debug/lib/libQt6Core_debug.6.3.2.dylib (0x1ab16dd30). One of the two will be used. Which one is undefined. objc[75989]: Class KeyValueObserver is implemented in both /System/Volumes/Data/data/bdaci01/ci-tmp-m1015Iv64c1316/Debug/NetAppTest/csharp_test/bin/libQt6Core_debug.6.3.2.dylib (0x1a3b1bd58) and /System/Volumes/Data/data/bdaci01/ci-dst-m1015Iv64c1316/Debug/lib/libQt6Core_debug.6.3.2.dylib (0x1ab16dd58). One of the two will be used. Which one is undefined. objc[75989]: Class RunLoopModeTracker is implemented in both /System/Volumes/Data/data/bdaci01/ci-tmp-m1015Iv64c1316/Debug/NetAppTest/csharp_test/bin/libQt6Core_debug.6.3.2.dylib (0x1a3b1bda8) and /System/Volumes/Data/data/bdaci01/ci-dst-m1015Iv64c1316/Debug/lib/libQt6Core_debug.6.3.2.dylib (0x1ab16dda8). One of the two will be used. Which one is undefined. BaseEnvironment::cleanupSignalHandler(): The process received signal 6, will flush buffers and exit.
There seem to be two paths searched for Qt libraries: The path inside the NetAppTest: /System/Volumes/Data/data/bdaci01/ci-tmp-m1015Iv64c1316/Debug/NetAppTest/csharp_test/bin/ (which is what I want), but also the original install target /System/Volumes/Data/data/bdaci01/ci-dst-m1015Iv64c1316/Debug/lib/ (which is not what I want).
I searched all the rpaths with otool -L. None of the library paths is pointing to the install target directory, for none of the files that I could check. I also ran grep on the files, and find the install target directory only inside binary files, so there is no config pointing to the "wrong" directory.
When I move the install target directory away temporarily, my application starts and executes correctly!
Am I doing something wrong?