Skip to content

Comments

libqglviewer: fix on darwin + add to qt6Packages#348549

Merged
GaetanLepage merged 3 commits intoNixOS:masterfrom
nim65s:qt6-libqglviewer
Feb 14, 2025
Merged

libqglviewer: fix on darwin + add to qt6Packages#348549
GaetanLepage merged 3 commits intoNixOS:masterfrom
nim65s:qt6-libqglviewer

Conversation

@nim65s
Copy link
Contributor

@nim65s nim65s commented Oct 14, 2024

Fix #348484, clean things a bit, and provide Qt6 version

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@nim65s

This comment was marked as outdated.

@ofborg ofborg bot added the 6.topic: darwin Running or building packages on Darwin label Oct 14, 2024
@nim65s

This comment was marked as outdated.

@ofborg ofborg bot added 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels Oct 14, 2024
@nim65s nim65s force-pushed the qt6-libqglviewer branch 2 times, most recently from 19fd3cb to 8e906b3 Compare October 14, 2024 18:21
@nim65s nim65s marked this pull request as ready for review October 14, 2024 19:04
@nim65s
Copy link
Contributor Author

nim65s commented Oct 14, 2024

Tested GUI on https://github.com/sofa-framework/sofa/, linux & darwin: snake simulation runs fine.

nim65s added a commit to nim65s/sofa that referenced this pull request Oct 16, 2024
This require fixes in upstream nixpkgs:
NixOS/nixpkgs#348549

So we can use the source of that PR for now
nim65s added a commit to nim65s/sofa that referenced this pull request Nov 19, 2024
This require fixes in upstream nixpkgs:
NixOS/nixpkgs#348549

So we can use the source of that PR for now
@nim65s
Copy link
Contributor Author

nim65s commented Dec 2, 2024

Hi @NixOS/darwin-core,
Could someone check this PR ?
I know nothing about the framework concept in darwin

Edit: should I mention darwin-maintainers instead ? the group has no description, so I'm unsure

@reckenrode
Copy link
Contributor

Specifying individual Darwin frameworks is no longer necessary as of 24.11. By default, Darwin provides an SDK with all that you should need. If your package needs a newer version, you can add that SDK as a package. See https://nixos.org/manual/nixpkgs/stable/#sec-darwin for details.

hugtalbot added a commit to sofa-framework/sofa that referenced this pull request Dec 4, 2024
* [Nix] initial packaging & flake

* [Nix] setup CI

* [CMake] FindQGLViewer: fix include dir computation

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

* [Nix] fix build on macos

This require fixes in upstream nixpkgs:
NixOS/nixpkgs#348549

So we can use the source of that PR for now

* [CMake] FindQGLViewer: fix for Qt6

ref. https://github.com/GillesDebunne/libQGLViewer/blob/ba9a875784afbb7ee73088fe0e8701c31bc7277d/QGLViewer/QGLViewer.pro#L176

* [Nix] Qt5 -> Qt6

* [CMake] fix typo for Qt6

* [CMake] fix SOFA_GUI_QT_HAVE_QT6 definition

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

* [Nix] fixup lib path on Darwin

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

* [Nix] CI on macos too

* nix: add nixGL

* [Nix] fix package description

Co-authored-by: Hugo <[email protected]>

* Apply suggestions from code review

---------

Co-authored-by: Hugo <[email protected]>
@wegank wegank added the 2.status: merge conflict This PR has merge conflicts with the target branch label Dec 31, 2024
@ofborg ofborg bot removed the 2.status: merge conflict This PR has merge conflicts with the target branch label Jan 27, 2025
@nim65s

This comment was marked as outdated.

bakpaul pushed a commit to sofa-framework/Sofa.Qt that referenced this pull request Feb 3, 2025
* [Nix] initial packaging & flake

* [Nix] setup CI

* [CMake] FindQGLViewer: fix include dir computation

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

* [Nix] fix build on macos

This require fixes in upstream nixpkgs:
NixOS/nixpkgs#348549

So we can use the source of that PR for now

* [CMake] FindQGLViewer: fix for Qt6

ref. https://github.com/GillesDebunne/libQGLViewer/blob/ba9a875784afbb7ee73088fe0e8701c31bc7277d/QGLViewer/QGLViewer.pro#L176

* [Nix] Qt5 -> Qt6

* [CMake] fix typo for Qt6

* [CMake] fix SOFA_GUI_QT_HAVE_QT6 definition

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

* [Nix] fixup lib path on Darwin

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

* [Nix] CI on macos too

* nix: add nixGL

* [Nix] fix package description

Co-authored-by: Hugo <[email protected]>

* Apply suggestions from code review

---------

Co-authored-by: Hugo <[email protected]>
@nim65s

This comment was marked as resolved.

@nim65s nim65s marked this pull request as draft February 5, 2025 11:25
@nim65s
Copy link
Contributor Author

nim65s commented Feb 5, 2025

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 348549


x86_64-linux

❌ 1 package failed to build:
  • rtabmap
✅ 5 packages built:
  • g2o
  • g2o.debug
  • g2o.dev
  • kdePackages.libqglviewer (qt6Packages.libqglviewer)
  • libsForQt5.libqglviewer

aarch64-darwin

⏩ 2 packages marked as broken and skipped:
  • g2o
  • g2o.dev
✅ 2 packages built:
  • kdePackages.libqglviewer (qt6Packages.libqglviewer)
  • libsForQt5.libqglviewer

@nim65s nim65s marked this pull request as ready for review February 5, 2025 12:53
@GaetanLepage
Copy link
Contributor

Can you squash your commits please? Maybe keep one or two if necessary, but 8 feels a bit too granular for this diff.

@nim65s
Copy link
Contributor Author

nim65s commented Feb 14, 2025

done

Copy link
Contributor

@GaetanLepage GaetanLepage left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

remove use of absolute path on darwin
@GaetanLepage
Copy link
Contributor

pcl issues addressed in #382027.

@GaetanLepage
Copy link
Contributor

GaetanLepage commented Feb 14, 2025

Anyway, @SuperSandro2000 's review is blocking the merge, so I'll let him press the button.

@GaetanLepage
Copy link
Contributor

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 348549


x86_64-linux

⏩ 1 package marked as broken and skipped:
  • rtabmap
✅ 5 packages built:
  • g2o
  • g2o.debug
  • g2o.dev
  • kdePackages.libqglviewer (qt6Packages.libqglviewer)
  • libsForQt5.libqglviewer (plasma5Packages.libqglviewer)

aarch64-linux

⏩ 1 package marked as broken and skipped:
  • rtabmap
✅ 5 packages built:
  • g2o
  • g2o.debug
  • g2o.dev
  • kdePackages.libqglviewer (qt6Packages.libqglviewer)
  • libsForQt5.libqglviewer (plasma5Packages.libqglviewer)

x86_64-darwin

⏩ 2 packages marked as broken and skipped:
  • g2o
  • g2o.dev
✅ 2 packages built:
  • kdePackages.libqglviewer (qt6Packages.libqglviewer)
  • libsForQt5.libqglviewer (plasma5Packages.libqglviewer)

aarch64-darwin

⏩ 2 packages marked as broken and skipped:
  • g2o
  • g2o.dev
✅ 2 packages built:
  • kdePackages.libqglviewer (qt6Packages.libqglviewer)
  • libsForQt5.libqglviewer (plasma5Packages.libqglviewer)

@GaetanLepage GaetanLepage dismissed SuperSandro2000’s stale review February 14, 2025 23:52

Feedback has been addressed.

@GaetanLepage GaetanLepage merged commit 5757120 into NixOS:master Feb 14, 2025
26 of 27 checks passed
@nim65s nim65s deleted the qt6-libqglviewer branch February 15, 2025 00:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: darwin Running or building packages on Darwin 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Build failure: libsForQt5.libqglviewer on aarch64-darwin

6 participants