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

[workflow][Nix] initial packaging & flake #5059

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

nim65s
Copy link

@nim65s nim65s commented Oct 12, 2024

Hi,

As discussed at Journées HPC INRIA in Lille, here is an initial nix package for sofa.

It also include a flake (and its lock), which is not mandatory, but ease the use of the package, with commands like

  • nix build, to compile the package in a sandbox
  • nix develop, to provide a shell with an environment containing all required dependencies to build the project in the usual CMake way
  • nix run, to start the software.

All these commands take an optional path argument, defaulting to the current working directory, but we could also build / develop / run any commit / tag / branch / fork of the project with eg. nix build github:sofa-framework/sofa(for master) or nix run github:nim65s/sofa/58ae0644d117aea880ed284f6cc0beb7e9802f96

While here, this also setup some CI for this packaging, mostly to detect early:

  • if anything new in the repo would break the nix packaging
  • if any update from a dependency in upstream nixpkgs would break sofa

But also, a nix binary cache can be set up with eg. https://www.cachix.org/, so that once a commit is build in CI, users & developers can directly use that cache instead of compiling themselves.
(it is also true in the other way: developers with write access to the cache can send their build result to it so that the CI will be instantaneous cache hit)

Here is an example of CI build log: https://github.com/nim65s/sofa/actions/runs/11306279152/job/31446709649

PS: I did not test on macos yet, so this is probably a bit early to expect it work. It at least require darwin signatures I guess, I'll try to test that this week, when I can use an apple system.


By submitting this pull request, I acknowledge that
I have read, understand, and agree SOFA Developer Certificate of Origin (DCO).


Reviewers will merge this pull-request only if

  • it builds with SUCCESS for all platforms on the CI.
  • it does not generate new warnings.
  • it does not generate new unit test failures.
  • it does not generate new scene test failures.
  • it does not break API compatibility.
  • it is more than 1 week old (or has fast-merge label).

@hugtalbot hugtalbot added pr: status to review To notify reviewers to review this pull-request pr: new feature Implement a new feature pr: highlighted in next release Highlight this contribution in the notes of the upcoming release labels Oct 14, 2024
@hugtalbot
Copy link
Contributor

Thanks a lot @nim65s for your PR, that's awesome 🙌
We'll review it this week 👓

@damienmarchal
Copy link
Contributor

Nice.

@hugtalbot hugtalbot changed the title Nix: initial packaging & flake [workflow][Nix] initial packaging & flake Oct 14, 2024
we use `#include <QGLViewer/qglviewer.h>`, so `QGLViewer_INCLUDE_DIR`
must not include `QGLViewer` component.

Also, on darwin, headers are installed in Headers dir, not include, ref:
https://github.com/GillesDebunne/libQGLViewer/blob/ba9a875784afbb7ee73088fe0e8701c31bc7277d/QGLViewer/QGLViewer.pro#L138
This require fixes in upstream nixpkgs:
NixOS/nixpkgs#348549

So we can use the source of that PR for now
without this, `lib/cmake/Sofa.GUI.Qt/Sofa.GUI.QtConfig.cmake` has:
> `set(SOFA_GUI_QT_HAVE_QT6 0)`

and therefore, in SofaPython3, `find_package(QGLViewer QUIET REQUIRED)`
is not called, and build ends up with:
> [ 98%] Linking CXX shared library ../../lib/python3/site-packages/Sofa/Gui.cpython-312-x86_64-linux-gnu.so
> […]/ld: cannot find -lQGLViewer: No such file or directory
TODO: This should be fixed in CMake instead, but I have no clue.

error was:
> dyld[61665]: Library not loaded: /nix/store/aalbn4pznxwy18ydjmb15c3y4izj8isi-sofa-24.06.00/lib/libSceneChecking.24.12.99.dylib
>   Referenced from: <8B75C775-7FE5-3755-A190-B11A3F4F6666> /nix/store/aalbn4pznxwy18ydjmb15c3y4izj8isi-sofa-24.06.00/bin/.runSofa-24.12.99-wrapped
>   Reason: tried: '/nix/store/aalbn4pznxwy18ydjmb15c3y4izj8isi-sofa-24.06.00/lib/libSceneChecking.24.12.99.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/nix/store/aalbn4pznxwy18ydjmb15c3y4izj8isi-sofa-24.06.00/lib/libSceneChecking.24.12.99.dylib' (no such file), '/nix/store/aalbn4pznxwy18ydjmb15c3y4izj8isi-sofa-24.06.00/lib/libSceneChecking.24.12.99.dylib' (no such file), '/usr/local/lib/libSceneChecking.24.12.99.dylib' (no such file), '/usr/lib/libSceneChecking.24.12.99.dylib' (no such file, not in dyld cache)
> zsh: abort      ./result/bin/runSofa
@nim65s
Copy link
Author

nim65s commented Oct 16, 2024

Updated to Qt6, and fixed on macos.

This required some fixes in upstream nixpkgs: NixOS/nixpkgs#348549, so until this is merged we have to use its source.

@@ -24,8 +24,11 @@ endif()

if (Qt6Core_FOUND)
message("${PROJECT_NAME}: will use Qt6")
sofa_find_package(Qt6 COMPONENTS Gui GuiTools Widgets WidgetsTools OpenGLWidgets REQUIRED)
set(SOFA_GUI_QT_TARETS ${SOFA_GUI_QT_TARGETS} Qt::Core Qt::Gui Qt::Widgets Qt::OpenGLWidgets )
find_package(Qt6 COMPONENTS Gui GuiTools Widgets WidgetsTools OpenGLWidgets REQUIRED)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not very familiar with Qt components. Can you give more details on the changes here? Thanks

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not familiar with those neither, but as a matter of fact, the Qt6GuiToolsConfig.cmake file does not define a Qt6::GuiTools CMake target. Therefore we can not rely on the presence of a Qt6::GuiTools CMake target to know how should we define SOFA_GUI_QT_HAVE_QT6.

But I don't know why we are looking for those CMake targets to define if SOFA_GUI_QT_HAVE_QT6 or not. My guess is that Qt6_FOUND should be enough.

@@ -0,0 +1,25 @@
{
description = "Real-time multi-physics simulation with an emphasis on medical simulation.";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hugtalbot you may want to suggest another description here

'';

meta = {
description = "Real-time multi-physics simulation with an emphasis on medical simulation";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#fetchFromGitHub,
glew,
gtest,
lib,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's this?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alxbilger
Copy link
Contributor

@nim65s The command nix build gives me this error: error: experimental Nix feature 'nix-command' is disabled; add '--extra-experimental-features nix-command' to enable it. I am not familiar enough with nix to understand what Google explains to me. What is going on? Thanks

@nim65s
Copy link
Author

nim65s commented Oct 16, 2024

flakes and the nix command are not mandatory and not perfect enough yet, so for now you can either:

  • run those commands with the extra flag: nix --extra-experimental-features "nix-command flakes" build
  • or add the line experimental-features = nix-command flakes in your ~/.config/nix/nix.conf
  • or add the line experimental-features = nix-command flakes in your /etc/nix/nix.conf and restart nix-daemon

@alxbilger
Copy link
Contributor

After a successful build, I have the following trace when running:

[INFO]    [runSofa] PluginRepository paths = /nix/store/mn6bilp3k5c238bk5g1hs67nn9cc2m27-sofa-24.06.00/plugins:/nix/store/mn6bilp3k5c238bk5g1hs67nn9cc2m27-sofa-24.06.00/collections:/nix/store/mn6bilp3k5c238bk5g1hs67nn9cc2m27-sofa-24.06.00/lib
[INFO]    [runSofa] DataRepository paths = /nix/store/mn6bilp3k5c238bk5g1hs67nn9cc2m27-sofa-24.06.00/share/sofa:/nix/store/mn6bilp3k5c238bk5g1hs67nn9cc2m27-sofa-24.06.00/share/sofa/examples:/nix/store/mn6bilp3k5c238bk5g1hs67nn9cc2m27-sofa-24.06.00/share/sofa:/nix/store/mn6bilp3k5c238bk5g1hs67nn9cc2m27-sofa-24.06.00/share/sofa/examples
[INFO]    [runSofa] GuiDataRepository paths = /nix/store/mn6bilp3k5c238bk5g1hs67nn9cc2m27-sofa-24.06.00/share/sofa/gui/runSofa:/nix/store/mn6bilp3k5c238bk5g1hs67nn9cc2m27-sofa-24.06.00/share/sofa/gui/qt
[ERROR]   [FileSystem::createdirectory()] /nix/store/mn6bilp3k5c238bk5g1hs67nn9cc2m27-sofa-24.06.00/config: Permission denied
[INFO]    [BaseGUI] Created directory: /nix/store/mn6bilp3k5c238bk5g1hs67nn9cc2m27-sofa-24.06.00/config
[ERROR]   [FileSystem::createdirectory()] /nix/store/mn6bilp3k5c238bk5g1hs67nn9cc2m27-sofa-24.06.00/screenshots: Permission denied
[INFO]    [BaseGUI] Created directory: /nix/store/mn6bilp3k5c238bk5g1hs67nn9cc2m27-sofa-24.06.00/screenshots
[INFO]    [GUIManager] Registered batch as a GUI.
[INFO]    [runSofa] Loading automatically plugin list in /nix/store/mn6bilp3k5c238bk5g1hs67nn9cc2m27-sofa-24.06.00/lib/plugin_list.conf.default
[INFO]    [PluginManager] Loaded plugin: /nix/store/mn6bilp3k5c238bk5g1hs67nn9cc2m27-sofa-24.06.00/lib/libSofa.Component.ODESolver.Forward.so
[INFO]    [PluginManager] Loaded plugin: /nix/store/mn6bilp3k5c238bk5g1hs67nn9cc2m27-sofa-24.06.00/lib/libSofa.Component.ODESolver.Backward.so
[INFO]    [PluginManager] Loaded plugin: /nix/store/mn6bilp3k5c238bk5g1hs67nn9cc2m27-sofa-24.06.00/lib/libSofa.Component.ODESolver.so
[INFO]    [PluginManager] Loaded plugin: /nix/store/mn6bilp3k5c238bk5g1hs67nn9cc2m27-sofa-24.06.00/lib/libSofa.Component.IO.Mesh.so
[INFO]    [PluginManager] Loaded plugin: /nix/store/mn6bilp3k5c238bk5g1hs67nn9cc2m27-sofa-24.06.00/lib/libSofa.Component.IO.so
[INFO]    [PluginManager] Loaded plugin: /nix/store/mn6bilp3k5c238bk5g1hs67nn9cc2m27-sofa-24.06.00/lib/libSofa.Component.Playback.so
[INFO]    [PluginManager] Loaded plugin: /nix/store/mn6bilp3k5c238bk5g1hs67nn9cc2m27-sofa-24.06.00/lib/libSofa.Component.SceneUtility.so
[INFO]    [PluginManager] Loaded plugin: /nix/store/mn6bilp3k5c238bk5g1hs67nn9cc2m27-sofa-24.06.00/lib/libSofa.Component.Topology.Container.Constant.so
[INFO]    [PluginManager] Loaded plugin: /nix/store/mn6bilp3k5c238bk5g1hs67nn9cc2m27-sofa-24.06.00/lib/libSofa.Component.Topology.Container.Dynamic.so
[INFO]    [PluginManager] Loaded plugin: /nix/store/mn6bilp3k5c238bk5g1hs67nn9cc2m27-sofa-24.06.00/lib/libSofa.Component.Topology.Container.Grid.so
[INFO]    [PluginManager] Loaded plugin: /nix/store/mn6bilp3k5c238bk5g1hs67nn9cc2m27-sofa-24.06.00/lib/libSofa.Component.Topology.Container.so
[INFO]    [PluginManager] Loaded plugin: /nix/store/mn6bilp3k5c238bk5g1hs67nn9cc2m27-sofa-24.06.00/lib/libSofa.Component.Topology.Mapping.so
[INFO]    [PluginManager] Loaded plugin: /nix/store/mn6bilp3k5c238bk5g1hs67nn9cc2m27-sofa-24.06.00/lib/libSofa.Component.Topology.Utility.so
[INFO]    [PluginManager] Loaded plugin: /nix/store/mn6bilp3k5c238bk5g1hs67nn9cc2m27-sofa-24.06.00/lib/libSofa.Component.Topology.so
[INFO]    [PluginManager] Loaded plugin: /nix/store/mn6bilp3k5c238bk5g1hs67nn9cc2m27-sofa-24.06.00/lib/libSofa.Component.Visual.so
[INFO]    [PluginManager] Loaded plugin: /nix/store/mn6bilp3k5c238bk5g1hs67nn9cc2m27-sofa-24.06.00/lib/libSofa.Component.LinearSystem.so
[INFO]    [PluginManager] Loaded plugin: /nix/store/mn6bilp3k5c238bk5g1hs67nn9cc2m27-sofa-24.06.00/lib/libSofa.Component.LinearSolver.Iterative.so
[INFO]    [PluginManager] Loaded plugin: /nix/store/mn6bilp3k5c238bk5g1hs67nn9cc2m27-sofa-24.06.00/lib/libSofa.Component.LinearSolver.Ordering.so
[INFO]    [PluginManager] Loaded plugin: /nix/store/mn6bilp3k5c238bk5g1hs67nn9cc2m27-sofa-24.06.00/lib/libSofa.Component.LinearSolver.Direct.so
[INFO]    [PluginManager] Loaded plugin: /nix/store/mn6bilp3k5c238bk5g1hs67nn9cc2m27-sofa-24.06.00/lib/libSofa.Component.LinearSolver.Preconditioner.so
[INFO]    [PluginManager] Loaded plugin: /nix/store/mn6bilp3k5c238bk5g1hs67nn9cc2m27-sofa-24.06.00/lib/libSofa.Component.LinearSolver.so
[INFO]    [PluginManager] Loaded plugin: /nix/store/mn6bilp3k5c238bk5g1hs67nn9cc2m27-sofa-24.06.00/lib/libSofa.Component.Mass.so
[INFO]    [PluginManager] Loaded plugin: /nix/store/mn6bilp3k5c238bk5g1hs67nn9cc2m27-sofa-24.06.00/lib/libSofa.Component.Diffusion.so
[INFO]    [PluginManager] Loaded plugin: /nix/store/mn6bilp3k5c238bk5g1hs67nn9cc2m27-sofa-24.06.00/lib/libSofa.Component.Mapping.Linear.so
[INFO]    [PluginManager] Loaded plugin: /nix/store/mn6bilp3k5c238bk5g1hs67nn9cc2m27-sofa-24.06.00/lib/libSofa.Component.Mapping.NonLinear.so
[INFO]    [PluginManager] Loaded plugin: /nix/store/mn6bilp3k5c238bk5g1hs67nn9cc2m27-sofa-24.06.00/lib/libSofa.Component.Mapping.MappedMatrix.so
[INFO]    [PluginManager] Loaded plugin: /nix/store/mn6bilp3k5c238bk5g1hs67nn9cc2m27-sofa-24.06.00/lib/libSofa.Component.Mapping.so
[INFO]    [PluginManager] Loaded plugin: /nix/store/mn6bilp3k5c238bk5g1hs67nn9cc2m27-sofa-24.06.00/lib/libSofa.Component.StateContainer.so
[INFO]    [PluginManager] Loaded plugin: /nix/store/mn6bilp3k5c238bk5g1hs67nn9cc2m27-sofa-24.06.00/lib/libSofa.Component.SolidMechanics.Spring.so
[INFO]    [PluginManager] Loaded plugin: /nix/store/mn6bilp3k5c238bk5g1hs67nn9cc2m27-sofa-24.06.00/lib/libSofa.Component.SolidMechanics.FEM.Elastic.so
[INFO]    [PluginManager] Loaded plugin: /nix/store/mn6bilp3k5c238bk5g1hs67nn9cc2m27-sofa-24.06.00/lib/libSofa.Component.SolidMechanics.FEM.HyperElastic.so
[INFO]    [PluginManager] Loaded plugin: /nix/store/mn6bilp3k5c238bk5g1hs67nn9cc2m27-sofa-24.06.00/lib/libSofa.Component.SolidMechanics.FEM.NonUniform.so
[INFO]    [PluginManager] Loaded plugin: /nix/store/mn6bilp3k5c238bk5g1hs67nn9cc2m27-sofa-24.06.00/lib/libSofa.Component.SolidMechanics.FEM.so
[INFO]    [PluginManager] Loaded plugin: /nix/store/mn6bilp3k5c238bk5g1hs67nn9cc2m27-sofa-24.06.00/lib/libSofa.Component.SolidMechanics.TensorMass.so
[INFO]    [PluginManager] Loaded plugin: /nix/store/mn6bilp3k5c238bk5g1hs67nn9cc2m27-sofa-24.06.00/lib/libSofa.Component.SolidMechanics.so
[INFO]    [PluginManager] Loaded plugin: /nix/store/mn6bilp3k5c238bk5g1hs67nn9cc2m27-sofa-24.06.00/lib/libSofa.Component.Constraint.Lagrangian.Model.so
[INFO]    [PluginManager] Loaded plugin: /nix/store/mn6bilp3k5c238bk5g1hs67nn9cc2m27-sofa-24.06.00/lib/libSofa.Component.Constraint.Lagrangian.Correction.so
[INFO]    [PluginManager] Loaded plugin: /nix/store/mn6bilp3k5c238bk5g1hs67nn9cc2m27-sofa-24.06.00/lib/libSofa.Component.Constraint.Lagrangian.Solver.so
[INFO]    [PluginManager] Loaded plugin: /nix/store/mn6bilp3k5c238bk5g1hs67nn9cc2m27-sofa-24.06.00/lib/libSofa.Component.Constraint.Lagrangian.so
[INFO]    [PluginManager] Loaded plugin: /nix/store/mn6bilp3k5c238bk5g1hs67nn9cc2m27-sofa-24.06.00/lib/libSofa.Component.Constraint.Projective.so
[INFO]    [PluginManager] Loaded plugin: /nix/store/mn6bilp3k5c238bk5g1hs67nn9cc2m27-sofa-24.06.00/lib/libSofa.Component.Constraint.so
[INFO]    [PluginManager] Loaded plugin: /nix/store/mn6bilp3k5c238bk5g1hs67nn9cc2m27-sofa-24.06.00/lib/libSofa.Component.AnimationLoop.so
[INFO]    [PluginManager] Loaded plugin: /nix/store/mn6bilp3k5c238bk5g1hs67nn9cc2m27-sofa-24.06.00/lib/libSofa.Component.MechanicalLoad.so
[INFO]    [PluginManager] Loaded plugin: /nix/store/mn6bilp3k5c238bk5g1hs67nn9cc2m27-sofa-24.06.00/lib/libSofa.Component.Collision.Geometry.so
[INFO]    [PluginManager] Loaded plugin: /nix/store/mn6bilp3k5c238bk5g1hs67nn9cc2m27-sofa-24.06.00/lib/libSofa.Component.Collision.Detection.Algorithm.so
[INFO]    [PluginManager] Loaded plugin: /nix/store/mn6bilp3k5c238bk5g1hs67nn9cc2m27-sofa-24.06.00/lib/libSofa.Component.Collision.Detection.Intersection.so
[INFO]    [PluginManager] Loaded plugin: /nix/store/mn6bilp3k5c238bk5g1hs67nn9cc2m27-sofa-24.06.00/lib/libSofa.Component.Collision.Detection.so
[INFO]    [PluginManager] Loaded plugin: /nix/store/mn6bilp3k5c238bk5g1hs67nn9cc2m27-sofa-24.06.00/lib/libSofa.Component.Collision.Response.Mapper.so
[INFO]    [PluginManager] Loaded plugin: /nix/store/mn6bilp3k5c238bk5g1hs67nn9cc2m27-sofa-24.06.00/lib/libSofa.Component.Collision.Response.Contact.so
[INFO]    [PluginManager] Loaded plugin: /nix/store/mn6bilp3k5c238bk5g1hs67nn9cc2m27-sofa-24.06.00/lib/libSofa.Component.Collision.Response.so
[INFO]    [PluginManager] Loaded plugin: /nix/store/mn6bilp3k5c238bk5g1hs67nn9cc2m27-sofa-24.06.00/lib/libSofa.Component.Collision.so
[INFO]    [PluginManager] Loaded plugin: /nix/store/mn6bilp3k5c238bk5g1hs67nn9cc2m27-sofa-24.06.00/lib/libSofa.Component.Setting.so
[INFO]    [PluginManager] Loaded plugin: /nix/store/mn6bilp3k5c238bk5g1hs67nn9cc2m27-sofa-24.06.00/lib/libSofa.Component.Controller.so
[INFO]    [PluginManager] Loaded plugin: /nix/store/mn6bilp3k5c238bk5g1hs67nn9cc2m27-sofa-24.06.00/lib/libSofa.Component.Engine.Analyze.so
[INFO]    [PluginManager] Loaded plugin: /nix/store/mn6bilp3k5c238bk5g1hs67nn9cc2m27-sofa-24.06.00/lib/libSofa.Component.Engine.Generate.so
[INFO]    [PluginManager] Loaded plugin: /nix/store/mn6bilp3k5c238bk5g1hs67nn9cc2m27-sofa-24.06.00/lib/libSofa.Component.Engine.Select.so
[INFO]    [PluginManager] Loaded plugin: /nix/store/mn6bilp3k5c238bk5g1hs67nn9cc2m27-sofa-24.06.00/lib/libSofa.Component.Engine.Transform.so
[INFO]    [PluginManager] Loaded plugin: /nix/store/mn6bilp3k5c238bk5g1hs67nn9cc2m27-sofa-24.06.00/lib/libSofa.Component.Engine.so
[INFO]    [PluginManager] Loaded plugin: /nix/store/mn6bilp3k5c238bk5g1hs67nn9cc2m27-sofa-24.06.00/lib/libSofa.Component.Haptics.so
[INFO]    [PluginManager] Loaded plugin: /nix/store/mn6bilp3k5c238bk5g1hs67nn9cc2m27-sofa-24.06.00/lib/libSofa.Component.so
[INFO]    [PluginManager] Loaded plugin: /nix/store/mn6bilp3k5c238bk5g1hs67nn9cc2m27-sofa-24.06.00/lib/libSofa.GL.Component.Rendering2D.so
[INFO]    [PluginManager] Loaded plugin: /nix/store/mn6bilp3k5c238bk5g1hs67nn9cc2m27-sofa-24.06.00/lib/libSofa.GL.Component.Rendering3D.so
[INFO]    [PluginManager] Loaded plugin: /nix/store/mn6bilp3k5c238bk5g1hs67nn9cc2m27-sofa-24.06.00/lib/libSofa.GL.Component.Engine.so
[INFO]    [PluginManager] Loaded plugin: /nix/store/mn6bilp3k5c238bk5g1hs67nn9cc2m27-sofa-24.06.00/lib/libSofa.GL.Component.Shader.so
[INFO]    [PluginManager] Loaded plugin: /nix/store/mn6bilp3k5c238bk5g1hs67nn9cc2m27-sofa-24.06.00/lib/libSofa.GL.Component.so
[INFO]    [PluginManager] Loaded plugin: /nix/store/mn6bilp3k5c238bk5g1hs67nn9cc2m27-sofa-24.06.00/lib/libSofa.GUI.Component.so
[INFO]    [PluginManager] Loaded plugin: /nix/store/mn6bilp3k5c238bk5g1hs67nn9cc2m27-sofa-24.06.00/lib/libSofa.GUI.Batch.so
[INFO]    [GUIManager] Registered qglviewer as a GUI.
[INFO]    [GUIManager] Registered qt as a GUI.
[INFO]    [PluginManager] Loaded plugin: /nix/store/mn6bilp3k5c238bk5g1hs67nn9cc2m27-sofa-24.06.00/lib/libSofa.GUI.Qt.so
[INFO]    [PluginManager] Loaded plugin: /nix/store/mn6bilp3k5c238bk5g1hs67nn9cc2m27-sofa-24.06.00/plugins/SceneCreator/lib/libSceneCreator.so
[INFO]    [PluginManager] Loaded plugin: /nix/store/mn6bilp3k5c238bk5g1hs67nn9cc2m27-sofa-24.06.00/plugins/ArticulatedSystemPlugin/lib/libArticulatedSystemPlugin.so
[INFO]    [PluginManager] Loaded plugin: /nix/store/mn6bilp3k5c238bk5g1hs67nn9cc2m27-sofa-24.06.00/plugins/MultiThreading/lib/libMultiThreading.so
[INFO]    [PluginManager] Loaded plugin: /nix/store/mn6bilp3k5c238bk5g1hs67nn9cc2m27-sofa-24.06.00/plugins/SofaMatrix/lib/libSofaMatrix.so
[INFO]    [PluginManager] 72 plugins have been loaded from /nix/store/mn6bilp3k5c238bk5g1hs67nn9cc2m27-sofa-24.06.00/lib/plugin_list.conf.default
[INFO]    [GUIManager] lastUsedGUI.ini not found; using default GUI.
[WARNING] [Qt] Detected locale "C" with character encoding "ANSI_X3.4-1968", which is not UTF-8.
Qt depends on a UTF-8 locale, and has switched to "C.UTF-8" instead.
If this causes problems, reconfigure your locale. See the locale(1) manual
for more information.
[WARNING] [Qt] Could not find the Qt platform plugin "wayland" in ""

(process:29694): Gtk-WARNING **: 22:14:09.328: Locale not supported by C library.
	Using the fallback 'C' locale.
Gtk-Message: 22:14:09.408: Failed to load module "canberra-gtk-module"
Gtk-Message: 22:14:09.409: Failed to load module "canberra-gtk-module"
[INFO]    [SofaPluginManager] Loading automatically plugin list in /nix/store/mn6bilp3k5c238bk5g1hs67nn9cc2m27-sofa-24.06.00/config/loadedPlugins.ini
[INFO]    [PluginManager] 0 plugins have been loaded from /nix/store/mn6bilp3k5c238bk5g1hs67nn9cc2m27-sofa-24.06.00/config/loadedPlugins.ini
[WARNING] [Qt] qglx_findConfig: Failed to finding matching FBConfig for QSurfaceFormat(version 3.2, options QFlags<QSurfaceFormat::FormatOption>(DeprecatedFunctions), depthBufferSize -1, redBufferSize 1, greenBufferSize 1, blueBufferSize 1, alphaBufferSize -1, stencilBufferSize -1, samples -1, swapBehavior QSurfaceFormat::SingleBuffer, swapInterval 0, colorSpace QColorSpace(), profile  QSurfaceFormat::CompatibilityProfile)
[WARNING] [Qt] qglx_findConfig: Failed to finding matching FBConfig for QSurfaceFormat(version 3.2, options QFlags<QSurfaceFormat::FormatOption>(DeprecatedFunctions), depthBufferSize -1, redBufferSize 1, greenBufferSize 1, blueBufferSize 1, alphaBufferSize -1, stencilBufferSize -1, samples -1, swapBehavior QSurfaceFormat::SingleBuffer, swapInterval 0, colorSpace QColorSpace(), profile  QSurfaceFormat::CompatibilityProfile)
[WARNING] [Qt] qglx_findConfig: Failed to finding matching FBConfig for QSurfaceFormat(version 3.2, options QFlags<QSurfaceFormat::FormatOption>(DeprecatedFunctions), depthBufferSize -1, redBufferSize 1, greenBufferSize 1, blueBufferSize 1, alphaBufferSize -1, stencilBufferSize -1, samples -1, swapBehavior QSurfaceFormat::SingleBuffer, swapInterval 0, colorSpace QColorSpace(), profile  QSurfaceFormat::CompatibilityProfile)
[FATAL]   [Qt] Could not initialize GLX

########## SIG 6 - SIGABRT: usually caused by an abort() or assert() ##########
  sofa::helper::BackTrace::sig(int)
  gsignal
  abort
  _Z13qErrnoWarningPKcz+0
  QOpenGLContext::create()
  QRhiGles2InitParams::newFallbackSurface(QSurfaceFormat const&)
  QBackingStoreRhiSupport::create()
  QWidgetPrivate::create()
  QWidget::create(unsigned long long, bool, bool)
  QWidgetPrivate::setVisible(bool)
  sofa::gui::qt::RealGUI::InitApplication(sofa::gui::qt::RealGUI*)
  sofa::gui::qt::RealGUI::CreateGUI(char const*, boost::intrusive_ptr<sofa::simulation::Node>, char const*)
  sofa::gui::common::GUIManager::createGUI(boost::intrusive_ptr<sofa::simulation::Node>, char const*)
  __libc_start_main
Aborted (core dumped)

@nim65s
Copy link
Author

nim65s commented Oct 17, 2024

Hum, yes, I only tested that on NixOS, sorry. I'll try on ubuntu, with x11 and wayland. I guess this is only a matter of selecting the correct QT_QPA_PLATFORM or something.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: highlighted in next release Highlight this contribution in the notes of the upcoming release pr: new feature Implement a new feature pr: status to review To notify reviewers to review this pull-request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants