Re: [Plplot-devel]   D language support topic (success for test_d on Darwin!)

2019-09-29 Thread Alan W. Irwin

On 2019-09-24 17:24-0700 Alan W. Irwin wrote:


But the other issue (where our various thread library needs are met by
the -pthread *compiler* option used for linking which neither dmd nor
ldc2 understands) has proved much more difficult to solve (even though it
is extremely easy to solve the issue by hand) *within the current
constraints imposed by CMake*.


See  for a CMake
feature request that would elegantly solve this issue.  But meanwhile,
I have implemented (commit ab8a90546 git-described as
plplot-5.15.0-44-gab8a90546) for the test_d project a workaround for
the current lack of am implementation for the 19757 feature
request. That workaround gives good results for dmd and ldc2 for an
updated test_d project and gdc (which does not require the workaround)
continues to work well for that updated test_d where (as in the plplot
project case) the test_d C library is linked with the -pthread option.
So this commit is a considerable step forward for test_d and
implements a workaround for the above issue that should also work
(once I implement it) for the plplot project case.

@Takeshi: would you please test the (updated) test_d project on your
Mac OS platform following what the (updated) cmake/test_d/README file
says?  Note, that file tells you how to build an extremely specific
version of dmd that has the -Xcc capability that my current D language
support for dmd needs.  This variant of dmd is being considered for
the next release of dmd, and likely the dmd developers will favor it
for inclusion the more platforms we use to test it (see the latter
part of the discussion at 
and also the on-going discussion at
).  So we are right at the
"cutting edge" of dmd development now with a lot of care required to
build the dmd versions that we need, but in a year from now I am
hoping that the -Xcc dmd capability is just part of mainstream dmd
versions that are being released with no special version of dmd being
required for our D language support.

More later as I transfer from the test_d project to the plplot project
what I have learned about a solution to the above -pthread issue.

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
__


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


Re: [Plplot-devel]   D language support topic (success for test_d on Darwin!)

2019-09-24 Thread Alan W. Irwin

On 2019-09-15 15:35-0700 Alan W. Irwin wrote:


Hi Takeshi:

[...]

I would appreciate you
testing that result [plplot-5.15.0-34-g6b47c717e] for the test_d project (to 
make sure my further
one-line change I committed beyond what you have tested already did
not screw anything up) and also (if that test is a success) the plplot
project itself.


For the others here I subsequently contacted Takeshi (and Arjen for
the MSYS2 case) off list to put those tests on hold because I wanted
to fix some additional issues I discovered when I attempted to
comprehensively test ldc2 and dmd on Linux for a PLplot with all
possible Linux components configured (as opposed to the good
comprehensive tests results on my Linux platform that I get
for a PLplot where only the C and D components were
configured).

The rest of this post is a status report on the remaining D build-system
issues for a fully configured PLplot on Linux.

I solved one of the issues (where Qt5 was polluting the D builds in
the static case with the -fPIC compile option which ldc2 did not
understand) by using the target_link_libraries PRIVATE option for the
static library build.

But the other issue (where our various thread library needs are met by
the -pthread *compiler* option used for linking which neither dmd nor
ldc2 understands) has proved much more difficult to solve (even though it
is extremely easy to solve the issue by hand) *within the current
constraints imposed by CMake*.  For those interested, I have just
posted a detailed report about this CMake-based build-system limitation
and a possible feature request to solve it at
.

As part of writing up that post today, I thought up a workaround for
the issue that is a bit messy (since part of the workaround requires
an extra library called PLPLOT::plplot_nothread to be built that is
exactly the same as PLPLOT::plplot except for its modified
INTERFACE_LINK_LIBRARIES property), but I think it will work until the
day (if it ever comes) when the CMake developers decide to implement
the above possible feature request.

In sum, at least I finally have a plan to work around this issue,
and (because a fair amount of build-system changes will be required) I
hope to implement that plan (unless the CMake developers advise me of
a simpler way to do the same thing) by (very roughly) the end of this
week.  Furthermore, the hold on non-Linux platform testing of D language
support should continue for both Takeshi and Arjen until I demonstrate
that the three D compilers all pass comprehensive testing of a fully
configured PLplot on my platform.

So until then...

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
__


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


Re: [Plplot-devel]   D language support topic (success for test_d on Darwin!)

2019-09-15 Thread Alan W. Irwin

On 2019-09-15 09:48- 榎本 剛 wrote:


Alan,

The test was a success.


Hi Takeshi:

I am now taking this discussion back to the plplot-devel mailing list.

Thanks for all your work in obtaining this good D language support
test result for the test_d project for your Darwin dmd (MacPorts)
platform.  I made one additional (untested) change to Darwin-dmd.cmake
for the reasons discussed in the commit message for
plplot-5.15.0-34-g6b47c717e.  Please update your local git repository
to the latest master branch version (so you have access to that commit
and there will be no need to patch PLplot).  I would appreciate you
testing that result for the test_d project (to make sure my further
one-line change I committed beyond what you have tested already did
not screw anything up) and also (if that test is a success) the plplot
project itself.

The rest of this post concerns that further comprehensing testing of the plplot 
project.

That is done by changing directory to the top-level directory of the PLplot 
source
tree (so NOT cmake/test_d) and running

scripts/comprehensive_test.sh --help

to get a sense of what is available for that much more sophisticated 
comprehensive
testing script than you ran for the test_d case.

Now the thing to remember about this script is it really is
comprehensive by default.  So usually you constrain it to avoid doing
tests that are currently not relevant to some topic such as D language
support for the plplot project.

So please look in the PLplot git log for commit f7d9bec368f3 where I
demonstrate how to limit that comprehensive test to just the D
binding and examples, the svg device, and (by default since these
components are always part of testing) the core C library and the
C examples.  Of course, for that test I did a lot of special things
relevant to my own platform such as testing blanks in source-, build-,
and install-tree pathnames.  So you don't want to repeat exactly
what I did.  So instead, here is my best (informed by what you
did for test_d) guess concerning how you would modify that plplot
comprehensive test invocation for your own needs:

# Important
cd 

# Important, set DC environment variable to select D compiler and
# options for that compiler and set PATH environment variable to
# access a CMake version >= 3.15.20190829-g3ec986c that has (on your
# platform) the essential CMake master branch fix needed so that D
# language support works for dmd.  Also drop the interactive
# component of comprehensive testing since that is not relevant
# to D.
env DC="/opt/local/bin/dmd -v" PATH=/usr/local/cmake/bin:$PATH scripts/comprehensive_test.sh 
--cmake_added_options "-DDEFAULT_NO_BINDINGS=ON -DENABLE_d=ON -DDEFAULT_NO_DEVICES=ON -DPLD_svg=ON" 
--build_command "make -j18" --ctest_command "ctest -j18" --do_test_interactive no)

Note that script run will be noticeably longer (but likely not too bad
because of all the above constraints limiting the test) compared to
the test_d script run because this script does much more than happens
for test_d (for example running all the PLplot C and D examples and
comparing those results for 15 different combinations of 2
test_noninteractive tests + 2 ctests + 1 traditional test (for 5 tests
in all) for our 3 different major configurations.

As with test_d, regardless of whether that script run is a success or
not, please collect the report tarball (which by default will be
stored in a different prefix area than in the test_d case) and send it
to me for further analysis.

Good luck with this (PLplot) constrained comprehensive test which when
it is a success will demonstrate improved D language support for both
the upstream version of PLplot that I have been helping to maintain
and ultimately the MacPorts port of PLplot that you have been
maintaining.

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
__


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