Skip to content

C++ error on Solaris OS #257

Description

@koheiw


* installing to library ‘/home/ripley/R/Lib32’
* installing *source* package ‘quanteda’ ...
** package ‘quanteda’ successfully unpacked and MD5 sums checked
** libs
/opt/csw/bin/g++ -std=c++11 -I/home/ripley/R/gcc/include -DNDEBUG  -I/opt/csw/include -I/usr/local/include -I"/home/ripley/R/Lib32/Rcpp/include" -I"/home/ripley/R/Lib32/RcppArmadillo/include"   -fPIC  -O2 -mcpu=niagara2 -c RcppExports.cpp -o RcppExports.o
/opt/csw/bin/g++ -std=c++11 -I/home/ripley/R/gcc/include -DNDEBUG  -I/opt/csw/include -I/usr/local/include -I"/home/ripley/R/Lib32/Rcpp/include" -I"/home/ripley/R/Lib32/RcppArmadillo/include"   -fPIC  -O2 -mcpu=niagara2 -c ngrams.cpp -o ngrams.o
/opt/csw/bin/g++ -std=c++11 -I/home/ripley/R/gcc/include -DNDEBUG  -I/opt/csw/include -I/usr/local/include -I"/home/ripley/R/Lib32/Rcpp/include" -I"/home/ripley/R/Lib32/RcppArmadillo/include"   -fPIC  -O2 -mcpu=niagara2 -c sequences.cpp -o sequences.o
sequences.cpp: In function ‘double lambda(std::vector<int>&, const int&)’:
sequences.cpp:53:31: error: call of overloaded ‘log(__gnu_cxx::__alloc_traits<std::allocator<int> >::value_type&)’ is ambiguous
   l += (n - 1) * log(counts[0]);
                               ^
In file included from /usr/include/math.h:11:0,
                 from /opt/csw/include/c++/5.2.0/cmath:44,
                 from /home/ripley/R/Lib32/Rcpp/include/Rcpp/platform/compiler.h:100,
                 from /home/ripley/R/Lib32/Rcpp/include/Rcpp/r/headers.h:48,
                 from /home/ripley/R/Lib32/Rcpp/include/RcppCommon.h:29,
                 from /home/ripley/R/Lib32/Rcpp/include/Rcpp.h:27,
                 from sequences.cpp:1:
/opt/csw/lib/gcc/sparc-sun-solaris2.10/5.2.0/include-fixed/iso/math_iso.h:200:21: note: candidate: long double std::log(long double)
  inline long double log(long double __X) { return __logl(__X); }
                     ^
/opt/csw/lib/gcc/sparc-sun-solaris2.10/5.2.0/include-fixed/iso/math_iso.h:168:15: note: candidate: float std::log(float)
  inline float log(float __X) { return __logf(__X); }
               ^
/opt/csw/lib/gcc/sparc-sun-solaris2.10/5.2.0/include-fixed/iso/math_iso.h:68:15: note: candidate: double std::log(double)
 extern double log __P((double));
               ^
*** Error code 1
make: Fatal error: Command failed for target `sequences.o'
Current working directory /tmp/Rtmpo.aiz0/R.INSTALL68c943ac1006/quanteda/src
ERROR: compilation failed for package ‘quanteda’
* removing ‘/home/ripley/R/Lib32/quanteda’

real     2:09.1
user     2:06.1
sys         2.3


Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions