New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
QT Designer does not start on MacOS #4700
Comments
@pieper Could you test this? |
On local machine |
On macOS, starting QtDesigner can be done without launcher because it is properly fixed up for either the build tree or the downloaded package. That said, having a consistent interface is important to streamline the user/developer experience. There are two cases:
First, we should address (1) |
I am not able to reproduce the problem. @pieper Could you try the following and report the output. Especially the part with
For example, here is what I get on the factory:
|
Please also try if these work?
|
|
It's probably because I built with a homebrew Qt that doesn't include the designer. I'm not seeing that there's a way to install it via brew. The path exists and it has all the other qt executables but no designer. This prints when I click either of the buttons @lassoan suggested:
|
Do the "Edit UI" and "launch" buttons work well in an installed official Slicer Preview Release?
You cannot develop classic desktop applications without Qt designer, so there must be an option to install it via homebrew. Maybe it comes with Qt Creator. We could make qSlicerApplication::launchDesigner method more intelligent by also searching at typical Qt Creator install locations. |
Yes, but I get this error when I do Edit UI in the module.
Yes, I can get this |
That makes then. Since no designer was found at configuration time, the launcher settings for the build tree didn't include the We could improve the build system to always add the launcher option but when designer is missing, it could instead starts Slicer with something like this :
|
@pieper Is qtdesigner in the |
I don't think it is necessary to have the Slicer --designer shortcut to launch Qt designer in an installed package, but if we want then we can map |
Yes! This launches the right one: $ /usr/local/opt/qt5/libexec/Designer.app/Contents/MacOS/Designer |
@pieper you've worked on Qt related issues on Mac, could you have a look at this? Maybe |
Since I did But if I start slicer with this command the designer starts with all the Slicer widgets available:
I'm rebuilding from scratch now to see if the designer from homebrew is detected. |
With a fresh build and qt-creator installed
|
I'm having a very similar issue to above. When I execute
When I try to run the aforementioned |
Does Qt designer work if you run it from an installed Slicer (that you got from download.slicer.org)? |
Previously I was using 4.11 ~mid July nightly build. I just upgraded to the most recent stable release (10/2) of 4.11 and continue to have the same issues, although now when I execute the command |
Hello all. After installing Slicer-4.13 rev 29461 on my Mac. I tried Application Settings->Developer->Qt Designer -> launch button, and the designer does not launch with a Alternatively, I also tried runnning /Applications/Slicer.app/Contents/MacOS/bin/Designer/Contents/MacOS/Designer, and get the error: I don't know if this helps or not, but having a hardcoded path to a build of Qt does not seem right. |
I am facing the same issue above.Has it been resolved on the stable build for Mac |
dyld: Library not loaded: /Volumes/D/Support/qt-everywhere-build-5.15.1/lib/QtDesignerComponents.framework/Versions/5/QtDesignerComponents |
Debugging the situation with Qt Designer on macOSI am using macOS for my daily work and I desperately needed Qt Designer. Since Qt Designer doesn't work out of the box I went through some debugging to get Qt Designer working on my macOS 11.1 machine. What worksThe only way I have managed to make Qt Designer work is by completing the following steps:
The only strange thing (if I can say so) I can see is that if I run What doesn't workUsing the same launcher if I try to run Qt Designer from the GUI by either going to
Nothing happens I've tried some other options:
I hope this information will help finding a solution to make macOS version of Slicer fully functional. In the mean time, please don't kill the |
I've debugged this and found that designer has absolute paths burnt in for Qt framework:
Instead of these absolute paths, we should see relative paths. For example, Qt designer installed by Qt:
I could make the designer work manually by the following steps:
@pieper Would you be able to fix the Designer installation based on these information? |
The CMake code responsible for fixing up the designer is executable is the following: Slicer/CMake/SlicerCPackBundleFixup.cmake.in Lines 360 to 419 in 1606047
the first part generates the following command responsible for fixing up the
... that said, after manually running the command, I noticed that it fails with the following:
SolutionProblem is that the argument Running the following command allowed to find out which path should be replaced:
After replacing the
|
After inspecting the history of Slicer/DashboardScripts project (see [1]), the regression was likely introduced when transitioning from Qt 5.10 to 5.15.0 in June 2020. [1] https://github.com/Slicer/DashboardScripts/commits/master/factory-south-macos-slicer_preview_nightly.cmake Issue was identified following this process: (1) Copy relevant code from the configured "SlicerCPackBundleFixup.cmake" into a CMake script where calls to "file(COPY ..." and "execute_process" were changed to be no-op by using "message()" statements. (2) Copy first command into a bash script and attempt to execute in a standalone way. Doing so led to the following command and error message: ``` install_name_tool \ -rpath "@executable_path/Frameworks" "@loader_path/../../../../" \ -change \ /Volumes/D/Support/qt-everywhere-build-5.15.2/lib/QtCore.framework/Versions/5/QtCore \ @rpath/Frameworks/QtCore.framework/Versions/5/QtCore \ -change \ /Volumes/D/Support/qt-everywhere-build-5.15.2/lib/QtDesigner.framework/Versions/5/QtDesigner \ @rpath/Frameworks/QtDesigner.framework/Versions/5/QtDesigner \ -change \ /Volumes/D/Support/qt-everywhere-build-5.15.2/lib/QtDesignerComponents.framework/Versions/5/QtDesignerComponents \ @rpath/Frameworks/QtDesignerComponents.framework/Versions/5/QtDesignerComponents \ -change \ /Volumes/D/Support/qt-everywhere-build-5.15.2/lib/QtGui.framework/Versions/5/QtGui \ @rpath/Frameworks/QtGui.framework/Versions/5/QtGui \ -change \ /Volumes/D/Support/qt-everywhere-build-5.15.2/lib/QtNetwork.framework/Versions/5/QtNetwork \ @rpath/Frameworks/QtNetwork.framework/Versions/5/QtNetwork \ -change \ /Volumes/D/Support/qt-everywhere-build-5.15.2/lib/QtPrintSupport.framework/Versions/5/QtPrintSupport \ @rpath/Frameworks/QtPrintSupport.framework/Versions/5/QtPrintSupport \ -change \ /Volumes/D/Support/qt-everywhere-build-5.15.2/lib/QtWidgets.framework/Versions/5/QtWidgets \ @rpath/Frameworks/QtWidgets.framework/Versions/5/QtWidgets \ -change \ /Volumes/D/Support/qt-everywhere-build-5.15.2/lib/QtXml.framework/Versions/5/QtXml \ @rpath/Frameworks/QtXml.framework/Versions/5/QtXml \ "/Volumes/D/P/S-0-build/Slicer-build/_CPack_Packages/macosx-amd64/DragNDrop/Slicer-4.13.0-2021-11-09-macosx-amd64/Slicer.app//Contents/bin/Designer.app/Contents/MacOS/Designer" ``` ``` error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: no LC_RPATH load command with path: @executable_path/Frameworks found in: /Volumes/D/P/S-0-build/Slicer-build/_CPack_Packages/macosx-amd64/DragNDrop/Slicer-4.13.0-2021-11-09-macosx-amd64/Slicer.app//Contents/bin/Designer.app/Contents/MacOS/Designer (for architecture x86_64), required for specified option "-rpath @executable_path/Frameworks @loader_path/../../../../" ``` Then, running the following command allowed to identify what should be the correct rpath to be updated: ``` otool -l /Volumes/D/P/S-0-build/Slicer-build/_CPack_Packages/macosx-amd64/DragNDrop/Slicer-4.13.0-2021-11-09-macosx-amd64/Slicer.app//Contents/bin/Designer.app/Contents/MacOS/Designer | grep -A 3 LC_RPATH cmd LC_RPATH cmdsize 48 path @executable_path/../Frameworks (offset 12) Load command 29 ``` See Slicer#4700
Thank you @jcfr for fixing this and also sharing details about how to diagnose and fix such issue - we can learn a lot from it. |
After inspecting the history of Slicer/DashboardScripts project (see [1]), the regression was likely introduced when transitioning from Qt 5.10 to 5.15.0 in June 2020. [1] https://github.com/Slicer/DashboardScripts/commits/master/factory-south-macos-slicer_preview_nightly.cmake Issue was identified following this process: (1) Copy relevant code from the configured "SlicerCPackBundleFixup.cmake" into a CMake script where calls to "file(COPY ..." and "execute_process" were changed to be no-op by using "message()" statements. (2) Copy first command into a bash script and attempt to execute in a standalone way. Doing so led to the following command and error message: ``` install_name_tool \ -rpath "@executable_path/Frameworks" "@loader_path/../../../../" \ -change \ /Volumes/D/Support/qt-everywhere-build-5.15.2/lib/QtCore.framework/Versions/5/QtCore \ @rpath/Frameworks/QtCore.framework/Versions/5/QtCore \ -change \ /Volumes/D/Support/qt-everywhere-build-5.15.2/lib/QtDesigner.framework/Versions/5/QtDesigner \ @rpath/Frameworks/QtDesigner.framework/Versions/5/QtDesigner \ -change \ /Volumes/D/Support/qt-everywhere-build-5.15.2/lib/QtDesignerComponents.framework/Versions/5/QtDesignerComponents \ @rpath/Frameworks/QtDesignerComponents.framework/Versions/5/QtDesignerComponents \ -change \ /Volumes/D/Support/qt-everywhere-build-5.15.2/lib/QtGui.framework/Versions/5/QtGui \ @rpath/Frameworks/QtGui.framework/Versions/5/QtGui \ -change \ /Volumes/D/Support/qt-everywhere-build-5.15.2/lib/QtNetwork.framework/Versions/5/QtNetwork \ @rpath/Frameworks/QtNetwork.framework/Versions/5/QtNetwork \ -change \ /Volumes/D/Support/qt-everywhere-build-5.15.2/lib/QtPrintSupport.framework/Versions/5/QtPrintSupport \ @rpath/Frameworks/QtPrintSupport.framework/Versions/5/QtPrintSupport \ -change \ /Volumes/D/Support/qt-everywhere-build-5.15.2/lib/QtWidgets.framework/Versions/5/QtWidgets \ @rpath/Frameworks/QtWidgets.framework/Versions/5/QtWidgets \ -change \ /Volumes/D/Support/qt-everywhere-build-5.15.2/lib/QtXml.framework/Versions/5/QtXml \ @rpath/Frameworks/QtXml.framework/Versions/5/QtXml \ "/Volumes/D/P/S-0-build/Slicer-build/_CPack_Packages/macosx-amd64/DragNDrop/Slicer-4.13.0-2021-11-09-macosx-amd64/Slicer.app//Contents/bin/Designer.app/Contents/MacOS/Designer" ``` ``` error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: no LC_RPATH load command with path: @executable_path/Frameworks found in: /Volumes/D/P/S-0-build/Slicer-build/_CPack_Packages/macosx-amd64/DragNDrop/Slicer-4.13.0-2021-11-09-macosx-amd64/Slicer.app//Contents/bin/Designer.app/Contents/MacOS/Designer (for architecture x86_64), required for specified option "-rpath @executable_path/Frameworks @loader_path/../../../../" ``` Then, running the following command allowed to identify what should be the correct rpath to be updated: ``` otool -l /Volumes/D/P/S-0-build/Slicer-build/_CPack_Packages/macosx-amd64/DragNDrop/Slicer-4.13.0-2021-11-09-macosx-amd64/Slicer.app//Contents/bin/Designer.app/Contents/MacOS/Designer | grep -A 3 LC_RPATH cmd LC_RPATH cmdsize 48 path @executable_path/../Frameworks (offset 12) Load command 29 ``` See #4700
@ungi The problem is fixed now, please ask your students to try the Slicer Preview Release tomorrow and report back here if everything works as expected. |
Confirmed it works well in Slicer-4.13.0-2021-11-10. Thank you @jcfr! |
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
The text was updated successfully, but these errors were encountered: