Sorry if this is a repeat. I sent this message off with real email yesterday, but the
forum doesn't seem to want to know, so I'm using gmail. I don't see any format
breakage, but it's possible there is some.
I'm currently trying to build Hugin 2005.0.0, and I'm running into
namespace hell.
OS: FreeBSD 10.2
compiler: FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) 20140512
Target: x86_64-unknown-freebsd10.2
src/tools/align_image_stack.cpp fails to build with the error
messages:
/eureka/home/src/FreeBSD/svn/ports/graphics/hugin-2015.0.0/work/hugin-2015.0.0/src/tools/align_image_stack.cpp:124:24:
+note: candidate found by name lookup is 'lock'
static hugin_omp::Lock lock;
^
/usr/include/c++/v1/mutex:424:1: note: candidate found by name lookup is 'std::__1::lock'
lock(_L0& __l0, _L1& __l1, _L2& __l2, _L3& ...__l3)
^
/usr/include/c++/v1/mutex:350:1: note: candidate found by name lookup is 'std::__1::lock'
lock(_L0& __l0, _L1& __l1)
^
Looking at the header file, this seems to be a couple of templates
called lock, but completely unrelated to the lock in the source file.
Looking at how this bizarre file got included, the sequence (from c++
-H) is:
. /usr/include/c++/v1/fstream
.. /usr/include/c++/v1/ostream
... /usr/include/c++/v1/ios
.... /usr/include/c++/v1/__locale
..... /usr/include/c++/v1/mutex
This is all clang specific, of course, but I don't see anything here
that has anything to do with FreeBSD. All the #includes are
unconditional, though I can disable <mutex> with
#define _LIBCPP_MUTEX
After that, I don't get the error messages any more (but I get others
from missing definitions from that header file). That's only intended
to protect against multiple #includes, of course, and it's clearly the
wrong way to disable it.
I could try building with gcc, but that's no longer properly supported
by FreeBSD, and it came up with even more issues that I didn't feel
like following.
So: has anybody built align_image_stack with clang? If so, how do you
do it? The only reference I see to clang is in ChangeLog:
2013-09-09 18:36 +0200 tmodes (752123441af3)
Fix for clang compiler [1213586] Spotted by Mojca Miklavec
> src/foreign/vigra/vigra/cachedfileimage.hxx
Greg