Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#33298 closed defect (fixed)

cgal build fails

Reported by: jwhowse4 Owned by: Veence (Vincent)
Priority: Normal Milestone:
Component: ports Version: 2.0.3
Keywords: haspatch Cc: Russell-Jones-OxPhys (Russell Jones), seanfarley (Sean Farley), ryandesign (Ryan Carsten Schmidt)
Port: cgal

Description

On Mac OS 10.7.3 with XCode 4.2.1 the cgal build fails. I have tried to compile the package with the xcode compilers clang and llvm-gcc-4.2, and the macports compiler apple-gcc-4.2 and gotten the same failure. The build seems to fail when trying to include elements from the boost library. I have attached the log files for all three builds.

Attachments (5)

cgal_main_clang.log (80.3 KB) - added by jwhowse4 12 years ago.
cgal_main_llvm-gcc-4.2.log (80.1 KB) - added by jwhowse4 12 years ago.
cgal_main_apple-gcc-4.2.log (80.0 KB) - added by jwhowse4 12 years ago.
patch-src-config.h.diff (607 bytes) - added by Russell-Jones-OxPhys (Russell Jones) 12 years ago.
Patch to work around QT build tool bug and allow cgal to build.
Portfile-cgal (3.2 KB) - added by Russell-Jones-OxPhys (Russell Jones) 12 years ago.
Portfile for cgal to apply patch to allow port to build.

Download all attachments as: .zip

Change History (14)

Changed 12 years ago by jwhowse4

Attachment: cgal_main_clang.log added

Changed 12 years ago by jwhowse4

Attachment: cgal_main_llvm-gcc-4.2.log added

Changed 12 years ago by jwhowse4

Attachment: cgal_main_apple-gcc-4.2.log added

comment:1 Changed 12 years ago by mf2k (Frank Schima)

Owner: changed from macports-tickets@… to vince@…
Port: cgal added

In the future, please fill in the Port field and Cc the maintainer(s).

comment:2 Changed 12 years ago by Russell-Jones-OxPhys (Russell Jones)

I have the same problem. The build seems to be failing at

:info:build opt/local/include/boost/type_traits/detail/has_binary_operator.hp:50: Parse error at "BOOST_JOIN":info:build make[2]: *** [src/Qt4/__/__/include/CGAL/Qt/moc_GraphicsItem.cxx] Error 1
:info:build make[2]: *** Waiting for unfinished jobs....
:info:build opt/local/include/boost/type_traits/detail/has_binary_operator.hp:50: Parse error at "BOOST_JOIN"
:info:build make[2]: *** [src/Qt4/__/__/include/CGAL/Qt/moc_GraphicsViewInput.cxx] Error 1

This is present in all the files.

This post looks relevant: http://cgal-discuss.949826.n4.nabble.com/Compiling-a-basic-CGAL-program-in-C-on-Mac-OS-X-10-7-2-td4166413.html

usr/local/Cellar/boost/1.48.0/include/boost/type_traits/detail/has_binary_op 
> erator.hp:50: Parse error at "BOOST_JOIN" 
> make[2]: *** [src/Qt4/__/__/include/CGAL/Qt/moc_GraphicsItem.cxx] Error 1 
> make[1]: *** [src/Qt4/CMakeFiles/CGAL_Qt4.dir/all] Error 2 
> make: *** [all] Error 2
... [show rest of quote]

There is bug in the Qt4 moc tool, that makes it incompatible with some Boost 
files from Boost-1.48. 

In CGAL-4.0-beta1, we have introduced a workaround. Copy the following lines 
near the beginning of CGAL-3.9/include/CGAL/config.h, if you want to fix that 
bug keeping CGAL-3.9: 


// Workaround to the following bug: 
//   https://bugreports.qt.nokia.com/browse/QTBUG-22829
#ifdef Q_MOC_RUN 
// When Qt moc runs on CGAL files, do not process 
// <boost/type_traits/has_operator.hpp> 
#  define BOOST_TT_HAS_OPERATOR_HPP_INCLUDED 
#endif 


I am not really proud of that workaround of mines, but at least it works. 

I can have a go at creating a patch/portfile, but not until next Wednesday.

comment:3 Changed 12 years ago by Russell-Jones-OxPhys (Russell Jones)

Just to confirm, cgal builds on 10.7.3 after applying this patch.

comment:4 Changed 12 years ago by Russell-Jones-OxPhys (Russell Jones)

Patch attached.

Changed 12 years ago by Russell-Jones-OxPhys (Russell Jones)

Attachment: patch-src-config.h.diff added

Patch to work around QT build tool bug and allow cgal to build.

Changed 12 years ago by Russell-Jones-OxPhys (Russell Jones)

Attachment: Portfile-cgal added

Portfile for cgal to apply patch to allow port to build.

comment:5 Changed 12 years ago by Veence (Vincent)

Cool, thanks. I’ve been so overburdened lately that I’d no opportunity to update the ports I’m responsible of. It’s better now, so I’ll commit your patch tomorrow. Thanks a lot for keeping the things clean while I was away.

comment:6 in reply to:  5 Changed 12 years ago by seanfarley (Sean Farley)

Replying to vince@…:

Cool, thanks. I’ve been so overburdened lately that I’d no opportunity to update the ports I’m responsible of. It’s better now, so I’ll commit your patch tomorrow. Thanks a lot for keeping the things clean while I was away.

I have a patch for cgal 4.0 if you'd prefer that in this thread (or should I start a new ticket?). Also, why is cgal list in the 'gis' category first? Wouldn't it make more sense in the 'math' category? I mean, it deals with computing geometry ... how much more math do you want to get?

comment:7 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: russell.jones@… sean.michael.farley@… ryandesign@… added
Resolution: fixed
Status: newclosed

vince, I just ran into this issue, so I hope you don't mind that I committed the patch in r90821. Note that the +demos variant was setting patchfiles, so that had to be changed to append to patchfiles.

sean.michael.farley, please do submit a new ticket to update the port to 4.0 (and hopefully to fix the livecheck).

comment:8 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Keywords: haspatch added

comment:9 in reply to:  7 Changed 12 years ago by Veence (Vincent)

Replying to ryandesign@…:

vince, I just ran into this issue, so I hope you don't mind that I committed the patch in r90821. Note that the +demos variant was setting patchfiles, so that had to be changed to append to patchfiles.

sean.michael.farley, please do submit a new ticket to update the port to 4.0 (and hopefully to fix the livecheck).

Of course not Ryan, thanks for doing this. I am going to ponder on the 4.0 version today. Thanks to all for your time and efforts !

Note: See TracTickets for help on using tickets.