Skip to content
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

[email protected]_py312_qt6: freecad command runtime issue with both macos & gnu+linux installs #666

Open
ipatch opened this issue Jan 2, 2025 · 5 comments
Assignees

Comments

@ipatch
Copy link
Collaborator

ipatch commented Jan 2, 2025

i'm getting the below error when launch the freecad command from the symlink provided by the post install step when launching / running freecad after installing the [email protected]_py312_qt6.rb formula, on both macos and gnu+linux,

macos

╰─λ freecad                                                                                                             0 (0.017s)
FreeCAD 1.0.0, Libs: 1.0.0RUnknown
(C) 2001-2024 FreeCAD contributors
FreeCAD is free and open-source software licensed under the terms of LGPL2+ license.

(qt.qpa.plugin) Could not find the Qt platform plugin "cocoa" in ""
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

fish: Job 1, 'freecad' terminated by signal SIGABRT (Abort)

gnu+linux

FreeCAD 1.0.0, Libs: 1.0.0RUnknown
(C) 2001-2024 FreeCAD contributors
FreeCAD is free and open-source software licensed under the terms of LGPL2+ license.

(qt.qpa.plugin) From 6.5.0, xcb-cursor0 or libxcb-cursor0 is needed to load the Qt xcb platform plugin.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: minimalegl, eglfs, offscreen, wayland, linuxfb, vkkhrdisplay, minimal, wayland-egl, xcb, vnc.

fish: Job 1, 'freecad' terminated by signal SIGABRT (Abort)
@ipatch
Copy link
Collaborator Author

ipatch commented Jan 2, 2025

the current workaround for macos,

export QT_QPA_PLATFORM_PLUGIN_PATH=$(brew --prefix)/opt/qt/share/qt/plugins/platforms freecad

@ipatch ipatch self-assigned this Jan 2, 2025
@ipatch
Copy link
Collaborator Author

ipatch commented Jan 2, 2025

a little follow-up with this issue concerning gnu+linux install,

╭─capin at rogue in /opt/code/dots (dev.evergreen ✔)
╰─λ QT_QPA_PLATFORM_PLUGIN_PATH=$bp/opt/qt/share/qt/plugins/platforms freecad
FreeCAD 1.0.0, Libs: 1.0.0RUnknown
(C) 2001-2024 FreeCAD contributors
FreeCAD is free and open-source software licensed under the terms of LGPL2+ license.

QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled
QOpenGLWidget is not supported on this platform.
QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled
QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled
QRhiGles2: Failed to create temporary context
QXcbIntegration: Cannot create platform offscreen surface, neither GLX nor EGL are enabled
QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled
QRhiGles2: Failed to create context
Failed to create QRhi for QBackingStoreRhiSupport
QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled
QOpenGLWidget: Failed to create context

using the same workaround as macos the above output is provided, and no gui is shown on a gnu+linux install.

@ipatch
Copy link
Collaborator Author

ipatch commented Jan 10, 2025

pretty sure this issue is happening due to the qt v6 installation provided by the upstream homebrew-core bottle of qt v6.

https://github.com/orgs/Homebrew/discussions/5860

@ipatch
Copy link
Collaborator Author

ipatch commented Jan 10, 2025

and some troubleshooting ouput on macos,

╭─chris ssh mac-mini-fpa in /Users/chris/code/freecad-git/hbfc ([email protected]_py312_qt6-updates ✚1)
╰─λ qmake -query QT_INSTALL_PREFIX                                                                                      0 (0.628s)
/opt/homebrew
╭─chris ssh mac-mini-fpa in /Users/chris/code/freecad-git/hbfc ([email protected]_py312_qt6-updates ✚1)
╰─λ qmake -query QT_INSTALL_PLUGINS                                                                                     0 (0.061s)
/opt/homebrew/share/qt/plugins
╭─chris ssh mac-mini-fpa in /Users/chris/code/freecad-git/hbfc ([email protected]_py312_qt6-updates ✚1)
╰─λ $bp/opt/qt5/bin/qmake -query QT_INSTALL_PLUGINS                                                                     0 (0.046s)
/Users/chris/homebrew/Cellar/qt@5/5.15.16/plugins
╭─chris ssh mac-mini-fpa in /Users/chris/code/freecad-git/hbfc ([email protected]_py312_qt6-updates ✚1)
╰─λ l $bp/opt/qt5/plugins/^C                                                                                            0 (0.046s)
╭─chris ssh mac-mini-fpa in /Users/chris/code/freecad-git/hbfc ([email protected]_py312_qt6-updates ✚1)
╰─λ echo $($bp/opt/qt5/bin/qmake -query QT_INSTALL_PLUGINS)/platforms                                                   0 (0.046s)
/Users/chris/homebrew/Cellar/qt@5/5.15.16/plugins/platforms
╭─chris ssh mac-mini-fpa in /Users/chris/code/freecad-git/hbfc ([email protected]_py312_qt6-updates ✚1)
╰─λ l $($bp/opt/qt5/bin/qmake -query QT_INSTALL_PLUGINS)/platforms                                                      0 (0.048s)
total 4480
drwxr-xr-x   6 chris  staff   192B Nov 18 17:42 ./
drwxr-xr-x  31 chris  staff   992B Nov 13 03:22 ../
-rwxr-xr-x   1 chris  staff   1.0M Nov 18 17:42 libqcocoa.dylib*
-rwxr-xr-x   1 chris  staff   229K Nov 18 17:42 libqminimal.dylib*
-rwxr-xr-x   1 chris  staff   259K Nov 18 17:42 libqoffscreen.dylib*
-rwxr-xr-x   1 chris  staff   705K Nov 18 17:42 libqwebgl.dylib*
╭─chris ssh mac-mini-fpa in /Users/chris/code/freecad-git/hbfc ([email protected]_py312_qt6-updates ✚1)
╰─λ l $($bp/opt/qt6/bin/qmake -query QT_INSTALL_PLUGINS)/platforms                                                      0 (0.057s)
ls: /opt/homebrew/share/qt/plugins/platforms: No such file or directory
╭─chris ssh mac-mini-fpa in /Users/chris/code/freecad-git/hbfc ([email protected]_py312_qt6-updates ✚1)
╰─λ qmake -query QT_INSTALL_PLUGINS                                                                                     1 (0.040s)
/opt/homebrew/share/qt/plugins
╭─chris ssh mac-mini-fpa in /Users/chris/code/freecad-git/hbfc ([email protected]_py312_qt6-updates ✚1)
╰─λ l $bp/opt/qt5/plugins/platforms/libq^C                                                                              0 (0.044s)
╭─chris ssh mac-mini-fpa in /Users/chris/code/freecad-git/hbfc ([email protected]_py312_qt6-updates ✚1)
╰─λ l $bp/opt/qt6/share/qt/plugins/platforms/                                                                           0 (0.044s)
total 2632
drwxr-xr-x   5 chris  staff   160B Nov 18 17:43 ./
drwxr-xr-x  29 chris  staff   928B Sep 20 00:27 ../
-rwxr-xr-x   1 chris  staff   1.0M Sep 20 00:27 libqcocoa.dylib*
-rwxr-xr-x   1 chris  staff   106K Nov 18 17:43 libqminimal.dylib*
-rwxr-xr-x   1 chris  staff   136K Sep 20 00:27 libqoffscreen.dylib*

@ipatch
Copy link
Collaborator Author

ipatch commented Jan 10, 2025

i just installed [email protected]_py312_qt6 on my extra macbook pro and logged in via rdp and am able to launch and run freecad, can confirm that this issue is likely due to the way a non standard $(brew --prefix) works with the qt version 6 installation of homebrew, which will require changes to the upstream qt.rb formula

below are some images of me using freecad via rdp on the ubuntu 22.04 box with homebrew setup in the default prefix /home/linuxbrew/.linuxbrew


image


image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant