[R] 64bit build on IBM
Tim Hoar
thoar at cgd.ucar.edu
Sat Mar 13 01:08:25 CET 2004
I am trying to build R with 64bit support so I can access more than
2GB of memory on an IBM running AIX. (IBM NightHawk II RS/6000 node with 16
64-bit, 375-MHz POWER3 CPUs and 32 GB of memory, if you want specifics)
The 32bit install required little tweaking, but the 64 bit is sufficiently
complicated that I thought I would report my findings here and ask for
help with the latest (and hopefully last) hurdle.
Let me also state I have been amazed at the ease of installations
despite the obvious complexity of the install process. I have built R
on at least 3 different O/S's with several different compilers, etc. on
each platform. I wanted to use R's configure process for some software
I am working with and realized just how hard the configure process is --
so my hats off to the developers!
#----------------------------------------------------------------------
# Settings in the config.site file
# Fortran or C options aren't making it everywhere.
#----------------------------------------------------------------------
CC='/usr/bin/xlc'
CFLAGS='-q64 ...'
F77='/usr/bin/xlf'
FFLAGS='-q64 ...'
CXX='/usr/bin/xlc'
CXXFLAGS='-q64 ...'
SHLIB_LDFLAGS=-b64
LDFLAGS='-L/usr/local/lib64/r4i4 -L/usr/lib'
bombs out. config.log:
configure:15817: checking whether mixed C/Fortran code can be run
** cftest === End of Compilation 1 ===
1501-510 Compilation successful for file conftestf.f.
ld: 0711-736 ERROR: Input file conftest.o:
XCOFF64 object files are not allowed in 32-bit mode.
CC='/usr/bin/xlc -q64'
F77='/usr/bin/xlf -q64'
CXX='/usr/bin/xlc -q64' makes it through.
I believe that somewhere there should be a SHLIB_LDFLAGS where there is not.
#----------------------------------------------------------------------
#2 const char ... vs char
#----------------------------------------------------------------------
had to compile with -qinitauto=00
to get the program to run the program to check for POSIX handling of
leapseconds. Without it, the program hangs!
#----------------------------------------------------------------------
# There needs to be some way to set an AR_FLAGS variable, ...
#----------------------------------------------------------------------
I've tried setting environement variables, running configure and then
modifying the top-level Makeconf file to redefine $(AR) to contain
the necessary options (see below) but the resulting makefiles all
keep getting a (bogus under AIX) "cr" option.
So I have to manually edit the top-level Makeconf and manually remove
the "cr" from the following makefiles: src/appl/Makefile, src/nmath/Makefile,
src/unix/Makefile, src/extra/bzip2/Makefile, src/extra/pcre/Makefile,
src/extra/zlib/Makefile ... but that's not all.
I edit them "all at once", before I issue the first "make" command, and
then I have to edit (just) src/unix/Makefile again -- seems it gets remade
at some point.
(before configure) setenv AR_FLAGS '-X64 -v -q' did nothing
adding Makeconf:AR_FLAGS = -X64 -q -v did nothing
'$(AR) cr' hardwired in src/appl/Makefile
'$(AR) cr' hardwired in src/nmath/Makefile
'$(AR) cr' hardwired in src/unix/Makefile
'$(AR) cr' hardwired in src/extra/bzip2/Makefile
'$(AR) cr' hardwired in src/extra/pcre/Makefile
'$(AR) cr' hardwired in src/extra/zlib/Makefile
#----------------------------------------------------------------------
# my problem ...
#----------------------------------------------------------------------
Our /lib/crt0.o is the 32bit flavor. We also have a
/lib/crt0_64.o so -- I changed the top-level Makeconf to
reflect this.
R_XTRA_LIBS = /lib/crt0_64.o
#----------------------------------------------------------------------
# Something with the X11 support is not working.
#----------------------------------------------------------------------
src/modules/X11/Makefile.in defines rules to create .lo objects,
which (in 64 bit mode) the AIX compiler does not like.
I manually edited the
Makefile to reflect the advice from our consultants. The result is
attached as a screen dump of the problem area.
Any help would be appreciated.
Tim
## Tim Hoar, Associate Scientist email: thoar at ucar.edu ##
## Geophysical Statistics Project phone: 303-497-1708 ##
## National Center for Atmospheric Research FAX : 303-497-1333 ##
## Boulder, CO 80307 http://www.cgd.ucar.edu/~thoar ##
-------------- next part --------------
exec: export(export,XL_CONFIG=/etc/vac.cfg:xlc,NULL)
exec: /usr/vac/bin/CreateExportList(/usr/vac/bin/CreateExportList,/ptmp/thoar/xlcSEtLbjqe,-f,/ptmp/thoar/xlcSFtDbjqd,-X,64,NULL)
exec: /bin/ld(/bin/ld,-bM:SRE,-bnoentry,-bM:SRE,-H512,-T512,-bnoentry,-bexpall,-bI:../../../etc/R.exp,-b64,-bpT:0x10000000,-bpD:0x20000000,-b64,-L/usr/lib,-oR_X11.so,dataentry.o,devX11.o,rotated.o,rbitmap.o,-lSM,-lICE,-lX11,-ldl,-ltermcap,-lm,-lc,-L/usr/lpp/xlopt,-lxlopt,-lc,-bE:/ptmp/thoar/xlcSEtLbjqe,NULL)
ld: 0711-317 ERROR: Undefined symbol: .Rf_error
ld: 0711-317 ERROR: Undefined symbol: .Rf_warning
ld: 0711-317 ERROR: Undefined symbol: .Rf_lengthgets
ld: 0711-317 ERROR: Undefined symbol: .R_Reprotect
ld: 0711-317 ERROR: Undefined symbol: .Rf_mkChar
ld: 0711-317 ERROR: Undefined symbol: .SET_STRING_ELT
ld: 0711-317 ERROR: Undefined symbol: .Rf_isNull
ld: 0711-317 ERROR: Undefined symbol: .SET_VECTOR_ELT
ld: 0711-317 ERROR: Undefined symbol: .Rf_isVector
ld: 0711-317 ERROR: Undefined symbol: R_NaString
ld: 0711-317 ERROR: Undefined symbol: R_NilValue
ld: 0711-317 ERROR: Undefined symbol: .Rf_PrintDefaults
ld: 0711-317 ERROR: Undefined symbol: .Rf_EncodeElement
ld: 0711-317 ERROR: Undefined symbol: .Rf_allocVector
ld: 0711-317 ERROR: Undefined symbol: .Rf_coerceVector
ld: 0711-317 ERROR: Undefined symbol: .Rf_install
ld: 0711-317 ERROR: Undefined symbol: R_GlobalEnv
ld: 0711-317 ERROR: Undefined symbol: .Rf_GetOption
ld: 0711-317 ERROR: Undefined symbol: .Rf_asInteger
ld: 0711-317 ERROR: Undefined symbol: R_NaInt
ld: 0711-317 ERROR: Undefined symbol: .Rf_length
ld: 0711-317 ERROR: Undefined symbol: .Rf_nthcdr
ld: 0711-317 ERROR: Undefined symbol: .R_strtod
ld: 0711-317 ERROR: Undefined symbol: .Rf_isBlankString
ld: 0711-317 ERROR: Undefined symbol: R_NaReal
ld: 0711-317 ERROR: Undefined symbol: .UNIMPLEMENTED
ld: 0711-317 ERROR: Undefined symbol: .Rf_duplicate
ld: 0711-317 ERROR: Undefined symbol: .R_ProtectWithIndex
ld: 0711-317 ERROR: Undefined symbol: R_NamesSymbol
ld: 0711-317 ERROR: Undefined symbol: .Rf_getAttrib
ld: 0711-317 ERROR: Undefined symbol: .Rf_errorcall
ld: 0711-317 ERROR: Undefined symbol: .Rf_protect
ld: 0711-317 ERROR: Undefined symbol: .Rf_str2type
ld: 0711-317 ERROR: Undefined symbol: .Rf_begincontext
ld: 0711-317 ERROR: Undefined symbol: .Rf_endcontext
ld: 0711-317 ERROR: Undefined symbol: .Rf_setAttrib
ld: 0711-317 ERROR: Undefined symbol: .Rf_unprotect
ld: 0711-317 ERROR: Undefined symbol: .R_setX11Routines
ld: 0711-317 ERROR: Undefined symbol: .vmaxget
ld: 0711-317 ERROR: Undefined symbol: .Rf_asReal
ld: 0711-317 ERROR: Undefined symbol: .Rf_isValidString
ld: 0711-317 ERROR: Undefined symbol: .Rf_warningcall
ld: 0711-317 ERROR: Undefined symbol: .Rf_isString
ld: 0711-317 ERROR: Undefined symbol: .Rf_isInteger
ld: 0711-317 ERROR: Undefined symbol: .Rf_isLogical
ld: 0711-317 ERROR: Undefined symbol: .Rf_isReal
ld: 0711-317 ERROR: Undefined symbol: .Rf_RGBpar
ld: 0711-317 ERROR: Undefined symbol: .vmaxset
ld: 0711-317 ERROR: Undefined symbol: .R_CheckDeviceAvailable
ld: 0711-317 ERROR: Undefined symbol: R_interrupts_suspended
ld: 0711-317 ERROR: Undefined symbol: .Rf_mkString
ld: 0711-317 ERROR: Undefined symbol: .Rf_gsetVar
ld: 0711-317 ERROR: Undefined symbol: .GEcreateDevDesc
ld: 0711-317 ERROR: Undefined symbol: .Rf_addDevice
ld: 0711-317 ERROR: Undefined symbol: .GEinitDisplayList
ld: 0711-317 ERROR: Undefined symbol: R_interrupts_pending
ld: 0711-317 ERROR: Undefined symbol: .Rf_onintr
ld: 0711-317 ERROR: Undefined symbol: .R_alloc
ld: 0711-317 ERROR: Undefined symbol: .Rf_findVar
ld: 0711-317 ERROR: Undefined symbol: .Rf_elt
ld: 0711-317 ERROR: Undefined symbol: .Rf_GetDevice
ld: 0711-317 ERROR: Undefined symbol: R_InputHandlers
ld: 0711-317 ERROR: Undefined symbol: .getInputHandler
ld: 0711-317 ERROR: Undefined symbol: .removeInputHandler
ld: 0711-317 ERROR: Undefined symbol: .Rf_devNumber
ld: 0711-317 ERROR: Undefined symbol: .Rf_KillDevice
ld: 0711-317 ERROR: Undefined symbol: .GEplayDisplayList
ld: 0711-317 ERROR: Undefined symbol: .R_ExpandFileName
ld: 0711-317 ERROR: Undefined symbol: .R_fopen
ld: 0711-317 ERROR: Undefined symbol: .Rf_asLogical
ld: 0711-317 ERROR: Undefined symbol: .addInputHandler
ld: 0711-317 ERROR: Undefined symbol: .Rprintf
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
unlink: /ptmp/thoar/xlcW0t0bjqa
unlink: /ptmp/thoar/xlcW1tBbjqb
unlink: /ptmp/thoar/xlcW2tBbjqc
unlink: /ptmp/thoar/xlcSEtLbjqe
unlink: /ptmp/thoar/xlcSFtDbjqd
More information about the R-help
mailing list