Skip to content

Rconfig.h & unsupported architectures

7 messages · Dirk Eddelbuettel, Simon Urbanek, Peter Dalgaard +1 more

#
Hi all,

Recently, when compiling R packages containing C code, I've started
getting the following error:

* installing to library ?/Users/hadley/R?
* installing *source* package ?appdirs? ...
** Creating default NAMESPACE file
** libs
*** arch - i386
gcc -arch i386 -std=gnu99
-I/Library/Frameworks/R.framework/Resources/include
-I/Library/Frameworks/R.framework/Resources/include/i386 -DNDEBUG
-I/usr/local/include    -fPIC  -g -O2  -c win-path.c -o win-path.o
In file included from /Library/Frameworks/R.framework/Resources/include/R.h:34,
                 from win-path.c:1:
/Library/Frameworks/R.framework/Resources/include/Rconfig.h:13:2:
error: #error "Unsupported architecture."
In file included from
/Library/Frameworks/R.framework/Resources/include/R_ext/RS.h:27,
                 from /Library/Frameworks/R.framework/Resources/include/R.h:44,
                 from win-path.c:1:
/Library/Frameworks/R.framework/Resources/include/Rconfig.h:13:2:
error: #error "Unsupported architecture."

I'm on
R version 2.15.1 (2012-06-22)
Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)

And in case it helps:

gcc --version
i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc.
build 5658) (LLVM build 2336.9.00)

Any ideas about what I might have done to break this?

Thanks!

Hadley
#
On 25 July 2012 at 15:56, Hadley Wickham wrote:
| Hi all,
| 
| Recently, when compiling R packages containing C code, I've started
| getting the following error:
| 
| * installing to library ?/Users/hadley/R?
| * installing *source* package ?appdirs? ...
| ** Creating default NAMESPACE file
| ** libs
| *** arch - i386
| gcc -arch i386 -std=gnu99
| -I/Library/Frameworks/R.framework/Resources/include
| -I/Library/Frameworks/R.framework/Resources/include/i386 -DNDEBUG
| -I/usr/local/include    -fPIC  -g -O2  -c win-path.c -o win-path.o
| In file included from /Library/Frameworks/R.framework/Resources/include/R.h:34,
|                  from win-path.c:1:
| /Library/Frameworks/R.framework/Resources/include/Rconfig.h:13:2:
| error: #error "Unsupported architecture."
| In file included from
| /Library/Frameworks/R.framework/Resources/include/R_ext/RS.h:27,
|                  from /Library/Frameworks/R.framework/Resources/include/R.h:44,
|                  from win-path.c:1:
| /Library/Frameworks/R.framework/Resources/include/Rconfig.h:13:2:
| error: #error "Unsupported architecture."
| 
| I'm on
| 
| > sessionInfo()
| R version 2.15.1 (2012-06-22)
| Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)
| 
| And in case it helps:
| 
| gcc --version
| i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc.
| build 5658) (LLVM build 2336.9.00)
| 
| Any ideas about what I might have done to break this?

A quick grep for the string shows it pop up in pcre:

edd at max:~/src/debian/R/R-2.15.1/src$ grep "Unsupported arch" */*/*
extra/pcre/pcre_jit_compile.c:#error Unsupported architecture
edd at max:~/src/debian/R/R-2.15.1/src$ 

and it is the same in R-devel. Can you substitute a pre-built pcre library?

Dirk

 
| Thanks!
| 
| Hadley
| 
| 
| -- 
| Assistant Professor / Dobelman Family Junior Chair
| Department of Statistics / Rice University
| http://had.co.nz/
| 
| ______________________________________________
| R-devel at r-project.org mailing list
| https://stat.ethz.ch/mailman/listinfo/r-devel
#
On 25 July 2012 at 18:46, Dirk Eddelbuettel wrote:
|
| On 25 July 2012 at 15:56, Hadley Wickham wrote:
| | Hi all,
| | 
| | Recently, when compiling R packages containing C code, I've started
| | getting the following error:
| | 
| | * installing to library ?/Users/hadley/R?
| | * installing *source* package ?appdirs? ...
| | ** Creating default NAMESPACE file
| | ** libs
| | *** arch - i386
| | gcc -arch i386 -std=gnu99
| | -I/Library/Frameworks/R.framework/Resources/include
| | -I/Library/Frameworks/R.framework/Resources/include/i386 -DNDEBUG
| | -I/usr/local/include    -fPIC  -g -O2  -c win-path.c -o win-path.o
| | In file included from /Library/Frameworks/R.framework/Resources/include/R.h:34,
| |                  from win-path.c:1:
| | /Library/Frameworks/R.framework/Resources/include/Rconfig.h:13:2:
| | error: #error "Unsupported architecture."
| | In file included from
| | /Library/Frameworks/R.framework/Resources/include/R_ext/RS.h:27,
| |                  from /Library/Frameworks/R.framework/Resources/include/R.h:44,
| |                  from win-path.c:1:
| | /Library/Frameworks/R.framework/Resources/include/Rconfig.h:13:2:
| | error: #error "Unsupported architecture."
| | 
| | I'm on
| | 
| | > sessionInfo()
| | R version 2.15.1 (2012-06-22)
| | Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)
| | 
| | And in case it helps:
| | 
| | gcc --version
| | i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc.
| | build 5658) (LLVM build 2336.9.00)
| | 
| | Any ideas about what I might have done to break this?
| 
| A quick grep for the string shows it pop up in pcre:
| 
| edd at max:~/src/debian/R/R-2.15.1/src$ grep "Unsupported arch" */*/*
| extra/pcre/pcre_jit_compile.c:#error Unsupported architecture
| edd at max:~/src/debian/R/R-2.15.1/src$ 
| 
| and it is the same in R-devel. Can you substitute a pre-built pcre library?

Actually, probably not the issue. You are getting it from one of R's headers
so it may have gotten there while you configured R on your machine. 

Dirk
 
| Dirk
| 
|  
| | Thanks!
| | 
| | Hadley
| | 
| | 
| | -- 
| | Assistant Professor / Dobelman Family Junior Chair
| | Department of Statistics / Rice University
| | http://had.co.nz/
| | 
| | ______________________________________________
| | R-devel at r-project.org mailing list
| | https://stat.ethz.ch/mailman/listinfo/r-devel
| 
| -- 
| Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com  
| 
| ______________________________________________
| R-devel at r-project.org mailing list
| https://stat.ethz.ch/mailman/listinfo/r-devel
1 day later
#
Which I didn't do, since I got a pre-built binary from CRAN.  I guess
I'll try re-installing and hope the problem goes away.

Hadley
1 day later
#
On Jul 27, 2012, at 5:06 PM, Hadley Wickham wrote:

            
What compilers/OS is this? The error comes from the multi-arch header stub so it dispatches depending on the architecture to the actual headers in the arch subdirectories, but the error means that your architecture is not installed/supported. This is rather odd, unless you're trying to use PPC on more recent OS X without Rosetta but even then ... If in doubt, sudo rm -rf /Library/Frameworks/R.framework and re-install R ...

Cheers,
Simon
#
On Jul 29, 2012, at 01:59 , Simon Urbanek wrote:

            
It would appear to be the stock Lion compiler. I can compile biarch with that and a current  R. 

As /Library/Frameworks/R.framework/Resources/include/Rconfig.h in its entirety is the following, the only obvious way to reach the #error  would be if __i386__ somehow got undefined. Or the file itself is corrupted, of course.

-pd

/* This is an automatically generated universal stub for architecture-dependent headers. */
#ifdef __i386__
#include "i386/Rconfig.h"
#elif defined __ppc__
#include "ppc/Rconfig.h"
#elif defined __ppc64__
#include "ppc64/Rconfig.h"
#elif defined __x86_64__
#include "x86_64/Rconfig.h"
#elif defined __arm__
#include "arm/Rconfig.h"
#else
#error "Unsupported architecture."
#endif

  
    
#
Ooops, that's was it!  I was looking at Rconfig.h for another reason,
and must have accidentally entered a space.  Thanks!

Hadley