[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Compiling with Qhull
From: |
Ben Abbott |
Subject: |
Re: Compiling with Qhull |
Date: |
Sat, 17 Dec 2011 16:55:04 -0500 |
On Dec 17, 2011, at 1:09 PM, John W. Eaton wrote:
> On 17-Dec-2011, Ben Abbott wrote:
>
> | After building with gcc 4.5, I deactivated qhull 2010.1 and activated
> 2011.2. Then I ran "make check". I encountered 13 failures related to qhull.
>
> What exactly did you do? Did you remove the old version?
>
> | Looking at the Macports port-file for qhull ...
> |
> | https://trac.macports.org/browser/trunk/dports/math/qhull/Portfile
> |
> | ... I see that the standard "qhull.h" is being used (not
> qhull.h-deprecated) by macports.
>
> What do you mean by standard? If macports already renamed libqhull.h
> to qhull.h, then I think you are OK, except that you probably need to
> modify the src/DLD-FUNCTIONS to have
>
> #define qh_QHpointer 1
>
> before including any Qhull header files. I don't know how to write a
> configure test so that this can happen automatically.
>
> Or is the qhull.h file that you have from some earlier release? I
> don't think we can hope to handle the situation of multiple versions
> of qhull installed at once.
>
> | Rik, I don't recall which package management system you are using. Do you
> know if your qhull 2011 uses the standard qhull.h or the deprecated version?
>
> I don't see any point in bothering with qhull.h-deprecated. All it
> does is include libqhull.h, which Octave's configure script already
> checks for.
>
> jwe
ah-ha ... I should have read the emails a bit more carefully. I made the change
below.
$ hg diff
diff --git a/src/DLD-FUNCTIONS/oct-qhull.h b/src/DLD-FUNCTIONS/oct-qhull.h
--- a/src/DLD-FUNCTIONS/oct-qhull.h
+++ b/src/DLD-FUNCTIONS/oct-qhull.h
@@ -20,6 +20,8 @@
*/
+#define qh_QHpointer 1
+
#if !defined (octave_oct_qhull_h)
#define octave_oct_qhull_h 1
Now, I only have one test fail.
src/DLD-FUNCTIONS/convhulln.cc ......................... PASS 2/3 FAIL 1
>From fntests.log ...
29 ***** testif HAVE_QHULL
30 cube = [0 0 0;1 0 0;1 1 0;0 1 0;0 0 1;1 0 1;1 1 1;0 1 1];
31 [h, v] = convhulln (cube);
32 assert (size (h), [6 4]);
33 h = sortrows (sort (h, 2), [1:4]);
34 assert (h, [1 2 3 4; 1 2 5 6; 1 4 5 8; 2 3 6 7; 3 4 7 8; 5 6 7 8]);
35 assert (v, 1, 10*eps);
36 !!!!! test failed
37 assert (size (h),[6, 4]) expected
38 6 4
39 but got
40 12 3
41 values do not match
Ben