| Summary: | expand not defined everywhere it needs to be | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Bruno Wolff III <bruno> |
| Component: | wfmath | Assignee: | Bruno Wolff III <bruno> |
| Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 15 | CC: | atorkhov, bruno, wart |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2011-05-15 14:45:39 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Bug Depends On: | |||
| Bug Blocks: | 551174, 674174 | ||
|
Description
Bruno Wolff III
2011-05-07 16:36:45 UTC
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. |