erikleitch / profiler

A simple Erlang profiler NIF library
2 stars 0 forks source link

Does not build under Ubuntu 14.04 #1

Open hazen opened 8 years ago

hazen commented 8 years ago

Testing 0d934a38af57adf0dd5b68bd739032fd0711e77e on Linux ubuntu-trusty64-riak-test 3.13.0-95-generic #142-Ubuntu SMP Fri Aug 12 17:00:09 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux and am getting the following error:

Compiling c_src/String.cc
c_src/String.cc:293:65: error: ‘std::ostream& gcp::util::operator<<(std::ostream&, gcp::util::String)’ should have been declared inside ‘gcp::util’
 std::ostream& gcp::util::operator<<(std::ostream& os, String str)
                                                                 ^
c_src/String.cc: In static member function ‘static int gcp::util::String::toInt(std::string)’:
c_src/String.cc:525:45: error: ‘strtol’ was not declared in this scope
   int iVal = strtol(str.c_str(), &endPtr, 10);
                                             ^
c_src/String.cc: In member function ‘float gcp::util::String::toFloat()’:
c_src/String.cc:546:44: error: ‘strtof’ was not declared in this scope
   float fVal = strtof(str_.c_str(), &endPtr);
                                            ^
c_src/String.cc: In member function ‘bool gcp::util::String::isValidPowerExpression()’:
c_src/String.cc:593:53: error: ‘strtod’ was not declared in this scope
     double baseVal = strtod(base.str().c_str(), NULL);
                                                     ^
c_src/String.cc:593:12: warning: unused variable ‘baseVal’ [-Wunused-variable]
     double baseVal = strtod(base.str().c_str(), NULL);
            ^
c_src/String.cc:604:12: warning: unused variable ‘expntVal’ [-Wunused-variable]
     double expntVal = strtod(expnt.str().c_str(), NULL);
            ^
c_src/String.cc: In member function ‘double gcp::util::String::getPowerExpression()’:
c_src/String.cc:626:53: error: ‘strtod’ was not declared in this scope
     double baseVal = strtod(base.str().c_str(), NULL);
                                                     ^
c_src/String.cc: In member function ‘double gcp::util::String::toDouble()’:
c_src/String.cc:662:47: error: ‘strtod’ was not declared in this scope
     double dVal = strtod(str_.c_str(), &endPtr);
                                               ^
c_src/String.cc: In member function ‘gcp::util::String gcp::util::String::findNextStringSeparatedByChars(std::string, bool)’:
c_src/String.cc:690:12: warning: unused variable ‘iStart’ [-Wunused-variable]
   unsigned iStart=0, iStop=0;
            ^
c_src/String.cc:690:22: warning: unused variable ‘iStop’ [-Wunused-variable]
   unsigned iStart=0, iStop=0;
                      ^
ERROR: compile failed while processing /usr/local/basho/riak_test_suite/riak_test/deps/profiler: rebar_abort
make: *** [compile] Error 1
hazen commented 8 years ago

Also:

gcc --version
gcc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4
Copyright (C) 2013 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.