gcc man page is broken

  • Done
  • quality assurance status badge
Details
5 participants
  • Danny Milosavljevic
  • Efraim Flashner
  • Branson, Joshua A
  • Ludovic Courtès
  • Maxim Cournoyer
Owner
unassigned
Submitted by
Danny Milosavljevic
Severity
normal

Debbugs page

Danny Milosavljevic wrote 9 years ago
(address . bug-guix@gnu.org)
20160725222342.1fb3bfaa@scratchpost.org
$ man gcc

timestamp

Manual page gcc(1) line 1/2 (END) (press h for help or q to quit)

$ ls -l /home/dannym/.guix-profile/share/man/man1/gcc.1.gz
lrwxrwxrwx 106 root guixbuild 79 1. Jan 1970 /home/dannym/.guix-profile/share/man/man1/gcc.1.gz -> /gnu/store/1xsd8qd6i0zkzwxa53rp5palcfxb7xqb-gccgo-4.9.3/share/man/man1/gcc.1.gz


Err.... what?

That's also the case for the normal gcc package (for example 4.9.3).

But

$ info gcc

works fine.
Branson, Joshua A wrote 8 years ago
(name . 24069@debbugs.gnu.org)(address . 24069@debbugs.gnu.org)
A8208FE4-7670-4C6F-A587-9802FF4F5758@purdue.edu
I can confirm that this bug still exists. The man page is broken as described, but info gcc works just fine.

Thanks,

Joshua
Maxim Cournoyer wrote 7 years ago
Re: bug#24069: gcc man page is broken
(name . Branson, Joshua A)(address . jbranso@purdue.edu)(name . 24069@debbugs.gnu.org)(address . 24069@debbugs.gnu.org)
877ewfx6s8.fsf@gmail.com
"Branson, Joshua A" <jbranso@purdue.edu> writes:

Toggle quote (6 lines)
> I can confirm that this bug still exists. The man page is broken as described, but info gcc works just fine.
>
> Thanks,
>
> Joshua

The problem is likely caused by lack of the lack of perl as well as pod2man, as
suggested by gcc's build log:

Toggle snippet (12 lines)
echo timestamp > gcc.pod
perl ../../gcc-7.2.0/gcc/../contrib/texi2pod.pl ../../gcc-7.2.0/gcc/doc/invoke.texi > gcc.pod
/gnu/store/kpxi8h3669afr9r1bgvaf9ij3y4wdyyn-bash-minimal-4.4.12/bin/bash: perl: command not found
make[2]: [Makefile:3257: gcc.pod] Error 127 (ignored)
echo timestamp > doc/gcc.1
(pod2man --center="GNU" --release="gcc-7.2.0" --date=2017-08-14 --section=1 gcc.pod > doc/gcc.1.T$$ && \
mv -f doc/gcc.1.T$$ doc/gcc.1) || \
(rm -f doc/gcc.1.T$$ && exit 1)
/gnu/store/kpxi8h3669afr9r1bgvaf9ij3y4wdyyn-bash-minimal-4.4.12/bin/bash: pod2man: command not found
make[2]: [Makefile:3235: doc/gcc.1] Error 1 (ignored)

I'm currently rebuilding with those two inputs added, will send a patch
if it fixes the problem.

Maxim
Maxim Cournoyer wrote 7 years ago
(name . Branson, Joshua A)(address . jbranso@purdue.edu)(address . 24069@debbugs.gnu.org)
873773vvfr.fsf_-_@gmail.com
Hello,

Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:

Toggle quote (25 lines)
> "Branson, Joshua A" <jbranso@purdue.edu> writes:
>
>> I can confirm that this bug still exists. The man page is broken as described, but info gcc works just fine.
>>
>> Thanks,
>>
>> Joshua
>
> The problem is likely caused by lack of the lack of perl as well as pod2man, as
> suggested by gcc's build log:
>
> echo timestamp > gcc.pod
> perl ../../gcc-7.2.0/gcc/../contrib/texi2pod.pl ../../gcc-7.2.0/gcc/doc/invoke.texi > gcc.pod
> /gnu/store/kpxi8h3669afr9r1bgvaf9ij3y4wdyyn-bash-minimal-4.4.12/bin/bash: perl: command not found
> make[2]: [Makefile:3257: gcc.pod] Error 127 (ignored)
> echo timestamp > doc/gcc.1
> (pod2man --center="GNU" --release="gcc-7.2.0" --date=2017-08-14 --section=1 gcc.pod > doc/gcc.1.T$$ && \
> mv -f doc/gcc.1.T$$ doc/gcc.1) || \
> (rm -f doc/gcc.1.T$$ && exit 1)
> /gnu/store/kpxi8h3669afr9r1bgvaf9ij3y4wdyyn-bash-minimal-4.4.12/bin/bash: pod2man: command not found
> make[2]: [Makefile:3235: doc/gcc.1] Error 1 (ignored)
>
> I'm currently rebuilding with those two inputs added, will send a patch
> if it fixes the problem.

I believe the attached patch *should* fix it (simply adds perl as a native
input; pod2man apparently comes with perl itself):
From 17105632d2142c16632c5f05490a7da9a4439cc4 Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Date: Sun, 1 Oct 2017 09:27:31 -0400
Subject: [PATCH] gnu: gcc: Fix manual pages.

Fixes bug #24069.

* gnu/packages/gcc.scm (gcc-4.7)[native-inputs]: Add perl.
(gcc-4.9)[native-inputs]: Likewise.
---
gnu/packages/gcc.scm | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

Toggle diff (35 lines)
diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm
index 7870d4513..f56c2a0b9 100644
--- a/gnu/packages/gcc.scm
+++ b/gnu/packages/gcc.scm
@@ -42,6 +42,7 @@
#:use-module (guix build-system trivial)
#:use-module (guix utils)
#:use-module (srfi srfi-1)
+ #:use-module (ice-9 match)
#:use-module (ice-9 regex))
(define %gcc-infrastructure
@@ -155,7 +156,8 @@ where the OS part is overloaded to denote a specific ABI---into GCC
;; GCC < 5 is one of the few packages that doesn't ship .info files.
;; Newer texinfos fail to build the manual, so we use an older one.
- (native-inputs `(("texinfo" ,texinfo-5)))
+ (native-inputs `(("perl" ,perl) ;for manpages
+ ("texinfo" ,texinfo-5)))
(arguments
`(#:out-of-source? #t
@@ -370,7 +372,9 @@ Go. It also includes runtime support libraries for these languages.")
"14l06m7nvcvb0igkbip58x59w3nq6315k6jcz3wr9ch1rn9d44bc"))
(patches (search-patches "gcc-arm-bug-71399.patch"
"gcc-libvtv-runpath.patch"))))
- (native-inputs `(("texinfo" ,texinfo)))))
+ ;; Override inherited texinfo-5 with latest version.
+ (native-inputs `(("perl" ,perl) ;for manpages
+ ("texinfo" ,texinfo)))))
(define-public gcc-5
;; Note: GCC >= 5 ships with .info files but 'make install' fails to install
--
2.14.1
I haven't been able to test it though; when attempting to rebuild gcc, I
get a stack overflow before the build process even starts (seems like a
guix problem -- I'll try to git pull & rebuild):

Toggle snippet (11 lines)
./pre-inst-env guix build -K gcc
allocate_stack failed: Cannot allocate memory
Warning: Unwind-only `stack-overflow' exception; skipping pre-unwind handler.
allocate_stack failed: Cannot allocate memory
Warning: Unwind-only `stack-overflow' exception; skipping pre-unwind handler.
allocate_stack failed: Cannot allocate memory
Warning: Unwind-only `stack-overflow' exception; skipping pre-unwind handler.
allocate_stack failed: Cannot allocate memory
Warning: Unwind-only `stack-overflow' exception; skipping pre-unwind handler.

Maxim
Maxim Cournoyer wrote 7 years ago
Re: bug#24069: [PATCHv2] Re: bug#24069: gcc man page is broken
(address . bug-guix@gnu.org)
87vajy6ey7.fsf_-_@gmail.com
Version 2.

Removes the unnecessary (ice-9 match) use clause I added while
experimenting.
From a044901c0fc51571b8ed6809080029b8701b09e4 Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Date: Sun, 1 Oct 2017 09:27:31 -0400
Subject: [PATCH] gnu: gcc: Fix manual pages.

Fixes bug #24069.

* gnu/packages/gcc.scm (gcc-4.7)[native-inputs]: Add perl.
(gcc-4.9)[native-inputs]: Likewise.
---
gnu/packages/gcc.scm | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)

Toggle diff (27 lines)
diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm
index 7870d4513..7089b420f 100644
--- a/gnu/packages/gcc.scm
+++ b/gnu/packages/gcc.scm
@@ -155,7 +155,8 @@ where the OS part is overloaded to denote a specific ABI---into GCC
;; GCC < 5 is one of the few packages that doesn't ship .info files.
;; Newer texinfos fail to build the manual, so we use an older one.
- (native-inputs `(("texinfo" ,texinfo-5)))
+ (native-inputs `(("perl" ,perl) ;for manpages
+ ("texinfo" ,texinfo-5)))
(arguments
`(#:out-of-source? #t
@@ -370,7 +371,9 @@ Go. It also includes runtime support libraries for these languages.")
"14l06m7nvcvb0igkbip58x59w3nq6315k6jcz3wr9ch1rn9d44bc"))
(patches (search-patches "gcc-arm-bug-71399.patch"
"gcc-libvtv-runpath.patch"))))
- (native-inputs `(("texinfo" ,texinfo)))))
+ ;; Override inherited texinfo-5 with latest version.
+ (native-inputs `(("perl" ,perl) ;for manpages
+ ("texinfo" ,texinfo)))))
(define-public gcc-5
;; Note: GCC >= 5 ships with .info files but 'make install' fails to install
--
2.14.1
Efraim Flashner wrote 7 years ago
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)(address . 24069@debbugs.gnu.org)
20171002092431.GP26375@macbook42.flashner.co.il
On Sun, Oct 01, 2017 at 11:54:56AM -0400, Maxim Cournoyer wrote:
Toggle quote (48 lines)
> Version 2.
>
> Removes the unnecessary (ice-9 match) use clause I added while
> experimenting.
>

> From a044901c0fc51571b8ed6809080029b8701b09e4 Mon Sep 17 00:00:00 2001
> From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
> Date: Sun, 1 Oct 2017 09:27:31 -0400
> Subject: [PATCH] gnu: gcc: Fix manual pages.
>
> Fixes bug #24069.
>
> * gnu/packages/gcc.scm (gcc-4.7)[native-inputs]: Add perl.
> (gcc-4.9)[native-inputs]: Likewise.
> ---
> gnu/packages/gcc.scm | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm
> index 7870d4513..7089b420f 100644
> --- a/gnu/packages/gcc.scm
> +++ b/gnu/packages/gcc.scm
> @@ -155,7 +155,8 @@ where the OS part is overloaded to denote a specific ABI---into GCC
>
> ;; GCC < 5 is one of the few packages that doesn't ship .info files.
> ;; Newer texinfos fail to build the manual, so we use an older one.
> - (native-inputs `(("texinfo" ,texinfo-5)))
> + (native-inputs `(("perl" ,perl) ;for manpages
> + ("texinfo" ,texinfo-5)))
>
> (arguments
> `(#:out-of-source? #t
> @@ -370,7 +371,9 @@ Go. It also includes runtime support libraries for these languages.")
> "14l06m7nvcvb0igkbip58x59w3nq6315k6jcz3wr9ch1rn9d44bc"))
> (patches (search-patches "gcc-arm-bug-71399.patch"
> "gcc-libvtv-runpath.patch"))))
> - (native-inputs `(("texinfo" ,texinfo)))))
> + ;; Override inherited texinfo-5 with latest version.
> + (native-inputs `(("perl" ,perl) ;for manpages
> + ("texinfo" ,texinfo)))))
>
> (define-public gcc-5
> ;; Note: GCC >= 5 ships with .info files but 'make install' fails to install
> --
> 2.14.1
>

I believe this would cause gcc-5 to be rebuilt, which would cause a
world rebuild, so for the moment we also need a native-inputs entry for
gcc-5 making sure that nothing changes, ie: that we're only using
texinfo there, preferably with a note that it should be changed in the
future. Also, you should take a look at gnu/packages/commencement and
make sure that we're not adding perl as a native-input for gcc-boot0 or
for libstdc++, wherever that happens to live (I don't remember off
hand).

I assume it is OK for us to build the man pages for gcc-final (if it
happens) since this is the gcc used for actually building packages, and
I believe the one pulled in for gcc-toolchain.


--
Efraim Flashner <efraim@flashner.co.il> אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAlnSBcUACgkQQarn3Mo9
g1HrRRAAtPMOhOnx6LsCbJdORfogSRZ0TYWYOdFtPHRTOX64d7Uv8dr1HyAeDTMG
WhMidRi9Mm7pQtQiP5WWbyd0TkfZ7t9xh7sqZa8WiHPBEaQMNK8iMg0BunE/ZqAI
RDXUB6N1eDjh4U9kDj60s4UzEatM2GlyvYaisgDfLQfxkWgtzzjXv6YR4PVqEAjB
R5hC2M+nb4PLKoBsVrzl2FhThO6wldM0JQfsMm/Gn3XAmXSr+xBRJhNs40+fhe8e
CrN/x4qZfKcx/VchPVBLqtSfUiCLLbRXs8r3VvsZ2D9Cxia9+sEmYLuU1JEur0di
ojJRmb/FdS1nmDmbffasdkbBKfxsjG02AUhs9oK2jmpgPgZGeckqVVGiq7DXhXgy
a22ftja0Yn5P/KNa/r+uNKFb7LSlNhYz4QrVk8qM7pm1AtUmwzat6VO4nzknQZIt
1hx60ge7OpAMhnz2MtFsmE0WZMOfJDjv8nGVg99q8+nhmgyX7yp6BW7VbF0zjJVW
Znky3FuxRWcdWi2TFQpz0VF5MdgbiXsmWqOwHEaHxs9H4sLep1GUFJFHW1vYSfyU
H39SGWmGnREL3vRvjQuc0k9G95ROaGcdk0C/CNZO9XuU+a7J7w2jUgZnAQCqHj5R
+5jKtAQO3p/7pRDRb+Q0GgCFgyw8hpWpePZGHTyYlBuDMQhOcJ8=
=1vhk
-----END PGP SIGNATURE-----


Ludovic Courtès wrote 7 years ago
(name . Efraim Flashner)(address . efraim@flashner.co.il)
871smlppn5.fsf@gnu.org
Efraim Flashner <efraim@flashner.co.il> skribis:

Toggle quote (9 lines)
> I believe this would cause gcc-5 to be rebuilt, which would cause a
> world rebuild, so for the moment we also need a native-inputs entry for
> gcc-5 making sure that nothing changes, ie: that we're only using
> texinfo there, preferably with a note that it should be changed in the
> future. Also, you should take a look at gnu/packages/commencement and
> make sure that we're not adding perl as a native-input for gcc-boot0 or
> for libstdc++, wherever that happens to live (I don't remember off
> hand).

I think this should go to ‘core-updates’.

Toggle quote (4 lines)
> I assume it is OK for us to build the man pages for gcc-final (if it
> happens) since this is the gcc used for actually building packages, and
> I believe the one pulled in for gcc-toolchain.

More precisely, building man pages for ‘gcc-boot0’ is pointless and
possibly adds Perl on the graph for no good reason. So if we can
arrange to just have man pages in ‘gcc-final’, we’re good.

Efraim, could you check whether that works for ‘core-updates’?

Thanks,
Ludo’.
Maxim Cournoyer wrote 7 years ago
(name . Ludovic Courtès)(address . ludo@gnu.org)
87zi992to1.fsf@gmail.com
Hello,

ludo@gnu.org (Ludovic Courtès) writes:

Toggle quote (26 lines)
> Efraim Flashner <efraim@flashner.co.il> skribis:
>
>> I believe this would cause gcc-5 to be rebuilt, which would cause a
>> world rebuild, so for the moment we also need a native-inputs entry for
>> gcc-5 making sure that nothing changes, ie: that we're only using
>> texinfo there, preferably with a note that it should be changed in the
>> future. Also, you should take a look at gnu/packages/commencement and
>> make sure that we're not adding perl as a native-input for gcc-boot0 or
>> for libstdc++, wherever that happens to live (I don't remember off
>> hand).
>
> I think this should go to ‘core-updates’.
>
>> I assume it is OK for us to build the man pages for gcc-final (if it
>> happens) since this is the gcc used for actually building packages, and
>> I believe the one pulled in for gcc-toolchain.
>
> More precisely, building man pages for ‘gcc-boot0’ is pointless and
> possibly adds Perl on the graph for no good reason. So if we can
> arrange to just have man pages in ‘gcc-final’, we’re good.
>
> Efraim, could you check whether that works for ‘core-updates’?
>
> Thanks,
> Ludo’.

I believe this is what is accomplished by the attached patch v3. Thanks
to Efraim for the points raised. It turned out that the stack overflow I
was getting attempting to test the previous version was caused by a
circular dependency that was introduced by gcc-boot0 inheriting
perl. This is now fixed.

I spent the last couple hours rebuilding gcc but it failed due to lack
of space on my side... Retrying now but it'll take a few hours before I
can confirm that it works as intended.

Thank you both!
From fac707c34dcc04fcac7254a724cd4c45ae384400 Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Date: Sun, 1 Oct 2017 09:27:31 -0400
Subject: [PATCH] gnu: gcc: Fix manual pages.

Fixes bug #24069.

* gnu/packages/gcc.scm (gcc-4.7)[native-inputs]: Add perl.
(gcc-4.9)[native-inputs]: Likewise.
* gnu/packages/commencement.scm (gcc-boot0)[native-inputs]: Filter out perl.
(gcc-final)[native-inputs]: Add perl-boot0.
---
gnu/packages/commencement.scm | 9 ++++++---
gnu/packages/gcc.scm | 7 +++++--
2 files changed, 11 insertions(+), 5 deletions(-)

Toggle diff (54 lines)
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index ec7677814..194feda0a 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -286,9 +286,11 @@
("libc-native" ,@(assoc-ref %boot0-inputs "libc"))
,@(alist-delete "libc" %boot0-inputs)))
- ;; No need for Texinfo at this stage.
- (native-inputs (alist-delete "texinfo"
- (package-native-inputs gcc))))))
+ ;; No need for the documentation native-inputs at this stage.
+ (native-inputs
+ (alist-delete "texinfo"
+ (alist-delete "perl"
+ (package-native-inputs gcc)))))))
(define perl-boot0
(let ((perl (package
@@ -779,6 +781,7 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
;; scripts such as 'mkheaders' and 'fixinc.sh' (XXX: who cares about these
;; scripts?).
(native-inputs `(("texinfo" ,texinfo-boot0)
+ ("perl" ,perl-boot0) ;for manpages
("static-bash" ,static-bash-for-glibc)
,@(package-native-inputs gcc-boot0)))
diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm
index 7870d4513..7089b420f 100644
--- a/gnu/packages/gcc.scm
+++ b/gnu/packages/gcc.scm
@@ -155,7 +155,8 @@ where the OS part is overloaded to denote a specific ABI---into GCC
;; GCC < 5 is one of the few packages that doesn't ship .info files.
;; Newer texinfos fail to build the manual, so we use an older one.
- (native-inputs `(("texinfo" ,texinfo-5)))
+ (native-inputs `(("perl" ,perl) ;for manpages
+ ("texinfo" ,texinfo-5)))
(arguments
`(#:out-of-source? #t
@@ -370,7 +371,9 @@ Go. It also includes runtime support libraries for these languages.")
"14l06m7nvcvb0igkbip58x59w3nq6315k6jcz3wr9ch1rn9d44bc"))
(patches (search-patches "gcc-arm-bug-71399.patch"
"gcc-libvtv-runpath.patch"))))
- (native-inputs `(("texinfo" ,texinfo)))))
+ ;; Override inherited texinfo-5 with latest version.
+ (native-inputs `(("perl" ,perl) ;for manpages
+ ("texinfo" ,texinfo)))))
(define-public gcc-5
;; Note: GCC >= 5 ships with .info files but 'make install' fails to install
--
2.14.1
Maxim Cournoyer wrote 7 years ago
Re: bug#24069: [PATCHv3] Re: bug#24069: gcc man page is broken
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 24069@debbugs.gnu.org)
8760bx2ce9.fsf_-_@gmail.com
Patch v3 still doesn't fix the problem. There are now pod2man errors
that prevent correctly generating the man pages:

Toggle snippet (30 lines)
Makefile:3076: update target 'gcc.pod' due to: ../../gcc-5.4.0/gcc/doc/invoke.texi ../../gcc-5.4.0/gcc/doc/cppenv.texi ../../gcc-5.4.0/gcc/doc/cppopts.texi gcc-vers.texi
echo timestamp > gcc.pod
perl ../../gcc-5.4.0/gcc/../contrib/texi2pod.pl ../../gcc-5.4.0/gcc/doc/invoke.texi > gcc.pod
Unescaped left brace in regex is illegal here in regex; marked by <-- HERE in m/^\@strong{ <-- HERE (.*)}$/ at ../../gcc-5.4.0/gcc/../contrib/texi2pod.pl line 319.
make: [Makefile:3077: gcc.pod] Error 255 (ignored)
Makefile:3054: update target 'doc/gcc.1' due to: gcc.pod
echo timestamp > doc/gcc.1
(pod2man --center="GNU" --release="gcc-5.4.0" --date=2016-06-03 --section=1 gcc.pod > doc/gcc.1.T$$ && \
mv -f doc/gcc.1.T$$ doc/gcc.1) || \
(rm -f doc/gcc.1.T$$ && exit 1)
pod2man: unable to format gcc.pod
make: [Makefile:3055: doc/gcc.1] Error 1 (ignored)
Makefile:3085: update target 'gpl.pod' due to: ../../gcc-5.4.0/gcc/doc/include/gpl_v3.texi
echo timestamp > gpl.pod
perl ../../gcc-5.4.0/gcc/../contrib/texi2pod.pl ../../gcc-5.4.0/gcc/doc/include/gpl_v3.texi > gpl.pod
Unescaped left brace in regex is illegal here in regex; marked by <-- HERE in m/^\@strong{ <-- HERE (.*)}$/ at ../../gcc-5.4.0/gcc/../contrib/texi2pod.pl line 319.
make: [Makefile:3086: gpl.pod] Error 255 (ignored)
Makefile:3060: update target 'doc/gpl.7' due to: gpl.pod
echo timestamp > doc/gpl.7
(pod2man --center="GNU" --release="gcc-5.4.0" --date=2016-06-03 --section=7 gpl.pod > doc/gpl.7.T$$ && \
mv -f doc/gpl.7.T$$ doc/gpl.7) || \
(rm -f doc/gpl.7.T$$ && exit 1)
pod2man: unable to format gpl.pod
make: [Makefile:3061: doc/gpl.7] Error 1 (ignored)
../../gcc-5.4.0/gcc/cp/Make-lang.in:189: update target 'doc/g++.1' due to: doc/gcc.1
cp doc/gcc.1 doc/g++.1
rm gcc.pod
make: Leaving directory '/tmp/guix-build-gcc-5.4.0.drv-0/build/gcc'

I could trigger this output by cd'ing into the failed derivation and
running:

Toggle snippet (6 lines)
cd /tmp/guix-build-gcc-5.4.0.drv-0
# running guix environment from stable guix pull, so need to add perl manually
guix environment --no-grafts gcc@5.4.0 --ad-hoc perl
make configure-gcc && make --trace -C gcc doc

Continuing investigation...
Maxim Cournoyer wrote 7 years ago
Re: bug#24069: [PATCHv4] Re: bug#24069: gcc man page is broken
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 24069@debbugs.gnu.org)
87bmlneqzk.fsf_-_@gmail.com
Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:

Toggle quote (2 lines)
> Patch v3 still doesn't fix the problem. There are now pod2man errors
> that prevent correctly generating the man pages:
[...]
Toggle quote (11 lines)
> (pod2man --center="GNU" --release="gcc-5.4.0" --date=2016-06-03 --section=7 gpl.pod > doc/gpl.7.T$$ && \
> mv -f doc/gpl.7.T$$ doc/gpl.7) || \
> (rm -f doc/gpl.7.T$$ && exit 1)
> pod2man: unable to format gpl.pod
> make: [Makefile:3061: doc/gpl.7] Error 1 (ignored)
> ../../gcc-5.4.0/gcc/cp/Make-lang.in:189: update target 'doc/g++.1' due to: doc/gcc.1
> cp doc/gcc.1 doc/g++.1
> rm gcc.pod
> make: Leaving directory '/tmp/guix-build-gcc-5.4.0.drv-0/build/gcc'
>

Apparently GCC < 6 required a patch to its texi2pod.pl script, which had
a syntax problem. The attached patch fixes this last problem. I could
successfully build GCC 5.4.0 by using a derived package for testing
(otherwise it would trigger a world rebuild which was never ending of my
lesser machine).

Here's the patch used to test it:

Toggle snippet (64 lines)
gnu/packages/gcc.scm | 21 +++++++++++++++++++++
gnu/packages/patches/gcc-fix-texi2pod.patch | 19 +++++++++++++++++++
2 files changed, 40 insertions(+)
create mode 100644 gnu/packages/patches/gcc-fix-texi2pod.patch

diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm
index 7870d4513..320201b9c 100644
--- a/gnu/packages/gcc.scm
+++ b/gnu/packages/gcc.scm
@@ -395,6 +395,27 @@ Go. It also includes runtime support libraries for these languages.")
;; `(("isl" ,isl)
;; ,@(package-inputs gcc-4.7)))))
+(define-public gcc-5-dev
+ (package (inherit gcc-5)
+ (name "gcc-dev")
+ (version "5.4.0-dev")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://gnu/gcc/gcc-"
+ version "/gcc-" version ".tar.bz2"))
+ (sha256
+ (base32
+ "0fihlcy5hnksdxk0sn6bvgnyq8gfrgs8m794b1jxwd1dxinzg3b0"))
+ (patches (search-patches "gcc-arm-bug-71399.patch"
+ "gcc-strmov-store-file-names.patch"
+ "gcc-asan-powerpc-missing-include.patch"
+ "gcc-5.0-libvtv-runpath.patch"
+ "gcc-5-source-date-epoch-1.patch"
+ "gcc-5-source-date-epoch-2.patch"
+ "gcc-fix-texi2pod.patch"))))
+ (native-inputs `(("perl" ,perl) ;for manpages
+ ("texinfo" ,texinfo)))))
+
(define-public gcc-6
(package
(inherit gcc-5)
diff --git a/gnu/packages/patches/gcc-fix-texi2pod.patch b/gnu/packages/patches/gcc-fix-texi2pod.patch
new file mode 100644
index 000000000..28bd56a38
--- /dev/null
+++ b/gnu/packages/patches/gcc-fix-texi2pod.patch
@@ -0,0 +1,19 @@
+This patch was taken from the official GCC git repository.
+X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=blobdiff_plain;f=contrib%2Ftexi2pod.pl;h=91bdbb5cea933d0381f2924ab94490fca31d5800;hp=eba1bcaa3cffa78b46030b219d04fe7d68367658;hb=67b56c905078d49d3e4028085e5cb1e1fb87a8aa;hpb=2f508a78310caab123e9794d3dcfe41f2769449b
+
+It fixes a defect in the contrib/texi2pod.pl script that prevented generating
+manual pages. It was corrected in the GCC 6.X series.
+
+diff --git a/contrib/texi2pod.pl b/contrib/texi2pod.pl
+index eba1bca..91bdbb5 100755
+--- a/contrib/texi2pod.pl
++++ b/contrib/texi2pod.pl
+@@ -316,7 +316,7 @@ while(<$inf>) {
+ @columns = ();
+ for $column (split (/\s*\@tab\s*/, $1)) {
+ # @strong{...} is used a @headitem work-alike
+- $column =~ s/^\@strong{(.*)}$/$1/;
++ $column =~ s/^\@strong\{(.*)\}$/$1/;
+ push @columns, $column;
+ }
+ $_ = "\n=item ".join (" : ", @columns)."\n";

I could then build gcc-dev and verify that the man pages gcc and cpp
were working correctly in an environment instantiated using:

Toggle snippet (3 lines)
./pre-inst-env guix environment --pure --ad-hoc gcc-dev man-db

The complete patch is attached; it should be good for core-updates.

Thank you,

Maxim
Maxim Cournoyer wrote 7 years ago
control message for bug #24069
(address . control@debbugs.gnu.org)
87a817epoe.fsf@gmail.com
tags 24069 pending
Ludovic Courtès wrote 7 years ago
Re: bug#24069: [PATCHv4] Re: bug#24069: gcc man page is broken
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)
87shdzxs8w.fsf@gnu.org
Hi!

Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis:

Toggle quote (16 lines)
>>From 7229d7887289316031847893f8ad020ff07bdcdd Mon Sep 17 00:00:00 2001
> From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
> Date: Sun, 1 Oct 2017 09:27:31 -0400
> Subject: [PATCH] gnu: gcc: Fix manual pages.
>
> Fixes bug #24069. perl is made a native input to all of the gcc-* packages
> except for gcc-boot0; perl-boot0 is made a native input to gcc-final.
>
> * gnu/packages/patches/gcc-fix-texi2pod.patch: Add patch file to fix texi2pod.
> * gnu/local.mk (dist_patch_DATA): Register it.
> * gnu/packages/gcc.scm (gcc-4.7, gcc-4.8, gcc-4.9, gcc-5): Use it.
> (gcc-4.7)[native-inputs]: Add perl.
> (gcc-4.9)[native-inputs]: Likewise.
> * gnu/packages/commencement.scm (gcc-boot0)[native-inputs]: Filter out perl.
> (gcc-final)[native-inputs]: Add perl-boot0.

Efraim pushed the patch as 19d27131968355a1da962e52163df51e0e03aba1 so I
think we’re all set. Thank you!

The definition of ‘gcc-final’ in (gnu packages commencement) has an
explicit #:allowed-references white list, so we can be sure it won’t
retain a reference to Perl.

Ludo’.
Closed
?
Your comment

This issue is archived.

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

To respond to this issue using the mumi CLI, first switch to it
mumi current 24069
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
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help