I suggest changing <cmath> by <math.h>

Victor

----- Original Message -----
From: jpff@cs.bath.ac.uk
Date: Tuesday, June 22, 2010 11:45 pm
Subject: Re: [Cs-dev] Csound5.12.1 fails to build on x86_64 (pure64-bit) linux computer with gcc-4.4.2
To: Developer discussions <csound-devel@lists.sourceforge.net>

> At the cost of sounding lik ea broken record, this is incompatabiulity
> between C++ and C++.  happens too often and is one of the
> reasons i will
> not willing iuse C++
>
> One need to lnown whta "g++ -v" says
>
> > Greetings,
> >
> > After a break I attempted to compile Csound5.12.1 on a box
> with the
> > following
> > reatures:-
> > -----(Linux{CBLFS}(64bit amd64 CPU kernel2.6.34 gcc4.4.22)/
> > -----I used the scons recipe   shipped with the
> Csound5.12.1 tarball.
> >
> >
> > I obtained the following output (with minor variations if
> > 'DoublePrecision' is
> > enabled or disabled)  on a number of occasions:-
> >
> > #########################################
> >
> > g++ -o InOut/widgets.os -c -fexceptions -march=k8 -mtune=k8 -
> fno-strict-
> > aliasing -fno-strict-aliasing -fno-strict-aliasing -Wno-format
> > -DGNU_GETTEXT -
> > DUSE_LRINT -march=k8 -mtune=k8 -g -fomit-frame-pointer -
> freorder-blocks
> > -fPIC
> > -DLINUX -DPIPES -fvisibility=hidden -fno-strict-aliasing
> > -fno-strict-aliasing
> > -fno-strict-aliasing -fPIC -DHAVE_LIBSNDFILE=1016 -DHAVE_FLTK -
> DBETA -
> > DHAVE_SOCKETS -DHAVE_PTHREAD_BARRIER_INIT -
> DHAVE_SYNC_LOCK_TEST_AND_SET -
> > DHAVE_MUSICXML2 -DHAVE_FCNTL_H -DHAVE_UNISTD_H -DHAVE_STDINT_H
> -
> > DHAVE_SYS_TIME_H -DHAVE_SYS_TYPES_H -DHAVE_TERMIOS_H -
> DHAVE_VALUES_H -
> > DHAVE_SOCKETS -DHAVE_DIRENT_H -I. -IH -I/usr/include/alsa -
> > I/usr/include/python2.6 -I/usr/local/include/FL -
> I/usr/local/include/jack> -
> > I/usr/local/include/libmusicxml -I/opt/include/pulse -
> I/opt/jdk/include -
> > I/opt/jdk/jdk1.6.0_18/include -I/opt/include -
> I/usr/local/include -
> > I/usr/lib/gcc/x86_64-unknown-linux-gnu/4.4.2/finclude
> > -I/usr/lib/gcc/x86_64-
> > unknown-linux-gnu/4.4.2/include -I/usr/lib/gcc/x86_64-unknown-
> linux-
> > gnu/4.4.2/include-fixed -I/usr/include -I/usr/X11R6/include -
> > I/usr/X11R7.5/include -IInOut -IInOut/virtual_keyboard
> InOut/widgets.cpp> In file included from InOut/widglobals.h:3,
> >                  from InOut/widgets.cpp:25:
> > /usr/lib/gcc/x86_64-unknown-linux-
> > gnu/4.4.2/../../../../include/c++/4.4.2/cmath:105: error:
> '::acos' has not
> > been declared
> > /usr/lib/gcc/x86_64-unknown-linux-
> > gnu/4.4.2/../../../../include/c++/4.4.2/cmath:121: error:
> '::asin' has not
> > been declared
> > /usr/lib/gcc/x86_64-unknown-linux-
> > gnu/4.4.2/../../../../include/c++/4.4.2/cmath:137: error:
> '::atan' has not
> > been declared
> > /usr/lib/gcc/x86_64-unknown-linux-
> > gnu/4.4.2/../../../../include/c++/4.4.2/cmath:153: error:
> '::atan2' has
> > not
> > been declared
> > /usr/lib/gcc/x86_64-unknown-linux-
> > gnu/4.4.2/../../../../include/c++/4.4.2/cmath:175: error:
> '::ceil' has not
> > been declared
> > /usr/lib/gcc/x86_64-unknown-linux-
> > gnu/4.4.2/../../../../include/c++/4.4.2/cmath:191: error:
> '::cos' has not
> > been
> > declared
> > /usr/lib/gcc/x86_64-unknown-linux-
> > gnu/4.4.2/../../../../include/c++/4.4.2/cmath:207: error:
> '::cosh' has not
> > been declared
> > /usr/lib/gcc/x86_64-unknown-linux-
> > gnu/4.4.2/../../../../include/c++/4.4.2/cmath:223: error:
> '::exp' has not
> > been
> > declared
> > /usr/lib/gcc/x86_64-unknown-linux-
> > gnu/4.4.2/../../../../include/c++/4.4.2/cmath:239: error:
> '::fabs' has not
> > been declared
> > /usr/lib/gcc/x86_64-unknown-linux-
> > gnu/4.4.2/../../../../include/c++/4.4.2/cmath:255: error:
> '::floor' has
> > not
> > been declared
> > /usr/lib/gcc/x86_64-unknown-linux-
> > gnu/4.4.2/../../../../include/c++/4.4.2/cmath:271: error:
> '::fmod' has not
> > been declared
> > /usr/lib/gcc/x86_64-unknown-linux-
> > gnu/4.4.2/../../../../include/c++/4.4.2/cmath:281: error:
> '::frexp' has
> > not
> > been declared
> > /usr/lib/gcc/x86_64-unknown-linux-
> > gnu/4.4.2/../../../../include/c++/4.4.2/cmath:297: error:
> '::ldexp' has
> > not
> > been declared
> > /usr/lib/gcc/x86_64-unknown-linux-
> > gnu/4.4.2/../../../../include/c++/4.4.2/cmath:313: error:
> '::log' has not
> > been
> > declared
> > /usr/lib/gcc/x86_64-unknown-linux-
> > gnu/4.4.2/../../../../include/c++/4.4.2/cmath:329: error:
> '::log10' has
> > not
> > been declared
> > /usr/lib/gcc/x86_64-unknown-linux-
> > gnu/4.4.2/../../../../include/c++/4.4.2/cmath:345: error:
> '::modf' has not
> > been declared
> > /usr/lib/gcc/x86_64-unknown-linux-
> > gnu/4.4.2/../../../../include/c++/4.4.2/cmath:355: error:
> '::pow' has not
> > been
> > declared
> > /usr/lib/gcc/x86_64-unknown-linux-
> > gnu/4.4.2/../../../../include/c++/4.4.2/cmath:393: error:
> '::sin' has not
> > been
> > declared
> > /usr/lib/gcc/x86_64-unknown-linux-
> > gnu/4.4.2/../../../../include/c++/4.4.2/cmath:409: error:
> '::sinh' has not
> > been declared
> > /usr/lib/gcc/x86_64-unknown-linux-
> > gnu/4.4.2/../../../../include/c++/4.4.2/cmath:425: error:
> '::sqrt' has not
> > been declared
> > /usr/lib/gcc/x86_64-unknown-linux-
> > gnu/4.4.2/../../../../include/c++/4.4.2/cmath:441: error:
> '::tan' has not
> > been
> > declared
> > /usr/lib/gcc/x86_64-unknown-linux-
> > gnu/4.4.2/../../../../include/c++/4.4.2/cmath:457: error:
> '::tanh' has not
> > been declared
> > /usr/lib/gcc/x86_64-unknown-linux-
> > gnu/4.4.2/../../../../include/c++/4.4.2/cmath: In function 'typename
> > __gnu_cxx::__enable_if<std::__is_arithmetic::__value,
> int>::__type> std::fpclassify(_Tp)':
> > /usr/lib/gcc/x86_64-unknown-linux-
> > gnu/4.4.2/../../../../include/c++/4.4.2/cmath:500: error:
> 'FP_NAN' was not
> > declared in this scope
> > /usr/lib/gcc/x86_64-unknown-linux-
> > gnu/4.4.2/../../../../include/c++/4.4.2/cmath:500: error:
> 'FP_INFINITE'> was
> > not declared in this scope
> > /usr/lib/gcc/x86_64-unknown-linux-
> > gnu/4.4.2/../../../../include/c++/4.4.2/cmath:500: error:
> 'FP_NORMAL' was
> > not
> > declared in this scope
> > /usr/lib/gcc/x86_64-unknown-linux-
> > gnu/4.4.2/../../../../include/c++/4.4.2/cmath:501: error:
> 'FP_SUBNORMAL'> was
> > not declared in this scope
> > /usr/lib/gcc/x86_64-unknown-linux-
> > gnu/4.4.2/../../../../include/c++/4.4.2/cmath:501: error:
> 'FP_ZERO' was
> > not
> > declared in this scope
> > InOut/widgets.cpp: In member function 'void
> Fl_Knob::draw_scale(int, int,
> > int)':
> > InOut/widgets.cpp:356: error: call of overloaded
> 'cos(double&)' is
> > ambiguous
> > /usr/lib/gcc/x86_64-unknown-linux-
> > gnu/4.4.2/../../../../include/c++/4.4.2/cmath:194: note:
> candidates are:
> > float
> > std::cos(float)
> > /usr/lib/gcc/x86_64-unknown-linux-
> > gnu/4.4.2/../../../../include/c++/4.4.2/cmath:198: note:
> > long
> > double std::cos(long double)
> > InOut/widgets.cpp:357: error: call of overloaded
> 'sin(double&)' is
> > ambiguous
> > /usr/lib/gcc/x86_64-unknown-linux-
> > gnu/4.4.2/../../../../include/c++/4.4.2/cmath:396: note:
> candidates are:
> > float
> > std::sin(float)
> > /usr/lib/gcc/x86_64-unknown-linux-
> > gnu/4.4.2/../../../../include/c++/4.4.2/cmath:400: note:
> > long
> > double std::sin(long double)
> > InOut/widgets.cpp:377: error: call of overloaded
> 'log10(double)' is
> > ambiguous
> > /usr/lib/gcc/x86_64-unknown-linux-
> > gnu/4.4.2/../../../../include/c++/4.4.2/cmath:332: note:
> candidates are:
> > float
> > std::log10(float)
> > /usr/lib/gcc/x86_64-unknown-linux-
> > gnu/4.4.2/../../../../include/c++/4.4.2/cmath:336: note:
> > long
> > double std::log10(long double)
> > InOut/widgets.cpp:378: error: call of overloaded
> 'cos(double&)' is
> > ambiguous
> > /usr/lib/gcc/x86_64-unknown-linux-
> > gnu/4.4.2/../../../../include/c++/4.4.2/cmath:194: note:
> candidates are:
> > float
> > std::cos(float)
> > /usr/lib/gcc/x86_64-unknown-linux-
> > gnu/4.4.2/../../../../include/c++/4.4.2/cmath:198: note:
> > long
> > double std::cos(long double)
> > InOut/widgets.cpp:379: error: call of overloaded
> 'sin(double&)' is
> > ambiguous
> > /usr/lib/gcc/x86_64-unknown-linux-
> > gnu/4.4.2/../../../../include/c++/4.4.2/cmath:396: note:
> candidates are:
> > float
> > std::sin(float)
> > /usr/lib/gcc/x86_64-unknown-linux-
> > gnu/4.4.2/../../../../include/c++/4.4.2/cmath:400: note:
> > long
> > double std::sin(long double)
> > InOut/widgets.cpp: In function 'int fl_setWidgetValuei(CSOUND*,
> > FL_SET_WIDGET_VALUE_I*)':
> > InOut/widgets.cpp:2848: error: call of overloaded
> 'log(double)' is
> > ambiguous
> > /usr/lib/gcc/x86_64-unknown-linux-
> > gnu/4.4.2/../../../../include/c++/4.4.2/cmath:316: note:
> candidates are:
> > float
> > std::log(float)
> > /usr/lib/gcc/x86_64-unknown-linux-
> > gnu/4.4.2/../../../../include/c++/4.4.2/cmath:320: note:
> > long
> > double std::log(long double)
> > InOut/widgets.cpp: In function 'int fl_setWidgetValue_set(CSOUND*,
> > FL_SET_WIDGET_VALUE*)':
> > InOut/widgets.cpp:2884: error: call of overloaded
> 'log(double)' is
> > ambiguous
> > /usr/lib/gcc/x86_64-unknown-linux-
> > gnu/4.4.2/../../../../include/c++/4.4.2/cmath:316: note:
> candidates are:
> > float
> > std::log(float)
> > /usr/lib/gcc/x86_64-unknown-linux-
> > gnu/4.4.2/../../../../include/c++/4.4.2/cmath:320: note:
> > long
> > double std::log(long double)
> > scons: *** [InOut/widgets.os] Error 1
> > scons: building terminated because of errors.
> >
> > ##########################################
> >
> >
> >
> > A header file cmath.h seems to be missing.  I did a check in
> > /usr/include/c++/4.4.2 and I did not find this file.  I
> did a similar
> > check on a
> > conventional fedora12 linux box and I did not find the said
> file either.
> >
> > Help would be appreciated.
> >
> > Yours sincerely
> >
> > luxInteg
> >
> > ---------------------------------------------------------------
> ---------------
> > ThinkGeek and WIRED's GeekDad team up for the Ultimate
> > GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
> > lucky parental unit.  See the prize list and enter to win:
> > http://p.sf.net/sfu/thinkgeek-promo
> > _______________________________________________
> > Csound-devel mailing list
> > Csound-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/csound-devel
> >
> >
> >
>
>
>
> -----------------------------------------------------------------
> -------------
> ThinkGeek and WIRED's GeekDad team up for the Ultimate
> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
> lucky parental unit.  See the prize list and enter to win:
> http://p.sf.net/sfu/thinkgeek-promo
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel

Dr Victor Lazzarini, Senior Lecturer, Dept. of Music,
National University of Ireland, Maynooth