[R-SIG-Mac] Building package from source error "file is not of required architecture"

Simon Urbanek simon.urbanek at r-project.org
Fri Sep 11 15:32:12 CEST 2009


Peter,

On Sep 11, 2009, at 2:05 AM, Peter Cowan wrote:

> Bouncing to the list after failing to reply-all
>
> On Thu, Sep 10, 2009 at 5:25 PM, Simon Urbanek
> <simon.urbanek at r-project.org> wrote:
>> Peter,
>>
>> you have probably compiled ncl in 64-bit (default on SL) but you're  
>> using
>> 32-bit R, so it won't work. Either use 64-bit R or compile ncl for  
>> 32-bit.
>
> I suspected something obvious of the like.  Unfortunately, I've not  
> been able to get 64 bit R working for me.  When I try the following  
> for the CRAN version:
>
> Birch$ R --arch x86_64
> /usr/bin/R: line 207:
> /Library/Frameworks/R.framework/Resources/etc/x86_64/ldpaths: No such
> file or directory
>

Yes, CRAN R is 32-bit only.


> So I got the 2.9.2 patched version distributed as a tar.gz from <http://r.research.att.com/ 
> > (thanks for providing this Simon!), but that doesn't work with the  
> 64bit GUI build on the same site (it won't even launch, because it  
> need 2.10.0).
>

Oh, true, the 2.9 GUI is simply not there. I'll have to look to see  
what went wrong.


> So I installed the 32/64 Universal 2.9.0,

[BTW: you can simply overwrite the installation with the 2.9.2 patched  
binary to upgrade it - the only part you really needed from the  
universal package was the GUI]


> but now building any package gives errors [1] perhaps because SL  
> doesn't install ppc64 libraries?

Yes, unfortunately. The hot fix is
rm -rf /Library/Frameworks/R.framework/Resources/bin/exec/ppc*


> I the same (or similar warning) using the R-devel nightly.
>
> I apologize if this to is obvious.  When I install xcode, do I need to
> install the tools for prior OSs to get ppc compilers?
>

The compilers are there all right, it's the libraries that are  
missing. They are now only part of the 10.5 SDK in Xcode which is not  
used by R.

Cheers,
Simon


> [1]
> ======
> (WARNING: partial output only, ask package author to use Rprintf  
> instead!)
> newick.c: In function ‘readNewickString’:
> newick.c:233: warning: format not a string literal and no format  
> arguments
> ld: warning: in /usr/lib/dylib1.10.5.o, missing required architecture
> ppc64 in file
> ld: warning: in /usr/lib/libSystemStubs.a, missing required
> architecture ppc64 in file
> ld: warning: in
> /System/Library/Frameworks//CoreFoundation.framework/CoreFoundation,
> missing required architecture ppc64 in file
> ld: warning: in /usr/lib/libSystem.dylib, missing required
> architecture ppc64 in file
> ld: in /usr/lib/libSystem.B.dylib, missing required architecture  
> ppc64 in file
> collect2: ld returned 1 exit status
> make: *** [ape.so] Error 1
> ERROR: compilation failed for package ‘ape’
> * Removing ‘/Library/Frameworks/R.framework/Versions/2.9/Resources/ 
> library/ape’
> * Restoring previous
> ‘/Library/Frameworks/R.framework/Versions/2.9/Resources/library/ape’
> ========
>
>
>> Cheers,
>> Simon
>>
>>
>> On Sep 10, 2009, at 7:58 PM, Peter Cowan wrote:
>>
>>> I'm running 10.6 from clean install, with the supplied Xcode, and R
>>> 2.9.2.  I am unable to build a package (specifically the phylobase
>>> package [1]) which built fine under 10.5.8.  Even more confusingly  
>>> it
>>> seems to build fine for others using 10.6.   The end of the install
>>> log (appended below) contains the these potentially informative
>>> errors:
>>>
>>> ld: warning: in ncl/ncl/.libs/libncl.a, file is not of required
>>> architecture
>>> ld: warning: duplicate dylib /usr/local/lib/libgcc_s.1.dylib
>>>
>>> The latter error I get with any source package, but doesn't seem to
>>> prevent them from being installed.
>>>
>>> The package also makes use of the Rcpp interface to use an included
>>> library (NCL).  It is this included library that seems to not build
>>> correctly, which could very well be related to the old version of
>>> Rcpp, or the makefiles responsible for building it.
>>>
>>> I've tried all manner of tweaking, upgrading, and list searching,  
>>> but
>>> the (probably obvious) solution still eludes me.  Any pointers in  
>>> the
>>> right direction are greatly appreciated.
>>>
>>> Peter
>>>
>>> [1] https://r-forge.r-project.org/projects/phylobase/
>>> =========================
>>>>
>>>> sessionInfo()
>>>
>>> R version 2.9.2 (2009-08-24)
>>> i386-apple-darwin8.11.1
>>>
>>> locale:
>>> en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8
>>>
>>> attached base packages:
>>> [1] stats     graphics  grDevices utils     datasets  methods   base
>>>
>>> =========================
>>> birch$ which gfortran
>>> /usr/local/bin/gfortran
>>>
>>> birch$ gfortran --version
>>> GNU Fortran (GCC) 4.2.3
>>> Copyright (C) 2007 Free Software Foundation, Inc.
>>>
>>> GNU Fortran comes with NO WARRANTY, to the extent permitted by law.
>>> You may redistribute copies of GNU Fortran
>>> under the terms of the GNU General Public License.
>>> For more information about these matters, see the file named COPYING
>>>
>>> ============================
>>>
> [original error snipped]
>
> _______________________________________________
> R-SIG-Mac mailing list
> R-SIG-Mac at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>
>



More information about the R-SIG-Mac mailing list