Opened 13 years ago

Closed 10 years ago

#31778 closed defect (fixed)

hugin-app @2011.0.0 not compiling, clang error, then "QDGetPictureBounds" not declared error with llvm-gcc-4.2

Reported by: philippe.bernery@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: hvdwolf@…, p.schmiedeskamp@…, eddedmondson@…, nickbroon@…, hanche
Port: hugin-app

Description

I tried both with "clang" (the default on my machine as I have Xcode 4.2 installed) and llvm-gcc-4.2

Here is an extract of the error with clang:

[ 37%] Built target flann_cpp
/usr/bin/make -f src/foreign/zthread/src/CMakeFiles/ZThread.dir/build.make src/foreign/zthread/src/CMakeFiles/ZThread.dir/depend
make[2]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_hugin-app/hugin-app/work/hugin-2011.0.0'
cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_hugin-app/hugin-app/work/hugin-2011.0.0 && /opt/local/bin/cmake -E cmake_depends "Unix Makefiles" /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_hugin-app/hugin-app/work/hugin-2011.0.0 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_hugin-app/hugin-app/work/hugin-2011.0.0/src/foreign/zthread/src /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_hugin-app/hugin-app/work/hugin-2011.0.0 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_hugin-app/hugin-app/work/hugin-2011.0.0/src/foreign/zthread/src /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_hugin-app/hugin-app/work/hugin-2011.0.0/src/foreign/zthread/src/CMakeFiles/ZThread.dir/DependInfo.cmake --color=
make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_hugin-app/hugin-app/work/hugin-2011.0.0'
/usr/bin/make -f src/foreign/zthread/src/CMakeFiles/ZThread.dir/build.make src/foreign/zthread/src/CMakeFiles/ZThread.dir/build
make[2]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_hugin-app/hugin-app/work/hugin-2011.0.0'
/opt/local/bin/cmake -E cmake_progress_report /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_hugin-app/hugin-app/work/hugin-2011.0.0/CMakeFiles 
[ 37%] Building CXX object src/foreign/zthread/src/CMakeFiles/ZThread.dir/AtomicCount.cxx.o
cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_hugin-app/hugin-app/work/hugin-2011.0.0/src/foreign/zthread/src && /Developer/usr/bin/clang++   -DNDEBUG -pipe -O2 -arch i386  -O3 -DNDEBUG -arch i386 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_hugin-app/hugin-app/work/hugin-2011.0.0/src -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_hugin-app/hugin-app/work/hugin-2011.0.0/src/hugin_base -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_hugin-app/hugin-app/work/hugin-2011.0.0/src/foreign -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_hugin-app/hugin-app/work/hugin-2011.0.0/src/foreign/vigra -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_hugin-app/hugin-app/work/hugin-2011.0.0/src/celeste -I/opt/local/include -I/opt/local/include/OpenEXR -I/System/Library/Frameworks/GLUT.framework/Headers -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_hugin-app/hugin-app/work/hugin-2011.0.0/src/foreign/zthread/src/../include    -o CMakeFiles/ZThread.dir/AtomicCount.cxx.o -c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_hugin-app/hugin-app/work/hugin-2011.0.0/src/foreign/zthread/src/AtomicCount.cxx
In file included from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_hugin-app/hugin-app/work/hugin-2011.0.0/src/foreign/zthread/src/AtomicCount.cxx:55:
In file included from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_hugin-app/hugin-app/work/hugin-2011.0.0/src/foreign/zthread/src/vanilla/SimpleAtomicCount.cxx:26:
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_hugin-app/hugin-app/work/hugin-2011.0.0/src/foreign/zthread/src/../include/zthread/Guard.h:117:9: error: void function 'createScope' should not return a value [-Wreturn-type]
        return false;
        ^      ~~~~~
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_hugin-app/hugin-app/work/hugin-2011.0.0/src/foreign/zthread/src/../include/zthread/Guard.h:121:5: error: void function 'createScope' should not return a value [-Wreturn-type]
    return true;
    ^      ~~~~
2 errors generated.

Here is the error when using llvm-gcc-4.2 as the compiler:

[ 58%] Building CXX object src/hugin1/base_wx/CMakeFiles/huginbasewx.dir/huginConfig.cpp.o
cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_hugin-app/hugin-app/work/hugin-2011.0.0/src/hugin1/base_wx && /Developer/usr/bin/llvm-g++-4.2   -Dhuginbasewx_EXPORTS -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXMAC__ -pipe -O2 -arch i386  -I/opt/local/include/wx-2.8 -O3 -DNDEBUG -arch i386 -isysroot / -mmacosx-version-min=10.7 -fPIC -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_hugin-app/hugin-app/work/hugin-2011.0.0/src -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_hugin-app/hugin-app/work/hugin-2011.0.0/src/hugin_base -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_hugin-app/hugin-app/work/hugin-2011.0.0/src/foreign -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_hugin-app/hugin-app/work/hugin-2011.0.0/src/foreign/vigra -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_hugin-app/hugin-app/work/hugin-2011.0.0/src/celeste -I/opt/local/include -I/opt/local/include/OpenEXR -I/System/Library/Frameworks/GLUT.framework/Headers -I/opt/local/lib/wx/include/mac-unicode-release-2.8 -I/opt/local/include/wx-2.8 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_hugin-app/hugin-app/work/hugin-2011.0.0/src/hugin1    -o CMakeFiles/huginbasewx.dir/huginConfig.cpp.o -c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_hugin-app/hugin-app/work/hugin-2011.0.0/src/hugin1/base_wx/huginConfig.cpp
In file included from /opt/local/include/wx-2.8/wx/mac/private.h:4,
                 from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_hugin-app/hugin-app/work/hugin-2011.0.0/src/hugin1/base_wx/platform.h:45,
                 from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_hugin-app/hugin-app/work/hugin-2011.0.0/src/hugin1/base_wx/huginConfig.cpp:31:
/opt/local/include/wx-2.8/wx/mac/carbon/private.h: In function ‘Rect* wxMacGetPictureBounds(Picture**, Rect*)’:
/opt/local/include/wx-2.8/wx/mac/carbon/private.h:1375: error: ‘QDGetPictureBounds’ was not declared in this scope
/opt/local/include/wx-2.8/wx/mac/carbon/private.h: At global scope:
/opt/local/include/wx-2.8/wx/mac/carbon/private.h:1459: error: ‘Cursor’ does not name a type
/opt/local/include/wx-2.8/wx/mac/carbon/private.h:1488: error: ‘ClassicCursor’ does not name a type

Looking on the Internet, I saw that there may be some errors when using wxWidgets on Lion. I tried to add "--with-macosx-sdk=/Developer/SDKs/MacOSX10.6.sdk --with-macosx-version-min=10.6" to the configure command but without success. Also, I'm not sure about the way to do add these parameters. I used this command line:

sudo port -d install hugin-app configure.compiler=llvm-gcc-4.2 configure.args-append="--with-macosx-sdk=/Developer/SDKs/MacOSX10.6.sdk --with-macosx-version-min=10.6"

Change History (15)

comment:1 Changed 13 years ago by eddedmondson@…

Drop your current configure.args-append and add

configure.args-append -DCMAKE_OSX_DEPLOYMENT_TARGET=10.6
configure.sdkroot /Developer/SDKs/MacOSX10.6.sdk

It still needs configure.compiler=llvm-gcc-4.2
You almost had the right answer - just that hugin is built with cmake and wxWidgets isn't, and they have different ways to do the same thing.

comment:2 Changed 13 years ago by eddedmondson@…

Cc: eddedmondson@… added

Cc Me!

comment:3 Changed 13 years ago by philippe.bernery@…

I still get the issue. I tried both

sudo port -d install hugin-app configure.compiler=llvm-gcc-4.2 configure.args-append=-DCMAKE_OSX_DEPLOYMENT_TARGET=10.6 configure.sdkroot=/Developer/SDKs/MacOSX10.6.sdk

and

sudo port -d install hugin-app configure.compiler=llvm-gcc-4.2 configure.args-append -DCMAKE_OSX_DEPLOYMENT_TARGET=10.6 configure.sdkroot /Developer/SDKs/MacOSX10.6.sdk

and got the error about QDGetPictureBounds.

I perfomed a

sudo port clean hugin-app

before each compile.

FYI, my variants.conf contains:

+no_x11 -x11 +quartz +no_tkinter +universal

comment:4 Changed 12 years ago by calvin@…

Cc me!

comment:5 Changed 12 years ago by nickbroon@…

Cc: nickbroon@… added

Cc Me!

comment:6 Changed 12 years ago by nickbroon@…

2011.2.0 and 2011.4.0 are both now available. Perhaps packaging one of those and see if it works would be help.

comment:7 Changed 12 years ago by hvdwolf@…

In the past weeks I have been looking at this issue but I have no idea where the clang issue comes from. I'm still on Snow Leopard and have no intentions yet to switch and it seems only to occur on lion. Next week I will work on the 2011.4.0 Portfile. I have no idea whether that will solve it and it will off course not solve the current issue in 2011.0 on Lion.

comment:8 Changed 12 years ago by hvdwolf@…

Now there is another new issue. boost 1.48 is the default boost for MacPorts. Hugin needs to be patched to work with boost 1.48. They already made a patch for the hugin trunk, which I applied to 2011.4.0, but it's not sufficient on OSX. I filed a bug report at the hugin launchpad.

comment:9 Changed 12 years ago by hvdwolf@…

Hugin need to be patched, but it's not only hugin. It's an issue between Apples Assertmacros.h and boost 1.48 check() macros. See boost ticket https://svn.boost.org/trac/boost/ticket/6219.

It requires a huge load of

#ifdef check
#undef check
#endif

before a lot of Boost includes in the hugin code, so it's not a hugin issue either. But it's quite a lot of work.

I assume this will influence a lot of boost related ports.

comment:10 Changed 12 years ago by hanche

Well, it seems that nobody has sufficient time and inclination to fix this bug. Is there a way to mark the port as broken on Lion, so that people don't waste time trying to compile it and its many dependencies (as I just did)?

comment:11 Changed 12 years ago by hanche

Cc: hanche@… added

Cc Me!

comment:12 in reply to:  7 Changed 12 years ago by jmroot (Joshua Root)

Replying to hvdwolf@…:

In the past weeks I have been looking at this issue but I have no idea where the clang issue comes from.

The error reported by clang is pretty simple: the function 'createScope' is declared to not return a value, but then it returns a value. This is completely bogus code, but probably not hard to fix.

comment:13 Changed 12 years ago by hvdwolf@…

The next hugin 2012.0 is to be released soon. hugin is currently built against Carbon using wxWidgets. The conflicting macro between boost >=1.48 and Apple inside assertMacros.h is a piece of carbon code that is necessary for wxwidgets 2.8 carbon. It's a conflict I can't solve. I already skipped the entire boost patch and wrote a few patches to compile hugin against wxwidgets 2.9 for Cocoa. These patches are in a hugin development branch and not ready for release yet. It has the advantage that hugin can be compiled both for i386 and x86_64. 64bits builds weren't posible against wxmac 2.8 as carbon isn't 64bits. When I use the wxwidgets-devel 2.9 version and use the CPP/C/CXXFLAG "-D ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES=0" to overcome the boost issue, I can compile hugin and I could build a portfile for that. Hugin against Cocoa works but needs finetuning and is not ready for release as drag&drop and a few more things are broken in wxwidgets 2.9.3 and 2.9.4. As it is not ready for release in 2012.0, it will not come to Macports soon either. I like to have a hugin 2012.2 release somewhere in autumn as well to implement all this, but at this moment I'm really in a situation I can't go forward. Which means that hugin will remain broken for a somewhat longer period or I should apply the hugin patches to 2012.0 as well and make a portfile that forces the use of wxwidgets-devel and deactivate wxwidgets (when installed).

Please advise in case of other solutions which I don't know now due to missing macports knowledge.

comment:14 Changed 11 years ago by mojca (Mojca Miklavec)

Is anyone "present here" still interested in the efforts to make Hugin work again? The reported error has been fixed both upstream and in MacPorts:

but there are a few other problems with boost.

comment:15 Changed 10 years ago by mojca (Mojca Miklavec)

Resolution: fixed
Status: newclosed
Version: 2.0.3

I committed some patches in r110277, r110894 and now upgraded the port to 2013.0.0 in r113119.

I believe this particular issue is solved now, even though #41280 remains. I successfully built hugin-app on 10.7 against wxWidgets-3.0 after manually fixing the other above mentioned problem.

In case that I forgot anything about this ticket, please reopen it or file a new one.

Note: See TracTickets for help on using tickets.