Skip to content

R 1.1.1 (and 1.2.0) on Mac (PPC) and "/afm/" bugs (?)

4 messages · stefano iacus, Martin Maechler, Peter Dalgaard +1 more

#
This is my second post. Is  the R porting  no more interesting ? I hope no. :)




Hy (I hope this is the right list).

1. Mac porting

I'm finishing the porting of R for Mac. I hope to finish it for the 
end of september. Thanks to the porting of  R 0.64 by Ross (that he 
gave me) I succeded in this porting. This is the current state:

Both R 1.1.1. and 1.2.0 works with minor modification to the original 
code. The Macintosh device has been updated to the new version of 
WASTE library that is Carbon-izable (for who knows MacOS, Carbon is a 
collections of libraries  that allow macintosh applications developed 
for pre-MacOS X to run under MacOS X with minor modification, MacOS X 
is beeing released in september).
There is  a lot of work to do in testing the 1.1.1 porting. The code 
I have modified is not all commented, so give me some times to fix 
this and I'll release the sources to who will ask for.
The porting runs only on PPC machines.
I  compiled 1.2 only to verify how much the changes are sensitive to 
new releases of the code. It seems to work without problems.

Is there anyone working on R porting for Mac at the moment?

Actually, I have problems on building the base package and packages 
in general and I just pick Win base package and adapt it, so the 
check I can do are not so accurate. Where can I find the proper 
documentation on building packages?
Makefiles on Mac are a problem for me at the moment, but I'll try to 
fix this also.



2. About the bug (?)

I've to remark one problem in the source code of PS and Xfig devices. 
When the device look for "afm" it is system dependent because slashes 
such "/" are used to search for fonts:

i.e. (in xfig, the same is for PS)

static int XFig_Open(DevDesc *dd, XFigDesc *pd)
{
     char buf[512];
     int i;

     for(i = 0; i < 5 ; i++) {
	sprintf(buf, "%s/afm/%s.%s", R_Home,             <--- HERE
		Family[pd->fontfamily].font[i].abbr,
		(i == 4) ? "afm" : Extension[pd->encoding]);


the slashes should be replaced by the FILESEP  definition.


Both devices fixed for FILESEP (and pictex as well) works on Mac.

Regards,

         Stefano
#
StefI> This is my second post. Is the R porting no more interesting ? I
    StefI> hope no. :) Hy (I hope this is the right list).

No, to the contrary.  There is quite a base of potential users who'd
welcome a Mac port very much! {I'm "unix only" though.}

Thanks a lot for your efforts!

I think you should send specific patches (as the one below, using FILESEP)
-- using "diff -c" against a recent version of R-devel --
to R-core at R-project.org which is the core team's (non-public) E-mail list.
One of us could then "slice" your code into the current development version.

    StefI> 1. Mac porting

    StefI> I'm finishing the porting of R for Mac. I hope to finish it for
    StefI> the end of september. Thanks to the porting of R 0.64 by Ross
    StefI> (that he gave me) I succeded in this porting. This is the
    StefI> current state:

    StefI> Both R 1.1.1. and 1.2.0 works with minor modification to the
    StefI> original code. The Macintosh device has been updated to the new
    StefI> version of WASTE library that is Carbon-izable (for who knows
    StefI> MacOS, Carbon is a collections of libraries that allow macintosh
    StefI> applications developed for pre-MacOS X to run under MacOS X with
    StefI> minor modification, MacOS X is beeing released in september).
    StefI> There is a lot of work to do in testing the 1.1.1 porting. The
    StefI> code I have modified is not all commented, so give me some times
    StefI> to fix this and I'll release the sources to who will ask for.
    StefI> The porting runs only on PPC machines.  I compiled 1.2 only to
    StefI> verify how much the changes are sensitive to new releases of the
    StefI> code. It seems to work without problems.

    StefI> Is there anyone working on R porting for Mac at the moment?

    StefI> Actually, I have problems on building the base package and
    StefI> packages in general and I just pick Win base package and adapt
    StefI> it, so the check I can do are not so accurate. Where can I find
    StefI> the proper documentation on building packages?  Makefiles on Mac
    StefI> are a problem for me at the moment, but I'll try to fix this
    StefI> also.



    StefI> 2. About the bug (?)

    StefI> I've to remark one problem in the source code of PS and Xfig
    StefI> devices.  When the device look for "afm" it is system dependent
    StefI> because slashes such "/" are used to search for fonts:

    StefI> i.e. (in xfig, the same is for PS)

    StefI> static int XFig_Open(DevDesc *dd, XFigDesc *pd) { char buf[512];
    StefI> int i;

    StefI>      for(i = 0; i < 5 ; i++) { sprintf(buf, "%s/afm/%s.%s",
    StefI> R_Home, <--- HERE Family[pd->fontfamily].font[i].abbr, (i == 4)
    StefI> ? "afm" : Extension[pd->encoding]);

    StefI> the slashes should be replaced by the FILESEP definition.

    StefI> Both devices fixed for FILESEP (and pictex as well) works on
    StefI> Mac.

    StefI> Regards,

    StefI>          Stefano -- Stefano Maria Iacus Dipartimento di Politica
    StefI> Economica ed Aziendale Universita' di Milano Via Conservatorio 7
    StefI> 20122 Milano Tel: 02 760 74 462 Fax: 02 760 23 198
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
Martin Maechler <maechler@stat.math.ethz.ch> writes:
Seconded (but of course you must be aware that the absence of a Mac
port makes Mac programmers a scarce resource on R-devel...)
Not necessary in this case. I've folded in the FILESEP change already.
#
On Mon, Sep 18, 2000 at 08:22:44AM +0200, Stefano Iacus wrote:
Well I am actually running R on a Mac already and both the R
base and all the packages that I have tried worked for me with
no modifications... but I will admit that I started out by
installing linux.

About fifteen years ago, Apple got offside with the free-software
community because of ``look-and-feel'' litigation. They are still
feeling the backlash off that (and probably will be for some time)
because of the scarcity of free-software developers using MacOS.
It is a snowball, once developers turn away from a platform,
there is nothing to encourage new developers to get interested.
Yup, good work spotting that and good luck with your porting
efforts. My Mac is a blue G3, running at 350 MHz. If you have
similar hardware then I would like to compare a few benchmarks
of R running under linux and MacOS. Failing that, if you make
available a binary package of the R base for MacOS then I'll
reboot into MacOS and do the comparison for myself.

	- Tel

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._