On 6/3/13 12:28 PM, Roy Stogner wrote: > > 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?
FWIW, I also see these errors on Mac using g++ from Fink: % g++-4 --version g++-4 (GCC) 4.8.0 Copyright (C) 2013 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -- Boyce ------------------------------------------------------------------------------ How ServiceNow helps IT people transform IT departments: 1. A cloud service to automate IT design, transition and operations 2. Dashboards that offer high-level views of enterprise services 3. A single system of record for all IT processes http://p.sf.net/sfu/servicenow-d2d-j _______________________________________________ Libmesh-devel mailing list Libmesh-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libmesh-devel