Skip to content

Conversation

nim65s
Copy link
Contributor

@nim65s nim65s commented Sep 21, 2025

fix #445078

Hi,

This PR update meshlab & python3Packages.pymeshlab from 2023.12 to 2025.07, among other things to fix build with CMake v4.

It also update their dependencies (levmar, lib3mf, tinygltf, vcg, corto, and nexus) and their packaging to use standard CMake exports (ref. cnr-isti-vclab/vcglib#248)

While here, meshlab-unstable is dropped, since it was older than 2025.07, cc. @pca006132

When I started to work on this, I did not see the work from #396295 (merged only 4 days ago), so I tried to merge this work with mine, but a few things might seem odd in the history. cc. @yzx9

I tested that by opening meshlab GUI and loading a mesh (only on linux) and trying a simple mesh decimation from python (linux & darwin):

$ nix-shell -I nixpkgs=. -p 'python3.withPackages(p: [p.pymeshlab])' --command python
>>> from pymeshlab import MeshSet
>>> ms = MeshSet()
>>> ms.load_new_mesh("/…/base_link.STL")
>>> ms.meshing_decimation_quadric_edge_collapse()
>>> ms.save_current_mesh("/…/base_link2.STL")

And, yes, base_link2.STL takes less disk space than base_link.STL (a random file from example-robot-data)

Things done

  • Built on platform:
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested, as applicable:
  • Ran nixpkgs-review on this PR. See nixpkgs-review usage.
  • Tested basic functionality of all binary files, usually in ./result/bin/.
  • Nixpkgs Release Notes
    • Package update: when the change is major or breaking.
  • NixOS Release Notes
    • Module addition: when adding a new NixOS module.
    • Module update: when the change is significant.
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other READMEs.

Add a 👍 reaction to pull requests you find important.

@nim65s nim65s marked this pull request as draft September 21, 2025 22:01
@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. labels Sep 21, 2025
@nim65s
Copy link
Contributor Author

nim65s commented Sep 21, 2025

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 445078
Commit: e6a43460d3e6a1113b56d04bb7619c0b16475717


x86_64-linux

✅ 21 packages built:
  • corto
  • kicadAddons.kikit
  • kicadAddons.kikit-library
  • kikit
  • kikit.dist
  • levmar
  • lib3mf
  • lib3mf.dev
  • libigl
  • meshlab
  • openbrf
  • openmvs
  • openscad
  • openscad-unstable
  • python312Packages.pymeshlab (python313Packages.pymeshlab)
  • snis-unwrapped
  • tinygltf
  • vcg
  • vclab-nexus
  • vclab-nexus.bin
  • wings

aarch64-darwin

❌ 1 package failed to build:
  • openscad
✅ 13 packages built:
  • corto
  • levmar
  • lib3mf
  • lib3mf.dev
  • libigl
  • meshlab
  • openmvs
  • openscad-unstable
  • python312Packages.pymeshlab (python313Packages.pymeshlab)
  • tinygltf
  • vcg
  • vclab-nexus
  • vclab-nexus.bin

Openscad fail on darwin seems unrelated:

[nix-shell:~/.cache/nixpkgs-review/pr-445078-1]$ grep error logs/openscad-aarch64-darwin.log 
otool: error: '/opt/local/lib/libboost_thread*': No such file or directory
src/node.cc:107:67: error: no member named 'mem_fun' in namespace 'std'; did you mean 'mem_fn'?
1 error generated.

@nim65s nim65s marked this pull request as ready for review September 21, 2025 22:37
@nim65s nim65s force-pushed the meshlab branch 2 times, most recently from 7b28d0d to 0cf289a Compare September 21, 2025 22:46
@nix-owners nix-owners bot requested review from pca006132 and yzx9 September 21, 2025 22:52
@nixpkgs-ci nixpkgs-ci bot added 12.approvals: 1 This PR was reviewed and approved by one person. 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages. labels Sep 22, 2025
@nim65s nim65s mentioned this pull request Sep 22, 2025
13 tasks
@nim65s
Copy link
Contributor Author

nim65s commented Sep 23, 2025

part of #445447

Copy link
Member

@SuperSandro2000 SuperSandro2000 left a comment

Choose a reason for hiding this comment

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

otherwise LGTM

@yzx9
Copy link
Contributor

yzx9 commented Sep 30, 2025

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 445078
Commit: a45e831d0525f8a6f0f4038bf652c490f59fe547


x86_64-linux

✅ 21 packages built:
  • corto
  • kicadAddons.kikit
  • kicadAddons.kikit-library
  • kikit
  • kikit.dist
  • levmar
  • lib3mf
  • lib3mf.dev
  • libigl
  • meshlab
  • openbrf
  • openmvs
  • openscad
  • openscad-unstable
  • python312Packages.pymeshlab (python313Packages.pymeshlab)
  • snis-unwrapped
  • tinygltf
  • vcg
  • vclab-nexus
  • vclab-nexus.bin
  • wings

aarch64-darwin

✅ 14 packages built:
  • corto
  • levmar
  • lib3mf
  • lib3mf.dev
  • libigl
  • meshlab
  • openmvs
  • openscad
  • openscad-unstable
  • python312Packages.pymeshlab (python313Packages.pymeshlab)
  • tinygltf
  • vcg
  • vclab-nexus
  • vclab-nexus.bin

Tested with open a mesh (.obj) on aarch64-darwin

@nixpkgs-ci nixpkgs-ci bot added 12.approvals: 2 This PR was reviewed and approved by two persons. 2.status: merge conflict This PR has merge conflicts with the target branch and removed 12.approvals: 1 This PR was reviewed and approved by one person. labels Sep 30, 2025
nim65s and others added 22 commits October 13, 2025 10:05
lm.h only contains a deprecation warning now
fix meshlab on darwin:
```
[ 47%] Building CXX object src/meshlabplugins/filter_cubization/CMakeFiles/filter_cubization.dir/filter_cubization_autogen/mocs_compilation.cpp.o
In file included from /tmp/nix-build-meshlab-2025.07.drv-0/source/build/src/meshlabplugins/filter_cubization/filter_cubization_autogen/mocs_compilation.cpp:2:
In file included from /tmp/nix-build-meshlab-2025.07.drv-0/source/build/src/meshlabplugins/filter_cubization/filter_cubization_autogen/EWIEGA46WW/moc_filter_cubization.cpp:10:
In file included from /tmp/nix-build-meshlab-2025.07.drv-0/source/build/src/meshlabplugins/filter_cubization/filter_cubization_autogen/EWIEGA46WW/../../../../../../src/meshlabplugins/filter_cubization/filter_cubization.h:28:
In file included from /tmp/nix-build-meshlab-2025.07.drv-0/source/src/common/../common/plugins/interfaces/filter_plugin.h:29:
In file included from /tmp/nix-build-meshlab-2025.07.drv-0/source/src/common/../common/plugins/interfaces/../../ml_document/mesh_document.h:27:
In file included from /tmp/nix-build-meshlab-2025.07.drv-0/source/src/common/../common/plugins/interfaces/../../ml_document/mesh_model.h:26:
In file included from /nix/store/18nlfi993h20y6dd1kfg8zm9gaglwygn-glew-2.2.0-dev/include/GL/glew.h:1217:
In file included from /nix/store/rhlyld20zdzdi5wghb4b12gw52s9whr9-apple-sdk-11.3/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenGL.framework/Headers/glu.h:9:
/nix/store/zchkzj4md6q4lq09iidcm4c8n7r22k46-libigl-2.6.0/include/igl/OpenGL/gl.h:23:10: fatal error: 'glad/glad.h' file not found
   23 | #include <glad/glad.h>
      |          ^~~~~~~~~~~~~
```
- fix CMake exports
- add missing library
- update to llvm 19

Co-authored-by: Zexin Yuan <[email protected]>
@nim65s
Copy link
Contributor Author

nim65s commented Oct 13, 2025

rebased to fix a conflict in aliases.nix

@nixpkgs-ci nixpkgs-ci bot removed the 2.status: merge conflict This PR has merge conflicts with the target branch label Oct 13, 2025
nim65s added a commit to nim65s/dotfiles that referenced this pull request Oct 14, 2025
@jopejoe1
Copy link
Member

nixpkgs-review result for #445078

Generated using nixpkgs-review-gha

Command: nixpkgs-review pr 445078
Commit: 5076e536352ceb823059ea721579ca5b9fe6bae6 (subsequent changes)
Merge: cf000110a8b794295bf1bad501ddca74d7c28af3

Logs: https://github.com/jopejoe1/nixpkgs-review-gha/actions/runs/18501047825


x86_64-linux

✅ 21 packages built:
  • corto
  • kicadAddons.kikit
  • kicadAddons.kikit-library
  • kikit
  • kikit.dist
  • levmar
  • lib3mf
  • lib3mf.dev
  • libigl
  • meshlab
  • openbrf
  • openmvs
  • openscad
  • openscad-unstable
  • python312Packages.pymeshlab (python313Packages.pymeshlab)
  • snis-unwrapped
  • tinygltf
  • vcg
  • vclab-nexus
  • vclab-nexus.bin
  • wings

aarch64-linux

❌ 1 package failed to build:
  • openmvs
✅ 20 packages built:
  • corto
  • kicadAddons.kikit
  • kicadAddons.kikit-library
  • kikit
  • kikit.dist
  • levmar
  • lib3mf
  • lib3mf.dev
  • libigl
  • meshlab
  • openbrf
  • openscad
  • openscad-unstable
  • python312Packages.pymeshlab (python313Packages.pymeshlab)
  • snis-unwrapped
  • tinygltf
  • vcg
  • vclab-nexus
  • vclab-nexus.bin
  • wings

Error logs: `aarch64-linux`
openmvs
    Start 1: UnitTests
    Start 2: PipelineTest
1/2 Test #2: PipelineTest .....................Subprocess aborted***Exception:   0.47 sec
OMP: Error #13: Assertion failure at kmp_affinity.cpp(3209).
OMP: Hint Please submit a bug report with this message, compile and run commands used, and machine configuration info including native compiler and operating system versions. Faster response will be obtained by including all program sources. For information on submitting this issue, please see https://github.com/llvm/llvm-project/issues/.

2/2 Test #1: UnitTests ........................Subprocess aborted***Exception: 0.47 sec
OMP: Error #13: Assertion failure at kmp_affinity.cpp(3209).
OMP: Hint Please submit a bug report with this message, compile and run commands used, and machine configuration info including native compiler and operating system versions. Faster response will be obtained by including all program sources. For information on submitting this issue, please see https://github.com/llvm/llvm-project/issues/.

0% tests passed, 2 tests failed out of 2

Total Test time (real) = 0.47 sec

The following tests FAILED:
1 - UnitTests (Subprocess aborted)
2 - PipelineTest (Subprocess aborted)
Errors while running CTest
make: *** [Makefile:71: test] Error 8


x86_64-darwin (sandbox = true)

❌ 9 packages failed to build:
  • lib3mf
  • lib3mf.dev
  • meshlab
  • openmvs
  • openscad
  • openscad-unstable
  • python312Packages.pymeshlab (python313Packages.pymeshlab)
  • vclab-nexus
  • vclab-nexus.bin
✅ 5 packages built:
  • corto
  • levmar
  • libigl
  • tinygltf
  • vcg

Error logs: `x86_64-darwin`
lib3mf
  115 |     bool IsValid();
      |          ^
/nix/build/nix-6894-3203513899/source/Autogenerated/Source/lib3mf_interfaces.hpp:1381:15: note: overridden virtual function is here
 1381 |         virtual bool IsValid() = 0;
      |                      ^
1 warning generated.
[65/378] Building CXX object CMakeFiles/lib3mf.dir/Source/API/lib3mf_levelsetiterator.cpp.o
[66/378] Building CXX object CMakeFiles/lib3mf.dir/Source/API/lib3mf_log10node.cpp.o
[67/378] Building CXX object CMakeFiles/lib3mf.dir/Source/API/lib3mf_log2node.cpp.o
[68/378] Building CXX object CMakeFiles/lib3mf.dir/Source/API/lib3mf_materialmapping.cpp.o
In file included from /nix/build/nix-6894-3203513899/source/Source/API/lib3mf_materialmapping.cpp:31:
In file included from /nix/build/nix-6894-3203513899/source/Include/API/lib3mf_materialmapping.hpp:38:
/nix/build/nix-6894-3203513899/source/Include/API/lib3mf_functionreference.hpp:140:16: warning: 'GetFallBackValue' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
  140 |         Lib3MF_double GetFallBackValue();
      |                       ^
/nix/build/nix-6894-3203513899/source/Autogenerated/Source/lib3mf_interfaces.hpp:2038:24: note: overridden virtual function is here
 2038 |         virtual Lib3MF_double GetFallBackValue() = 0;
      |                               ^
1 warning generated.
[69/378] Building CXX object CMakeFiles/lib3mf.dir/Source/API/lib3mf_lognode.cpp.o

aarch64-darwin (sandbox = true)

❌ 9 packages failed to build:
  • lib3mf
  • lib3mf.dev
  • meshlab
  • openmvs
  • openscad
  • openscad-unstable
  • python312Packages.pymeshlab (python313Packages.pymeshlab)
  • vclab-nexus
  • vclab-nexus.bin
✅ 5 packages built:
  • corto
  • levmar
  • libigl
  • tinygltf
  • vcg

Error logs: `aarch64-darwin`
lib3mf
/nix/build/nix-5033-3465747232/source/Autogenerated/Source/lib3mf_interfaces.hpp:1381:15: note: overridden virtual function is here
 1381 |         virtual bool IsValid() = 0;
      |                      ^
1 warning generated.
[57/378] Building CXX object CMakeFiles/lib3mf.dir/Source/API/lib3mf_implicitfunction.cpp.o
[58/378] Building CXX object CMakeFiles/lib3mf.dir/Source/API/lib3mf_implicitport.cpp.o
[59/378] Building CXX object CMakeFiles/lib3mf.dir/Source/API/lib3mf_iterator.cpp.o
[60/378] Building CXX object CMakeFiles/lib3mf.dir/Source/API/lib3mf_implicitportiterator.cpp.o
[61/378] Building CXX object CMakeFiles/lib3mf.dir/Source/API/lib3mf_inversenode.cpp.o
[62/378] Building CXX object CMakeFiles/lib3mf.dir/Source/API/lib3mf_lengthnode.cpp.o
[63/378] Building CXX object CMakeFiles/lib3mf.dir/Source/API/lib3mf_keystore.cpp.o
[64/378] Building CXX object CMakeFiles/lib3mf.dir/Source/API/lib3mf_levelset.cpp.o
In file included from /nix/build/nix-5033-3465747232/source/Source/API/lib3mf_levelset.cpp:35:
/nix/build/nix-5033-3465747232/source/Include/API/lib3mf_meshobject.hpp:115:10: warning: 'IsValid' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
  115 |     bool IsValid();
      |          ^
/nix/build/nix-5033-3465747232/source/Autogenerated/Source/lib3mf_interfaces.hpp:1381:15: note: overridden virtual function is here
 1381 |         virtual bool IsValid() = 0;
      |                      ^
1 warning generated.

@yzx9
Copy link
Contributor

yzx9 commented Oct 14, 2025

qt applications on drawin include a sandbox profile, so they don't work with sandbox = true

And I suspect lib3mf run into OOM error based on the log

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

Labels

10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. 12.approvals: 2 This PR was reviewed and approved by two persons. 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants