[Rd] Compilation error Mac binary

Dirk Eddelbuettel edd at debian.org
Wed Jun 29 21:19:26 CEST 2011


On 29 June 2011 at 14:17, Simon Urbanek wrote:
| BTW: the build result is at
| 
| http://www.r-project.org/nosvn/R.check/r-release-macosx-ix86/GUTS-00install.html
| 
| so you may want to have a look. I'm not a C++ expert so you may want to ask on the Rcpp list since it appears to be some issue triggered by Rcpp includes - as if boost and tr1 and somehow define the same things but differently ... Since Dirk uses the same boost (1.43 here) successfully in QuantLib he may know more ...

Well, I already told Soeren over there on rcpp-devel that his issues are

  a) totally homegrown (as he continues to ignore configure issues and just
     assumes things would work because they do on his),

  b) hence unrelated to Rcpp (as he just throws '#include <boost/...>' in his
     code without testing

  c) almost entirely solvable by copy-and-paste as e.g. my RQuantLib has a
     configure script using boost-config he could copy (but I acknowldged
     that the configure script does more and is hence not the easiest
     possible).

Now, I do admit that learning configure is a bit of a pain, but that is the
price of admission of CRAN if you use Boost -- or you choose the frequently
done but very inelegant route of copying all your Boost headers into your
package.  My RcppBDT package does that too.  Some of us have talked about
creating a 'boost-headers' package for CRAN that the couple of Boost-using
packages could have a 'Depends:' and 'LinkingTo:' on.  Then his issues would
be solved -- but we're not there yet.

Soeren just shown resilience and persistence in getting his package
written, built and now onto CRAN.  The remaining step is to learn more about
cross-platform build issues.  Because that is the (high) standard of CRAN,
and if you want to be part of it, you are expected to conform.  No shortcuts.

Dirk

 
| Cheers,
| Simon
| 
| 
| On Jun 29, 2011, at 2:05 PM, Simon Urbanek wrote:
| 
| > 
| > On Jun 29, 2011, at 1:12 PM, Uwe Ligges wrote:
| > 
| >> Looks like a different boost version than the one you require.
| >> I'd suggest to talk to the Mac maintainer, Simon Urbanek (CCing).
| >> 
| > 
| > GUTS doesn't specify any system requirements, so obviously it has no business trying to use boost from the system. Also note boost is inlined in the vast majority of cases, so most packages simply supply the headers inside as to guarantee the required version is used (which I would certainly expect GUTS to do since it doesn't depend on boost according to the DESCRIPTION).
| > 
| > Cheers,
| > Simon
| > 
| > 
| >> 
| >> On 29.06.2011 17:14, soeren.vogel at uzh.ch wrote:
| >>> Hello David
| >>> 
| >>> On 29.06.2011, at 15:56, David Winsemius wrote:
| >>> 
| >>>> On Jun 29, 2011, at 5:33 AM, soeren.vogel at uzh.ch wrote:
| >>>> 
| >>>>> Hello, the compilation of the GUTS package on CRAN for Mac produces the following error messages:
| >>>>> 
| >>>>> http://www.r-project.org/nosvn/R.check/r-release-macosx-ix86/GUTS-00install.html
| >>>>> 
| >>>>> I guess it is some namespace collision, but I can not reproduce it on my machine, it compiles fine here. What is the cause and which setup do I need to reproduce the errors?
| >>>> 
| >>>> I was going to suggest you take this up with the maintainers... but you _are_ one of the maintainers.
| >>> 
| >>> :-)
| >>> 
| >>>> Here is the output from an attempt to compile from source, version 0.1.45, with a relatively recent version of R 2.13.0 (but not the most recent and I still use Mac OSX 10.5.8). Perhaps its brevity will be helpful, and the fact that it seems to identify different error than those flagged in the log at CRAN.
| >>> 
| >>> Thanks for your answer. The failure on your side is clear to me: there is no installation of the boost C++ library in any of the standard include locations. I have added /opt/local/include in Makevars (Mac Ports installation of C source packages), however, I know I should but still I am reluctant to write a configure script that could circumvent non-standard installations of boost on UNIX machines.
| >>> 
| >>> So thanks for the output, but the CRAN messages must point to something different...
| >>> 
| >>> Regards
| >>> Sören
| >>> 
| >>>> trying URL 'http://lib.stat.cmu.edu/R/CRAN/src/contrib/GUTS_0.1.45.tar.gz'
| >>>> Content type 'application/x-gzip' length 9842 bytes
| >>>> opened URL
| >>>> ==================================================
| >>>> downloaded 9842 bytes
| >>>> 
| >>>> Loading required package: lattice
| >>>> Loading required package: sos
| >>>> Loading required package: brew
| >>>> [1] "2011-06-29 09:40:18 EDT"
| >>>> * installing *source* package ‘GUTS’ ...
| >>>> ** libs
| >>>> *** arch - i386
| >>>> g++ -arch i386 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/i386 -I/opt/local/include -I/usr/local/include -I"/Library/Frameworks/R.framework/Versions/2.13/Resources/library/Rcpp/include"   -fPIC  -g -O2 -c GUTS.cpp -o GUTS.o
| >>>> In file included from GUTS.cpp:12:
| >>>> GUTS.h:21:28: error: boost/random.hpp: No such file or directory
| >>>> GUTS.h:22:40: error: boost/math/distributions.hpp: No such file or directory
| >>>> GUTS.cpp: In function ‘void to_print(double)’:
| >>>> GUTS.cpp:277: error: ‘cout’ was not declared in this scope
| >>>> GUTS.cpp: In member function ‘void GUTS::showObject()’:
| >>>> GUTS.cpp:281: error: ‘cout’ is not a member of ‘std’
| >>>> GUTS.cpp:284: error: ‘cout’ was not declared in this scope
| >>>> make: *** [GUTS.o] Error 1
| >>>> ERROR: compilation failed for package ‘GUTS’
| >>>> * removing ‘/Library/Frameworks/R.framework/Versions/2.13/Resources/library/GUTS’
| >>>> 
| >>>>> sessionInfo()
| >>>> R version 2.13.0 beta (2011-04-04 r55296)
| >>>> Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)
| >>>> 
| >>>> locale:
| >>>> [1] 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
| >>>> 
| >>>> other attached packages:
| >>>> [1] mgcv_1.7-6      sos_1.3-0       brew_1.0-6      lattice_0.19-26
| >>>> 
| >>>> loaded via a namespace (and not attached):
| >>>> [1] grid_2.13.0        Matrix_0.999375-50 nlme_3.1-101       tools_2.13.0
| >>>> 
| >>>> --
| >>>> David.
| >>>> 
| >>>> 
| >>>>> 
| >>>>> R: version
| >>>>> platform       i386-apple-darwin9.8.0
| >>>>> arch           i386
| >>>>> os             darwin9.8.0
| >>>>> system         i386, darwin9.8.0
| >>>>> status
| >>>>> major          2
| >>>>> minor          13.0
| >>>>> year           2011
| >>>>> month          04
| >>>>> day            13
| >>>>> svn rev        55427
| >>>>> language       R
| >>>>> version.string R version 2.13.0 (2011-04-13)
| >>>>> 
| >>>>> I ~ $: gcc --version
| >>>>> i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5666) (dot 3)
| >>>>> Copyright (C) 2007 Free Software Foundation, Inc.
| >>>>> This is free software; see the source for copying conditions.  There is NO
| >>>>> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
| >>>>> 
| >>>>> I ~ $: less /opt/local/include/boost/version.hpp
| >>>>> //  Boost version.hpp configuration header file  ------------------------------//
| >>>>> [...]
| >>>>> #define BOOST_VERSION 104601
| >>>>> #define BOOST_LIB_VERSION "1_46_1"
| >>>>> [...]
| >>>>> 
| >>>>> ______________________________________________
| >>>>> R-devel at r-project.org mailing list
| >>>>> https://stat.ethz.ch/mailman/listinfo/r-devel
| >>>> 
| >>>> David Winsemius, MD
| >>>> West Hartford, CT
| >>>> 
| >>>> 
| >>> 
| >>> ______________________________________________
| >>> R-devel at r-project.org mailing list
| >>> https://stat.ethz.ch/mailman/listinfo/r-devel
| >> 
| >> 
| > 
| 

-- 
Gauss once played himself in a zero-sum game and won $50.
                      -- #11 at http://www.gaussfacts.com



More information about the R-devel mailing list