From: Alan W. I. <ir...@be...> - 2006-09-22 01:26:36
|
I recently expressed a "bright idea" on plplot-general for dealing with the ENABLE_DYNDRIVERS OFF case and the C++ device drivers. The idea was to split off the C++ drivers into their own library rather than mixing that C++ object code into the core C library. Only problem is this causes cross-dependencies; this proposed library defined symbols required by our core library and vice versa. Such cross-dependencies should be avoided since they cause linking issues on many platforms. The autotools book even has a special section on avoiding cross or circular library dependencies. Unfortunately, I wasted a lot of time on the idea until I figured out it was not so bright. That's when I thought to post to the CMake list about whether there was any real problem with the alternative of mixing C and C++ object code in the same library, and I have been assured there that KDE does that with no problems which is consistent with Geoffrey's post on the same issue. Therefore, I have decided to make the experiment of allowing both the psttf and wxwidgets device drivers when ENABLE_DYNDRIVERS OFF. Some changes had to be made to get this to work, but the result passes the usual ctest results for the following possibilities: (1) default (-DBUILD_SHARED_LIBS=ON[default] -DENABLE_DYNDRIVERS=ON[default]) (2) disabled dynamic drivers (-DBUILD_SHARED_LIBS=ON[default] -DENABLE_DYNDRIVERS=OFF) (3) static build (-DBUILD_SHARED_LIBS=OFF -DENABLE_DYNDRIVERS=OFF[this value forced when BUILD_SHARED_LIBS is OFF]) N.B. case (3) still uses shared external libraries, although the PLplot libraries are static. The first two also passed the install tree examples build and execute test so I have recently committed all my work. Please test these changes to our CBS on the platforms accessible to you. The current status is there is a library ordering problem with the build of the installed examples for case (3) above which I should be able to sort out tomorrow. Once that works, then I will be in a good position to finally answer the interesting (paraphrased) question on plplot-general of whether for Linux systems it is possible to make a completely static build of PLplot. That can be implemented by the combination of case (3) above plus use of the linker option -Bstatic to force static linking to external libraries. I think the answer to the question must be yes, but it may take some time to get to that answer since library ordering is even more critical for that case then it is for case (3) above. 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); PLplot scientific plotting software package (plplot.org); the Yorick front-end to PLplot (yplot.sf.net); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __________________________ Linux-powered Science __________________________ |