[PATCH] gnu: Add meshlab

  • Done
  • quality assurance status badge
Details
2 participants
  • Ekaitz Zarraga
  • Ludovic Courtès
Owner
unassigned
Submitted by
Ekaitz Zarraga
Severity
normal
E
E
Ekaitz Zarraga wrote on 7 Apr 2020 19:08
(name . guix-patches@gnu.org)(address . guix-patches@gnu.org)
_UXapokzwPRYl41j0bjkPGSDUNXahWNWsEn72py7ch7Rd6DBsxW9B8rw8wTbmzj1O2HfWXz7XLbEdWCYQsFCa5DgMlGn0CKVPr779J2PFuo=@elenq.tech
Hi everyone,

I wrote a package to add meshlab but I'm not sure if I did it right:
- It doesn't have tests so I removed the testing.
- It fails to check RUNPATH, but I don't really know why so I disabled
it at the moment. It fails while searching for meshlab core libraries
but the search path is correct (it misses a /meshlab at the end).

Can you please check it and suggest a solution?

It works as it is but the runpath checks should pass...

Thanks!
Ekaitz

---


From d9020d7e64020dc7eea1bd46af184856d568ca7d Mon Sep 17 00:00:00 2001
From: Ekaitz Zarraga <ekaitz@elenq.tech>
Date: Tue, 7 Apr 2020 18:56:06 +0200
Subject: [PATCH] gnu: Add meshlab

---
gnu/packages/engineering.scm | 39 ++++++++++++++++++++++++++++++++++++
1 file changed, 39 insertions(+)

Toggle diff (47 lines)
diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 5405db762c..85efc01c4c 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -2491,3 +2491,42 @@ without any changes. And programmers that are familiar with the magellan API
can continue using it with a free library without the restrictions of the
official SDK.")
(license license:bsd-3)))
+
+(define-public meshlab
+ (let ((commit-ref "Meshlab-2020.04"))
+ (package
+ (name "meshlab")
+ (version commit-ref)
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/cnr-isti-vclab/meshlab")
+ (commit commit-ref)
+ (recursive? #t)))
+ (sha256
+ (base32 "1vx9jcsnnxvzi90pcxpp7p72cqg3cm6jiivdmrxkzhr2fiz3pfvr"))))
+ (build-system cmake-build-system)
+ (native-inputs
+ `(("qtbase" ,qtbase)
+ ("qtscript" ,qtscript)
+ ("qtxmlpatterns" ,qtxmlpatterns)
+ ("mesa", mesa)
+ ("glu", glu)))
+ (arguments
+ `(#:tests? #f
+ #:validate-runpath? #f
+ #:phases (modify-phases %standard-phases
+ (add-after 'unpack 'go-to-source-dir
+ (lambda _ (chdir "src") #t)))))
+ (synopsis
+ "The open source system for processing and editing 3D triangular meshes.")
+ (home-page "http://www.meshlab.net/")
+ (description "MeshLab is an open source, portable, and extensible system
+for the processing and editing of unstructured large 3D triangular meshes. It
+is aimed to help the processing of the typical not-so-small unstructured models
+arising in 3D scanning, providing a set of tools for editing, cleaning,
+healing, inspecting, rendering and converting this kind of meshes. These tools
+include MeshLab proper, a versatile program with a graphical user interface,
+and meshlabserver, a program that can perform mesh
+processing tasks in batch mode, without a GUI.")
+ (license license:gpl3+))))
--
2.25.1
L
L
Ludovic Courtès wrote on 22 Apr 2020 19:23
(name . Ekaitz Zarraga)(address . ekaitz@elenq.tech)(address . 40492@debbugs.gnu.org)
87a733v3hh.fsf@gnu.org
Hi,

Ekaitz Zarraga <ekaitz@elenq.tech> skribis:

Toggle quote (3 lines)
> I wrote a package to add meshlab but I'm not sure if I did it right:
> - It doesn't have tests so I removed the testing.

Please add a short comment in the code saying this so that people
touching the package in the future will know.

Toggle quote (4 lines)
> - It fails to check RUNPATH, but I don't really know why so I disabled
> it at the moment. It fails while searching for meshlab core libraries
> but the search path is correct (it misses a /meshlab at the end).

Could you show the error message? It may be that the build system fails
to pass the right -Wl,-rpath or even the right -L/-l flags at link time.

Toggle quote (9 lines)
>>From d9020d7e64020dc7eea1bd46af184856d568ca7d Mon Sep 17 00:00:00 2001
> From: Ekaitz Zarraga <ekaitz@elenq.tech>
> Date: Tue, 7 Apr 2020 18:56:06 +0200
> Subject: [PATCH] gnu: Add meshlab
>
> ---
> gnu/packages/engineering.scm | 39 ++++++++++++++++++++++++++++++++++++
> 1 file changed, 39 insertions(+)

Bonus points if you can provide a commit log that follows our
conventions. :-) See
‘git log’ for examples.

Toggle quote (6 lines)
> +(define-public meshlab
> + (let ((commit-ref "Meshlab-2020.04"))
> + (package
> + (name "meshlab")
> + (version commit-ref)

The version field should be “2020.04”. You can construct the commit
from that:

(string-append "Meshlab-" version)

Toggle quote (5 lines)
> + (synopsis
> + "The open source system for processing and editing 3D triangular meshes.")
> + (home-page "http://www.meshlab.net/")
> + (description "MeshLab is an open source, portable, and extensible system

Two comments:

1. Everything in Guix is free software, you can remove the “open
source” mention.

2. Please make sure to run ‘guix lint’ and check the guidelines at

Could you send an updated patch?

Thanks in advance!

Ludo’.
E
E
Ekaitz Zarraga wrote on 22 Apr 2020 20:40
(name . Ludovic Courtès)(address . ludo@gnu.org)(name . 40492@debbugs.gnu.org)(address . 40492@debbugs.gnu.org)
kWjRCanSLpg5f0wAl_GZac1iZJSZi5ST69nKRQ3ZpGWeP58f5Wun985oaCV9kch6XbbjBm6atQCjGJm3m_eAndPBmDKsbaLHLgwCojpnndw=@elenq.tech
??????? Original Message ???????
On Wednesday, April 22, 2020 7:23 PM, Ludovic Courtès <ludo@gnu.org> wrote:

Toggle quote (76 lines)
> Hi,
>
> Ekaitz Zarraga ekaitz@elenq.tech skribis:
>
> > I wrote a package to add meshlab but I'm not sure if I did it right:
> >
> > - It doesn't have tests so I removed the testing.
>
> Please add a short comment in the code saying this so that people
> touching the package in the future will know.
>
> > - It fails to check RUNPATH, but I don't really know why so I disabled
> > it at the moment. It fails while searching for meshlab core libraries
> > but the search path is correct (it misses a /meshlab at the end).
> >
>
> Could you show the error message? It may be that the build system fails
> to pass the right -Wl,-rpath or even the right -L/-l flags at link time.
>
> > > From d9020d7e64020dc7eea1bd46af184856d568ca7d Mon Sep 17 00:00:00 2001
> > > From: Ekaitz Zarraga ekaitz@elenq.tech
> > > Date: Tue, 7 Apr 2020 18:56:06 +0200
> > > Subject: [PATCH] gnu: Add meshlab
> >
> > gnu/packages/engineering.scm | 39 ++++++++++++++++++++++++++++++++++++
> > 1 file changed, 39 insertions(+)
>
> Bonus points if you can provide a commit log that follows our
> conventions. :-) See
> https://guix.gnu.org/manual/en/html_node/Submitting-Patches.html and
> ‘git log’ for examples.
>
> > +(define-public meshlab
> >
> > - (let ((commit-ref "Meshlab-2020.04"))
> > - (package
> > - (name "meshlab")
> >
> >
> > - (version commit-ref)
> >
> >
>
> The version field should be “2020.04”. You can construct the commit
> from that:
>
> (string-append "Meshlab-" version)
>
> > - (synopsis
> >
> >
> > - "The open source system for processing and editing 3D triangular meshes.")
> >
> >
> > - (home-page "http://www.meshlab.net/")
> >
> >
> > - (description "MeshLab is an open source, portable, and extensible system
> >
> >
>
> Two comments:
>
> 1. Everything in Guix is free software, you can remove the “open
> source” mention.
>
> 2. Please make sure to run ‘guix lint’ and check the guidelines at
> https://guix.gnu.org/manual/en/html_node/Synopses-and-Descriptions.html.
>
>
> Could you send an updated patch?
>
> Thanks in advance!
>
> Ludo’.

Hi Ludo,

Thanks for the detailed answer. I'll check the formatting errors.
About the RUNPATH checks, I isolated one of the errors and I don't know what to change.

This is the error of the file libsamplefilter.so during the runpath check:

/gnu/store/lcpp0gpispfqw8zna2mjrr6cwj3ih133-meshlab-Meshlab-2020.04/lib/meshlab/plugins/libsamplefilter.so: error: depends on 'libmeshlab-common.so', which cannot be found in RUNPATH ("/gnu/store/lcpp0gpispfqw8zna2mjrr6cwj3ih133-meshlab-Meshlab-2020.04/lib" "/gnu/store/ahqgl4h89xqj695lgqvsaf6zh2nhy4pj-glibc-2.29/lib" "/gnu/store/2plcy91lypnbbysb18ymnhaw3zwk8pg1-gcc-7.4.0-lib/lib" "/gnu/store/n6ji2fxg1cn6abd2bn2jd14pglyblysr-qtbase-5.12.7/lib" "/gnu/store/qbq794vbw5scpxvnzlnyvdkqfr9163rk-qtscript-5.12.7/lib" "/gnu/store/2k1bsh663bilxndca4gx4zrdp7m63fjb-qtxmlpatterns-5.12.7/lib" "/gnu/store/2mf0clz9w64diy0kz11qcs4q5wg9hc6z-mesa-19.3.4/lib" "/gnu/store/2plcy91lypnbbysb18ymnhaw3zwk8pg1-gcc-7.4.0-lib/lib/gcc/x86_64-unknown-linux-gnu/7.4.0/../../..")
/gnu/store/lcpp0gpispfqw8zna2mjrr6cwj3ih133-meshlab-Meshlab-2020.04/lib/meshlab/plugins/libsamplefilterdyn.so: error: depends on 'libmeshlab-common.so', which cannot be found in RUNPATH ("/gnu/store/lcpp0gpispfqw8zna2mjrr6cwj3ih133-meshlab-Meshlab-2020.04/lib" "/gnu/store/ahqgl4h89xqj695lgqvsaf6zh2nhy4pj-glibc-2.29/lib" "/gnu/store/2plcy91lypnbbysb18ymnhaw3zwk8pg1-gcc-7.4.0-lib/lib" "/gnu/store/n6ji2fxg1cn6abd2bn2jd14pglyblysr-qtbase-5.12.7/lib" "/gnu/store/qbq794vbw5scpxvnzlnyvdkqfr9163rk-qtscript-5.12.7/lib" "/gnu/store/2k1bsh663bilxndca4gx4zrdp7m63fjb-qtxmlpatterns-5.12.7/lib" "/gnu/store/2mf0clz9w64diy0kz11qcs4q5wg9hc6z-mesa-19.3.4/lib" "/gnu/store/2plcy91lypnbbysb18ymnhaw3zwk8pg1-gcc-7.4.0-lib/lib/gcc/x86_64-unknown-linux-gnu/7.4.0/../../..")
validating RUNPATH of 2 binaries in "/gnu/store/lcpp0gpispfqw8zna2mjrr6cwj3ih133-meshlab-Meshlab-2020.04/bin"...

But the first element in the RUNPATH is the place where the library is. This is the library's path:

/gnu/store/lcpp0gpispfqw8zna2mjrr6cwj3ih133-meshlab-Meshlab-2020.04/lib/meshlab/libmeshlab-common.so


This is the linking of the libsamplefilter.so file:

[ 98%] Linking CXX shared module ../../distrib/plugins/libsamplefilter.so
cd /tmp/guix-build-meshlab-Meshlab-2020.04.drv-0/source/build/sampleplugins/samplefilter && /gnu/store/iz9500ssxcqlyr74hg1jq10ycrh42yq1-cmake-minimal-3.15.1/bin/cmake -E cmake_link_script CMakeFiles/samplefilter.dir/link.txt --verbose=1
/gnu/store/x3jx25cd3q363mr7nbgzrhrv1vza6cf7-gcc-7.4.0/bin/c++ -fPIC -O2 -g -DNDEBUG -Wl,--no-undefined -shared -o ../../distrib/plugins/libsamplefilter.so CMakeFiles/samplefilter.dir/samplefilter_autogen/mocs_compilation.cpp.o CMakeFiles/samplefilter.dir/samplefilter.cpp.o -Wl,-rpath,/tmp/guix-build-meshlab-Meshlab-2020.04.drv-0/source/build/common:::::: ../../common/libmeshlab-common.so /gnu/store/n6ji2fxg1cn6abd2bn2jd14pglyblysr-qtbase-5.12.7/lib/libQt5OpenGL.so.5.12.7 /gnu/store/qbq794vbw5scpxvnzlnyvdkqfr9163rk-qtscript-5.12.7/lib/libQt5Script.so.5.12.7 /gnu/store/n6ji2fxg1cn6abd2bn2jd14pglyblysr-qtbase-5.12.7/lib/libQt5Widgets.so.5.12.7 /gnu/store/n6ji2fxg1cn6abd2bn2jd14pglyblysr-qtbase-5.12.7/lib/libQt5Gui.so.5.12.7 /gnu/store/n6ji2fxg1cn6abd2bn2jd14pglyblysr-qtbase-5.12.7/lib/libQt5Xml.so.5.12.7 /gnu/store/2k1bsh663bilxndca4gx4zrdp7m63fjb-qtxmlpatterns-5.12.7/lib/libQt5XmlPatterns.so.5.12.7 /gnu/store/n6ji2fxg1cn6abd2bn2jd14pglyblysr-qtbase-5.12.7/lib/libQt5Network.so.5.12.7 /gnu/store/n6ji2fxg1cn6abd2bn2jd14pglyblysr-qtbase-5.12.7/lib/libQt5Core.so.5.12.7 ../../libexternal-glew.a /gnu/store/2mf0clz9w64diy0kz11qcs4q5wg9hc6z-mesa-19.3.4/lib/libGL.so

The -rpath and -Wl are set to /tmp/guix-build-meshlab-Meshlab-2020.04.drv-0/source/build/common
but it should be set to the directory it showed previously, right?

If I need to change that, what do I have to do?

Sorry for the inconvenience, but I'm a little bit lost on this.

Thank you,

Ekaitz
L
L
Ludovic Courtès wrote on 22 Apr 2020 21:52
(name . Ekaitz Zarraga)(address . ekaitz@elenq.tech)(name . 40492@debbugs.gnu.org)(address . 40492@debbugs.gnu.org)
87wo67ti07.fsf@gnu.org
Egun on, :-)

Ekaitz Zarraga <ekaitz@elenq.tech> skribis:

Toggle quote (23 lines)
> Thanks for the detailed answer. I'll check the formatting errors.
> About the RUNPATH checks, I isolated one of the errors and I don't know what to change.
>
> This is the error of the file libsamplefilter.so during the runpath check:
>
> /gnu/store/lcpp0gpispfqw8zna2mjrr6cwj3ih133-meshlab-Meshlab-2020.04/lib/meshlab/plugins/libsamplefilter.so: error: depends on 'libmeshlab-common.so', which cannot be found in RUNPATH ("/gnu/store/lcpp0gpispfqw8zna2mjrr6cwj3ih133-meshlab-Meshlab-2020.04/lib" "/gnu/store/ahqgl4h89xqj695lgqvsaf6zh2nhy4pj-glibc-2.29/lib" "/gnu/store/2plcy91lypnbbysb18ymnhaw3zwk8pg1-gcc-7.4.0-lib/lib" "/gnu/store/n6ji2fxg1cn6abd2bn2jd14pglyblysr-qtbase-5.12.7/lib" "/gnu/store/qbq794vbw5scpxvnzlnyvdkqfr9163rk-qtscript-5.12.7/lib" "/gnu/store/2k1bsh663bilxndca4gx4zrdp7m63fjb-qtxmlpatterns-5.12.7/lib" "/gnu/store/2mf0clz9w64diy0kz11qcs4q5wg9hc6z-mesa-19.3.4/lib" "/gnu/store/2plcy91lypnbbysb18ymnhaw3zwk8pg1-gcc-7.4.0-lib/lib/gcc/x86_64-unknown-linux-gnu/7.4.0/../../..")
> /gnu/store/lcpp0gpispfqw8zna2mjrr6cwj3ih133-meshlab-Meshlab-2020.04/lib/meshlab/plugins/libsamplefilterdyn.so: error: depends on 'libmeshlab-common.so', which cannot be found in RUNPATH ("/gnu/store/lcpp0gpispfqw8zna2mjrr6cwj3ih133-meshlab-Meshlab-2020.04/lib" "/gnu/store/ahqgl4h89xqj695lgqvsaf6zh2nhy4pj-glibc-2.29/lib" "/gnu/store/2plcy91lypnbbysb18ymnhaw3zwk8pg1-gcc-7.4.0-lib/lib" "/gnu/store/n6ji2fxg1cn6abd2bn2jd14pglyblysr-qtbase-5.12.7/lib" "/gnu/store/qbq794vbw5scpxvnzlnyvdkqfr9163rk-qtscript-5.12.7/lib" "/gnu/store/2k1bsh663bilxndca4gx4zrdp7m63fjb-qtxmlpatterns-5.12.7/lib" "/gnu/store/2mf0clz9w64diy0kz11qcs4q5wg9hc6z-mesa-19.3.4/lib" "/gnu/store/2plcy91lypnbbysb18ymnhaw3zwk8pg1-gcc-7.4.0-lib/lib/gcc/x86_64-unknown-linux-gnu/7.4.0/../../..")
> validating RUNPATH of 2 binaries in "/gnu/store/lcpp0gpispfqw8zna2mjrr6cwj3ih133-meshlab-Meshlab-2020.04/bin"...
>
> But the first element in the RUNPATH is the place where the library is. This is the library's path:
>
> /gnu/store/lcpp0gpispfqw8zna2mjrr6cwj3ih133-meshlab-Meshlab-2020.04/lib/meshlab/libmeshlab-common.so
>
>
> This is the linking of the libsamplefilter.so file:
>
> [ 98%] Linking CXX shared module ../../distrib/plugins/libsamplefilter.so
> cd /tmp/guix-build-meshlab-Meshlab-2020.04.drv-0/source/build/sampleplugins/samplefilter && /gnu/store/iz9500ssxcqlyr74hg1jq10ycrh42yq1-cmake-minimal-3.15.1/bin/cmake -E cmake_link_script CMakeFiles/samplefilter.dir/link.txt --verbose=1
> /gnu/store/x3jx25cd3q363mr7nbgzrhrv1vza6cf7-gcc-7.4.0/bin/c++ -fPIC -O2 -g -DNDEBUG -Wl,--no-undefined -shared -o ../../distrib/plugins/libsamplefilter.so CMakeFiles/samplefilter.dir/samplefilter_autogen/mocs_compilation.cpp.o CMakeFiles/samplefilter.dir/samplefilter.cpp.o -Wl,-rpath,/tmp/guix-build-meshlab-Meshlab-2020.04.drv-0/source/build/common:::::: ../../common/libmeshlab-common.so /gnu/store/n6ji2fxg1cn6abd2bn2jd14pglyblysr-qtbase-5.12.7/lib/libQt5OpenGL.so.5.12.7 /gnu/store/qbq794vbw5scpxvnzlnyvdkqfr9163rk-qtscript-5.12.7/lib/libQt5Script.so.5.12.7 /gnu/store/n6ji2fxg1cn6abd2bn2jd14pglyblysr-qtbase-5.12.7/lib/libQt5Widgets.so.5.12.7 /gnu/store/n6ji2fxg1cn6abd2bn2jd14pglyblysr-qtbase-5.12.7/lib/libQt5Gui.so.5.12.7 /gnu/store/n6ji2fxg1cn6abd2bn2jd14pglyblysr-qtbase-5.12.7/lib/libQt5Xml.so.5.12.7 /gnu/store/2k1bsh663bilxndca4gx4zrdp7m63fjb-qtxmlpatterns-5.12.7/lib/libQt5XmlPatterns.so.5.12.7 /gnu/store/n6ji2fxg1cn6abd2bn2jd14pglyblysr-qtbase-5.12.7/lib/libQt5Network.so.5.12.7 /gnu/store/n6ji2fxg1cn6abd2bn2jd14pglyblysr-qtbase-5.12.7/lib/libQt5Core.so.5.12.7 ../../libexternal-glew.a /gnu/store/2mf0clz9w64diy0kz11qcs4q5wg9hc6z-mesa-19.3.4/lib/libGL.so
>
> The -rpath and -Wl are set to /tmp/guix-build-meshlab-Meshlab-2020.04.drv-0/source/build/common
> but it should be set to the directory it showed previously, right?

Not really, I think CMake initially sets the RUNPATH to the build tree,
as shown above, that’s OK. I think it changes it upon “make install”.

Toggle quote (2 lines)
> If I need to change that, what do I have to do?

One way to fix it would be to arrange to pass ‘-Wl,-rpath,'$ORIGIN'’ on
the link command line of the plugins.

Another solution would be to add a post-install phase to move
libmeshlab-common.so* to $output/lib, which seems more conventional,
though perhaps upstream had good reasons not to do that.

HTH!

Ludo’.
E
E
Ekaitz Zarraga wrote on 25 Apr 2020 21:47
(name . Ludovic Courtès)(address . ludo@gnu.org)(name . 40492\@debbugs.gnu.org)(address . 40492@debbugs.gnu.org)
qfq8UVmfNtFdXiGZfR8P0LMcbE1nU--Qmyi8V20fK1-BD-7D64nFJEJejMDgOF1HqSdBjbkKLzsrwh0Pfo0bVc27vtYP2e3t2eWEFK1xanI=@elenq.tech
Saluton!

Toggle quote (15 lines)
> Egun on, :-)
>
> [...]
> Not really, I think CMake initially sets the RUNPATH to the build tree,
> as shown above, that’s OK. I think it changes it upon “make install”.
>
> > If I need to change that, what do I have to do?
>
> One way to fix it would be to arrange to pass ‘-Wl,-rpath,'$ORIGIN'’ on
> the link command line of the plugins.
>
> Another solution would be to add a post-install phase to move
> libmeshlab-common.so* to $output/lib, which seems more conventional,
> though perhaps upstream had good reasons not to do that.

Went for the second option because I didn't know how to make the first and
looks like it's working.

Also I think I fixed everything you pointed in the first comment.

I attach the updated patch.

Thanks for your help Ludo,

Ekaitz
From 814e44cb90b1427a9af5d6a66392c5a39910e8fd Mon Sep 17 00:00:00 2001
From: Ekaitz Zarraga <ekaitz@elenq.tech>
Date: Tue, 7 Apr 2020 18:56:06 +0200
Subject: [PATCH] gnu: Add meshlab.

* gnu/packages/engineering.scm (meshlab): New variable.
---
gnu/packages/engineering.scm | 49 ++++++++++++++++++++++++++++++++++++
1 file changed, 49 insertions(+)

Toggle diff (59 lines)
diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 5405db762c..dbe7faf78b 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -2491,3 +2491,52 @@ without any changes. And programmers that are familiar with the magellan API
can continue using it with a free library without the restrictions of the
official SDK.")
(license license:bsd-3)))
+
+(define-public meshlab
+ (let ((version "2020.04"))
+ (package
+ (name "meshlab")
+ (version version)
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/cnr-isti-vclab/meshlab")
+ (commit (string-append "Meshlab-" version))
+ (recursive? #t)))
+ (sha256
+ (base32 "1vx9jcsnnxvzi90pcxpp7p72cqg3cm6jiivdmrxkzhr2fiz3pfvr"))))
+ (build-system cmake-build-system)
+ (native-inputs
+ `(("qtbase" ,qtbase)
+ ("qtscript" ,qtscript)
+ ("qtxmlpatterns" ,qtxmlpatterns)
+ ("mesa", mesa)
+ ("glu", glu)))
+ (arguments
+ `(#:tests? #f ; Has no tests
+ #:phases
+ (modify-phases
+ %standard-phases
+ (add-after
+ 'unpack 'go-to-source-dir
+ (lambda _ (chdir "src") #t))
+ (add-after
+ 'install 'move-files
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((lib (string-append (assoc-ref outputs "out")
+ "/lib")))
+ (rename-file
+ (string-append lib "/meshlab/libmeshlab-common.so")
+ (string-append lib "/libmeshlab-common.so"))
+ #t))))))
+ (synopsis "3D triangular mesh processing and editing software")
+ (home-page "http://www.meshlab.net/")
+ (description "MeshLab is a system for the processing and
+editing of unstructured large 3D triangular meshes. It is aimed to help the
+processing of the typical not-so-small unstructured models arising in 3D
+scanning, providing a set of tools for editing, cleaning, healing, inspecting,
+rendering and converting this kind of meshes. These tools include MeshLab
+proper, a versatile program with a graphical user interface, and meshlabserver,
+a program that can perform mesh processing tasks in batch mode, without a
+GUI.")
+ (license license:gpl3+))))
--
2.26.1
L
L
Ludovic Courtès wrote on 26 Apr 2020 22:49
(name . Ekaitz Zarraga)(address . ekaitz@elenq.tech)(name . 40492@debbugs.gnu.org)(address . 40492@debbugs.gnu.org)
87blneynu0.fsf@gnu.org
Saluton!

Ekaitz Zarraga <ekaitz@elenq.tech> skribis:

Toggle quote (7 lines)
> From 814e44cb90b1427a9af5d6a66392c5a39910e8fd Mon Sep 17 00:00:00 2001
> From: Ekaitz Zarraga <ekaitz@elenq.tech>
> Date: Tue, 7 Apr 2020 18:56:06 +0200
> Subject: [PATCH] gnu: Add meshlab.
>
> * gnu/packages/engineering.scm (meshlab): New variable.

Great! I added a copyright line for you, fixed up indentation (see the
bit in the manual for how to do that automatically), and added a
comment—patch attached.

It built for me, but then I realized I had missed something: the
external/ sub-directory contains lots of bundled copies of external
tools, and indeed, the ‘configure’ phase shows:

Toggle snippet (20 lines)
-- Could NOT find Lib3ds (missing: LIB3DS_INCLUDE_DIR LIB3DS_LIBRARY)
-- Could NOT find GMP (missing: GMP_INCLUDE_DIR GMP_LIBRARY)
-- Could NOT find muparser (missing: MUPARSER_INCLUDE_DIR MUPARSER_LIBRARY)
-- Could NOT find OpenCTM (missing: OPENCTM_INCLUDE_DIR OPENCTM_LIBRARY)
-- Could NOT find Qhull (missing: QHULL_qhull_LIBRARY QHULL_qhull_INCLUDE_DIR qhull)
-- Found OpenMP_C: -fopenmp (found version "4.5")
-- Found OpenMP_CXX: -fopenmp (found version "4.5")
-- Found OpenMP: TRUE (found version "4.5")
-- - jhead - using bundled source
-- - glew - using bundled source
-- - Eigen - using bundled source
-- - newuoa - using bundled source
-- - levmar - using bundled source
-- - lib3ds - using bundled source
-- - muparser - using bundled source
-- - OpenCTM - using bundled source
-- - structure-synth - using bundled source
-- - qhull - using bundled source

Some of these are already packaged, so it should be a matter of adding
them to ‘inputs’. For the remaining ones, it would be extra packaging
work to do.

The goal is to address all of these, but if we can address the majority
of these, perhaps we can commit a first version of the package with a
FIXME stating what remains to be done, if you prefer.

Thanks, and apologies for overlooking it before!

Ludo’.
Toggle diff (91 lines)
diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 2fc2ecdd88..ee90e3b429 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -16,6 +16,7 @@
;;; Copyright © 2019 John Soo <jsoo1@asu.edu>
;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re>
;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
+;;; Copyright © 2020 Ekaitz Zarraga <ekaitz@elenq.tech>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -2520,43 +2521,43 @@ official SDK.")
(source (origin
(method git-fetch)
(uri (git-reference
- (url "https://github.com/cnr-isti-vclab/meshlab")
- (commit (string-append "Meshlab-" version))
- (recursive? #t)))
+ (url "https://github.com/cnr-isti-vclab/meshlab")
+ (commit (string-append "Meshlab-" version))
+ (recursive? #t)))
+ (file-name (git-file-name name version))
(sha256
- (base32 "1vx9jcsnnxvzi90pcxpp7p72cqg3cm6jiivdmrxkzhr2fiz3pfvr"))))
+ (base32 "1vx9jcsnnxvzi90pcxpp7p72cqg3cm6jiivdmrxkzhr2fiz3pfvr"))))
(build-system cmake-build-system)
(native-inputs
- `(("qtbase" ,qtbase)
- ("qtscript" ,qtscript)
- ("qtxmlpatterns" ,qtxmlpatterns)
- ("mesa", mesa)
- ("glu", glu)))
+ `(("qtbase" ,qtbase)
+ ("qtscript" ,qtscript)
+ ("qtxmlpatterns" ,qtxmlpatterns)
+ ("mesa", mesa)
+ ("glu", glu)))
(arguments
- `(#:tests? #f ; Has no tests
- #:phases
- (modify-phases
- %standard-phases
- (add-after
- 'unpack 'go-to-source-dir
- (lambda _ (chdir "src") #t))
- (add-after
- 'install 'move-files
- (lambda* (#:key outputs #:allow-other-keys)
- (let ((lib (string-append (assoc-ref outputs "out")
- "/lib")))
- (rename-file
- (string-append lib "/meshlab/libmeshlab-common.so")
- (string-append lib "/libmeshlab-common.so"))
- #t))))))
+ `(#:tests? #f ;has no tests
+ #:phases
+ (modify-phases
+ %standard-phases
+ (add-after 'unpack 'go-to-source-dir
+ (lambda _ (chdir "src") #t))
+ (add-after 'install 'move-files
+ (lambda* (#:key outputs #:allow-other-keys)
+ ;; The RUNPATH on plugins is set to OUT/lib. Move
+ ;; libmeshlab-common.so there so it can be found.
+ (let ((lib (string-append (assoc-ref outputs "out")
+ "/lib")))
+ (rename-file
+ (string-append lib "/meshlab/libmeshlab-common.so")
+ (string-append lib "/libmeshlab-common.so"))
+ #t))))))
(synopsis "3D triangular mesh processing and editing software")
- (home-page "http://www.meshlab.net/")
- (description "MeshLab is a system for the processing and
-editing of unstructured large 3D triangular meshes. It is aimed to help the
-processing of the typical not-so-small unstructured models arising in 3D
-scanning, providing a set of tools for editing, cleaning, healing, inspecting,
-rendering and converting this kind of meshes. These tools include MeshLab
-proper, a versatile program with a graphical user interface, and meshlabserver,
-a program that can perform mesh processing tasks in batch mode, without a
-GUI.")
- (license license:gpl3+))))
+ (home-page "http://www.meshlab.net/")
+ (description "MeshLab is a system for the processing and editing of
+unstructured large 3D triangular meshes. It is aimed to help the processing
+of the typical not-so-small unstructured models arising in 3D scanning,
+providing a set of tools for editing, cleaning, healing, inspecting, rendering
+and converting this kind of meshes. These tools include MeshLab proper, a
+versatile program with a graphical user interface, and meshlabserver, a
+program that can perform mesh processing tasks in batch mode, without a GUI.")
+ (license license:gpl3+))))
E
E
Ekaitz Zarraga wrote on 26 Apr 2020 23:00
(name . Ludovic Courtès)(address . ludo@gnu.org)(name . 40492\@debbugs.gnu.org)(address . 40492@debbugs.gnu.org)
YdoNZvfmmw6JlomYc7wYN4yeGV0RViJHsG0Bgzg60yF5ghS0cItwPNuE8-_YoJroxVl6Rpw93EnHLXc3dsel1AxzMFbBfhLV2M2Z4IQrLMk=@elenq.tech
On Sunday, April 26, 2020 10:49 PM, Ludovic Courtès <ludo@gnu.org> wrote:

Toggle quote (53 lines)
> Saluton!
>
> Ekaitz Zarraga ekaitz@elenq.tech skribis:
>
> > From 814e44cb90b1427a9af5d6a66392c5a39910e8fd Mon Sep 17 00:00:00 2001
> > From: Ekaitz Zarraga ekaitz@elenq.tech
> > Date: Tue, 7 Apr 2020 18:56:06 +0200
> > Subject: [PATCH] gnu: Add meshlab.
> >
> > * gnu/packages/engineering.scm (meshlab): New variable.
> >
>
> Great! I added a copyright line for you, fixed up indentation (see the
> bit in the manual for how to do that automatically), and added a
> comment—patch attached.
>
> It built for me, but then I realized I had missed something: the
> external/ sub-directory contains lots of bundled copies of external
> tools, and indeed, the ‘configure’ phase shows:
>
> --8<---------------cut here---------------start------------->8---
> -- Could NOT find Lib3ds (missing: LIB3DS_INCLUDE_DIR LIB3DS_LIBRARY)
> -- Could NOT find GMP (missing: GMP_INCLUDE_DIR GMP_LIBRARY)
> -- Could NOT find muparser (missing: MUPARSER_INCLUDE_DIR MUPARSER_LIBRARY)
> -- Could NOT find OpenCTM (missing: OPENCTM_INCLUDE_DIR OPENCTM_LIBRARY)
> -- Could NOT find Qhull (missing: QHULL_qhull_LIBRARY QHULL_qhull_INCLUDE_DIR qhull)
> -- Found OpenMP_C: -fopenmp (found version "4.5")
> -- Found OpenMP_CXX: -fopenmp (found version "4.5")
> -- Found OpenMP: TRUE (found version "4.5")
> -- - jhead - using bundled source
> -- - glew - using bundled source
> -- - Eigen - using bundled source
> -- - newuoa - using bundled source
> -- - levmar - using bundled source
> -- - lib3ds - using bundled source
> -- - muparser - using bundled source
> -- - OpenCTM - using bundled source
> -- - structure-synth - using bundled source
> -- - qhull - using bundled source
> --8<---------------cut here---------------end--------------->8---
>
> Some of these are already packaged, so it should be a matter of adding
> them to ‘inputs’. For the remaining ones, it would be extra packaging
> work to do.
>
> The goal is to address all of these, but if we can address the majority
> of these, perhaps we can commit a first version of the package with a
> FIXME stating what remains to be done, if you prefer.
>
> Thanks, and apologies for overlooking it before!
>
> Ludo’.

Hi,

No worries, I'll try to take a look to those.

We can push it with the Fixme and I'll go adding those during these days when I'm free.

Thanks!

PS: Should I push those to the same file under engineering? or should I create a new file for meshlab and add all its dependencies there too?
L
L
Ludovic Courtès wrote on 27 Apr 2020 10:03
(name . Ekaitz Zarraga)(address . ekaitz@elenq.tech)(name . 40492@debbugs.gnu.org)(address . 40492@debbugs.gnu.org)
87r1w9we2g.fsf@gnu.org
Saluton,

Ekaitz Zarraga <ekaitz@elenq.tech> skribis:

Toggle quote (2 lines)
> PS: Should I push those to the same file under engineering? or should I create a new file for meshlab and add all its dependencies there too?

You can add the new packages in the file where it makes most sense,
which may or may not be engineering.scm.

Thanks for looking into it!

Ludo’.
L
L
Ludovic Courtès wrote on 8 May 2020 16:30
(name . Ekaitz Zarraga)(address . ekaitz@elenq.tech)(name . 40492@debbugs.gnu.org)(address . 40492@debbugs.gnu.org)
87imh6cxdz.fsf@gnu.org
Saluton,

Did you have a change to look into this?

Thanks,
Ludo'.

Ekaitz Zarraga <ekaitz@elenq.tech> skribis:

Toggle quote (64 lines)
> On Sunday, April 26, 2020 10:49 PM, Ludovic Courtès <ludo@gnu.org> wrote:
>
>> Saluton!
>>
>> Ekaitz Zarraga ekaitz@elenq.tech skribis:
>>
>> > From 814e44cb90b1427a9af5d6a66392c5a39910e8fd Mon Sep 17 00:00:00 2001
>> > From: Ekaitz Zarraga ekaitz@elenq.tech
>> > Date: Tue, 7 Apr 2020 18:56:06 +0200
>> > Subject: [PATCH] gnu: Add meshlab.
>> >
>> > * gnu/packages/engineering.scm (meshlab): New variable.
>> >
>>
>> Great! I added a copyright line for you, fixed up indentation (see the
>> bit in the manual for how to do that automatically), and added a
>> comment—patch attached.
>>
>> It built for me, but then I realized I had missed something: the
>> external/ sub-directory contains lots of bundled copies of external
>> tools, and indeed, the ‘configure’ phase shows:
>>
>> --8<---------------cut here---------------start------------->8---
>> -- Could NOT find Lib3ds (missing: LIB3DS_INCLUDE_DIR LIB3DS_LIBRARY)
>> -- Could NOT find GMP (missing: GMP_INCLUDE_DIR GMP_LIBRARY)
>> -- Could NOT find muparser (missing: MUPARSER_INCLUDE_DIR MUPARSER_LIBRARY)
>> -- Could NOT find OpenCTM (missing: OPENCTM_INCLUDE_DIR OPENCTM_LIBRARY)
>> -- Could NOT find Qhull (missing: QHULL_qhull_LIBRARY QHULL_qhull_INCLUDE_DIR qhull)
>> -- Found OpenMP_C: -fopenmp (found version "4.5")
>> -- Found OpenMP_CXX: -fopenmp (found version "4.5")
>> -- Found OpenMP: TRUE (found version "4.5")
>> -- - jhead - using bundled source
>> -- - glew - using bundled source
>> -- - Eigen - using bundled source
>> -- - newuoa - using bundled source
>> -- - levmar - using bundled source
>> -- - lib3ds - using bundled source
>> -- - muparser - using bundled source
>> -- - OpenCTM - using bundled source
>> -- - structure-synth - using bundled source
>> -- - qhull - using bundled source
>> --8<---------------cut here---------------end--------------->8---
>>
>> Some of these are already packaged, so it should be a matter of adding
>> them to ‘inputs’. For the remaining ones, it would be extra packaging
>> work to do.
>>
>> The goal is to address all of these, but if we can address the majority
>> of these, perhaps we can commit a first version of the package with a
>> FIXME stating what remains to be done, if you prefer.
>>
>> Thanks, and apologies for overlooking it before!
>>
>> Ludo’.
>
> Hi,
>
> No worries, I'll try to take a look to those.
>
> We can push it with the Fixme and I'll go adding those during these days when I'm free.
>
> Thanks!
>
> PS: Should I push those to the same file under engineering? or should I create a new file for meshlab and add all its dependencies there too?
L
L
Ludovic Courtès wrote on 8 May 2020 16:30
(name . Ekaitz Zarraga)(address . ekaitz@elenq.tech)(name . 40492@debbugs.gnu.org)(address . 40492@debbugs.gnu.org)
87h7wqcxdv.fsf@gnu.org
Saluton,

Did you have a change to look into this?

Thanks,
Ludo'.

Ekaitz Zarraga <ekaitz@elenq.tech> skribis:

Toggle quote (64 lines)
> On Sunday, April 26, 2020 10:49 PM, Ludovic Courtès <ludo@gnu.org> wrote:
>
>> Saluton!
>>
>> Ekaitz Zarraga ekaitz@elenq.tech skribis:
>>
>> > From 814e44cb90b1427a9af5d6a66392c5a39910e8fd Mon Sep 17 00:00:00 2001
>> > From: Ekaitz Zarraga ekaitz@elenq.tech
>> > Date: Tue, 7 Apr 2020 18:56:06 +0200
>> > Subject: [PATCH] gnu: Add meshlab.
>> >
>> > * gnu/packages/engineering.scm (meshlab): New variable.
>> >
>>
>> Great! I added a copyright line for you, fixed up indentation (see the
>> bit in the manual for how to do that automatically), and added a
>> comment—patch attached.
>>
>> It built for me, but then I realized I had missed something: the
>> external/ sub-directory contains lots of bundled copies of external
>> tools, and indeed, the ‘configure’ phase shows:
>>
>> --8<---------------cut here---------------start------------->8---
>> -- Could NOT find Lib3ds (missing: LIB3DS_INCLUDE_DIR LIB3DS_LIBRARY)
>> -- Could NOT find GMP (missing: GMP_INCLUDE_DIR GMP_LIBRARY)
>> -- Could NOT find muparser (missing: MUPARSER_INCLUDE_DIR MUPARSER_LIBRARY)
>> -- Could NOT find OpenCTM (missing: OPENCTM_INCLUDE_DIR OPENCTM_LIBRARY)
>> -- Could NOT find Qhull (missing: QHULL_qhull_LIBRARY QHULL_qhull_INCLUDE_DIR qhull)
>> -- Found OpenMP_C: -fopenmp (found version "4.5")
>> -- Found OpenMP_CXX: -fopenmp (found version "4.5")
>> -- Found OpenMP: TRUE (found version "4.5")
>> -- - jhead - using bundled source
>> -- - glew - using bundled source
>> -- - Eigen - using bundled source
>> -- - newuoa - using bundled source
>> -- - levmar - using bundled source
>> -- - lib3ds - using bundled source
>> -- - muparser - using bundled source
>> -- - OpenCTM - using bundled source
>> -- - structure-synth - using bundled source
>> -- - qhull - using bundled source
>> --8<---------------cut here---------------end--------------->8---
>>
>> Some of these are already packaged, so it should be a matter of adding
>> them to ‘inputs’. For the remaining ones, it would be extra packaging
>> work to do.
>>
>> The goal is to address all of these, but if we can address the majority
>> of these, perhaps we can commit a first version of the package with a
>> FIXME stating what remains to be done, if you prefer.
>>
>> Thanks, and apologies for overlooking it before!
>>
>> Ludo’.
>
> Hi,
>
> No worries, I'll try to take a look to those.
>
> We can push it with the Fixme and I'll go adding those during these days when I'm free.
>
> Thanks!
>
> PS: Should I push those to the same file under engineering? or should I create a new file for meshlab and add all its dependencies there too?
E
E
Ekaitz Zarraga wrote on 8 May 2020 16:47
(name . Ludovic Courtès)(address . ludo@gnu.org)(name . 40492\@debbugs.gnu.org)(address . 40492@debbugs.gnu.org)
v-XKa6UjWGoRVnQcUI1iQIoa2Sm0rG8x6Vq-lMKKZy9veBMKa0FvYxbO-SH43iEezQRtZR3Cjp5wPhbA5RIwxPJhuFnSjGcrV6Boz8s1E50=@elenq.tech
??????? Original Message ???????
On Friday, May 8, 2020 4:30 PM, Ludovic Courtès <ludo@gnu.org> wrote:

Toggle quote (8 lines)
> Saluton,
>
> Did you have a change to look into this?
>
> Thanks,
> Ludo'.
>

Not yet :(

I'll try to get some free time these days but I've been busy.
Is it possible to add it like it is with embedded libraries temporarily until we separate all of them?
E
E
Ekaitz Zarraga wrote on 10 May 2020 23:29
(name . Ludovic Courtès)(address . ludo@gnu.org)(name . 40492\@debbugs.gnu.org)(address . 40492@debbugs.gnu.org)
5Xe04GEft3Gf5wO_7lIfdvvkO2Vt2ow9ykrLBPWOxgnkYRCbbLl1fdhPmdc2iO6JL8ZMyQA6zRGlz_7I1Hi-4DrrdnR9HySNCVrxj3ZI3R0=@elenq.tech
Hi,

Toggle quote (6 lines)
> Not yet :(
>
> I'll try to get some free time these days but I've been busy.
> Is it possible to add it like it is with embedded libraries temporarily until we separate all of them?


I'm working on it. I managed to add some system provided libraries but I'm having issues with qhull and I'm trying to fix them upstream.

First step, I filed an issue in meshlab: https://github.com/cnr-isti-vclab/meshlab/issues/678

Second step will be to fix the issue.

Next I need to figure out what to do with the rest of the libraries. Should we package all of them? Some of them don't look interesting by themselves, maybe it's better to keep them bundled.

I also have a question:
Most of the libraries that are bundled in meshlab have very old versions (qhull's version is from 2003). How does Guix handle breaking changes in libraries?
If meshlab doesn't support newer libraries, what do we need to do?

I'll manage to correct qhull's issue and submit a new patch.

Thanks!
L
L
Ludovic Courtès wrote on 11 May 2020 14:44
(name . Ekaitz Zarraga)(address . ekaitz@elenq.tech)(name . 40492@debbugs.gnu.org)(address . 40492@debbugs.gnu.org)
87a72eiqu9.fsf@gnu.org
Egun on!

Ekaitz Zarraga <ekaitz@elenq.tech> skribis:

Toggle quote (4 lines)
> I'm working on it. I managed to add some system provided libraries but I'm having issues with qhull and I'm trying to fix them upstream.
>
> First step, I filed an issue in meshlab: https://github.com/cnr-isti-vclab/meshlab/issues/678

Great!

Toggle quote (4 lines)
> Second step will be to fix the issue.
>
> Next I need to figure out what to do with the rest of the libraries. Should we package all of them? Some of them don't look interesting by themselves, maybe it's better to keep them bundled.

Ideally, yes. Now, if some of these libraries have no other users, we
can make an exception.

Toggle quote (4 lines)
> I also have a question:
> Most of the libraries that are bundled in meshlab have very old versions (qhull's version is from 2003). How does Guix handle breaking changes in libraries?
> If meshlab doesn't support newer libraries, what do we need to do?

We could still unbundle for example qhull and, if needed, package that
older version that Meshlab need. In parallel, we can report the issue
to the Meshlab developers so that future versions can use the current
qhull.

I realize this is quite some work, so you’re welcome to improve things
incrementally. If you don’t manage to deal with all the bundled
libraries, then you can still send an updated patch and we’ll see where
we are and perhaps push the version you arrived at.

Thank you!

Ludo’.
E
E
Ekaitz Zarraga wrote on 11 May 2020 16:10
(name . Ludovic Courtès)(address . ludo@gnu.org)(name . 40492\@debbugs.gnu.org)(address . 40492@debbugs.gnu.org)
Bo3u1lRCje7tHGzqmpRZYQMT8tCow8k4GO7fQzotBC8sneLBTDRe3b3YsaYJqzTU_feR4T9Kc91b5DHBpoxWu9o567uok0W8U1Bg_2TO750=@elenq.tech
Kaixo,


On Monday, May 11, 2020 2:44 PM, Ludovic Courtès <ludo@gnu.org> wrote:

Toggle quote (8 lines)
> Egun on!
>
> > Second step will be to fix the issue.
> > Next I need to figure out what to do with the rest of the libraries. Should we package all of them? Some of them don't look interesting by themselves, maybe it's better to keep them bundled.
>
> Ideally, yes. Now, if some of these libraries have no other users, we
> can make an exception.

Understood.
Weird stuff like openkinect is not going to be used anywhere else, right? :D

Toggle quote (9 lines)
> > I also have a question:
> > Most of the libraries that are bundled in meshlab have very old versions (qhull's version is from 2003). How does Guix handle breaking changes in libraries?
> > If meshlab doesn't support newer libraries, what do we need to do?
>
> We could still unbundle for example qhull and, if needed, package that
> older version that Meshlab need. In parallel, we can report the issue
> to the Meshlab developers so that future versions can use the current
> qhull.

Ok!

Toggle quote (5 lines)
> I realize this is quite some work, so you’re welcome to improve things
> incrementally. If you don’t manage to deal with all the bundled
> libraries, then you can still send an updated patch and we’ll see where
> we are and perhaps push the version you arrived at.

I attach what I currently have. It's a working package with most recent version of Meshlab (overwrites older patch) with some of the libraries unbundled. It has some extra comments about bundled libs that may be better to remove if it's released, but I'll leave that to your opinion.

I'll keep doing this because it's important for me. Meshlab is a very powerful tool and we almost have it!

ty,

Ekaitz
E
E
Ekaitz Zarraga wrote on 11 May 2020 16:11
(name . Ludovic Courtès)(address . ludo@gnu.org)(name . 40492\@debbugs.gnu.org)(address . 40492@debbugs.gnu.org)
IiFHIISWdR1nkVRqbN_dVB6xJ99FtcrkPjlCzXbQT8vMsXOfmt4zE1XugZG8NrI44BWmAfNuiImpaJ1EESfDoATKHI3cHOaMgWsjtfCp99E=@elenq.tech
Toggle quote (2 lines)
> I attach what I currently have.

I didn't...
From d462d7446e4ecbc4244e429538b926aae43004b8 Mon Sep 17 00:00:00 2001
From: Ekaitz Zarraga <ekaitz@elenq.tech>
Date: Tue, 7 Apr 2020 18:56:06 +0200
Subject: [PATCH] gnu: Add meshlab.

* gnu/packages/engineering.scm (meshlab): New variable.
---
gnu/packages/engineering.scm | 64 ++++++++++++++++++++++++++++++++++++
1 file changed, 64 insertions(+)

Toggle diff (74 lines)
diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 5405db762c..6e13be10e1 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -2491,3 +2491,67 @@ without any changes. And programmers that are familiar with the magellan API
can continue using it with a free library without the restrictions of the
official SDK.")
(license license:bsd-3)))
+
+(define-public meshlab
+ (let ((version "2020.05"))
+ (package
+ (name "meshlab")
+ (version version)
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/cnr-isti-vclab/meshlab")
+ (commit (string-append "Meshlab-" version))
+ (recursive? #t)))
+ (sha256
+ (base32 "00sim20ka9vjwljixdj4cqd285j21mpaq05ari7nqq2w8yyglp5m"))))
+ (build-system cmake-build-system)
+ (native-inputs
+ `(("qtbase" ,qtbase)
+ ("qtscript" ,qtscript)
+ ("qtxmlpatterns" ,qtxmlpatterns)
+ ("mesa", mesa)
+ ("glu", glu)
+ ; Externals, also bundled in meshlab's code
+ ("glew", glew)
+ ("muparser", muparser)
+ ("gmp", gmp)
+ ("eigen", eigen)
+ ;("qhull", qhull) ; Compilation fails with system qhull
+ ;Not packaged in Guix
+ ;structuresynth-1.5
+ ;openkinect
+ ;newoua
+ ;lib3ds 1.3.0
+ ;levmar 2.3
+ ;jhead 3.04
+ ;openctm 1.3.0
+ ))
+ (arguments
+ `(#:tests? #f ; Has no tests
+ #:phases
+ (modify-phases
+ %standard-phases
+ (add-after
+ 'unpack 'go-to-source-dir
+ (lambda _ (chdir "src") #t))
+ (add-after
+ 'install 'move-files
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((lib (string-append (assoc-ref outputs "out")
+ "/lib")))
+ (rename-file
+ (string-append lib "/meshlab/libmeshlab-common.so")
+ (string-append lib "/libmeshlab-common.so"))
+ #t))))))
+ (synopsis "3D triangular mesh processing and editing software")
+ (home-page "http://www.meshlab.net/")
+ (description "MeshLab is a system for the processing and
+editing of unstructured large 3D triangular meshes. It is aimed to help the
+processing of the typical not-so-small unstructured models arising in 3D
+scanning, providing a set of tools for editing, cleaning, healing, inspecting,
+rendering and converting this kind of meshes. These tools include MeshLab
+proper, a versatile program with a graphical user interface, and meshlabserver,
+a program that can perform mesh processing tasks in batch mode, without a
+GUI.")
+ (license license:gpl3+))))
--
2.26.1
L
L
Ludovic Courtès wrote on 14 May 2020 10:06
(name . Ekaitz Zarraga)(address . ekaitz@elenq.tech)(name . 40492@debbugs.gnu.org)(address . 40492@debbugs.gnu.org)
87blmrvt3c.fsf@gnu.org
Hi,

Ekaitz Zarraga <ekaitz@elenq.tech> skribis:

Toggle quote (7 lines)
> From d462d7446e4ecbc4244e429538b926aae43004b8 Mon Sep 17 00:00:00 2001
> From: Ekaitz Zarraga <ekaitz@elenq.tech>
> Date: Tue, 7 Apr 2020 18:56:06 +0200
> Subject: [PATCH] gnu: Add meshlab.
>
> * gnu/packages/engineering.scm (meshlab): New variable.

[...]

Toggle quote (9 lines)
> + ;Not packaged in Guix
> + ;structuresynth-1.5
> + ;openkinect
> + ;newoua
> + ;lib3ds 1.3.0
> + ;levmar 2.3
> + ;jhead 3.04
> + ;openctm 1.3.0

Of these I think we should at least package openkinect, lib3ds, and
openctm, which appear to be rather widespread pieces of software. I
haven’t checked the others.

Would you like to give it a try? We can come back to Meshlab
afterwards.

Thank you,
Ludo’.
E
E
Ekaitz Zarraga wrote on 14 May 2020 10:17
(name . Ludovic Courtès)(address . ludo@gnu.org)(name . 40492\@debbugs.gnu.org)(address . 40492@debbugs.gnu.org)
jtizEq58wAeTGNvQXulHbeNrisOh65pGT12Id0SfzYe_5oYPG7aiuAITMlfqdCDW-Hq7Dzhd7Dy69WMrwrJJoU1nSi9mY3V5DOcPUuyM3oQ=@elenq.tech
Hi,

On Thursday, May 14, 2020 10:06 AM, Ludovic Courtès <ludo@gnu.org> wrote:

Toggle quote (10 lines)
> Of these I think we should at least package openkinect, lib3ds, and
> openctm, which appear to be rather widespread pieces of software. I
> haven’t checked the others.
>
> Would you like to give it a try? We can come back to Meshlab
> afterwards.
>
> Thank you,
> Ludo’.

Sure.

I'll work on those during these days.
E
E
Ekaitz Zarraga wrote on 16 May 2020 00:41
(name . Ludovic Courtès)(address . ludo@gnu.org)(name . 40492\@debbugs.gnu.org)(address . 40492@debbugs.gnu.org)
jrT4KJnmbhMPZei-nJ6mqn173bPfAh9bigKP6o0d3e61h9TKDtINdJ1CpPrYmNY-aEWtqWnZp9h5sR7dpoSX_Ujq8j3ZzQQZXq-ZD0K8giU=@elenq.tech
Hi,

??????? Original Message ???????
On Thursday, May 14, 2020 10:17 AM, Ekaitz Zarraga <ekaitz@elenq.tech> wrote:

Toggle quote (16 lines)
> Hi,
>
> On Thursday, May 14, 2020 10:06 AM, Ludovic Courtès ludo@gnu.org wrote:
>
> > Of these I think we should at least package openkinect, lib3ds, and
> > openctm, which appear to be rather widespread pieces of software. I
> > haven’t checked the others.
> > Would you like to give it a try? We can come back to Meshlab
> > afterwards.
> > Thank you,
> > Ludo’.
>
> Sure.
>
> I'll work on those during these days.

I added all the packages mentioned:


But there's something worth mentioning on all of them I think. They have two different parts: binaries and the library itself. The binaries are just for testing the library or using it while the most interesting part is the library itself.

I think it could be more interesting to separate the outputs to have more lightweight lib packages. I don't know how to do it though. I'd like to learn and add it but the documentation is not really clear about it to learn myself so I'm afraid I need some help on that.

Best,
Ekaitz
E
E
Ekaitz Zarraga wrote on 21 May 2020 13:59
(name . Ludovic Courtès)(address . ludo@gnu.org)(name . 40492\@debbugs.gnu.org)(address . 40492@debbugs.gnu.org)
ZlgmhTh25LyVwRVRUehl2Ojo_lStWVRRDt-9Hd6gw5pE8VbC6n7XkAJye67YzmJaRaVs8oPdnp1mPbZsTqoemtVthGx7lHaWIJcYZ5U5qNo=@elenq.tech
Hi,

I think all the packages mentioned are added.
I'll come back to this issue and try to make meshlab work.
We don't have any news from the qhull compilation issue yet so I'll probably fix it myself (why not?).

Best,
Ekaitz
L
L
Ludovic Courtès wrote on 12 Jun 2020 18:13
(name . Ekaitz Zarraga)(address . ekaitz@elenq.tech)(name . 40492@debbugs.gnu.org)(address . 40492@debbugs.gnu.org)
875zbw5kka.fsf@gnu.org
Hi,

Ekaitz Zarraga <ekaitz@elenq.tech> skribis:

Toggle quote (4 lines)
> I think all the packages mentioned are added.
> I'll come back to this issue and try to make meshlab work.
> We don't have any news from the qhull compilation issue yet so I'll probably fix it myself (why not?).

Did you have a chance to look into it? Or is there something blocking
progress?

Thanks,
Ludo’.
E
E
Ekaitz Zarraga wrote on 12 Jun 2020 18:32
(name . Ludovic Courtès)(address . ludo@gnu.org)(name . 40492\@debbugs.gnu.org)(address . 40492@debbugs.gnu.org)
MKHfu4q9vRfWT5ZX1-FuWf5BBYumzkiyr_64pJOeFrlVbdGtBXAHqkGBxAUr3ybuEfBqSv8wl1Fq2lD2ka63zhDmUwp0lAzCoWyc0vzR1ZA=@elenq.tech
Hi Ludo,

Toggle quote (6 lines)
> Did you have a chance to look into it? Or is there something blocking
> progress?
>
> Thanks,
> Ludo’.

I did my best here and there's some extra CMake configuration step error, I talked with meshlab's developers about this and I'm unable to make it work with system qhull.
I don't know why.

I don't know enough about CMake (I don't know anything about CMake tbh) to make it work myself.

This is the issue upstream.

With the QHull provided by Meshlab it works well with all the libs we packaged, does it make sense to leave just qhull for the moment?

Best,
Ekaitz
L
L
Ludovic Courtès wrote on 12 Jun 2020 21:45
(name . Ekaitz Zarraga)(address . ekaitz@elenq.tech)(name . 40492@debbugs.gnu.org)(address . 40492@debbugs.gnu.org)
87tuzg2hly.fsf@gnu.org
Hi,

Ekaitz Zarraga <ekaitz@elenq.tech> skribis:

Toggle quote (10 lines)
> I did my best here and there's some extra CMake configuration step error, I talked with meshlab's developers about this and I'm unable to make it work with system qhull.
> I don't know why.
>
> I don't know enough about CMake (I don't know anything about CMake tbh) to make it work myself.
>
> This is the issue upstream.
> https://github.com/cnr-isti-vclab/meshlab/issues/678
>
> With the QHull provided by Meshlab it works well with all the libs we packaged, does it make sense to leave just qhull for the moment?

Yeah, let’s do that, with a FIXME comment referencing the above issue.

Thanks for the update!

Ludo’.
E
E
Ekaitz Zarraga wrote on 12 Jun 2020 23:46
(name . Ludovic Courtès)(address . ludo@gnu.org)(name . 40492\@debbugs.gnu.org)(address . 40492@debbugs.gnu.org)
qfCNcDJ4o52MgsyhtKtYN2sWnX3o7CerccMq-8uNgGtlcZdltM0cjhjLrgPSK-b6ISr3a1ZdEmV1ypGl-ba2yxHRrwAQCQIBVtTrOUTeNmw=@elenq.tech
??????? Original Message ???????
On Friday, June 12, 2020 9:45 PM, Ludovic Courtès <ludo@gnu.org> wrote:

Toggle quote (17 lines)
> Hi,
>
> Ekaitz Zarraga ekaitz@elenq.tech skribis:
>
> > I did my best here and there's some extra CMake configuration step error, I talked with meshlab's developers about this and I'm unable to make it work with system qhull.
> > I don't know why.
> > I don't know enough about CMake (I don't know anything about CMake tbh) to make it work myself.
> > This is the issue upstream.
> > https://github.com/cnr-isti-vclab/meshlab/issues/678
> > With the QHull provided by Meshlab it works well with all the libs we packaged, does it make sense to leave just qhull for the moment?
>
> Yeah, let’s do that, with a FIXME comment referencing the above issue.
>
> Thanks for the update!
>
> Ludo’.

There it goes.


From 2779f50ad71b4458272aaa9223df96e3a77f60e4 Mon Sep 17 00:00:00 2001
From: Ekaitz Zarraga <ekaitz@elenq.tech>
Date: Fri, 12 Jun 2020 23:41:18 +0200
Subject: [PATCH] gnu: Add meshlab.

* gnu/packages/engineering.scm (meshlab): New variable.
---
gnu/packages/engineering.scm | 61 ++++++++++++++++++++++++++++++++++++
1 file changed, 61 insertions(+)

Toggle diff (76 lines)
diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 9d9c67b861..b243974dcc 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -105,6 +105,7 @@
#:use-module (gnu packages version-control)
#:use-module (gnu packages wxwidgets)
#:use-module (gnu packages xml)
+ #:use-module (gnu packages openkinect)
#:use-module (gnu packages xorg))

(define-public librecad
@@ -2619,3 +2620,63 @@ accessible through a simple API")
model files. Its main goal is to simplify the creation of 3DS import and
export filters.")
(license license:lgpl2.1+)))
+
+(define-public meshlab
+ (let ((version "2020.05"))
+ (package
+ (name "meshlab")
+ (version version)
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/cnr-isti-vclab/meshlab")
+ (commit (string-append "Meshlab-" version))
+ (recursive? #t)))
+ (sha256
+ (base32 "00sim20ka9vjwljixdj4cqd285j21mpaq05ari7nqq2w8yyglp5m"))))
+ (build-system cmake-build-system)
+ (native-inputs
+ `(("qtbase" ,qtbase)
+ ("qtscript" ,qtscript)
+ ("qtxmlpatterns" ,qtxmlpatterns)
+ ("mesa" ,mesa)
+ ("glu" ,glu)
+ ("glew" ,glew)
+ ("muparser" ,muparser)
+ ("gmp" ,gmp)
+ ("eigen" ,eigen)
+ ("libfreenect" ,libfreenect)
+ ("lib3ds" ,lib3ds)
+ ("openctm" ,openctm)
+ ;; Compilation fails with system qhull
+ ;; https://github.com/cnr-isti-vclab/meshlab/issues/678
+ ;; ("qhull" ,qhull)
+ ))
+ (arguments
+ `(#:tests? #f ; Has no tests
+ #:phases
+ (modify-phases
+ %standard-phases
+ (add-after
+ 'unpack 'go-to-source-dir
+ (lambda _ (chdir "src") #t))
+ (add-after
+ 'install 'move-files
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((lib (string-append (assoc-ref outputs "out")
+ "/lib")))
+ (rename-file
+ (string-append lib "/meshlab/libmeshlab-common.so")
+ (string-append lib "/libmeshlab-common.so"))
+ #t))))))
+ (synopsis "3D triangular mesh processing and editing software")
+ (home-page "https://www.meshlab.net/")
+ (description "MeshLab is a system for the processing and
+editing of unstructured large 3D triangular meshes. It is aimed to help the
+processing of the typical not-so-small unstructured models arising in 3D
+scanning, providing a set of tools for editing, cleaning, healing, inspecting,
+rendering and converting this kind of meshes. These tools include MeshLab
+proper, a versatile program with a graphical user interface, and meshlabserver,
+a program that can perform mesh processing tasks in batch mode, without a
+GUI.")
+ (license license:gpl3+))))
--
2.26.2
L
L
Ludovic Courtès wrote on 13 Jun 2020 16:58
(name . Ekaitz Zarraga)(address . ekaitz@elenq.tech)(name . 40492@debbugs.gnu.org)(address . 40492-done@debbugs.gnu.org)
87imfv108a.fsf@gnu.org
Hi,

Ekaitz Zarraga <ekaitz@elenq.tech> skribis:

Toggle quote (7 lines)
> From 2779f50ad71b4458272aaa9223df96e3a77f60e4 Mon Sep 17 00:00:00 2001
> From: Ekaitz Zarraga <ekaitz@elenq.tech>
> Date: Fri, 12 Jun 2020 23:41:18 +0200
> Subject: [PATCH] gnu: Add meshlab.
>
> * gnu/packages/engineering.scm (meshlab): New variable.

Alright! Applied with the following changes (whitespace-insensitive
diff). I hope we can eventually fix the qhull issue, we’ll see.

Thank you!

Ludo’.
Toggle diff (59 lines)
diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index b243974dcc..fe3c87edd5 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -2622,20 +2622,20 @@ export filters.")
(license license:lgpl2.1+)))
(define-public meshlab
- (let ((version "2020.05"))
(package
(name "meshlab")
- (version version)
+ (version "2020.05")
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/cnr-isti-vclab/meshlab")
(commit (string-append "Meshlab-" version))
(recursive? #t)))
+ (file-name (git-file-name name version))
(sha256
(base32 "00sim20ka9vjwljixdj4cqd285j21mpaq05ari7nqq2w8yyglp5m"))))
(build-system cmake-build-system)
- (native-inputs
+ (inputs
`(("qtbase" ,qtbase)
("qtscript" ,qtscript)
("qtxmlpatterns" ,qtxmlpatterns)
@@ -2648,20 +2648,17 @@ export filters.")
("libfreenect" ,libfreenect)
("lib3ds" ,lib3ds)
("openctm" ,openctm)
- ;; Compilation fails with system qhull
+ ;; FIXME: Compilation fails with system qhull:
;; https://github.com/cnr-isti-vclab/meshlab/issues/678
;; ("qhull" ,qhull)
))
(arguments
`(#:tests? #f ; Has no tests
#:phases
- (modify-phases
- %standard-phases
- (add-after
- 'unpack 'go-to-source-dir
+ (modify-phases %standard-phases
+ (add-after 'unpack 'go-to-source-dir
(lambda _ (chdir "src") #t))
- (add-after
- 'install 'move-files
+ (add-after 'install 'move-files
(lambda* (#:key outputs #:allow-other-keys)
(let ((lib (string-append (assoc-ref outputs "out")
"/lib")))
@@ -2679,4 +2676,4 @@ rendering and converting this kind of meshes. These tools include MeshLab
proper, a versatile program with a graphical user interface, and meshlabserver,
a program that can perform mesh processing tasks in batch mode, without a
GUI.")
- (license license:gpl3+))))
+ (license license:gpl3+)))
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 40492@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 40492
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch