On 2010-01-24 16:35-0800 David MacMahon wrote:

Hi, PLplot developers,

On Jan 19, 2010, at 21:34 , David MacMahon wrote:

I am in the process of updating my MacPorts installation, but after
that finishes I will (try to) recreate the above steps and capture
all the output you've requested.

After finishing my MacPorts update.  I am no longer able to build
PLplot due to a missing header file for qhull.  The MacPorts update
brought with it qhull version 2010.1.  Previously I had qhull version
2003.1.  According to the qhull web site (http://www.qhull.org/): "A
"serious bug was found in Qhull 2003.1 . Please upgrade to 2010.1 or
apply poly.c-qh_gethash.patch.".

The problem is that the MacPorts installation of qhull 2010.1 does
NOT install the "qhull/qhull_a.h" file.  Instead, it installs just
"libqhull.h".  I don't know if this is a bug in the MacPorts qhull
"portfile" or if it is a bug in qhull's installation process in
general.  From what I can tell of qhull's installation process (now
using cmake), it looks like libqhull.h is the only header file
installed (and even that is only in the qhull git repo, not in the
qhull-2010.1-src.tgz distribution tarball!).

I tried to replace the occurrences of qhull/qhull_a.h with
libqhull.h, but it seems that libqhull.h includes "user.h", which is
another qhull header that does not get installed.

Has anyone successfully built PLplot using qhull 2010.1?

Yes.

You really do need qhull_a.h.  See
src/plgridd.c:#include <qhull/qhull_a.h>

That file is part of the tarball.  Look for it in qhull-2010.1/src/.  The
CMake-based build system that comes with the tarball really sucks (static
libraries only, no install). Werner (with some help from me) is putting
together an improved version of that which we plan to donate to the qhull
developers. I attach a modified qhull-2010.1/src/CMakeLists.txt that worked
for me on Linux, and I encourage you to generalize it for your own needs and
get back to us.

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of
Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__________________________

Linux-powered Science
__________________________
project(qhull_lib)

# Configurable items here.

option(USE_RPATH "Use -rpath when linking libraries, executables" ON)

# libraries are all shared by default
option(BUILD_SHARED_LIBS "Build shared libraries" ON)

# Change before each release whenever there has been an API change of any
# kind.
set(qhull_SOVERSION 5)
set(qhull_VERSION ${qhull_SOVERSION}.0.0)

# Order object files by frequency of execution.  Small files at end.
set(
    qhull_src
        rboxlib.c
        user.c
        global.c
        stat.c
        io.c
        geom2.c
        poly2.c
        merge.c
        libqhull.c
        geom.c
        poly.c
        qset.c
        mem.c
        usermem.c
        userprintf.c
        random.c
)

file(GLOB qhull_hdr *.h)
install(FILES ${qhull_hdr} DESTINATION ${CMAKE_INSTALL_PREFIX}/include/qhull)


add_library(qhull ${qhull_src})
target_link_libraries(qhull m)
set_target_properties(
  qhull
  PROPERTIES 
  SOVERSION ${qhull_SOVERSION}
  VERSION ${qhull_VERSION}
  INSTALL_NAME_DIR ${CMAKE_INSTALL_PREFIX}/lib
  )
install(TARGETS qhull DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)


set(qhullcmd_SOURCES  unix.c)
set(rbox_SOURCES  rbox.c)
set(qconvex_SOURCES  qconvex.c)
set(qdelaunay_SOURCES  qdelaun.c)
set(qvoronoi_SOURCES  qvoronoi.c)
set(qhalf_SOURCES  qhalf.c)

set(TARGET_LIST)
list(APPEND TARGET_LIST qhullcmd)
list(APPEND TARGET_LIST rbox)
list(APPEND TARGET_LIST qconvex)
list(APPEND TARGET_LIST qdelaunay)
list(APPEND TARGET_LIST qvoronoi)
list(APPEND TARGET_LIST qhalf)

foreach(TARGET ${TARGET_LIST})
  add_executable(${TARGET} ${${TARGET}_SOURCES})
  target_link_libraries(${TARGET} qhull)
  if(USE_RPATH)
    set_target_properties(
      ${TARGET}
      PROPERTIES 
      INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib
      INSTALL_NAME_DIR ${CMAKE_INSTALL_PREFIX}/bin
      )
  else(USE_RPATH)
    set_target_properties(
      ${TARGET}
      PROPERTIES 
      INSTALL_NAME_DIR ${CMAKE_INSTALL_PREFIX}/bin
      )
  endif(USE_RPATH)
  install(TARGETS ${TARGET} DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
endforeach(TARGET ${TARGET_LIST})
------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to