Description of problem: I can build wfmath 0.3.11 on f14, but not f15. When linking the vector test as part of the build I see the following error: ./.libs/libwfmath-0.3.so: undefined reference to `WFMath::_Poly2Orient<3>::expand(WFMath::Point<3> const&, WFMath::Point<2>&, double)' As far as I can tell that function should be defined in the library. I am not real proficient in c++ so it may be that the code isn't valid and works with earlier versions of g++ by luck. Version-Release number of selected component (if applicable): gcc-4.6.0-6.fc15.i686 How reproducible: 100% Steps to Reproduce: 1. fedpkg clone wfmath 2. cd wfmath 3. fedpkg scratch-build To see it work with older gcc use: 4. fedpkg scratch-build --target dist-f14 Actual results: http://koji.fedoraproject.org/koji/getfile?taskID=3056773&name=build.log Expected results: Successful build.
I am still seeing this with gcc-4.6.0-7.fc15.
I believe wfmath is buggy. In polygon.h included by most sources there is: template<const int dim> class _Poly2Orient { public: ... bool expand(const Point<dim>& pd, Point<2>& p2, double epsilon = WFMATH_EPSILON); ... }; but expand is only defined in polygon_funcs.h, which is only included in polygon.cpp: template<const int dim> bool _Poly2Orient<dim>::expand(const Point<dim>& pd, Point<2>& p2, double epsilon) { ... } There is explicit instantiation in polygon.cpp just for: template class Polygon<3>; template Point<3> _Poly2Orient<3>::convert(const Point<2>& p) const; template _Poly2Orient<3>& _Poly2Orient<3>::operator=(_Poly2Orient<3> const&); template void _Poly2Orient<3>::rotate(RotMatrix<3> const&, Point<3> const&); but not for expand (and others). With g++ 4.5 you just were lucky that expand has been compiled into polygon.o and not inlined, but even with 4.5 if you say compile polygon.cpp with -O3 --param=max-inline-insns-auto=5000, wfmath will fail the same way. In 4.6 it is partially inlined and thus not exported. You should add: template bool _Poly2Orient<3>::expand(const Point<3>&, Point<2>&, double); to polygon.cpp (and similarly for others, really try -O3 --param=max-inline-insns-auto=10000 and see what breaks).
Thanks for helping me out with this one, especially the suggested fixes! I'll take you off the cc after this comment.
A fixed version is building in rawhide. Forcing instantiation of the needed instances worked.