[R] Building R on Sun Solaris 10 (SPARC) using Sun Studio 12
Prof Brian Ripley
ripley at stats.ox.ac.uk
Tue Dec 11 08:43:36 CET 2007
On Mon, 10 Dec 2007, James T Brown wrote:
> R Help List:
>
> Just curious if anyone has successfully built R on a SPARC
> platform running Sun Solaris 10 using the latest Sun Studio
> 12 set of compilers. If so, I would be interested in the
> compile flags that you used.
Yes, the flags given in the R-admin manual. (We don't currently have a
Solaris 10 Sparc box running, but this was with the current Sun Studio 12
at the time, just after it came out.)
> I have tried several different builds of version 2.5.1, 2.6.0,
> and 2.6.1 using various different compile flags and I am able
> to compile and check, but for whatever reason, the "foreign"
> package crashes whenever it is loaded. I need the "foreign"
> package in order to install the "maptools" package. This is
> the error that I am getting when attempting to load "foreign":
>
>>> library(foreign)
>>
>> *** caught segfault ***
>> address fbb1dc40, cause 'invalid permissions'
>>
>> Traceback:
>> 1: .C("spss_init", PACKAGE = "foreign")
>> 2: fun(...)
>> 3: doTryCatch(return(expr), name, parentenv, handler)
>> 4: tryCatchOne(expr, names, parentenv, handlers[[1]])
>> 5: tryCatchList(expr, classes, parentenv, handlers)
>> 6: tryCatch(expr, error = function(e) { call <-
>> conditionCall(e) if (!is.null(call)) { if
>> (identical(call[[1]], quote(doTryCatch))) call <-
>> sys.call(-4) dcall <- deparse(call)[1] prefix <-
>> paste("Error in", dcall, ": ") LONGCALL <- 30 if
>> (nchar(dcall) > LONGCALL) prefix <- paste(prefix, "\n\t",
>> sep = "") } else prefix <- "Error : " msg <- paste(prefix,
>> conditionMessage(e), "\n", sep = "")
>> .Internal(seterrmessage(msg[1])) if (!silent &&
>> identical(getOption("show.error.messages"), TRUE)) {
>> cat(msg, file = stderr()) .Internal(printDeferredWarnings())
>> } invisible(structure(msg, class = "try-error"))})
>> 7: try({ fun(...) NULL})
>> 8: runHook(".onLoad", package, env, package.lib, package)
>> 9: loadNamespace(package, c(which.lib.loc, lib.loc), keep.source =
>> keep.source)
>> 10: doTryCatch(return(expr), name, parentenv, handler)
>> 11: tryCatchOne(expr, names, parentenv, handlers[[1]])
>> 12: tryCatchList(expr, classes, parentenv, handlers)
>> 13: tryCatch(expr, error = function(e) { call <-
>> conditionCall(e) if (!is.null(call)) { if
>> (identical(call[[1]], quote(doTryCatch))) call <-
>> sys.call(-4) dcall <- deparse(call)[1] prefix <-
>> paste("Error in", dcall, ": ") LONGCALL <- 30 if
>> (nchar(dcall) > LONGCALL) prefix <- paste(prefix, "\n\t",
>> sep = "") } else prefix <- "Error : " msg <- paste(prefix,
>> conditionMessage(e), "\n", sep = "")
>> .Internal(seterrmessage(msg[1])) if (!silent &&
>> identical(getOption("show.error.messages"), TRUE)) {
>> cat(msg, file = stderr()) .Internal(printDeferredWarnings())
>> } invisible(structure(msg, class = "try-error"))})
>> 14: try({ ns <- loadNamespace(package, c(which.lib.loc, lib.loc),
>> keep.source = keep.source) dataPath <- file.path(which.lib.loc,
>> package, "data") env <- attachNamespace(ns, pos = pos, dataPath =
>> dataPath)})
>> 15: library(foreign)
>>
>> Possible actions:
>> 1: abort (with core dump, if enabled)
>> 2: normal R exit
>> 3: exit R without saving workspace
>> 4: exit R saving workspace
>
>
>
> The latest build was compiled with the following flags:
>
>> ./configure --prefix=/usr/local/R-2.5.1
>> --with-blas
>> --with-lapack
>> --with-tcl-config=/usr/local/lib/tclConfig.sh
>> --with-tk-config=/usr/local/lib/tkConfig.sh
>> --without-iconv
>> R_PAPERSIZE=letter
>> SHLIB_CXXLDFLAGS="-G /opt/SUNWspro/lib/libCrun.so"
>> CC=/opt/SUNWspro/bin/cc CXX=/opt/SUNWspro/bin/CC
>> F77=/opt/SUNWspro/bin/f77 F90=/opt/SUNWspro/bin/f95
>> FC=/opt/SUNWspro/bin/f95 CFLAGS="-mt -ftrap=%none
>> -xarch=sparcvis -fPIC -xmemalign=4s"
>> CXXFLAGS="-mt -ftrap=%none -xarch=sparcvis -xmemalign=4s"
>> FFLAGS="-mt -ftrap=%none -shared -xarch=sparcvis"
>> FCFLAGS="-mt -ftrap=%none -shared -xarch=sparcvis"
>> LDFLAGS="-V -fPIC -L/usr/local/lib -L/opt/SUNWspro/lib
>> -L/usr/sfw/lib -L/usr/lib
>>
>> -R/usr/local/lib:/opt/SUNWspro/lib:/usr/sfw/lib:/usr/lib"
>
>
> I have been messing with the "xmemalign" flag, but doesn't seem to have much
> of an impact. I am curious if there may be a simple compile flag in Sun
> Studio 12 that can be set to fix this problem.
>
>
> At any rate, if anyone has been able to successfully build on Sun Solaris 10
> (SPARC) using Sun Studio 12 and the "foreign" package loads without
> crashing,
> I would be most appreciative if you could let me take a look at your
> ".configure"
> options.
>
>
> NOTE: So far, the only package that I am having trouble with is
> "foreign". Everything
> else seems to build and check ok. In fact, when "foreign" is built,
> there are no errors
> reported during the compile. Also, I have tried
> "install.packages("foreign") from
> within R to upgrade to the latest version of "foreign". It compiles and
> installs, but
> once again, it crashes when R attempts to use it producing the
> "segfault" error.
>
>
> Any help would be most welcome.
>
>
> Thanks.
>
>
>
> Jim
>
>
>
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
More information about the R-help
mailing list