[hugin-ptx] Re: Problems building 2005.0.0

2015-10-31 Thread T. Modes


Am Samstag, 31. Oktober 2015 06:05:58 UTC+1 schrieb Groogle:
>
>
> I still don't understand what is going on here.  I've read the name 
> lookup rules at 
> http://en.cppreference.com/w/cpp/language/unqualified_lookup , and I'm 
> still not 100% convinced I understand them.  In any case, it seems 
> that the templates in v1/mutex get looked at before the locally 
> defined lock.  Maybe there's some cast that can be used to force it to 
> look at the definition, but changing the name works as well.  I'm 
> attaching patches. 
>

The cluprit is probably "using namespace std;" so that all functions in std 
namespace can be used without adding "std::"
This is already fixed in default branch.

>
> Another issue I had was in 
> src/hugin1/icpfind/AutoCtrlPointCreator.cpp.  It has conditional code 
> for GCC, but it seems that clang defines __GNUC__ anyway.  I've made 
> this conditional on __FreeBSD__, though this is probably not the right 
> way to go. 
>

Thanks for patch. It is now fixed in default branch. 

>
> clang finds many causes for warnings while building Hugin.  I'd like 
> to remove the more obvious ones (like using the obsolete 'register' 
> keyword), but I don't want to do it every time.  If I submit patches, 
> will they be incorporated into the tree? 
>

Yes. But please submit patches against default branch and not against 
2015.0.
 

-- 
A list of frequently asked questions is available at: 
http://wiki.panotools.org/Hugin_FAQ
--- 
You received this message because you are subscribed to the Google Groups 
"hugin and other free panoramic software" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to hugin-ptx+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/hugin-ptx/2ba80c7b-d11f-4b40-aa0a-7f12051ab6ff%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[hugin-ptx] Re: Problems building 2005.0.0

2015-10-30 Thread Greg 'groggy' Lehey
On Friday, 23 October 2015 at  9:28:53 +1100, Greg Lehey wrote:
> 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.

Yes, there was :-(  See above.

> I'm currently trying to build Hugin 2005.0.0, and I'm running into
> namespace hell.

Hugin 2015.0.0, of course.

> 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...

I still don't understand what is going on here.  I've read the name
lookup rules at
http://en.cppreference.com/w/cpp/language/unqualified_lookup , and I'm
still not 100% convinced I understand them.  In any case, it seems
that the templates in v1/mutex get looked at before the locally
defined lock.  Maybe there's some cast that can be used to force it to
look at the definition, but changing the name works as well.  I'm
attaching patches.

Another issue I had was in
src/hugin1/icpfind/AutoCtrlPointCreator.cpp.  It has conditional code
for GCC, but it seems that clang defines __GNUC__ anyway.  I've made
this conditional on __FreeBSD__, though this is probably not the right
way to go.

clang finds many causes for warnings while building Hugin.  I'd like
to remove the more obvious ones (like using the obsolete 'register'
keyword), but I don't want to do it every time.  If I submit patches,
will they be incorporated into the tree?

Greg
--
Sent from my desktop computer.
Finger g...@freebsd.org for PGP public key.
See complete headers for address and phone numbers.
This message is digitally signed.  If your Microsoft MUA reports
problems, please read http://tinyurl.com/broken-mua

-- 
A list of frequently asked questions is available at: 
http://wiki.panotools.org/Hugin_FAQ
--- 
You received this message because you are subscribed to the Google Groups 
"hugin and other free panoramic software" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to hugin-ptx+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/hugin-ptx/20151031050552.GA8129%40eureka.lemis.com.
For more options, visit https://groups.google.com/d/optout.
--- src/hugin1/icpfind/AutoCtrlPointCreator.cpp.orig	2015-07-18 02:44:00.0 +1000
+++ src/hugin1/icpfind/AutoCtrlPointCreator.cpp	2015-10-31 15:49:42.0 +1100
@@ -29,8 +29,10 @@
 
 #include 
 #ifdef __GNUC__
+#ifndef __FreeBSD__
 #include 
 #endif
+#endif
 
 #include "algorithms/optimizer/ImageGraph.h"
 
--- src/tools/align_image_stack.cpp~	2015-10-31 11:10:56.0 +1100
+++ src/tools/align_image_stack.cpp	2015-10-29 13:09:52.0 +1100
@@ -121,7 +121,7 @@
 }
 
 typedef std::multimap MapPoints;
-static hugin_omp::Lock lock;
+static hugin_omp::Lock slock;
 
 template 
 void FineTuneInterestPoints(Panorama& pano,
@@ -193,7 +193,7 @@
res.maxpos.y,
stereo ? ControlPoint::Y : ControlPoint::X_Y);
 {
-hugin_omp::ScopedLock sl(lock);
+hugin_omp::ScopedLock sl(slock);
 pano.addCtrlPoint(p);
 };
 }
--- src/tools/tca_correct.cpp~	2015-10-31 11:10:44.0 +1100
+++ src/tools/tca_correct.cpp	2015-10-29 13:14:14.0 +1100
@@ -465,7 +465,7 @@
  << "commandline arguments for fulla" << endl;
 }
 
-static hugin_omp::Lock lock;
+static hugin_omp::Lock slock;
 typedef std::multimap MapPoints;
 
 template 
@@ -584,7 +584,7 @@
 }
 if (!cps.empty())
 {
-hugin_omp::ScopedLock sl(lock);
+hugin_omp::ScopedLock sl(slock);
 for (CPVector::const_iterator it = cps.begin(); it != cps.end(); ++it)
 {
 pano.addCtrlPoint(*it);


pgpX7Td05ozK7.pgp
Description: PGP signature