Skip to content

Building R-2.3.1 for Windows with ATLAS

2 messages · Giuseppe Antonaci, Brian Ripley

#
Ok, moved to R-devel.

I tried to build R-2.3.1. Since I intent to distribute this tuned R to
all other who have a computer like mine here at work I thought it was
best to stay with the latest stable release.

About your suggestion, I could'n find xerblas.o file. And I don't know
how to edit libf77blas.a. I tried to open it with VIM
(http://vim.sf.net/) but there was a lot of strange symbols (expected,
I think), either way I found a reference to xerblas.o inside it but
didn't know what to do with this reference.
Thanks,
Giuseppe Antonaci
On 26/09/06, Prof Brian Ripley <ripley at stats.ox.ac.uk> wrote:
I managed to build R-2.3.1 successfully with the default BLAS but when I
change the MKRULES to use ATLAS BLAS and set the path to
"C:/WinNT_ATHLONSSE2" I got the
following error message (I'm posting only the final part, there was a
lot of compilation before this):

cp R.dll ../../bin/
-------- Building ../../bin/Rblas.dll --------
gcc  -shared -s -o ../../bin/Rblas.dll blas00.o dllversion.o Rblas.def \
  -L../../bin -lR  -L"C:/WinNT_ATHLONSSE2" -lf77blas -latlas
C:/WinNT_ATHLONSSE2/libf77blas.a(xerbla.o):xerbla.f:(.text+0xb): undefined refer
ence to `s_wsfe'
C:/WinNT_ATHLONSSE2/libf77blas.a(xerbla.o):xerbla.f:(.text+0x27): undefined refe
rence to `do_fio'
C:/WinNT_ATHLONSSE2/libf77blas.a(xerbla.o):xerbla.f:(.text+0x43): undefined refe
rence to `do_fio'
C:/WinNT_ATHLONSSE2/libf77blas.a(xerbla.o):xerbla.f:(.text+0x48): undefined refe
rence to `e_wsfe'
C:/WinNT_ATHLONSSE2/libf77blas.a(xerbla.o):xerbla.f:(.text+0x5c): undefined refe
rence to `s_stop'
collect2: ld returned 1 exit status
make[2]: *** [../../bin/Rblas.dll] Error 1
make[1]: *** [rbuild] Error 2
make: *** [all] Error 2

The ATLAS BLAS was build using Cygwin. AFTER building ATLAS BLAS I
changed the "Path" variable putting "C:\Rtools\tools\bin;C:\MinGW\bin"
before everything else.
To build R I followed "R Administration and Instalation" and Duncan
Murdoch's guide at http://www.murdoch-sutherland.com/Rtools/,
including the version of MinGW.

At ATLAS web page (http://math-atlas.sourceforge.net/errata.html) I
found the following:

Q: I'm linking with C, and getting missing symbols (such as w_wsfe,
do_fio, w_esfe or s_stop).
R: These kinds of symbols are Fortran library calls. The problem is
that the C linker does not automatically find the Fortran libraries.
The most common fix is to either link using your fortran linker, or to
rewrite your code so that Fortran routines are not called. If you know
where they are, you can also choose to link in the Fortran libraries
explicitly

Well, I think this answers my question but I didn't understand the
answer (and it was not because it is in English). Unfortunately I know
nothing of C or Fortran. Even if I
knew that I have these Fortran libraries I wouldn't know how to link
them. I tried to look at MinGW web page but found nothing.
Any help would be mostly welcome, please.
Giuseppe Antonaci
#
On Wed, 27 Sep 2006, Giuseppe Antonaci wrote:

            
Which is 2.4.0 RC.
Well, I said xerbla.o, not xerblas.o.

You edit library archives with ar, something like

ar d libf77blas.a xerbla.o