[PATCH] gnu: octave: Build with texinfo.

  • Done
  • quality assurance status badge
Details
3 participants
  • Arun Isaac
  • Ludovic Courtès
  • Marius Bakke
Owner
unassigned
Submitted by
Arun Isaac
Severity
normal
A
A
Arun Isaac wrote on 7 Aug 2017 12:43
(address . guix-patches@gnu.org)(name . Arun Isaac)(address . arunisaac@systemreboot.net)
c470797a.AEQAOK6C9kgAAAAAAAAAAAOtUOAAAAACwQwAAAAAAAW9WABZiERt@mailjet.com
texinfo is required for the built-in documentation.

* gnu/packages/maths.scm (octave)[inputs]: Add texinfo.
[native-inputs]: Remove texinfo.
---
gnu/packages/maths.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Toggle diff (31 lines)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index e19c8edc8..44de8a4e6 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -1026,7 +1026,7 @@ can solve two kinds of problems:
(license license:bsd-3)))
;; For a fully featured Octave, users are strongly recommended also to install
-;; the following packages: texinfo, less, ghostscript, gnuplot.
+;; the following packages: less, ghostscript, gnuplot.
(define-public octave
(package
(name "octave")
@@ -1058,6 +1058,7 @@ can solve two kinds of problems:
("glu" ,glu)
("zlib" ,zlib)
("curl" ,curl)
+ ("texinfo" ,texinfo)
("graphicsmagick" ,graphicsmagick)))
(native-inputs
`(("lzip" ,lzip)
@@ -1072,7 +1073,6 @@ can solve two kinds of problems:
;; will still run without them, albeit without the features they
;; provide.
("less" ,less)
- ("texinfo" ,texinfo)
("ghostscript" ,ghostscript)
("gnuplot" ,gnuplot)))
(arguments
--
2.13.4
M
M
Marius Bakke wrote on 8 Aug 2017 00:13
87k22fauwn.fsf@fastmail.com
Arun Isaac <arunisaac@systemreboot.net> writes:

Toggle quote (5 lines)
> texinfo is required for the built-in documentation.
>
> * gnu/packages/maths.scm (octave)[inputs]: Add texinfo.
> [native-inputs]: Remove texinfo.

If I read this right, Octave references texinfo at runtime, so it's
moved to inputs for correctness? The commit message is a bit confusing,
since it already has texinfo available :-)
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAlmI5ggACgkQoqBt8qM6
VPqgRQf+IfW4D3/v4VbfyieYUf2OnksdrFkZHr4EMyDbN880B0W3LBGSwM7xemv2
/syBv7zX0qmkjVwaFsVfyzlpiIzkjszzwRelbOBVtfAT0RoFEhA2oIkAg+xrJFQ/
n4mu2MsaR4AaLLj6KIyLh6SzuZIj8X79rv/WfsMCFrHlQ80ll+/lo4o1r4kYGmYe
MdPHnLxtPACpl5+wbbxslwyEiX61jwVH6zO2KvUsbLH0GYScDTbDiilFlxWCvpmp
369Z0J4Kge3LT927y9iSpJtbXkjM21lq0xtQvpleojDy7gw59Ks5kRATfdkFH7hO
3AhKmGqiZpPC9nOsMZYDX/ah0NTEfA==
=dvAH
-----END PGP SIGNATURE-----

M
M
Marius Bakke wrote on 8 Aug 2017 00:18
[Mail Delivery System] Undelivered Mail Returned to Sender
(address . 28000@debbugs.gnu.org)
87fud3auob.fsf@fastmail.com
Arun, the previous email bounced at my mail server:

Diagnostic-Code: X-Postfix; Host or domain name not found. Name service error
for name=hrrol.systemreboot.net type=A: Host not found

...in case you wonder where the replies are.
A
A
Arun Isaac wrote on 26 Sep 2017 15:23
Re: [bug#28000] [PATCH] gnu: octave: Build with texinfo.
(name . Marius Bakke)(address . mbakke@fastmail.com)(address . 28000@debbugs.gnu.org)
4f4688dd.AEEARAgPOysAAAAAAAAAAAPwTpIAAAACwQwAAAAAAAW9WABZylTD@mailjet.com
Indeed, I was waiting for a response to this patch, and am seeing your
reply only now, after almost 2 months! It looks like I'm having trouble
with my DNS configuration. :-(


Toggle quote (9 lines)
>> texinfo is required for the built-in documentation.
>>
>> * gnu/packages/maths.scm (octave)[inputs]: Add texinfo.
>> [native-inputs]: Remove texinfo.
>
>If I read this right, Octave references texinfo at runtime, so it's
>moved to inputs for correctness? The commit message is a bit confusing,
>since it already has texinfo available :-)

Currently, there is a comment above the octave package definition saying
that users should install texinfo manually in their profile. My patch
allows the user to not have to do that. This is the meaning I was trying
to convey with the commit message. What other commit message would you
suggest?
M
M
Marius Bakke wrote on 27 Sep 2017 23:14
(name . Arun Isaac)(address . arunisaac@systemreboot.net)(address . 28000@debbugs.gnu.org)
877ewjalo5.fsf@fastmail.com
Arun Isaac <arunisaac@systemreboot.net> writes:

Toggle quote (20 lines)
> Indeed, I was waiting for a response to this patch, and am seeing your
> reply only now, after almost 2 months! It looks like I'm having trouble
> with my DNS configuration. :-(
>
>
>>> texinfo is required for the built-in documentation.
>>>
>>> * gnu/packages/maths.scm (octave)[inputs]: Add texinfo.
>>> [native-inputs]: Remove texinfo.
>>
>>If I read this right, Octave references texinfo at runtime, so it's
>>moved to inputs for correctness? The commit message is a bit confusing,
>>since it already has texinfo available :-)
>
> Currently, there is a comment above the octave package definition saying
> that users should install texinfo manually in their profile. My patch
> allows the user to not have to do that. This is the meaning I was trying
> to convey with the commit message. What other commit message would you
> suggest?

I think the comment may be referring to some of the command-line
utilities from Texinfo, e.g. for PDF exports. There are no new
texinfo references in "octave" after this patch:

Toggle snippet (8 lines)
$ grep -R /gnu/store/gfsiaw6rn29ii8cpjnix05a7r588k9yv-texinfo-6.3 $(./pre-inst-env guix build octave)
Binary file /gnu/store/pkg54952yx7dgv4cwjiwpfq5l9lyv90y-octave-4.2.1/lib/octave/4.2.1/liboctinterp.so.4.0.0 matches
Binary file /gnu/store/pkg54952yx7dgv4cwjiwpfq5l9lyv90y-octave-4.2.1/lib/octave/4.2.1/liboctinterp.so.4 matches
Binary file /gnu/store/pkg54952yx7dgv4cwjiwpfq5l9lyv90y-octave-4.2.1/lib/octave/4.2.1/liboctinterp.so matches
Binary file /gnu/store/pkg54952yx7dgv4cwjiwpfq5l9lyv90y-octave-4.2.1/bin/mkoctfile matches
Binary file /gnu/store/pkg54952yx7dgv4cwjiwpfq5l9lyv90y-octave-4.2.1/bin/mkoctfile-4.2.1 matches

However, native-inputs should not be referenced at all, so the patch
LGTM apart from the comment update. Or maybe it's simply outdated?

Side note: Why is it referring to a different texinfo than the one from
`guix build texinfo`.
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAlnMFMoACgkQoqBt8qM6
VPpIgwgAm2Qpdok3B2cGE5a9Et/zsBYPH8/nRMlwdhPG7y1MqIIBFHtjDS177Bza
GHL2sYwQvnQ/u8A79MsUfVkRMVgfsi4RjCjUm4kxNRPeRc6X38xw3gVLNzRGb0Wp
A0OHYaIKSp8ZwFqIWzDvCyF3JQYwra+7JAKf6nyePeDidOVh0HkFjcrN9FWzk33p
31i32KnPXGMD1ipA0NuIJn48C1oyRWjURnS9J4cq1WmJyxQVLx9V/7vzkNUxhIsD
jgEYPaWRgm8yB8SoFD5ctE7uViKc+dTcjkKOS0edagpp8uNK9P3lejZt+E96ddvp
87N8nyylPcdQXS+6Tddsxxj0FuSwrw==
=tBmC
-----END PGP SIGNATURE-----

A
A
Arun Isaac wrote on 29 Sep 2017 16:55
(name . Marius Bakke)(address . mbakke@fastmail.com)(address . 28000@debbugs.gnu.org)
0cd8914f.ADkAADSRXK4AAAAAAAAAAAPwTpIAAAACwQwAAAAAAAW9WABZzl7V@mailjet.com
Oops! I just realized that my patch doesn't work. Let me explain.

Octave uses makeinfo to render the built-in function documentation. So,
it complains when it is not able to find makeinfo. This is shown below:

octave:1> help sin
sh: makeinfo: command not found
warning: help: Texinfo formatting filter exited abnormally; raw Texinfo source of help text follows...
'sin' is a built-in function from the file libinterp/corefcn/mappers.cc

Moving texinfo to inputs does not fix this. I wrongly thought it did
because when I tested octave within the following environment, the
built-in documentation worked.

$ guix environment guix
$ ./pre-inst-env guix environment --ad-hoc octave

However, this was only because texinfo, having been pulled in by the
guix environment, was in the profile.

Now, I'll try to patch the octave source code so that it references the
makeinfo executable in the store. I will send a new patch when I'm done.
A
A
Arun Isaac wrote on 30 Sep 2017 11:25
[PATCH] gnu: octave: Reference makeinfo with absolute path.
(name . Arun Isaac)(address . arunisaac@systemreboot.net)
66af43b0.AEQAQ7astGgAAAAAAAAAAAPwTpIAAAACwQwAAAAAAAW9WABZz2Mh@mailjet.com
* gnu/packages/maths.scm (octave)[arguments]: Add configure-makeinfo phase.
[inputs]: Add texinfo.
[native-inputs]: Remove texinfo.
---
gnu/packages/maths.scm | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)

Toggle diff (49 lines)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index f326f6af7..5c2ab05d1 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -1126,7 +1126,7 @@ can solve two kinds of problems:
(license license:bsd-3)))
;; For a fully featured Octave, users are strongly recommended also to install
-;; the following packages: texinfo, less, ghostscript, gnuplot.
+;; the following packages: less, ghostscript, gnuplot.
(define-public octave
(package
(name "octave")
@@ -1158,6 +1158,7 @@ can solve two kinds of problems:
("glu" ,glu)
("zlib" ,zlib)
("curl" ,curl)
+ ("texinfo" ,texinfo)
("graphicsmagick" ,graphicsmagick)))
(native-inputs
`(("lzip" ,lzip)
@@ -1172,14 +1173,23 @@ can solve two kinds of problems:
;; will still run without them, albeit without the features they
;; provide.
("less" ,less)
- ("texinfo" ,texinfo)
("ghostscript" ,ghostscript)
("gnuplot" ,gnuplot)))
(arguments
`(#:configure-flags
(list (string-append "--with-shell="
(assoc-ref %build-inputs "bash")
- "/bin/sh"))))
+ "/bin/sh"))
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'configure 'configure-makeinfo
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "libinterp/corefcn/help.cc"
+ (("Vmakeinfo_program = \"makeinfo\"")
+ (string-append "Vmakeinfo_program = \""
+ (assoc-ref inputs "texinfo")
+ "/bin/makeinfo\"")))
+ #t)))))
(home-page "https://www.gnu.org/software/octave/")
(synopsis "High-level language for numerical computation")
(description "GNU Octave is a high-level interpreted language that is
--
2.14.1
L
L
Ludovic Courtès wrote on 4 Oct 2017 16:37
(name . Arun Isaac)(address . arunisaac@systemreboot.net)
87poa36ksj.fsf@gnu.org
Arun Isaac <arunisaac@systemreboot.net> skribis:

Toggle quote (4 lines)
> * gnu/packages/maths.scm (octave)[arguments]: Add configure-makeinfo phase.
> [inputs]: Add texinfo.
> [native-inputs]: Remove texinfo.

LGTM, thank you!

Ludo’.
A
A
Arun Isaac wrote on 6 Oct 2017 00:09
(name . Ludovic Courtès)(address . ludo@gnu.org)
11772286.AEMAROwDHiQAAAAAAAAAAAPz3OAAAAACwQwAAAAAAAW9WABZ1q24@mailjet.com
Pushed, thanks!
Closed
?
Your comment

This issue is archived.

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

To respond to this issue using the mumi CLI, first switch to it
mumi current 28000
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