On Mon, 3 Jun 2013, Lorenzo Alessio Botti wrote: > it seems that the issue was due to a missing header file in Hilbert.hpp > > After adding > #include "Hilbert/Algorithm.hpp" > everything went fine. > I think the compiler was right since Algorithm.hpp is required to complete > the definition of the function coordsToIndex. > Probably this issue manifests only with the flag --enable-static. > >>> Undefined symbols for architecture x86_64: >>> "Hilbert::coordsToIndex(CFixBitVec const*, int, int, CBigBitVec&)", >>> referenced from: >>> Hilbert::HilbertIndices (anonymous >>> namespace)::get_hilbert_index<libMesh::Node>(libMesh::Node const*, >>> libMesh::MeshTools::BoundingBox const&) in >>> libmesh_opt.a(libmesh_opt_la-mesh_communication_global_indices.o)
Now I'm more baffled by libHilbert than anything else. They've got a non-templated declaration and definition for A) Hilbert::coordsToIndex(CFixBitVec const*, int, int, CBigBitVec&) in Hilbert.hpp/Hilbert.C but they also have a matching inline template B) Hilbert::coordsToIndex(const P*, int, int, H&) in Algorithm.hpp which the non-templated function calls. This seems to be very unsafe even if legal C++. I'm afraid it looks like your bugfix is masking the problem, though, not necessarily fixing it. Adding that extra header probably just somehow (contrary to what I thought I knew about overload resolution rules) convinces get_hilbert_index to call (B) instead of (A). That probably works as a workaround, since for some reason all (A) does is dispatch to (B), but there still seems to be some linker failure here we haven't fixed if get_hilbert_index isn't finding (A) available in the first place. I'll try static libraries on Linux and add a buildbot test with them, but I have no idea when or if I'd be able to reproduce this if it's really Mac+clang specific. Can anyone else? --- Roy ------------------------------------------------------------------------------ Get 100% visibility into Java/.NET code with AppDynamics Lite It's a free troubleshooting tool designed for production Get down to code-level detail for bottlenecks, with <2% overhead. Download for free and get started troubleshooting in minutes. http://p.sf.net/sfu/appdyn_d2d_ap2 _______________________________________________ Libmesh-devel mailing list Libmesh-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libmesh-devel