[Rcpp-devel] no matching function for call in mzR on Mac after Rcpp 0.11.0 update

Kevin Ushey kevinushey at gmail.com
Wed May 14 06:49:13 CEST 2014


Hi Jack,

I've already brought this up with the package maintainer. It's because
they bundle an old, broken version of boost. I asked them to fix it; I
guess they haven't (the BioC build reports also show it failing on
Mavericks) I've appended a copy of my e-mail at the end of this just
so you know what's up (and maybe others having problems will stumble
upon it).

A local fix would involve removing the (broken, illegal) forward declarations.

The error you saw before, re reference classes, was something separate
-- that was indeed our bug, and is fixed in the current version of
Rcpp on CRAN.

Thanks,
Kevin

---

Hi Bernd, Nicolas,

I'm unable to install mzR from source. Here's the script I use:

#!/usr/bin/env sh

cd ~
mkdir .mzR
cd .mzR
wget http://www.bioconductor.org/packages/devel/bioc/src/contrib/mzR_1.9.8.tar.gz
R CMD INSTALL mzR_1.9.8.tar.gz

This gives me the same error as Nicolas sees:

In file included from pwiz/data/msdata/DefaultReaderList.cpp:40:

In file included from ./boost/regex.hpp:31:
In file included from ./boost/regex/v4/regex.hpp:67:
./boost/regex/v4/basic_regex.hpp:149:9: error: too few template
arguments for class
      template 'vector'
   std::vector<name> m_sub_names;
        ^
./boost/detail/container_fwd.hpp:82:47: note: template is declared here
    template <class T, class Allocator> class vector;
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~       ^

This is actually a case of boost doing something it shouldn't -- it's
trying to forward-declare std::vector, but one cannot assume the
template structure of a vector is of <class T, class Allocator> -- in
particular this breaks on clang with libc++. See e.g.
http://stackoverflow.com/questions/307343/forward-declare-an-stl-container

One can work around this by forcing the following Makevars flags:

    PKG_CXXFLAGS=-std=gnu++11 -stdlib=libstdc++

However, this will only work if both Rcpp and mzR are built with the
same flags, and using libstdc++ kind of defeats the purpose of using
clang...

I'm sure you'll get some mail from Dan Tenenbaum when he tries to
build the package on the new Mavericks machines, so I think you will
have to either update the version of boost packaged with mzR, or fix
the forward declarations that it tries to use.

Cheers,
Kevin

On Tue, May 13, 2014 at 8:52 PM, Jack Howarth
<howarth.mailing.lists at gmail.com> wrote:
> After updating the bioconductor packages to the Bioc 2.14 release, I ran in
> to this failure on Mac OS X 10.9 with the clang compilers from Xcode 5.1.1.
> Interestingly, this failure doesn't occur on Mac OS X  10.8 with the clang
> compilers from Xcode 5.1.1 which suggests it somehow libc++ related. The
> error below is suppressed on 10.9 f I append -stdlib=libstdc++ to the
> compile line so it is definitely libc++ specific.
>              Jack
> ps The error I see in mzR  using Rcpp 0.11.1 is…
>
> clang++ -I/sw/Library/Frameworks/R.framework/Versions/3.1/Resources/include
> -DNDEBUG -D_LARGEFILE_SOURCE -I./boost_aux/ -I. -DHAVE_PWIZ_MZML_LIB
> -D_NODEBUG -I/sw/include -I"/sw/lib/R/3.1/site-library/Rcpp/include"   -fPIC
> -g -O3  -c boost/regex/src/posix_api.cpp -o boost/regex/src/posix_api.o
> In file included from boost/regex/src/posix_api.cpp:22:
> In file included from ./boost/regex.hpp:31:
> In file included from ./boost/regex/v4/regex.hpp:67:
> ./boost/regex/v4/basic_regex.hpp:149:9: error: too few template arguments
> for class template 'vector'
>    std::vector<name> m_sub_names;
>         ^
> ./boost/detail/container_fwd.hpp:82:47: note: template is declared here
>     template <class T, class Allocator> class vector;
>     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~       ^
> In file included from boost/regex/src/posix_api.cpp:22:
> In file included from ./boost/regex.hpp:31:
> In file included from ./boost/regex/v4/regex.hpp:67:
> ./boost/regex/v4/basic_regex.hpp:131:21: error: too few template arguments
> for class template 'vector'
>       typename std::vector<name>::const_iterator pos =
> std::lower_bound(m_sub_names.begin(), m_sub_names.end(), t);
>                     ^
> ./boost/detail/container_fwd.hpp:82:47: note: template is declared here
>     template <class T, class Allocator> class vector;
>     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~       ^
> In file included from boost/regex/src/posix_api.cpp:22:
> In file included from ./boost/regex.hpp:31:
> In file included from ./boost/regex/v4/regex.hpp:67:
> ./boost/regex/v4/basic_regex.hpp:131:35: error: expected a qualified name
> after 'typename'
>       typename std::vector<name>::const_iterator pos =
> std::lower_bound(m_sub_names.begin(), m_sub_names.end(), t);
>                                   ^
> ./boost/regex/v4/basic_regex.hpp:131:35: error: unknown type name
> 'const_iterator'
> ./boost/regex/v4/basic_regex.hpp:141:21: error: too few template arguments
> for class template 'vector'
>       typename std::vector<name>::const_iterator pos =
> std::lower_bound(m_sub_names.begin(), m_sub_names.end(), t);
>                     ^
> ./boost/detail/container_fwd.hpp:82:47: note: template is declared here
>     template <class T, class Allocator> class vector;
>     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~       ^
> In file included from boost/regex/src/posix_api.cpp:22:
> In file included from ./boost/regex.hpp:31:
> In file included from ./boost/regex/v4/regex.hpp:67:
> ./boost/regex/v4/basic_regex.hpp:141:35: error: expected a qualified name
> after 'typename'
>       typename std::vector<name>::const_iterator pos =
> std::lower_bound(m_sub_names.begin(), m_sub_names.end(), t);
>                                   ^
> ./boost/regex/v4/basic_regex.hpp:141:35: error: unknown type name
> 'const_iterator'
> ./boost/regex/v4/basic_regex.hpp:163:12: error: too few template arguments
> for class template 'vector'
>       std::vector<Other> v;
>            ^
> ./boost/detail/container_fwd.hpp:82:47: note: template is declared here
>     template <class T, class Allocator> class vector;
>     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~       ^
> In file included from boost/regex/src/posix_api.cpp:22:
> In file included from ./boost/regex.hpp:31:
> In file included from ./boost/regex/v4/regex.hpp:67:
> ./boost/regex/v4/basic_regex.hpp:228:9: error: too few template arguments
> for class template 'vector'
>    std::vector<
>         ^
> ./boost/detail/container_fwd.hpp:82:47: note: template is declared here
>     template <class T, class Allocator> class vector;
>     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~       ^
> In file included from boost/regex/src/posix_api.cpp:22:
> In file included from ./boost/regex.hpp:31:
> In file included from ./boost/regex/v4/regex.hpp:67:
> ./boost/regex/v4/basic_regex.hpp:269:9: error: too few template arguments
> for class template 'basic_string'
>    std::basic_string<charT> BOOST_REGEX_CALL str()const
>         ^
> ./boost/detail/container_fwd.hpp:63:65: note: template is declared here
>     template <class charT, class traits, class Allocator> class
> basic_string;
>     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~       ^
> In file included from boost/regex/src/posix_api.cpp:22:
> In file included from ./boost/regex.hpp:31:
> In file included from ./boost/regex/v4/regex.hpp:67:
> ./boost/regex/v4/basic_regex.hpp:271:12: error: too few template arguments
> for class template 'basic_string'
>       std::basic_string<charT> result;
>            ^
> ./boost/detail/container_fwd.hpp:63:65: note: template is declared here
>     template <class charT, class traits, class Allocator> class
> basic_string;
>     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~       ^
> In file included from boost/regex/src/posix_api.cpp:22:
> In file included from ./boost/regex.hpp:31:
> In file included from ./boost/regex/v4/regex.hpp:67:
> ./boost/regex/v4/basic_regex.hpp:273:24: error: too few template arguments
> for class template 'basic_string'
>          result = std::basic_string<charT>(this->m_expression,
> this->m_expression_len);
>                        ^
> ./boost/detail/container_fwd.hpp:63:65: note: template is declared here
>     template <class charT, class traits, class Allocator> class
> basic_string;
>     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~       ^
> In file included from boost/regex/src/posix_api.cpp:22:
> In file included from ./boost/regex.hpp:31:
> In file included from ./boost/regex/v4/regex.hpp:67:
> ./boost/regex/v4/basic_regex.hpp:285:68: error: implicit instantiation of
> undefined template 'std::pair<unsigned long, unsigned long>'
>       std::pair<const_iterator, const_iterator> p(expression() + pi.first,
> expression() + pi.second);
>                                                                    ^
> ./boost/detail/container_fwd.hpp:92:42: note: template is declared here
>     template <class T1, class T2> struct pair;
>                                          ^
> In file included from boost/regex/src/posix_api.cpp:22:
> In file included from ./boost/regex.hpp:31:
> In file included from ./boost/regex/v4/regex.hpp:67:
> ./boost/regex/v4/basic_regex.hpp:527:9: error: too few template arguments
> for class template 'basic_string'
>    std::basic_string<charT> BOOST_REGEX_CALL str()const
>         ^
> ./boost/detail/container_fwd.hpp:63:65: note: template is declared here
>     template <class charT, class traits, class Allocator> class
> basic_string;
>     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~       ^
> In file included from boost/regex/src/posix_api.cpp:22:
> In file included from ./boost/regex.hpp:31:
> In file included from ./boost/regex/v4/regex.hpp:67:
> ./boost/regex/v4/basic_regex.hpp:529:52: error: too few template arguments
> for class template 'basic_string'
>       return m_pimpl.get() ? m_pimpl->str() : std::basic_string<charT>();
>                                                    ^
> ./boost/detail/container_fwd.hpp:63:65: note: template is declared here
>     template <class charT, class traits, class Allocator> class
> basic_string;
>     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~       ^
> In file included from boost/regex/src/posix_api.cpp:22:
> In file included from ./boost/regex.hpp:31:
> In file included from ./boost/regex/v4/regex.hpp:70:
> ./boost/regex/v4/basic_regex_creator.hpp:140:26: error: too few template
> arguments for class template 'vector'
>    typedef typename std::vector<digraph_type>::const_iterator
> list_iterator;
>                          ^
> ./boost/detail/container_fwd.hpp:82:47: note: template is declared here
>     template <class T, class Allocator> class vector;
>     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~       ^
> In file included from boost/regex/src/posix_api.cpp:22:
> In file included from ./boost/regex.hpp:31:
> In file included from ./boost/regex/v4/regex.hpp:70:
> ./boost/regex/v4/basic_regex_creator.hpp:140:48: error: expected a qualified
> name after 'typename'
>    typedef typename std::vector<digraph_type>::const_iterator
> list_iterator;
>                                                ^
> ./boost/regex/v4/basic_regex_creator.hpp:140:62: error: expected ';' at end
> of declaration list
>    typedef typename std::vector<digraph_type>::const_iterator
> list_iterator;
>                                                              ^
>                                                              ;
> ./boost/regex/v4/basic_regex_creator.hpp:141:4: error: unknown type name
> 'list_iterator'
>    list_iterator singles_begin()const
>    ^
> fatal error: too many errors emitted, stopping now [-ferror-limit=]
> 20 errors generated.
>
>
> _______________________________________________
> 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