Opened 13 years ago

Closed 13 years ago

#31053 closed defect (fixed)

qhull fails to build using g++-4.0, e.g., leopard

Reported by: gnw3 Owned by: mamoll (Mark Moll)
Priority: Normal Milestone:
Component: ports Version: 2.0.1
Keywords: Cc:
Port: qhull

Description

[ 48%] Building CXX object CMakeFiles/qhullcpp.dir/src/libqhullcpp/Qhull.cpp.o
/usr/bin/g++-4.0   -Dqh_QHpointer -O2 -arch i386  -O3 -DNDEBUG -arch i386 -isysroot / -mmacosx-version-min=10.5 \
-I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_math_qhull/qhull/\
work/qhull-2011.1/src/libqhullcpp \
 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_math_qhull/qhull/\
work/qhull-2011.1/src \
-I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_math_qhull/qhull/\
work/qhull-2011.1/src/libqhull   \
 -o CMakeFiles/qhullcpp.dir/src/libqhullcpp/Qhull.cpp.o \
-c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_math_qhull/qhull/\
work/qhull-2011.1/src/libqhullcpp/Qhull.cpp
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_math_qhull/qhull/\
work/qhull-2011.1/src/libqhullcpp/QhullPointSet.h:114: error: using typedef-name 'orgQhull::QhullSet<double*>::const_iterator' after 'class'

also http://paste.lisp.org/+2NVH. The author attributes this to a bug in g++-4.0 http://paste.lisp.org/+2NVH/1 for a patch. Qhull is used, e.g., by octave, which uses gcc44 by default. Should qhull do the same?

Attachments (1)

Portfile.diff (1.7 KB) - added by tenomoto (Takeshi Enomoto) 13 years ago.

Download all attachments as: .zip

Change History (8)

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

Keywords: octave gcc removed
Owner: changed from macports-tickets@… to mmoll@…

comment:2 Changed 13 years ago by mamoll (Mark Moll)

Patch committed in r83413. Please confirm that this works, since I don't have access to a Leopard machine.

comment:3 in reply to:  2 Changed 13 years ago by gnw3

Replying to mmoll@…:

Patch committed in r83413. Please confirm that this works, since I don't have access to a Leopard machine.

Thanks for the fast response. There was a minor problem with the change to the Portfile:

 port upgrade qhull
--->  Computing dependencies for qhull
--->  Fetching qhull
--->  Attempting to fetch # from http://www.qhull.org/download

After editing the Partfile to remove the trailing comment "# patch for g++-4.0 / Leopard, see #31053" I was able to build qhull on Leopard. There was another issue:

--->  Staging qhull into destroot
Warning: violation by /opt/local/man
Warning: qhull violates the layout of the ports-filesystems!
Warning: Please fix or indicate this misbehavior (if it is intended), it will be an error in future releases!

I'm guessing the man pages are supposed to go in /opt/local/share/man.

For the record, I haven't tested the new version yet because octave-devel looks for qhull/qhull_a.h:, and the headers are now in libqhull. I'll file a report against octave-devel.

comment:4 Changed 13 years ago by mamoll (Mark Moll)

Fix committed in r83436. I created a symlink from ${prefix}/include/libqhull to ${prefix}/include/qhull. Hopefully that's sufficient to stay backwards compatible.

comment:5 Changed 13 years ago by gnw3

Thanks. The symlink may help some other dependent packages, but octave-devel links against libqhull.dylib. I tried a symbolic link libqhull6.dylib --> libqhull.dylib, but the new dylib is called libqhull6.dylib. Another symlink, but then configure wants qhull/qhull.h. The upstream octave bug report neglects to mention this, but does mentions a problem when using qhull-2011.1 -- could the upstream reporter have mixed old and new headers?

Changed 13 years ago by tenomoto (Takeshi Enomoto)

Attachment: Portfile.diff added

comment:6 Changed 13 years ago by tenomoto (Takeshi Enomoto)

I updated for 2011.2 and created a few symlinks for backward compatibility. A better solution may be update the octave source. I was able to build octave against qhull with this fix. See also #31062.

comment:7 Changed 13 years ago by mamoll (Mark Moll)

Resolution: fixed
Status: newclosed

Committed in r87709. Thanks for the patch!

Note: See TracTickets for help on using tickets.