Reproduce the problem: 1. download source archive (libofa-0.9.3) :) 2. ./configure 3. make
I get a build error like this:
make[3]: Entering directory /libofa-0.9.3/lib'
if /bin/bash ../libtool --mode=compile g++ -DHAVE_CONFIG_H -I. -I. -I..
-I../include -g -O2 -Wall -g -MT mainprint.lo -MD -MP -MF
".deps/mainprint.Tpo" -c -o mainprint.lo mainprint.cpp; \
then mv -f ".deps/mainprint.Tpo" ".deps/mainprint.Plo"; else rm -f
".deps/mainprint.Tpo"; exit 1; fi
g++ -DHAVE_CONFIG_H -I. -I. -I.. -I../include -g -O2 -Wall -g -MT
mainprint.lo -MD -MP -MF .deps/mainprint.Tpo -c mainprint.cpp -fPIC -DPIC
-o .libs/mainprint.o
JAMA/tnt_math_utils.h: In function 'Real TNT::hypot(const Real&, const
Real&) [with Real = float]':
JAMA/jama_svd.h:73: instantiated from 'JAMA::SVD<Real>::SVD(const
TNT::Array2D<T>&) [with Real = float]'
mainprint.cpp:151: instantiated from here
JAMA/tnt_math_utils.h:34: error: call of overloaded 'abs(const float&)' is
ambiguous
/usr/include/stdlib.h:691: note: candidates are: int abs(int)
/usr/include/c++/4.2/cstdlib:174: note: long long int
__gnu_cxx::abs(long long int)
/usr/include/c++/4.2/cstdlib:143: note: long int
std::abs(long int)
make[3]: *** [mainprint.lo] Error 1
make[3]: Leaving directory
/libofa-0.9.3/lib'
make[2]: * [all-recursive] Error 1
What version of the product are you using? On what operating system? gcc (GCC) 4.2.3 (Ubuntu 4.2.3-2ubuntu7) on Ubuntu 8.10
Please provide any additional information below. The fix: add a "using __gnu_cxx::abs;" in JAMA/tnt_math_utils.h @ line 33;
After this the build works fine
Comment #1
Posted on Aug 26, 2011 by Happy Beari get the same issue do you have any solution for this ??
Comment #2
Posted on Aug 26, 2011 by Quick Monkeydid you try the mentioned fix?
Comment #3
Posted on Aug 26, 2011 by Happy Bearyes i tried it but it is not working
Comment #4
Posted on Aug 26, 2011 by Happy Bearyes i tried it but it is not working
Comment #5
Posted on Aug 26, 2011 by Quick MonkeyI dont know of other solution then. I stopped working with libfoa a long time ago, as i didn't have the necessary time
Comment #6
Posted on Aug 29, 2011 by Happy BearDid you worked on the same domain after leaving libofa..?? Can you suggest me any other such library which can be used in lieu of libofa..??
Comment #7
Posted on Aug 29, 2011 by Quick Monkeynope, i gave up on the idea
Comment #8
Posted on Sep 6, 2011 by Happy RhinoI really know jack about it, but this makes it go on Slackware 13.37.0/gcc version 4.5.2.. I blew away examples, so no examples..
- libofa-abs-patch.txt 1005
Status: New
Labels:
Type-Defect
Priority-Medium