Opened 10 years ago
Last modified 2 years ago
#45269 new defect
crossbinutils @ 1.0 0-byte manpages
Reported by: | japanesecake (mmallet) | Owned by: | macports-tickets@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.3.1 |
Keywords: | Cc: | japanesecake (mmallet), cooljeanius (Eric Gallager), mojca (Mojca Miklavec), chrstphrchvz (Christopher Chavez), mascguy (Christopher Nielsen) | |
Port: | arm-elf-binutils |
Description
I am about to submit my first ports but I've noticed that for one of them, a cross build of binutils, the manpages are 0-bytes files (few bytes when their got gzipped).
ll /opt/local/share/man/man1/arm-elf-* -r--r--r--+ 1 root admin 40B Nov 19 2013 /opt/local/share/man/man1/arm-elf-addr2line.1.gz -r--r--r--+ 1 root admin 33B Nov 19 2013 /opt/local/share/man/man1/arm-elf-ar.1.gz -r--r--r--+ 1 root admin 33B Nov 19 2013 /opt/local/share/man/man1/arm-elf-as.1.gz -r--r--r--+ 1 root admin 38B Nov 19 2013 /opt/local/share/man/man1/arm-elf-c++filt.1.gz ...
In the port's build directory, when I look at the manpages file size, I get the following (sh-elf-binutils is the port I am working on, ):
/opt/local/var/macports/build/_devel_ports_cross_sh-elf-binutils/sh-elf-binutils/work$ find . -iname "*.1" | xargs ls -ali 15648159 -rw-r--r--+ 1 macports wheel 10470 Mar 25 2013 ./binutils-2.23.2/binutils/doc/addr2line.1 15648160 -rw-r--r--+ 1 macports wheel 18478 Mar 25 2013 ./binutils-2.23.2/binutils/doc/ar.1 ... 15667876 -rw-r--r--+ 1 macports wheel 0 Oct 6 19:44 ./build/binutils/doc/addr2line.1 15667877 -rw-r--r--+ 1 macports wheel 0 Oct 6 19:44 ./build/binutils/doc/ar.1 ...
It seems that there is something wrong when copying the manpages. Can someone point me out the thing that I may had not done correctly? (before I submit a fix I would rather be sure I just do not miss an option)
By building binutils manually, I get manpages installed correctly though.
How to reproduce:
sudo port install arm-elf-binutils man arm-elf-ar fgets: No such file or directory Error reading man page /opt/local/share/man/man1/arm-elf-ar.1.gz No manual entry for arm-elf-ar
Attachments (1)
Change History (12)
comment:1 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)
Changed 10 years ago by japanesecake (mmallet)
Attachment: | arm-elf-binutils-main.log added |
---|
comment:3 Changed 10 years ago by japanesecake (mmallet)
I use this as a fix but maybe there is a better way around:
post-destroot { # Fix manpages set binutilsman ${worksrcpath}/binutils/doc set mandir ${prefix}/share/man/man1 foreach manpage [glob -tails -directory ${binutilsman} *.1] { system "cp ${binutilsman}/${manpage} ${binutilsman}/${crossbinutils.target}-${manpage}" xinstall -m 644 ${binutilsman}/${crossbinutils.target}-${manpage} \ ${destroot}${mandir} } }
comment:5 follow-up: 6 Changed 10 years ago by japanesecake (mmallet)
Well, I found out what is wrong. In the "crossbinutils-1.0.tcl" script, the post-extract phase deletes the "etc" directory which contains the tex2pod script:
post-extract { delete ${worksrcpath}/etc file mkdir ${workpath}/build }
If I comment out the "delete ${worksrcpath}/etc" line I get my man pages generated. Does anyone know why we remove this etc directory?
comment:6 Changed 10 years ago by cooljeanius (Eric Gallager)
Replying to matthieu.mallet@…:
Well, I found out what is wrong. In the "crossbinutils-1.0.tcl" script, the post-extract phase deletes the "etc" directory which contains the tex2pod script:
post-extract { delete ${worksrcpath}/etc file mkdir ${workpath}/build }If I comment out the "delete ${worksrcpath}/etc" line I get my man pages generated. Does anyone know why we remove this etc directory?
I am guessing it was because the stuff in it is included in a bunch of other GNU packages as well, so leaving them there could lead to conflicts... I suppose if conflicts are the issue, though, it would make more sense to wait until the destroot phase to remove them, and to only get rid of the specific things that conflict instead of the entire directory...
comment:7 Changed 8 years ago by mf2k (Frank Schima)
Keywords: | crossbuild binutils removed |
---|
comment:8 Changed 6 years ago by mojca (Mojca Miklavec)
Cc: | mojca added |
---|
comment:9 Changed 2 years ago by chrstphrchvz (Christopher Chavez)
The binutils port, which doesn’t use the crossbinutils portgroup, also has this issue since it deletes ${worksrcpath}/etc
. However I would think every port that does use the crossbinutils portgroup is also affected.
comment:10 Changed 2 years ago by chrstphrchvz (Christopher Chavez)
Cc: | chrstphrchvz added |
---|
comment:11 Changed 2 years ago by mascguy (Christopher Nielsen)
Cc: | mascguy added |
---|
Could you attach the main.log file? It's normally deleted after a build, so please rebuild with the
-k
flag to keep it:Then attach the file at: