From: Arjen M. <Arj...@de...> - 2015-07-05 13:57:28
|
Hi Alan, I have attached the result of the comprehensive_test.sh script on Cygwin. This time I had an X server running, so that Tk is properly recognised as a valid option. The "shared" build succeeds, but the "nondynamic" build fails: CMakeFiles/plplot.dir/__/bindings/tcl/tclAPI.c.o:tclAPI.c:(.text+0xacc): undefined reference to `__imp_plplotLibDir' CMakeFiles/plplot.dir/__/bindings/tcl/tclAPI.c.o:tclAPI.c:(.text+0xacc): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `__imp_plplotLibDir' collect2: error: ld returned 1 exit status I guess this is due to confusion between static and dynamic linking - plplotLibDir has the attribute PLDLLIMPEXP. I have not tried to analyse the precise cause. Regards, Arjen Arjen Markus Sr. Adviseur/Onderzoeker T +31(0)88335 8559 E arj...@de... [Logo]<http://www.deltares.com/> www.deltares.com<http://www.deltares.com/> Postbus 177 2600 MH Delft [Deltares Twitter] <http://www.twitter.com/deltares> [Deltares LinkedIn]<http://www.linkedin.com/company/217430> [Deltares Facebook]<https://www.facebook.com/pages/Deltares/154189334634001> [Think before printing]Please consider the environment before printing this email > -----Original Message----- > From: Alan W. Irwin [mailto:ir...@be...] > Sent: Wednesday, June 17, 2015 9:09 PM > To: Arjen Markus > Cc: plp...@li... > Subject: RE: [Plplot-devel] Comprehensive testing on Cygwin with Tcl/Tk/Itcl/Itk and > Ada > > On 2015-06-17 10:39-0000 Arjen Markus wrote: > > > Hi Alan, > > > > > > > > Hm, something is failing in the non_dynamic tests: > > > > CMakeFiles/pltcl.dir/pltcl.c.o:pltcl.c:(.text+0x20e): undefined reference to > `__imp_Pltcl_Init' > > > > CMakeFiles/pltcl.dir/pltcl.c.o:pltcl.c:(.text+0x20e): relocation truncated to fit: > R_X86_64_PC32 against undefined symbol `__imp_Pltcl_Init' > > > > So your latest changes regarding the reduction of the llibraries for the non-dynamic > drivers seem to have introduced a bug. I have attached the complete tarball. > > Hi Arjen: > > Thanks for this test. > > I. Comments on your setup of this test. > > For some reason there was a regression in your X setup so that you are now > encountering that DISPLAY issue again. The message (in > cmake.out) was > > Application initialization failed: no display name and no $DISPLAY environment > variable > > I encourage you to automate your X setup to avoid this regression in behaviour in > future. > > Also please drop the -DENABLE_itk=OFF workaround which should not be > necessary if you have all Tcl/Tk/Itcl/Itk/Iwidgets packages properly installed on > Cygwin. And if those are not properly installed, please fix that. > > Also, in retrospect it was a good idea for you to be cautious and test first with -- > do_test_interactive no. But once the current issue is fixed, I will encourage you to > drop that restriction so that all the Tcl, etc., interactive results can also be run-time > tested. > > II. Comments on the bug you found. > > The link command that is failing above is (after line wrapping at each white space to > help clarify the command and redacting the many irrelevant > parts) > > /usr/bin/cc > -Wl,--enable-auto-import > CMakeFiles/pltcl.dir/pltcl.c.o > -o > pltcl.exe > -Wl,--out-implib,libpltcl.dll.a > -Wl,--major-image-version,0,--minor-image-version,0 > ../../dll/libplplottcltk_Main.dll.a > /usr/lib/itcl3.4/libitcl3.4.dll.a > -ltcl > ../../dll/libplplot.dll.a > [...] > /usr/local/lib/libLASi.dll.a > [...] > /usr/local/lib/libshp.a > [...] > > II A. The /usr/local issue. > > Sorry I did not notice this issue before. My assumption is that anything in /usr/local > cannot be due to an official Cygwin install so should be avoided (at least for now). > So to follow up on this I looked for "local" in cmake.out and found the following: > > -- TCL_INCLUDE_PATH = /usr/local/include > > -- FindShapelib: Found shapelib header directory, /usr/local/include, and library, > /usr/local/lib/libshp.a. > > libplplot_LINK_FLAGS = > /usr/lib/libltdl.dll.a;/usr/lib/libdl.a;/usr/local/lib/libshp.a;/usr/lib/libfreetype.dll.a;- > lcsirocsa;-lcsironn;-lqhull;-lqsastime > > So please do the appropriate /usr/local renaming (perhaps of all of > /usr/local) to force CMake to find the official Cygwin versions of Tcl, shapelib, and > libLASi which I presume you have long-since already installed. The result should be > no mention of /usr/local in cmake.out the CMake cache files or any of your build > commands. > > I suspect all those /usr/local results are leftovers from an epa_build attempt you did > long ago. At some point you might want to try epa_build again (but with an install > prefix other that /usr/local so the results don't necessarily take CMake precedence > over all others), but only after you make sure all the official Cygwin packages work. > > II B. The linking issue with pltcl that you discovered above. > > The above link command for pltcl shows that libplplot is properly linked. So one > possibility to explain this is either Pltcl_Init is not defined in the plplot library or it is > defined in that library but not visible. To check that, please use the nm command > (which likely is already installed, but if not you should be able to find it in > binutils-2.25-2) as follows: > > # Change to _nondynamic_ build directory > cd ../comprehensive_test_disposeable/nondynamic/build_tree/ > # Build plplot library (which was cleaned by the script) in the # nondynamic case > make plplot # Test for definition of Pltcl_Init in that library nm --defined-only > <library_name> |grep Pltcl_Init > > where <library_name> is the appropriate name of the plplot library you just built. > Here that is src/libplplot.so, but I am aware there are two locations (in src and in dll) > of the plplot library for Cygwin, and I don't know which one you should be using with > the nm command so you will have to experiment to find which to use with nm. > > The result of the above command here is > > 000000000008f120 T Pltcl_Init > > which indicates that symbol is defined in the plplot library and you should be getting > something similar there. > > Once you have proved that symbol is defined in the plplot library the next issue is > whether that symbol is externally visible. "nm" tests symbol visibility with the -- > extern-only option, e.g., > > nm --extern-only --defined-only <library_name> |grep Pltcl_Init > > and if Pltcl_Init is externally visible you should get the same result whether --extern- > only is used or not. And that proved to be the case here when I compiled with > > CXXFLAGS=-O3 -fvisibility=hidden -Wuninitialized > CFLAGS=-O3 -fvisibility=hidden -Wuninitialized > > which should make gcc act very similarly on Linux to the way it handles visibility > issues for C or C++ library on Windows. > > So from my good visibility results here, I am pretty sure visibility should not be an > issue for you there, but please get back to me with the Pltcl_Init definition and > visibility results via the "nm" command for the plplot library for the nondynamic case > to confirm that (or not), and we can take it from there. > > 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 > __________________________ > DISCLAIMER: This message is intended exclusively for the addressee(s) and may contain confidential and privileged information. If you are not the intended recipient please notify the sender immediately and destroy this message. Unauthorized use, disclosure or copying of this message is strictly prohibited. The foundation 'Stichting Deltares', which has its seat at Delft, The Netherlands, Commercial Registration Number 41146461, is not liable in any way whatsoever for consequences and/or damages resulting from the improper, incomplete and untimely dispatch, receipt and/or content of this e-mail. |