On 2017-07-13 16:02+0200 Ole Streicher wrote:

Dear Alan,

On 13.07.2017 11:27, Alan W. Irwin wrote:
I already have a few small questions. First language bindings: Currently
the following are disabled:

ENABLE_ada:             OFF
ENABLE_d:               OFF
ENABLE_octave:          OFF
ENABLE_pdl:             OFF
ENABLE_pyqt5:           OFF

Would it be useful to (re-)enable any of them? And what would I need to
add as dependencies then?

You should _not_ disable the first 3 which are well supported (at least
on Linux).  On Debian Jessie, ENABLE_ada, ENABLE_d, and ENABLE_octave
require the gnat, gdc, and liboctave-dev packages be installed.

ADA seems to work fine, I enabled it.

Excellent.  However, too be sure all is well with Ada and the other
computer languages we support you should build the test_diff_psc target (which 
compares
the plot output files for our psc device for all our standard examples
for all our supported languages (including octave) with the equivalent
C results.

The current summary of those comparisons on Debian Jessie are as follows:

Comparison test using psc device

c++
  Missing examples            :
  Differing graphical output  :
  Missing stdout              :
Differing stdout : fortran
  Missing examples            :
  Differing graphical output  :
  Missing stdout              :
Differing stdout : java
  Missing examples            :
  Differing graphical output  :
  Missing stdout              :
Differing stdout : octave
  Missing examples            :
  Differing graphical output  :
  Missing stdout              :
Differing stdout : python
  Missing examples            :
  Differing graphical output  :
  Missing stdout              :
Differing stdout : tcl
  Missing examples            :
  Differing graphical output  :
  Missing stdout              :
Differing stdout : adastandard
  Missing examples            :
  Differing graphical output  :
  Missing stdout              :
Differing stdout : adatraditional
  Missing examples            :
  Differing graphical output  :
  Missing stdout              :
Differing stdout : ocaml
  Missing examples            :
  Differing graphical output  :  16 19 33
  Missing stdout              :
Differing stdout : lua
  Missing examples            :
  Differing graphical output  :
  Missing stdout              :
Differing stdout : d
  Missing examples            :
  Differing graphical output  :
  Missing stdout              :
Differing stdout : WARNING: Some graphical or stdout results were different
[100%] Built target test_diff_psc

So PLplot language support is almost perfect for this Debian Jessie platform
except for some long-standing issues with our ocaml support.  So
these results are what we should aspire to on Debian Stretch as well.


With D, I also have to install libgphobos-dev (right?),
but even then I get the following error (on newer Debian systems, f.e. Stretch,
or unstable):

-- D Compiler Install Prefix (use D_PATH env var to override): /usr
-- Check for working D compiler: /usr/bin/gdc
-- Check for working D compiler: /usr/bin/gdc -- works
-- Check for working Phobos
-- Check for working Phobos -- unavailable
-- Check for working Tango
-- Check for working Tango -- unavailable
CMake Error at 
cmake/modules/language_support/cmake/CMakeTestDCompiler.cmake:175 (MESSAGE):
 Phobos is required for this project, but it is not available!
Call Stack (most recent call first):
 cmake/modules/d.cmake:53 (enable_language)
 cmake/modules/plplot.cmake:493 (include)
 CMakeLists.txt:135 (include)
[...]
Determining if Phobos works failed with the following output:
Change Dir: /build/plplot-5.12.0+dfsg/obj-x86_64-linux-gnu/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_b0e79/fast"
make[2]: Entering directory 
'/build/plplot-5.12.0+dfsg/obj-x86_64-linux-gnu/CMakeFiles/CMakeTmp'
/usr/bin/make -f CMakeFiles/cmTC_b0e79.dir/build.make 
CMakeFiles/cmTC_b0e79.dir/build
make[3]: Entering directory 
'/build/plplot-5.12.0+dfsg/obj-x86_64-linux-gnu/CMakeFiles/CMakeTmp'
Building D object CMakeFiles/cmTC_b0e79.dir/testDCompiler.o
/usr/bin/gdc   -fversion=Phobos    -o CMakeFiles/cmTC_b0e79.dir/testDCompiler.o 
-c /build/plplot-5.12.0+dfsg/obj-x86_64-linux-gnu/CM
Linking D executable cmTC_b0e79
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_b0e79.dir/link.txt 
--verbose=1
/usr/bin/gdc   -fversion=Phobos   -Wl,-z,relro -Wl,--as-needed  
CMakeFiles/cmTC_b0e79.dir/testDCompiler.o -o cmTC_b0e79  -lgphobos2
/usr/bin/ld: cannot find -lgphobos2
collect2: error: ld returned 1 exit status
[...]

Do you have an idea what to do here? Did I use the wrong library?

Here is what I get on my Debian Jessie platform:

-- D Compiler Install Prefix (use D_PATH env var to override): /usr
-- Check for working D compiler: /usr/bin/gdc
-- Check for working D compiler: /usr/bin/gdc -- works
-- Check for working Phobos
-- Check for working Phobos -- works
-- Check for working Tango
-- Check for working Tango -- unavailable

So phobos (rather than tango) is the right library in general on Debian.  
Furthermore,

irwin@raven> locate gphobos2
/usr/lib/gcc/x86_64-linux-gnu/4.9/libgphobos2.a
irwin@raven> dpkg --search /usr/lib/gcc/x86_64-linux-gnu/4.9/libgphobos2.a
libphobos-4.9-dev: /usr/lib/gcc/x86_64-linux-gnu/4.9/libgphobos2.a

However, from
<https://packages.debian.org/stretch/amd64/libgphobos-6-dev/filelist>
the name of the library has been changed to
/usr/lib/gcc/x86_64-linux-gnu/6/libgphobos.so (or
/usr/lib/gcc/x86_64-linux-gnu/6/libgphobos.a)

Finally,

software@raven> find cmake/modules/language_support/cmake/ -type f |xargs grep 
phobos
cmake/modules/language_support/cmake/CMakeDInformation.cmake:           SET(DSTDLIB_FLAGS 
"-L${D_PATH}/lib -ltango -lphobos")
cmake/modules/language_support/cmake/CMakeDInformation.cmake:           SET(DSTDLIB_FLAGS 
"-lgphobos2")
cmake/modules/language_support/cmake/CMakeDInformation.cmake:           SET(DSTDLIB_FLAGS 
"-L${D_PATH}/lib -lphobos")
cmake/modules/language_support/cmake/CMakeTestDCompiler.cmake:  CMAKE_FLAGS 
"-DLINK_LIBRARIES=${D_PATH}/lib/libphobos2.a"
cmake/modules/language_support/cmake/CMakeTestDCompiler.cmake:  #CMAKE_FLAGS 
"-DLINK_LIBRARIES=gphobos"
cmake/modules/language_support/cmake/CMakeTestDCompiler.cmake:  CMAKE_FLAGS 
"-DLINK_LIBRARIES=gphobos2"
cmake/modules/language_support/cmake/CMakeTestDCompiler.cmake:  CMAKE_FLAGS 
"-DLINK_LIBRARIES=${D_PATH}/lib/libphobos.a"
cmake/modules/language_support/cmake/CMakeTestDCompiler.cmake:  CMAKE_FLAGS 
"-DLINK_LIBRARIES=${D_PATH}/lib/libtango.a;${D_PATH}/lib/libphobos.a"
cmake/modules/language_support/cmake/CMakeTestDCompiler.cmake:# if both tango 
and phobos are selected try to choose which one is available

So I am virtually positive the issue is in our CMake D language
support logic (i.e., in one or both of the above files), and it also
appears those files have already gone through some changes between the
library name of gphobos and gphobos2.  But probably that was for an
earlier generation of a phobos library name change so that logic
likely needs changing for the latest generation of a phobos library
name change as well.  However, I am tied up with other PLplot release
issues at the moment, and have no way to quickly test phobos library
name changes so if you were willing to look further in those files and
come up with a patch that works for you, I would be happy to accept
that patch.


I also tried octave, but get the warning

-- OCTAVE = /usr/bin/octave
-- MKOCTFILE = /usr/bin/mkoctfile
-- OCTAVE_CONFIG = /usr/bin/octave-config
-- OCTAVE_VERSION = 4.2.1
-- WARNING: Octave-4 has been found which is likely to lead to build errors for 
PLplot.
-- WARNING: Disabling Octave binding. If you want to use that component of 
PLplot you
  should try installing Octave-3 (which works well with PLplot) or else try the
  experimental cmake option -DTRY_OCTAVE4=ON

Debian (Stretch and later) has Octave 4 only, so I am a bit worried enabling 
this
for the moment. Would you recommend it despite of the warning?

I don't have access to octave4 so I am not sure. "git blame"
tells me that warning was initially put in coincident with the following
commit message:

commit 8cd0971dd17177d8baedcc03acdb5e1c6230167d
Author: Alan W. Irwin <air...@users.sourceforge.net>
Date:   Wed Jul 8 13:21:37 2015 -0700

    Build system: Implement WARNING message for the Octave-4 case

    Note that the WARNING message warns the users of potential build
    errors but does not actually disable Octave in case someone wants to
    experimentally try Octave-4 once the swig fix for Octave-4 #include
    issues becomes available.

So it appears to me the original problem was caused by some swig
issues (our octave binding is generated using swig), and my guess is
that swig issue has likely been fixed in the two years since.

So I suggest you try enabling it, and then follow up with a build of
the test_diff_psc target. If that test works, i.e., it produces the
good octave results above, then I think you can be pretty confident
all is well with an octave4 binding of PLplot.

The fundamental problem, of course, (since I am the person with
probably the most PLplot development knowledge) is I need to upgrade
from Debian Jessie to Debian Stretch (now that the latter has been
released as the stable version of Debian), and then tackle such PLplot
dependency version issues that remain.  So I plan to do that
after the release of 5.13.0.  But any help you can supply for
more modern Debian versions than the one I am using now
would be quite helpful.

By the way, if you are interested in the history of the Debian
packaging of PLplot from 2003 to 2014, then you should take a look at

git log --name-status -- debian

results.

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
__________________________

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to