GNU bug report logs -
#45573
[PATCH] Correct freecad runtime errors
Previous Next
Reported by: Ekaitz Zarraga <ekaitz <at> elenq.tech>
Date: Thu, 31 Dec 2020 18:49:01 UTC
Severity: normal
Tags: patch
Done: Leo Famulari <leo <at> famulari.name>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 45573 in the body.
You can then email your comments to 45573 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#45573
; Package
guix-patches
.
(Thu, 31 Dec 2020 18:49:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Ekaitz Zarraga <ekaitz <at> elenq.tech>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Thu, 31 Dec 2020 18:49:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi,
I attach 4 patches that correct the runtime issues freecad has and also supply some packages needed as a dependency.
Freecad is a very complex package that is hard to build because many of its dependencies' buildsystem is broken. The approach followed here is the same that Nix follows and appears to work correctly.
The changes correct the Draft module, which wasn't available because pivy was not added as a dependency.
For context, see this message:
https://lists.gnu.org/archive/html/guix-devel/2020-12/msg00123.html
Thanks
[0001-gnu-Add-coin3D-4.patch (text/x-patch, attachment)]
[0003-gnu-Add-python-pivy.patch (text/x-patch, attachment)]
[0004-gnu-freecad-correct-runtime-errors.patch (text/x-patch, attachment)]
[0002-gnu-Add-soqt.patch (text/x-patch, attachment)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#45573
; Package
guix-patches
.
(Thu, 31 Dec 2020 22:37:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 45573 <at> debbugs.gnu.org (full text, mbox):
On Thu, Dec 31, 2020 at 06:47:59PM +0000, Ekaitz Zarraga wrote:
> I attach 4 patches that correct the runtime issues freecad has and also supply some packages needed as a dependency.
>
> Freecad is a very complex package that is hard to build because many of its dependencies' buildsystem is broken. The approach followed here is the same that Nix follows and appears to work correctly.
>
> The changes correct the Draft module, which wasn't available because pivy was not added as a dependency.
>
> For context, see this message:
> https://lists.gnu.org/archive/html/guix-devel/2020-12/msg00123.html
Thanks!
Here is my feedback:
> Subject: [PATCH 1/4] gnu: Add coin3D-4.
>
> * gnu/packages/graphics.scm (coin3D-4): New variable.
> + (snippet
> + '(begin
> + (for-each delete-file
> + '("cfg/csubst.exe"
> + "cfg/wrapmsvc.exe"))
Please add a brief code comment like "Delete binaries".
> + (substitute* "CMakeLists.txt"
> + ((".*cpack.d.*") ""))
> + #t))))
What does this do? Please add an explanatory comment.
> Subject: [PATCH 3/4] gnu: Add python-pivy.
>
> * gnu/packages/python-xyz.scm (python-pivy): New variable.
> + (snippet
> + '(begin
> + (substitute* "CMakeLists.txt"
> + (("\\$\\{SoQt_INCLUDE_DIRS}")
> + "${Coin_INCLUDE_DIR};${SoQt_INCLUDE_DIRS}"))
> + #t))))
Origin snippets affect what is returned by `guix build --source
python-pivy`, and are used for correcting very serious bugs in the
source code or for fixing so-called "freedom issues", such as removing
pre-compiled binaries.
We prefer to make other types of changes in custom build phases in a
package's arguments. I'm not sure exactly what this substitution does —
please add a comment — but perhaps it would be more appropriate in a
custom build phase?
> + (arguments
> + `(#:tests? #f))
Why are the tests disabled? We aim to make Guix packages pass upstream
test suites, so there should be a reason for skipping them. If there is
no test suite, just add a comment saying so. Same question about the
soqt package.
> Subject: [PATCH 4/4] gnu: freecad correct runtime errors
>
> * gnu/packages/engineering.scm (freecad): Update package
> [inputs]: Move python-pyside-2-tools to native-inputs
> [inputs]: Add pivy
> [inputs]: Add qtxmlpatterns
> [inputs]: Add qtwebkit
Are all of these changes necessary to fix the errors? If not, we prefer
to split the changes up into separate commits. For example, one commit
to update the package, one commit to fix the errors, one commit to
enable some optional feature (e.g. requiring qtwebkit).
If all the changes must be made together, that's fine too.
The commit message should be rewritten, but exactly how depends on
answers to my previous questions. It could be written like this:
------
gnu: FreeCad: Update to 0.18.5-1.7616153.
Fixes *description of bug*.
* gnu/packages/engineering.scm (freecad): Update to 0.18.5-1.7616153.
[inputs]: Add python-pivy, qtxmlpatterns, and qtwebkit. Remove
python-pyside-2-tools.
[native-inputs]: Add python-pyside-2-tools.
------
Can you send a revised patch series?
Information forwarded
to
guix-patches <at> gnu.org
:
bug#45573
; Package
guix-patches
.
(Thu, 31 Dec 2020 23:24:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 45573 <at> debbugs.gnu.org (full text, mbox):
Hi,
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Thursday, December 31, 2020 11:36 PM, Leo Famulari <leo <at> famulari.name> wrote:
> On Thu, Dec 31, 2020 at 06:47:59PM +0000, Ekaitz Zarraga wrote:
>
> > I attach 4 patches that correct the runtime issues freecad has and also supply some packages needed as a dependency.
> > Freecad is a very complex package that is hard to build because many of its dependencies' buildsystem is broken. The approach followed here is the same that Nix follows and appears to work correctly.
> > The changes correct the Draft module, which wasn't available because pivy was not added as a dependency.
> > For context, see this message:
> > https://lists.gnu.org/archive/html/guix-devel/2020-12/msg00123.html
>
> Thanks!
>
> Here is my feedback:
>
> > Subject: [PATCH 1/4] gnu: Add coin3D-4.
> >
> > * gnu/packages/graphics.scm (coin3D-4): New variable.
> >
>
> > - (snippet
> >
> >
> > - '(begin
> >
> >
> > - (for-each delete-file
> >
> >
> > - '("cfg/csubst.exe"
> >
> >
> > - "cfg/wrapmsvc.exe"))
> >
> >
>
> Please add a brief code comment like "Delete binaries".
>
> > - (substitute* "CMakeLists.txt"
> >
> >
> > - ((".*cpack.d.*") ""))
> >
> >
> > - #t))))
> >
> >
>
> What does this do? Please add an explanatory comment.
It removes an unnecessary library.
I'll add a comment.
> > Subject: [PATCH 3/4] gnu: Add python-pivy.
> >
> > * gnu/packages/python-xyz.scm (python-pivy): New variable.
> >
>
> > - (snippet
> >
> >
> > - '(begin
> >
> >
> > - (substitute* "CMakeLists.txt"
> >
> >
> > - (("\\\\$\\\\{SoQt_INCLUDE_DIRS}")
> >
> >
> > - "${Coin_INCLUDE_DIR};${SoQt_INCLUDE_DIRS}"))
> >
> >
> > - #t))))
> >
> >
>
> Origin snippets affect what is returned by`guix build --source python-pivy`, and are used for correcting very serious bugs in the
> source code or for fixing so-called "freedom issues", such as removing
> pre-compiled binaries.
>
> We prefer to make other types of changes in custom build phases in a
> package's arguments. I'm not sure exactly what this substitution does —
> please add a comment — but perhaps it would be more appropriate in a
> custom build phase?
This substitution corrects the repository.
By default the repository doesn't find Coin3D, so we need to insert its search path by hand.
What's the best way to add this?
> > - (arguments
> > - `(#:tests? #f))
> >
> >
>
> Why are the tests disabled? We aim to make Guix packages pass upstream
> test suites, so there should be a reason for skipping them. If there is
> no test suite, just add a comment saying so. Same question about the
> soqt package.
>
> > Subject: [PATCH 4/4] gnu: freecad correct runtime errors
> >
> > * gnu/packages/engineering.scm (freecad): Update package
> > [inputs]: Move python-pyside-2-tools to native-inputs
> > [inputs]: Add pivy
> > [inputs]: Add qtxmlpatterns
> > [inputs]: Add qtwebkit
> >
>
> Are all of these changes necessary to fix the errors? If not, we prefer
> to split the changes up into separate commits. For example, one commit
> to update the package, one commit to fix the errors, one commit to
> enable some optional feature (e.g. requiring qtwebkit).
Ok, I'll separate the qtwebkit as it's not necessary for this fix.
> If all the changes must be made together, that's fine too.
>
> The commit message should be rewritten, but exactly how depends on
> answers to my previous questions. It could be written like this:
>
> -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> gnu: FreeCad: Update to 0.18.5-1.7616153.
>
> Fixes description of bug.
>
> - gnu/packages/engineering.scm (freecad): Update to 0.18.5-1.7616153.
> [inputs]: Add python-pivy, qtxmlpatterns, and qtwebkit. Remove
> python-pyside-2-tools.
> [native-inputs]: Add python-pyside-2-tools.
I'll change that.
> Can you send a revised patch series?
Of course. I'll write a follow up soon.
Happy new year.
Ekaitz
Information forwarded
to
guix-patches <at> gnu.org
:
bug#45573
; Package
guix-patches
.
(Fri, 01 Jan 2021 14:44:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 45573 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi,
I attach the corrected patch set.
If something is missing please let me know.
Thanks.
Happy new year.
Ekaitz
[0001-gnu-Add-coin3D-4.patch (text/x-patch, attachment)]
[0002-gnu-Add-soqt.patch (text/x-patch, attachment)]
[0005-gnu-freecad-move-python-pyside-2-tools-to-native-inp.patch (text/x-patch, attachment)]
[0006-gnu-freecad-Add-qtwebkit-input.patch (text/x-patch, attachment)]
[0003-gnu-Add-python-pivy.patch (text/x-patch, attachment)]
[0004-gnu-FreeCad-Update-to-0.18.5-1.7616153.patch (text/x-patch, attachment)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#45573
; Package
guix-patches
.
(Mon, 04 Jan 2021 00:14:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 45573 <at> debbugs.gnu.org (full text, mbox):
On Fri, Jan 01, 2021 at 02:37:39PM +0000, Ekaitz Zarraga wrote:
> I attach the corrected patch set.
> If something is missing please let me know.
Thanks for the revisions!
> Subject: [PATCH 1/6] gnu: Add coin3D-4.
>
> * gnu/packages/graphics.scm (coin3D-4): New variable.
> + (name "coin3D-4")
I changed the name to "coin3D". One can specify the version in the Guix
UI with "coin3D <at> 4" and in code by referring to the variable name,
coin3D-4.
> + ;; Delete references to packaging tool cpack
> + (substitute* "CMakeLists.txt"
> + ((".*cpack.d.*") ""))
> + #t))))
I still did not understand the reason for this substitution. I tried
building without it and found that the build is broken, so I added this
info to the comment.
Can you report it upstream? It seems like something that all
distributors would benefit from.
> Subject: [PATCH 2/6] gnu: Add soqt.
>
> * gnu/packages/qt.scm (soqt): New variable.
I pushed these first two patches as
a5f13705cb9261ab66bdf73d1fb4a832714feb31
Comments on the others to follow...
Information forwarded
to
guix-patches <at> gnu.org
:
bug#45573
; Package
guix-patches
.
(Mon, 04 Jan 2021 00:19:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 45573 <at> debbugs.gnu.org (full text, mbox):
On Fri, Jan 01, 2021 at 02:37:39PM +0000, Ekaitz Zarraga wrote:
> Subject: [PATCH 3/6] gnu: Add python-pivy.
>
> * gnu/packages/python-xyz.scm (python-pivy): New variable.
> + `(#:tests? #f ; Tests are broken
Can you clarify what you mean, and the overall situation with the tests?
Are they actually used upstream?
> + #:phases
> + (modify-phases %standard-phases
> + (add-after 'unpack 'patch-cmake-include-dirs
> + (lambda _
> + ;; Patch buildsystem to respect Coin3D include directory
> + (substitute* "CMakeLists.txt"
> + (("\\$\\{SoQt_INCLUDE_DIRS}")
> + "${Coin_INCLUDE_DIR};${SoQt_INCLUDE_DIRS}"))
This can probably be fixed with #:configure-flags. I can look into this
before pushing.
> Subject: [PATCH 4/6] gnu: FreeCad: Update to 0.18.5-1.7616153.
>
> Fixes Draft module import errors
>
> * gnu/packages/engineering.scm (freecad): Update to 0.18.5-1.7616153.
> [inputs]: Add python-pivy.
> Subject: [PATCH 5/6] gnu: freecad: move python-pyside-2-tools to native-inputs
>
> * gnu/packages/engineering.scm (freecad):
> [inputs]: Remove python-pyside-2-tools.
> [native-inputs]: Add python-pyside-2-tools.
The re-indentation of the package in patch 4/6 is not complete, and I
will squash these two patches before pushing. I have this "ready to go"
in my Git tree.
> Subject: [PATCH 6/6] gnu: freecad: Add qtwebkit input.
>
> * gnu/packages/engineering.scm (freecad):
> [inputs]: Add qtwebkit.
> - ;; qtwebkit is optional. We remove it currently, because it takes
> - ;; much time to compile and substitutes are often unavailable
> - ;;("qtwebkit" ,qtwebkit)
> + ("qtwebkit" ,qtwebkit)
The comment is still true... I recommend adding a note in the commit
message saying what the new dependency enables.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#45573
; Package
guix-patches
.
(Mon, 04 Jan 2021 12:03:02 GMT)
Full text and
rfc822 format available.
Message #23 received at 45573 <at> debbugs.gnu.org (full text, mbox):
Hi Leo,
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Monday, January 4, 2021 1:13 AM, Leo Famulari <leo <at> famulari.name> wrote:
>
> > - ;; Delete references to packaging tool cpack
> >
> >
> > - (substitute* "CMakeLists.txt"
> >
> >
> > - ((".*cpack.d.*") ""))
> >
> >
> > - #t))))
> >
> >
>
> I still did not understand the reason for this substitution. I tried
> building without it and found that the build is broken, so I added this
> info to the comment.
>
> Can you report it upstream? It seems like something that all
> distributors would benefit from.
I think it's related with packaging. But I'm not sure neither.
Guys at Nix do the same and remove that line. I tried to leave it
and it doesn't work. I'll try to report upstream.
> > Subject: [PATCH 2/6] gnu: Add soqt.
> >
> > * gnu/packages/qt.scm (soqt): New variable.
> >
>
> I pushed these first two patches as
> a5f13705cb9261ab66bdf73d1fb4a832714feb31
>
> Comments on the others to follow...
Thanks!
Information forwarded
to
guix-patches <at> gnu.org
:
bug#45573
; Package
guix-patches
.
(Mon, 04 Jan 2021 12:16:02 GMT)
Full text and
rfc822 format available.
Message #26 received at 45573 <at> debbugs.gnu.org (full text, mbox):
Hi,
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Monday, January 4, 2021 1:18 AM, Leo Famulari <leo <at> famulari.name> wrote:
> On Fri, Jan 01, 2021 at 02:37:39PM +0000, Ekaitz Zarraga wrote:
>
> > Subject: [PATCH 3/6] gnu: Add python-pivy.
> >
> > * gnu/packages/python-xyz.scm (python-pivy): New variable.
> >
>
> > - `(#:tests? #f ; Tests are broken
> >
> >
>
> Can you clarify what you mean, and the overall situation with the tests?
> Are they actually used upstream?
I think they are broken upstream.
When they are run during the guix compilation they report a circular
dependency issue when loading but once the lib is installed i'm able to
import it without issues.
>
> > - #:phases
> >
> >
> > - (modify-phases %standard-phases
> >
> >
> > - (add-after 'unpack 'patch-cmake-include-dirs
> >
> >
> > - (lambda _
> >
> >
> > - ;; Patch buildsystem to respect Coin3D include directory
> >
> >
> > - (substitute* "CMakeLists.txt"
> >
> >
> > - (("\\\\$\\\\{SoQt_INCLUDE_DIRS}")
> >
> >
> > - "${Coin_INCLUDE_DIR};${SoQt_INCLUDE_DIRS}"))
> >
> >
>
> This can probably be fixed with #:configure-flags. I can look into this
> before pushing.
I tried that and I was unable to solve it that way.
I'm not a CMake expert but I think the problem is that even if CMake finds
Coin3D, it's not taking it in account during the compilation, so it needs
that patch to use it.
>
> > Subject: [PATCH 4/6] gnu: FreeCad: Update to 0.18.5-1.7616153.
> > Fixes Draft module import errors
> >
> > * gnu/packages/engineering.scm (freecad): Update to 0.18.5-1.7616153.
> > [inputs]: Add python-pivy.
> >
>
> > Subject: [PATCH 5/6] gnu: freecad: move python-pyside-2-tools to native-inputs
> >
> > * gnu/packages/engineering.scm (freecad):
> > [inputs]: Remove python-pyside-2-tools.
> > [native-inputs]: Add python-pyside-2-tools.
> >
>
> The re-indentation of the package in patch 4/6 is not complete, and I
> will squash these two patches before pushing. I have this "ready to go"
> in my Git tree.
>
> > Subject: [PATCH 6/6] gnu: freecad: Add qtwebkit input.
> >
> > * gnu/packages/engineering.scm (freecad):
> > [inputs]: Add qtwebkit.
> >
>
> > - ;; qtwebkit is optional. We remove it currently, because it takes
> >
> >
> > - ;; much time to compile and substitutes are often unavailable
> >
> >
> > - ;;("qtwebkit" ,qtwebkit)
> >
> >
> >
> > - ("qtwebkit" ,qtwebkit)
> >
> >
>
> The comment is still true... I recommend adding a note in the commit
> message saying what the new dependency enables.
I'm not sure if the comment is true.
I'd like to discuss it, but you can safely discard this change.
The only part that is affected by qtwebkit is the first screen of the
program that shows some examples, links and news. So it's safe to remove
but I'm not sure if the substitutes were unavailable because of this or
because the compilation was failing (it have been broken for a long time).
I'm not sure about how to proceed here. I'm ok with a FreeCad that
is open in a blank screen and shows a couple of warnings on load. I'll
leave the decision of including this patch or not on you guys if you don't
mind.
Thank you for your time,
Ekaitz
Reply sent
to
Leo Famulari <leo <at> famulari.name>
:
You have taken responsibility.
(Mon, 04 Jan 2021 20:13:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Ekaitz Zarraga <ekaitz <at> elenq.tech>
:
bug acknowledged by developer.
(Mon, 04 Jan 2021 20:13:02 GMT)
Full text and
rfc822 format available.
Message #31 received at 45573-done <at> debbugs.gnu.org (full text, mbox):
On Mon, Jan 04, 2021 at 12:15:26PM +0000, Ekaitz Zarraga wrote:
> I think they are broken upstream.
>
> When they are run during the guix compilation they report a circular
> dependency issue when loading but once the lib is installed i'm able to
> import it without issues.
Thanks for the info. I added it to a comment. It helps reviewers (and
later readers of the package definition) to include bits of info to help
understand why the package definition does something non-standard.
> I tried that and I was unable to solve it that way.
> I'm not a CMake expert but I think the problem is that even if CMake finds
> Coin3D, it's not taking it in account during the compilation, so it needs
> that patch to use it.
Okay.
> The only part that is affected by qtwebkit is the first screen of the
> program that shows some examples, links and news. So it's safe to remove
> but I'm not sure if the substitutes were unavailable because of this or
> because the compilation was failing (it have been broken for a long time).
>
> I'm not sure about how to proceed here. I'm ok with a FreeCad that
> is open in a blank screen and shows a couple of warnings on load. I'll
> leave the decision of including this patch or not on you guys if you don't
> mind.
Now that I understand that the absence of QtWebKit breaks part of the
FreeCAD interface, I agree that it should be included.
I squashed the patches in a way that seemed appropriate, wrote the
commit messages, and pushed as ed2e0b1b50587a38ad26574585f73979874e56f0
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 02 Feb 2021 12:24:06 GMT)
Full text and
rfc822 format available.
This bug report was last modified 3 years and 76 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.