[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 22:16:26 CEST 2009


On Sep 11, 2009, at 15:41 , Peter Cowan wrote:

> On Fri, Sep 11, 2009 at 6:32 AM, Simon Urbanek
> <simon.urbanek at r-project.org> wrote:
>> 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.
>
> Yes, this makes sense, but I was a bit confused by this comment on
> r.research.att.com
>
> "Leopard builds, 64-bit binaries and packages are becoming available  
> from CRAN as of R 2.8.0."
> Does that mean r.research.att.com ?

No, the package binaries are available directly from CRAN:
http://cran.r-project.org/bin/macosx/leopard/contrib/


>  I don't find a link on CRAN.
>

>>> 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.
>
> Thanks!
>

Hm.. the builds are in fact there on the build machine, but are  
missing from the website index ... some more digging needed ...

Please use the direct link in the meantime:
http://r.research.att.com/R-GUI-5473-2.9-leopard-Leopard64.dmg


>>
>>> 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]
>
> Okay, I was concerned there might be a version mismatch between 2.9.2
> and the 2.9.0 gui so I didn't do that.

Patch-level releases of R are [supposed to be] binary-compatible, so  
it should be safe.


> BTW is the repository for the GUI public?

Yes, see FAQ:

2.4 How to build and install the R.app
The sources for the R.app GUI are currently not included in the global  
R source distribution. They are available in the form of a Xcode  
project on the R for Mac OS X CRAN pages (released versions) as well  
as the SVN repository. In order to check out the latest development  
version, use

svn co https://svn.r-project.org/R-packages/trunk/Mac-GUI


> I see the .tar on CRAN.
>
>>
>>> 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*
>
> Brilliant!  This works perfectly.  Thank you for not only contributing
> software but patiently helping me understand it.
>

Sure, you're welcome.

Cheers,
Simon


>
>
>>> 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