On 2017-11-03 11:52-0000 Arjen Markus wrote:
Yes, I saw it [new Ada packaging for Cygwin] and I have updated my
installation.
Good.
I see the import library now, but my very preliminary
tests (test_ada and a simple build) have failed so far:
- test_ada does not produce an executable - see the tarball (sorry,
output to the screen is missing, but there was nothing much to see anyway).
- a simple build finds the static library and then the duplicate
symbols problem is back.
I guess PLplot needs to be told to use the import library before
trying the static one. I have not had time yet to do the manual steps that you suggest. On Linux I have tried the experiment of forcing the shared or static versions of gnat lib as follows: -DGNAT_LIB=/usr/lib/gcc/x86_64-linux-gnu/4.9/adalib/libgnat.so or -DGNAT_LIB=/usr/lib/gcc/x86_64-linux-gnu/4.9/adalib/libgnat.a The shared version (equivalent to the import library version for you) works both with -DBUILD_SHARED_LIBS=ON or OFF. (N.B. -DBUILD_SHARED_LIBS affects only how our Ada library is builtand does not affect how that library and our Ada executables are linked to external libraries such as gnat.)
The static version of the gnat library only works for the -DBUILD_SHARED_LIB=OFF case. (The Linux issue for the -DBUILD_SHARED_LIB=ON case is libgnat.a was built without the -fPIC flag, but I presume there are similar compilation flag issues when attempting to use libgnat.a for -DBUILD_SHARED_LIB=ON on Cygwin that cause the duplicate symbols issue you see there.) So I agree with you we should likely be fine if we always find the shared version of the gnat library on Linux and the import version of the gnat library on Cygwin (and other Windows platforms). That happens automatically (if not forcing like above) in the Linux case since CMake always prefers to find the shared version of libraries if given a choice with the same basename ("gnat" above with no version number). So that is why comprehensive testing of test_ada has "just worked" on that platform. But Windows has no standard naming conventions for libraries so you have to identify independently what filename corresponds to the import library (in the Cygwin case that filename is libgnat-6.dll.a, but who knows, for example, what it might be for MinGW-w64/MSYS2 or some arbitrary build of the gnu tool chain on Windows) so we have to be quite specific for what library name we want to find in the Windows case in order to guarantee we have the import form of the gnat library. The attached commit makes this change for the Cygwin case (and fills in something generic for the non-Cygwin Windows case which will likely need to be corrected in the future for the MinGW-w64/MSYS2 case). When you get a chance please commit this change on a local topic branch using "git am" and try it out on Cygwin using cmake/test_ada/scripts/comprehensive_test.sh 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 __________________________
0001-test_ada-build-system-Find-the-non-static-version-of.patch.gz
Description: test_ada build system: Find the non-static version of the gnat library on Cygwin
------------------------------------------------------------------------------ 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