On 2015-11-09 20:49-0800 Alan W. Irwin wrote:

> On 2015-11-01 19:54-0700 Orion Poplawski wrote:
>
> [...]
>> I don't enable D support on the Fedora package [....]
>
> Hi Orion:
>
> Our D results with the gdc compiler on the Debian Jessie Linux
> platform are perfect right now as measured by comparing C and D
> results for all our standard examples.  See the commit message giving
> those latest test details at
> <http://sourceforge.net/p/plplot/plplot/ci/16fe6dcb1e5acc3284f265af366eccc1b2099bfc>.
> Therefore, I encourage you to go ahead and package the D component of
> PLplot for Fedora assuming gdc is packaged for that platform.
>
> It's possible that you dropped D in the past because for a long time
> we supported D version 1 and newer versions of gdc only supported D
> version 2.  However, this should no longer be a problem since Andrew
> has long since upgraded us from D version 1 to D version 2.
>
> I have emphasized gdc above since other D compiler choices (see
> <https://en.wikipedia.org/wiki/D_(programming_language)> are currently
> problematic on Linux.
>
> The dmd compiler is effectively eliminated by its closed-source nature
> from Linux distribution.  There is at least one dmd emulator (a
> wrapper for gdc) that is available on Linux (see
> <http://manpages.ubuntu.com/manpages/oneiric/man1/gdmd.1.html>). I
> have a report from Greg Jung that "dmd" (which I assume was such a
> wrapper) failed on openSUSE, and I attribute that problem to that
> wrapper not supporting all dmd command line options required by
> cmake/modules/language_support/cmake/Platform/Linux-dmd.cmake. Our
> CMake language support favors dmd above gdc so when both the dmd
> wrapper and gdc are available and the wrapper does not work then you
> should specify gdc instead by setting the environment variable
>
> export DC=gdc
>
> In principal by copying
> cmake/modules/language_support/cmake/Platform/Linux-gdc.cmake to
> cmake/modules/language_support/cmake/Platform/Linux-ldc.cmake and
> changing option names from the gdc name and format to the equivalent
> ldc options our CMake language support for D could be extended to ldc,
> and I plan to try that at some point if nobody else beats me to it.
>
>
> In sum, dmd is proprietary, dmd wrappers might not support all the dmd
> options required by
> cmake/modules/language_support/cmake/Platform/Linux-dmd.cmake, and
> there is currently no
> cmake/modules/language_support/cmake/Platform/Linux-ldc.cmake. Which
> currently essentially just leaves gdc as the only choice of D compiler
> on Linux that is suitable for building the D component of PLplot.

I followed up by looking carefully at our (inherited) D language
support code, and what it does at the moment is look at the compiler
identity and if that is gdc, it uses gcd PLatform packages such as
cmake/modules/language_support/cmake/Platform/Linux-gdc.cmake and
otherwise it assumes whatever D compiler that has been chosen by the
user is dmd compatible and uses dmd Platform packages such as
cmake/modules/language_support/cmake/Platform/Linux-dmd.cmake.
Furthermore, I was interested to find that
the ldc package that is available from Debian Jessie includes
what appears to be a dmd wrapper (called ldmd2) so I tried that
(using export DC=ldmd2), but it proved to be incompatible with
cmake/modules/language_support/cmake/Platform/Linux-dmd.cmake.
For example, the -version=whatever flag is allowed by ldmd2, but
-version=Posix (which appears in Linux-dmd.cmake) cannot be
used by ldmd2 because it is reserved.  I got further if I removed
-version=Posix from Linux-dmd.cmake, but then I ran into a problem
with finding the libphotos.a library and gave up at that point.

In sum, this dmd wrapper from the ldc project does not seem to be
exactly equivalent to dmd itself and/or/ Linux-dmd.cmake (written 8
years ago!) is incompatible with modern dmd.  So our effective D
compiler support continues to be limited to just gdc.  Note also that
a further look at
cmake/modules/language_support/cmake/CMakeDetermineDCompiler.cmake
shows that gdc is favored above dmd so if gdc and dmd are installed on
the system, cmake will find and use gdc.  Therefore, my remark above
concerning the user having to specify "export DC=gdc" when both
gdc and dmd are available was incorrect.

@Greg and Orion:

Now that you know gdc is absolutely necessary and dmd wrappers are
unlikely to cut it, have you both been able to find rpms that contain
the gdc compiler for openSUSE (Greg) and Fedora (Orion)?

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
__________________________

------------------------------------------------------------------------------
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to