[R-SIG-Mac] help2man problem installing R-2.3.0 from source
Kieran Healy
kjhealy at arizona.edu
Tue May 16 15:45:12 CEST 2006
Hi -
I posted a little while ago about the same problem, as did Michael
Toews. I've tried to follow this up. The short answer is that R
2.3.0's version string doesn't conform to what the help2man.pl
utility expects. The help2man.pl script gets version information from
R --version and makes a man page from it. Here is the relevant line
of the Makefile inside the doc/ directory of the R-2.3.0 source code
bundle:
> @$(HELP2MAN) --include=$(srcdir)/R.aux --no-info --output=R.1 \
> --name="a language for data analysis and graphics" \
> $(top_builddir)/bin/R
The help2man script wants the version information in a specific form
Here is 2.3.0's version info (without the copyright message, which
doesn't matter for the error):
> [Deiseal] ~/downloads/R-2.3.0/doc % ../bin/R --version
> R version 2.3.0 (2006-04-24)
And here is 2.2.1:
> [Deiseal] ~ % R --version
> R 2.2.1 (2005-12-20).
The extra word 'version' is what does it.
The roots of this issue are in src/main/version.c, which contains the
code that produces the text of the version message. It has changed
since 2.2.1. The changed code includes a function whose comments say,
more or less, "this is a workaround designed to make GNU tools like
help2man happy," together with information about how the version
message will change in the next version of R. So I guess the authors
of the code are aware of this issue, but for whatever reason it still
arises on some macs. I'm afraid I don't' know C, so I can't diagnose
any further.
As a short-term, completely ad hoc workaround, I ran the help2man
command in the Makefile directly, but pointed it at my already-
installed version of R (2.2.1) instead. I.e., from inside the doc/
directory in the R 2.3.0 sources, and assuming you have R 2.2.1
already installed, do
> perl ../tools/help2man.pl --include=./R.aux --no-info --output=R.1
> --name="a language for data analysis and graphics" R
(This should all be one line.) This produces a file called R.1
containing version information, which is the desired goal, but with
version info from R.2.2.1 instead of 2.3.0. You can edit the first
line of the file to make the version number correct if you like. Then
you can comment out the equivalent section in doc/Makefile, viz,
> #@$(HELP2MAN) --include=$(srcdir)/R.aux --no-info --output=R.1 \
> # --name="a language for data analysis and graphics" \
> # $(top_builddir)/bin/R
Doing 'sudo make install' as usual (from the top-level source
directory) will then work, as the R.1 file is now present in the doc
directory. Of course this doesn't change the usual output of R --
version (you'd have to edit version.c to do that), just the
information in the man page.
Obviously is not any kind of proper solution, but I'm afraid I don't
know C, or the ins-and-outs of R's source code in great detail. I'm
not sure why this issue only appears on some macs (e.g., my iBook)
and not others (e.g., by G5 tower).
Best,
Kieran
On May 16, 2006, at 1:32 AM, Jean Thioulouse wrote:
> Hello,
>
> Sorry to bother you, but I have a problem installing R-2.3.0 from
> source.
> 'configure' and 'make' produce no error, and the R executable seems
> to run
> fine (particularly, R --version does work), but 'make install'
> fails with
> the following error message :
>
> % sudo make install
> Password:
> make[1]: Nothing to be done for `install'.
> make[1]: Nothing to be done for `install'.
> installing doc ...
> help2man: can't get `--version' info from ../bin/R
> make[1]: *** [R.1] Error 22
> make: *** [install] Error 1
>
> R-2.2.1 compiles and installs without problem. Using MacOS 10.4.6 on a
> powerMac G5 with XCode 2.2.1.
>
> Thank you,
> Jean
> --
> Jean Thioulouse - Labo de Biometrie et Biologie Evolutive, UMR CNRS
> 5558
> Universite Lyon 1, Batiment G. Mendel, 43 Boulevard du 11 Novembre
> 1918
> 69622 Villeurbanne Cedex, France. Tel/Fax : (33) 4 72 43
> 27 56
> http://pbil.univ-lyon1.fr/JTHome.html
>
> _______________________________________________
> R-SIG-Mac mailing list
> R-SIG-Mac at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
More information about the R-SIG-Mac
mailing list