[Rcpp-devel] Conflit with sys/vnode.h on Solaris (gcc 4.4.3)

Douglas Bates bates at stat.wisc.edu
Tue Apr 12 20:33:21 CEST 2011


On Tue, Apr 12, 2011 at 11:11 AM, Giuseppe Milicia
<Giuseppe.Milicia at makoglobal.com> wrote:
> Dirk,
>
> I steer away from the Solaris compiler, too many headaches there...
>
> I'm currently using gcc 4.4.3
>
> I tried rearranging the headers (in my code) but I got nowhere :( I suspect this is the case because sys/vnode.h is used by the standard libraries and those are included in RcppCommon before the conflicting definitions. I'll see if I can figure a way out of this and let you know...


Can you use qualified names, as in Rcpp::as, or would that mean
rewriting most of the Rcpp headers?

>
> Cheers,
>
> //Giuseppe
>
> -----Original Message-----
> From: Dirk Eddelbuettel [mailto:edd at debian.org]
> Sent: 12 April 2011 16:53
> To: Giuseppe Milicia
> Cc: 'rcpp-devel at lists.r-forge.r-project.org'
> Subject: Re: [Rcpp-devel] Conflit with sys/vnode.h on Solaris (gcc 4.4.3)
>
>
> On 12 April 2011 at 16:43, Giuseppe Milicia wrote:
> | Guys,
> |
> |
> |
> | I was wondering if anyone has seen a conflict between Rcpp and sys/vnode.h on
> | Solaris (gcc 4.4.3, R-2.12.2).
>
> We do not have access to Solaris.
>
> We do however get scolded by Prof Ripley if it doesn't pass 'R CMD check' (or
> even builds) on Solaris, and there seems to an issue with the compiler, see
>
>   http://cran.r-project.org/web/checks/check_results_Rcpp.html
>
> and the two entries with an error -- on Solaris, with the Sun compiler
>
> It would superb if you could help getting this into shape. Our lack of access
> hinders this dramatically.  Do you use the Sun compiler?
>
> | This could be my fault entirely but before I spend a few hours on this I
> | thought I might just ask?
> |
> |
> |
> | This is the error and indeed at like 565 of sys/vnode.h we have ?struct as;?
> |
> |
> |
> | In file included from /.../Rcpp/include/Rcpp.h:32,
> |
> |                  from XXX.cc:10:
> |
> | /usr/include/sys/vnode.h: In member function
> | 'Rcpp::RObject::SlotProxy::operator T() const [with T = SEXPREC*]':
> |
> | /.../Rcpp/include/Rcpp/DataFrame.h:47:   instantiated from here
> |
> | /usr/include/sys/vnode.h:565: error: 'struct as' is not a function,
> |
> | /.../Rcpp/include/Rcpp/as.h:74: error:   conflict with 'template<class T> T
> | Rcpp::as(SEXPREC*)'
> |
> | /.../Rcpp/include/Rcpp/RObject.h:201: error:   in call to 'as'
> |
> | /usr/include/sys/vnode.h: In member function
> | 'Rcpp::RObject::AttributeProxy::operator T() const [with T = SEXPREC*]':
> |
> | /.../Rcpp/include/Rcpp/DataFrame.h:48:   instantiated from here
> |
> | /usr/include/sys/vnode.h:565: error: 'struct as' is not a function,
> |
> | /.../Rcpp/include/Rcpp/as.h:74: error:   conflict with 'template<class T> T
> | Rcpp::as(SEXPREC*)'
> |
> | /.../Rcpp/include/Rcpp/RObject.h:150: error:   in call to 'as'
> |
> | In file included from /.../Rcpp/include/Rcpp.h:39,
> |
> |                  from XXX.cc:10:
> |
> | /usr/include/sys/vnode.h: In member function
> | 'Rcpp::Environment::Binding::operator T() const [with T = Rcpp::Function]':
> |
> | /.../Rcpp/include/Rcpp/InternalFunction.h:46:   instantiated from here
> |
> | /usr/include/sys/vnode.h:565: error: 'struct as' is not a function,
> |
> | /.../Rcpp/include/Rcpp/as.h:74: error:   conflict with 'template<class T> T
> | Rcpp::as(SEXPREC*)'
> |
> | /.../Rcpp/include/Rcpp/Environment.h:138: error:   in call to 'as'
> |
> |
> |
> | Any ideas would be appreciated.
>
> Sometimes you can surf around these issues by reordering the header files in
> your code.  This is a little iffy as we can't just redefine (our) as<>() --
> it is used in too many places.
>
> You gotta dig. We can try to help.  Reducing the problem to smaller files
> sometimes helps.
>
> And if you could help with the Solaris compiler ....
>
> Dirk
>
> |
> |
> | Cheers,
> |
> |
> |
> | //Giuseppe
> |
> |
> | -------------------------------------------------------------------------------
> | ---- MAKO ----
> | This email and any files transmitted with it are confidential and intended
> | solely for the use of the individual or entity to whom they are addressed. If
> | you have received this email in error please notify the sender immediately by
> | e-mail and delete this e-mail from your system. Please note that any views or
> | opinions presented in this email are solely those of the author and do not
> | necessarily represent those of the Mako Group. If you are not the intended
> | recipient you are notified that disclosing, copying, distributing or taking any
> | action with respect to the contents of this information is strictly prohibited.
> | Finally, the recipient should check this email and any attachments for the
> | presence of viruses. The Mako Group accepts no liability for any damage caused
> | by any virus transmitted by this email.
> | For important disclosures please click <<http://www.makoglobal.com/
> | UKRegulatoryNotice.htm>>
> |
> | ----------------------------------------------------------------------
> | _______________________________________________
> | Rcpp-devel mailing list
> | Rcpp-devel at lists.r-forge.r-project.org
> | https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
>
> --
> Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com
>
> ---- MAKO ----
> This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the sender immediately by e-mail and delete this e-mail from your system. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the Mako Group. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action with respect to the contents of this information is strictly prohibited. Finally, the recipient should check this email and any attachments for the presence of viruses. The Mako Group accepts no liability for any damage caused by any virus transmitted by this email.
> For important disclosures please click <<http://www.makoglobal.com/UKRegulatoryNotice.htm>>
> _______________________________________________
> Rcpp-devel mailing list
> Rcpp-devel at lists.r-forge.r-project.org
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
>


More information about the Rcpp-devel mailing list