On 2011-11-23 19:27-0800 Alan W. Irwin wrote: > Here are my further plans: > > Implement the NON_TRANSITIVE option for our build system that will > drop transitive linking for the CMake case and replace Requires: by > Requires.private: for the pkg-config case. This option will be > experimental and will default to OFF. Then I plan to go through our > languages (starting with C++) one by one to deal with all the various > issues that are found with turning that option ON. >
DONE and completely tested for the shared library case on my Debian stable platform for C++ (as of revision 12033). The "ldd -u" results for the C++ examples are extremely abbreviated compared to those for C, e.g., software@raven> ldd -u examples/c/x01c Unused direct dependencies: /home/software/plplot_svn/HEAD/build_dir/src/libplplotd.so.11 /lib/libm.so.6 /usr/lib/libltdl.so.7 /lib/libdl.so.2 /home/software/plplot_svn/HEAD/build_dir/lib/csa/libcsirocsa.so.0 /home/software/plplot_svn/HEAD/build_dir/lib/nn/libcsironn.so.0 /home/software/qhull/install/lib/libqhull.so.5 /home/software/plplot_svn/HEAD/build_dir/lib/qsastime/libqsastime.so.0 /usr/lib/libfreetype.so.6 software@raven> ldd -u examples/c++/x01 Unused direct dependencies: /home/software/plplot_svn/HEAD/build_dir/bindings/c++/libplplotcxxd.so.10 /lib/libm.so.6 /lib/libgcc_s.so.1 In fact, the rpmlint tests for unused direct dependencies may not be quite equivalent to "ldd -u" since that command obviously provides erroneous results above, e.g., we know that direct linking of libplplotcxxd and libm is required for the C++ examples and those libraries are definitely used as well contrary to what is reported by "ldd -u". A similar situation may apply for libgcc_s so that you might get a completely clean rpmlint report for the C++ examples. (But currently libplplotcxx will still have warning messages because I haven't yet implemented non-transitive linking for our C libraries). Another issue is my Debian stable system had no problems with the call to c_plrandd (resolved only by libplplotd) in C++ example 17 even though I checked that in all the three cases (build tree and traditional and CMake-based installed examples), the example was linked just with libplplotcxxd and not libplplotd. So the only way I can explain this difference between my results and yours (assuming you confirm problems with example 17 still persist) is the Debian stable run-time loader resolves symbols by promiscuously searching through all the indirectly linked libraries (e.g., libplplotd linked by libplplotcxxd but not the C++ examples) while the Fedora run-time loader only searches through directly linked libraries (i.e., libplplotcxxd for the C++ examples) so it cannot resolve the c_plrandd symbol in x17.cc. Orion, just for now I am going to leave the call to plrandd (a.k.a. c_plrandd) in examples/c++/x17.cc as a test to see whether you continue to get the bad C++ results on Fedora because of that. Here is how I tested the C++ case (and I suggest you do the same) where PL_PREFIX is an environment variable set to your preferred PLplot install prefix which should be initially empty just like the directories I create below with mkdir. mkdir build_dir cd build_dir cmake -DCMAKE_INSTALL_PREFIX=$PL_PREFIX \ -DBUILD_TEST=ON -DDEFAULT_NO_BINDINGS=ON -DENABLE_cxx=ON \ -DNON_TRANSITIVE=ON /path/to/top/of/source_tree # Build tree test: make test_diff_psc # Prerequisite for installed examples tests: make install # CMake-based installed examples: mkdir install_build_dir cd install_build_dir cmake $PL_PREFIX/share/plplot5.9.9/examples make test_diff_psc # Traditional installed examples: cd .. mkdir traditional_build_tree cp -a $PL_PREFIX/share/plplot5.9.9/examples traditional_build_tree cd traditional_build_tree/examples make compare If C++ example 17 gives trouble (which I assume it will) please replace the plrandd C call with the correct C++ form and try the above tests again. If that works, I will commit the change as well. Assuming you do prove that Fedora is more unforgiving than Debian stable, then my plan is to get rid of all errors generated by -DNON_TRANSITIVE=ON one language at a time (just like I have just done for C++), and then pass off the further testing of that language to you to see what further changes have to be made for that language to satisfy Fedora. I am game to keep going with this as long as you are! 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 __________________________ ------------------------------------------------------------------------------ All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-novd2d _______________________________________________ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel