bugGNU Octave - Bugs: bug #60016, libqhull was deprecated in favor...


bug #60016: libqhull was deprecated in favor of libqhull_r

Submitted by:  Markus Mützel <mmuetzel>
Submitted on:  Sat 06 Feb 2021 03:18:31 PM UTC  
Category:  Libraries Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Build Failure
Status:  Confirmed Assigned to:  None
Originator Name:  Open/Closed:  Open
Release:  dev Operating System:  Any

Add a New Comment (Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Sun 07 Feb 2021 11:09:01 PM UTC, comment #4: 

Octave isn't using the C++ interface so it is not mandatory to convert.  Probably should do this before the next release, but not a lot of urgency.

Rik <rik5>
Project Administrator
Sun 07 Feb 2021 09:29:24 PM UTC, comment #3: 

They write that reentrant Qhull is 1-2% slower:

They also write:

> C++ users need to convert to libqhull_r.

I'm not sure if this applies to Octave.

Markus Mützel <mmuetzel>
Project Member
Sun 07 Feb 2021 07:41:37 PM UTC, comment #2: 

A re-entrant Qhull library is probably of minimal utility for Octave.  And it would be useful if they would quantify the speed difference between the two libraries.  The file DEPRECATED.txt says "minimal", but that means different things to different people.  Does it mean a few milliseconds or does it mean within 10% of libqhull runtime?

Regardless, we probably need to end up porting the code in case there are bug fixes which the maintainers of QHull won't bother porting back to the non-reentrant library.

I believe that Octave uses the 'C' language interface even though the surrounding code is written in C++.  It would be more of a pain if we also have to rewrite our code to use the 'C++' API.  It's not quite clear from DEPRECATED.txt.  We use qh functions, and sometimes the qh macro. 

Rik <rik5>
Project Administrator
Sun 07 Feb 2021 01:48:00 PM UTC, comment #1: 

As a workaround for MXE Octave, the following change builds the deprecated library and installs it:

Markus Mützel <mmuetzel>
Project Member
Sat 06 Feb 2021 03:18:31 PM UTC, original submission:  

The non-reentrant version of the Qhull library `libqhull` was deprecated upstream in favor of the reentrant version of the same library `libqhull_r`.

From the upstream repository:


    This directory contains the non-reentrant version of qhull, libqhull.

    New code should use the reentrant version of qhull (libqhull_r).
    It allows multiple instances of qhull to run at the same time. On
    modern architectures, it is nearly as fast as libqhull.

    Qhull programs may be built with either library.  Each program has a
    reentrant version (e.g., qconvex_r.c) and a non-reentrant
    version (qconvex.c).   The programs, rbox, qconvex, qdelaunay, qhalf,
    and qvoronoi, are built with libqhull.  The qhull program is built
    with libqhull_r.

    Qhull's C++ interface requires libqhull_r.  If you previously used the
    C++ interface with libqhull, you will need to update your code to libqhull_r.
    See qh-code.htm#convert and Changes.txt for suggestions.

    The C code in libqhull looks unusual because of the 'qh' macro.  The 'qh'
    macro controls access to Qhull's global data structure, qhT.  If
    'qh_QHpointer' is defined, 'qh' is 'qh_qh->' and 'qh_qh' is defined as
    'qhT *qh_qh', otherwise 'qh' is 'qh_qh.' and 'qh_qh' is defined as
    'qhT qh_qh'.  This allows dynamic allocation of qh_qh without modifying
    the code.  Reentrant Qhull is a better solution.

    libqhull will be supported indefinitely.  The qh_QHpointer variation
    of libqhull will be not be retested each release.  It is replaced by

See this related note from the Debian repositories:

Deprecation Notice
The non-reentrant libqhull is no longer built by default in upstream. You
should port your software to the reentrant libqhull_r library as soon as
possible. libqhull is likely to be discontinued after the 8.0.x releases.

We should probably switch over to using libqhull_r in Octave.

This is already an issue for MXE Octave: The non-reentrant version that we use in Octave isn't built currently.
That should probably be fixed there, too (at least until we switch to libqhull_r in Octave).

Markus Mützel <mmuetzel>
Project Member


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by mmuetzel (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.




    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-02-07 rik5 StatusNone => Confirmed

    Back to the top

    Powered by Savane 3.5