[Rd] Problems building R 2.9.0... on SGI and Sun once again

Peter Dalgaard P.Dalgaard at biostat.ku.dk
Thu Apr 23 18:20:35 CEST 2009


Darin A. England wrote:
> I have the same problem trying build R 2.9.0 on AIX using the IBM 
> Visual Age compilers and GNU make. I'm trying to figure it out, but
> any hints on a fix are greatly appreciated.


This seems to come from constructions of the form

for i in $FOO : do .... ; done

If $FOO is empty, then the resulting "for i in ;" is a syntax error with
some versions of bash and sh. Current Linux versions of bash do not have
that behaviour. As we saw in an earlier post, quotes around $FOO is not
the answer.

One workaround could be to upgrade bash.

Another workaround could be to safeguard the for-loop with

test "$FOO" != "" && for i in $FOO : do .... ; done

in all of the Makefiles where this can be an issue.




-- 
   O__  ---- Peter Dalgaard             Øster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark      Ph:  (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)              FAX: (+45) 35327907



More information about the R-devel mailing list