| 1 | | |
| | 1 | Convert the src folder using dos2unix or similar utility. Then copy [http://ports.haiku-files.org/browser/haikuports/trunk/media-libs/qhull/Makefile.haiku Makefile.haiku] into src as Makefile, and run make. |
| | 2 | |
| | 3 | Fails: |
| | 4 | {{{ |
| | 5 | ~/qhull-2003.1/src> make new |
| | 6 | rm -f *.o ../core qconvex qdelaunay qhalf qvoronoi qhull libqhull.a \ |
| | 7 | *.exe |
| | 8 | rm -f *~ ../rbox ../qhull ../qhalf ../qconvex ../qdelaunay ../qhalf\ |
| | 9 | ../qvoronoi ../user_eg ../user_eg2 ../*.exe >/dev/null |
| | 10 | gcc -c -O2 -ansi rbox.c |
| | 11 | /boot/home/qhull-2003.1/src/rbox.c:39: warning: `PI' redefined |
| | 12 | /boot/develop/headers/posix/math.h:23: warning: this is the location of the previous definition |
| | 13 | gcc -o rbox rbox.o -O2 -ansi |
| | 14 | cp rbox .. |
| | 15 | gcc -c -O2 -ansi qconvex.c |
| | 16 | gcc -c -O2 -ansi user.c |
| | 17 | gcc -c -O2 -ansi global.c |
| | 18 | gcc -c -O2 -ansi stat.c |
| | 19 | gcc -c -O2 -ansi io.c |
| | 20 | gcc -c -O2 -ansi geom2.c |
| | 21 | gcc -c -O2 -ansi poly2.c |
| | 22 | gcc -c -O2 -ansi merge.c |
| | 23 | gcc -c -O2 -ansi qhull.c |
| | 24 | gcc -c -O2 -ansi geom.c |
| | 25 | gcc -c -O2 -ansi poly.c |
| | 26 | gcc -c -O2 -ansi qset.c |
| | 27 | gcc -c -O2 -ansi mem.c |
| | 28 | if ar or ranlib fails, try make qhullx |
| | 29 | ar r libqhull.a user.o global.o stat.o io.o geom2.o poly2.o merge.o qhull.o geom.o poly.o qset.o mem.o |
| | 30 | ar: creating libqhull.a |
| | 31 | the next line may need to be removed. |
| | 32 | test -x ranlib -o -x ranlib && ranlib libqhull.a |
| | 33 | make: [libqhull.a] Error 1 (ignored) |
| | 34 | gcc -o qconvex -O2 -ansi qconvex.o -L. -lqhull |
| | 35 | cp qconvex .. |
| | 36 | gcc -c -O2 -ansi qdelaun.c |
| | 37 | gcc -o qdelaunay -O2 -ansi qdelaun.o -L. -lqhull |
| | 38 | cp qdelaunay .. |
| | 39 | gcc -c -O2 -ansi qhalf.c |
| | 40 | gcc -o qhalf -O2 -ansi qhalf.o -L. -lqhull |
| | 41 | cp qhalf .. |
| | 42 | gcc -c -O2 -ansi qvoronoi.c |
| | 43 | gcc -o qvoronoi -O2 -ansi qvoronoi.o -L. -lqhull |
| | 44 | cp qvoronoi .. |
| | 45 | gcc -c -O2 -ansi unix.c |
| | 46 | gcc -o qhull -O2 -ansi unix.o -L. -lqhull |
| | 47 | cp qhull .. |
| | 48 | chmod +x ../eg/q_test ../eg/q_eg ../eg/q_egtest |
| | 49 | cd ..; ./rbox D4 | ./qhull |
| | 50 | |
| | 51 | This is the qhull test case. If any errors or core dumps occur, |
| | 52 | recompile qhull with 'make new'. If errors still occur, there is |
| | 53 | an incompatibility. You should try a different compiler. You can also |
| | 54 | change the choices in user.h. If you discover the source of the problem, |
| | 55 | please send mail to qhull_bug@qhull.org. |
| | 56 | |
| | 57 | Type 'qhull' for a short list of options. |
| | 58 | qhull error: the joggle for 'QJn', 1.8e+308, is below roundoff for distance computations, inf |
| | 59 | |
| | 60 | While executing: ./rbox D4 | ./qhull |
| | 61 | Options selected for Qhull 2003.1 2003/12/30: |
| | 62 | _pre-merge _zero-centrum _max-width inf Error-roundoff inf _one-merge nan |
| | 63 | _near-inside nan |
| | 64 | make: [qhull] Error 1 (ignored) |
| | 65 | ~/qhull-2003.1/src> |
| | 66 | }}} |
| | 67 | |
| | 68 | Probably related to Haiku ticket [http://dev.haiku-os.org/ticket/3308 3308]. |