Plan to deal with remaining D language support issues for PLplot

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Plan to deal with remaining D language support issues for PLplot

Alan W. Irwin-2
Hi Ben:

You know this already from our off-list discussion, but for other's here,
the PLplot's ancient fork of the cmaked project works well for gdc, but is completely
broken (doesn't even compile a test example) with dmd on my Linux (Debian Buster)
platform.  So I have been trying the
[cmake-d](https://github.com/dcarp/cmake-d) project (suitably patched for
PLplot needs) instead for our D language support.  That support
currently works well for gdc, and also *almost* works well for dmd
(and probably ldc as well although I am concentrating on the dmd case
at the moment).

The remaining issues for cmake-d appear to be

1.

# "D" version:
set(CMAKE_LIBRARY_PATH_FLAG "-L-L")
set(CMAKE_LINK_LIBRARY_FLAG "-L-l")

for the dmd and also the ldc cases.

This conflicts with support for our other languages on Linux which sets

# "C" version
set(CMAKE_LIBRARY_PATH_FLAG "-L")
set(CMAKE_LINK_LIBRARY_FLAG "-l")

2. Libraries linked by full pathname cannot be linked properly by dmd and lcd
(since they both need an "-L" prefix to such pathnames to pass those to the linker).

I took a look at [another D support project that you recommended to me
off list](https://github.com/trentforkert/cmake/) that project
contained the following commit:

Author: Ben Boeckel <[hidden email]>
Date:   Tue Apr 15 00:21:15 2014 -0400

     linking: Support language-specific link flags

     Adds support for the following variables:

       * CMAKE_<LANG>_LINK_LIBRARY_FLAG
       * CMAKE_<LANG>_LINK_LIBRARY_FILE_FLAG
       * CMAKE_<LANG>_LINK_LIBRARY_SUFFIX
       * CMAKE_<LANG>_LINK_PATH_FLAG
       * CMAKE_<LANG>_LINK_PATH_TERMINATOR

     so that compilers with different flags can be used in the same build.

M       Help/manual/cmake-variables.7.rst
A       Help/variable/CMAKE_LANG_LIBRARY_PATH_FLAG.rst
A       Help/variable/CMAKE_LANG_LINK_LIBRARY_FILE_FLAG.rst
A       Help/variable/CMAKE_LANG_LINK_LIBRARY_FLAG.rst
A       Help/variable/CMAKE_LANG_LINK_LIBRARY_SUFFIX.rst
M       Source/cmComputeLinkInformation.cxx
M       Source/cmLocalGenerator.cxx

It appears from those documentation files that this commit would help
to solve both issues 1. and 2. above.  Therefore, my planned next step
is to rebase that commit on the upstream cmake master branch, and test
that patched upstream result to see if those limited internal CMake
changes allow fixing (with minor patching of cmake-d files) all
remaining cmake-d issues for the PLplot use case.

More later as the above plan unfolds....

Alan
__________________________
Alan W. Irwin

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.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
__________________________
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: Plan to deal with remaining D language support issues for PLplot

Alan W. Irwin-2
On 2019-08-21 13:37-0700 Alan W. Irwin wrote:

> I took a look at [another D support project that you recommended to me
> off list](https://github.com/trentforkert/cmake/) that project
> contained the following commit:
>
> Author: Ben Boeckel <[hidden email]>
> Date:   Tue Apr 15 00:21:15 2014 -0400
[...]
> [My] planned next step
> is to rebase that commit on the upstream cmake master branch, and test
> that patched upstream result to see if those limited internal CMake
> changes allow fixing (with minor patching of cmake-d files) all
> remaining cmake-d issues for the PLplot use case.

Indeed, all issues in (patched) cmake-d have now been solved by this
commit (now rebased to the cmake upstream cmake master branch which
required some conflict resolution).  The results for this patched
upstream cmake for all of gdc, ldc, and dmd pass our stringent tests
of our D examples (where we compare SVG plot file results for our ~30 D examples
with corresponding results for the equivalent C examples) for our
three major PLplot configurations (shared libraries + dynamic devices,
shared libraries + nondynamic devices, and static libraries +
nondynamic devices).

In order for PLplot users other than me to be able to take advantage
of these additional internal CMake capabilities for some future
release of upstream CMake, I request you pull the attached commit
(which is non-intrusive and rebased from your single commit above for
the trentforkert version) into the appropriate branch of upstream
cmake development.

Please let me know if there are any technical issues with this
pull request because it has been a long time since I
have made such a request to CMake developers.

Alan
__________________________
Alan W. Irwin

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.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
__________________________
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake

0001-linking-Support-language-specific-link-flags.patch.gz (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Plan to deal with remaining D language support issues for PLplot

Alan W. Irwin-2
On 2019-08-21 19:17-0700 Alan W. Irwin wrote:

> Please let me know if there are any technical issues with this
> pull request because it has been a long time since I
> have made such a request to CMake developers.

I have now made this pull request available on the bug tracker,
see <https://gitlab.kitware.com/cmake/cmake/issues/19631>.

Alan.

__________________________
Alan W. Irwin

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.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
__________________________
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake