On 2012-10-25 12:00-0700 Alan W. Irwin wrote:

> On 2012-10-25 18:46+0100 Andrew Ross wrote:
>
>> On Mon, Oct 22, 2012 at 04:24:48PM -0700, Alan Irwin wrote:
>>> Hi Andrew:
>>>
>>> One of my recent posts to PLplot-devel included a rudimentary but
>>> still useful CMake-based build system for ndiff. I have now (revision
>>> 12250) made that available in external/ndiff along with instructions
>>> on how to use it. I encourage you to expand that build system if you
>>> have additional needs (e.g., installation which should take basically
>>> 10 minutes to add).
>>>
>>> I often wondered why nobody packaged ndiff for Debian, but I suspect
>>> the problem is lack of installation relocatability for the current
>>> aged and bit-rotted build system. I think you get installation
>>> relocability automatically with the new CMake-based build system
>>> (using the DESTDIR variable in the make command) so if you happened to
>>> be interested in packaging ndiff for Debian, this CMake-based build
>>> system would be a useful first step toward that goal.
>>
>> Alan,
>>
>> As you may have noticed I've updated your work to properly install the
>> binary + man page, as well as linking against the gmp library properly if
>> that is detected.
>
> Hi Andrew:
>
> Thanks for those useful additions.
>
>> I think a half decent implementation should still check
>> for the long double support as well implementing the tests.
>
> Agreed.  I will take a look at both of those now since they would be
> useful in their own right for PLplot developers and also if you
> decide to package up the result for Debian.

Hi Andrew:

I have just (revision 12265) finished implementing the requested test
system.  It works perfectly on Linux for the present hard-coded
set(HAVE_LONG_DOUBLE 0), and works well (but not perfectly
for a possible reason discussed in the commit message) on
MinGW/MSYS/Wine. It might also produce perfect test results on Windows
(only with MinGW+MSYS since MSYS is needed for the tests) for the
reasons I indicated in the commit message.

The above paragraph was all about the set(HAVE_LONG_DOUBLE 0) case.
As expected (because Intel long double is 80-bits rather than
128-bits) if you change the CMakeLists.txt file to use
set(HAVE_LONG_DOUBLE 1), some tests fail since the ndiff results are
being compared with ndiff results determined in 2000 with a ndiff
version that had access to 128-bit floating point.  Some code changes
to ndiff.c (I think you would have to use the gcc extension type
__float128) would presumably get around this problem, but then you
would be stuck with software emulation of 128-bit floating-point
arithmetic operations which would likely make ndiff much slower. So I
recommend you don't go there.

The present test system will likely produce perfect results for the
case (which I didn't bother to try) when the gmp library is installed
on Linux.

I have run out of time for anything more, but if you are keen to
really polish it further, then tests for whether LONG DOUBLE, size_t, and
STDC_HEADERS exist on the platform could be implemented in
CMakeLists.txt and config.h.cmake modified accordingly.  Also, the
original build system allowed the user to force HAVE_LONG_DOUBLE and
HAVE_GMP (presumably followed by tests to make sure those were
available) so cmake command-line options for such forcing options
might be worth implementing as well.

As usual for a new build system, MinGW + MSYS tests are especially
requested on Windows to verify my good Wine results. (Note the
previous request for such tests was for shapelib.  This request is for
ndiff which is an extremely useful tool for figuring out what is going
on with any PostScript differences you run into on any platform. just
go to cmake/external/ndiff/README.ndiff and follow directions there to
test it.)

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); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); 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
__________________________

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to