zf8848 / libjingle

Automatically exported from code.google.com/p/libjingle
0 stars 0 forks source link

Problem with <cmath> when building libjingle-0.5 on Ubuntu #75

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Follow libjingle-0.5 README installation instructions.
2. Problem occur when executing ../swtoolkit/hammer.sh.
3. Build stops in file base/network.cc

What is the expected output? What do you see instead?
Expected output is to build libjingle correctly.
Instead, when compiling network.cc I get the following output:

________Compiling build/dbg/obj/base/network.o
In file included from base/network.cc:51:
/usr/include/c++/4.4/cmath:105: error: '::acos' has not been declared
/usr/include/c++/4.4/cmath:121: error: '::asin' has not been declared
/usr/include/c++/4.4/cmath:137: error: '::atan' has not been declared
/usr/include/c++/4.4/cmath:153: error: '::atan2' has not been declared
/usr/include/c++/4.4/cmath:175: error: '::ceil' has not been declared
/usr/include/c++/4.4/cmath:191: error: '::cos' has not been declared
/usr/include/c++/4.4/cmath:207: error: '::cosh' has not been declared
/usr/include/c++/4.4/cmath:223: error: '::exp' has not been declared
/usr/include/c++/4.4/cmath:239: error: '::fabs' has not been declared
/usr/include/c++/4.4/cmath:255: error: '::floor' has not been declared
/usr/include/c++/4.4/cmath:271: error: '::fmod' has not been declared
/usr/include/c++/4.4/cmath:281: error: '::frexp' has not been declared
/usr/include/c++/4.4/cmath:297: error: '::ldexp' has not been declared
/usr/include/c++/4.4/cmath:313: error: '::log' has not been declared
/usr/include/c++/4.4/cmath:329: error: '::log10' has not been declared
/usr/include/c++/4.4/cmath:345: error: '::modf' has not been declared
/usr/include/c++/4.4/cmath:355: error: '::pow' has not been declared
/usr/include/c++/4.4/cmath:393: error: '::sin' has not been declared
/usr/include/c++/4.4/cmath:409: error: '::sinh' has not been declared
/usr/include/c++/4.4/cmath:425: error: '::sqrt' has not been declared
/usr/include/c++/4.4/cmath:441: error: '::tan' has not been declared
/usr/include/c++/4.4/cmath:457: error: '::tanh' has not been declared
/usr/include/c++/4.4/cmath: In function 'typename 
__gnu_cxx::__enable_if<std::__is_arithmetic::__value, int>::__type 
std::fpclassify(_Tp)':
/usr/include/c++/4.4/cmath:500: error: 'FP_NAN' was not declared in this scope
/usr/include/c++/4.4/cmath:500: error: 'FP_INFINITE' was not declared in this 
scope
/usr/include/c++/4.4/cmath:500: error: 'FP_NORMAL' was not declared in this 
scope
/usr/include/c++/4.4/cmath:501: error: 'FP_SUBNORMAL' was not declared in this 
scope
/usr/include/c++/4.4/cmath:501: error: 'FP_ZERO' was not declared in this scope
base/network.cc: In member function 'void 
talk_base::Network::EstimateQuality()':
base/network.cc:399: error: 'exp' was not declared in this scope
base/network.cc: In member function 'void 
talk_base::Network::AddDataPoint(uint32, double)':
base/network.cc:423: error: 'exp' was not declared in this scope
scons: *** [build/dbg/obj/base/network.o] Error 1
scons: building terminated because of errors.

What version of the product are you using? On what operating system?
libjingle-0.5
Building on Ubuntu 10.04
gcc (Ubuntu 4.4.3-4ubuntu5) 4.4.3

Please provide any additional information below.
I already tried the patchs for gcc4x from another issue thread but the problem 
still.
Please help! I've been investigating this issue for days!

Original issue reported on code.google.com by fe.mesqu...@gmail.com on 21 Oct 2010 at 5:49

GoogleCodeExporter commented 9 years ago
me too, please help. 
i am using:
Building on Ubuntu 10.10 
gcc (Ubuntu/Linaro 4.4.4-14ubuntu5) 4.4.5

Original comment by milliy...@sina.cn on 10 Apr 2011 at 6:07

GoogleCodeExporter commented 9 years ago
i think, maybe i find the problem, but i don't know how to fix it. 

there is a file: 
/home/milliyang/download/libjingle-0.5/talk/third_party/srtp/crypto/include/math
.h

maybe when
network.cc use #include<cmath>, 
then /usr/include/c++/4.4/cmath use #include<math.h>

the g++ miss use the local file.

is there anyone can help ??

Original comment by milliy...@sina.cn on 11 Apr 2011 at 12:58

GoogleCodeExporter commented 9 years ago
Please follow the new instruction in version 0.5.5+ and download the SRTP 
package from:
http://code.google.com/p/libjingle/downloads/detail?name=srtp-cvs.zip&can=2&q=#m
akechanges

Original comment by jun...@google.com on 7 Jun 2011 at 9:24