On 2007-04-09 12:02-0700 Alan W. Irwin wrote:

Note, since we must configure plplotd-wxwidgets.pc in any case to give the
users access to our wxwidgets binding library, then I think it is less
complicated for the user (and consistent with the approach used for all the
rest of our bindings) to not require them to supplement pkg-config with
wx-config like I had to do above to build the wxwidgets example. The
required changes to the configuration of plplotd-wxwidgets.pc are clear.  We
already have ${wxWidgets_INCLUDE_DIRS}, ${wxWidgets_DEFINITIONS}, and
${wxWidgets_LIBRARIES} internally available for our CMake build system so it
is a straightforward matter to configure plplotd-wxwidgets.pc with those
variables (appropriately transformed to the pkg-config form as in the other
bindings).

Werner, are you willing to go along with this approach? If so, I will take
responsibility for implementing it.

Hi Werner:

Since you didn't respond, I assumed you were busy with something else so I
went ahead and implemented the improved plplotd-wxwidgets.pc which allows
the user to drop any use of wx-config.  While I was at it, I also
implemented an install-tree build of wxPLplotDemo (revision 7665).

That does give an automatic install-tree build (without any necessity for
wx-config) of wxPLplotDemo on Ubuntu Dapper.  Just run "make" in the
installed examples directory.  The resulting wxPLplotDemo executable passes
the ldd -r test as well as producing a good-looking plot without any obvious
errors.  However, the rest of my previous report about a clean valgrind
result is completely bogus because I made the mistake of running "valgrind
test" (which tests /usr/bin/test and gives a clean report for that tiny
executable) rather than the local test executable that I had hand-compiled.

I have attached compressed versions of the valgrind results produced
by

valgrind --num-callers=80 ./wxPLplotDemo >& valgrind.out

and

valgrind --num-callers=100 ./x10 -dev wxwidgets >& valgrind10.out

The summaries are respectively

==5178== ERROR SUMMARY: 524 errors from 16 contexts (suppressed: 95 from 1)
==5244== ERROR SUMMARY: 168 errors from 18 contexts (suppressed: 35 from 1)

i.e., both are horrible, but wxPLplotDemo which uses libplplotwxwidgetsd is
~3 times worse than example 10 with the wxwidgets device.  I don't know how
significant that difference is because example 10 results (two nested boxes
with some lettering) are rather simple compared to the results from
wxPLplotDemo, but it still might be well worth comparing the two reports to
see if there is anything obviously wrong with the memory management of
wxPLplotDemo and libplplotwxwidgetsd compared to the memory management of
the wxwidgets device.  (We know there is something obviously wrong with
wxPLplotDemo and libplplotwxwidgetsd on Winson's windows platform and these
Linux valgrind results may shed some light on that issue.)

We went through a similar valgrind exercise recently for libLASi and
libpango, and I have to regretfully conclude that the major Linux desktop
libraries (especially anything in the GTK+ stack of libraries such as
libpango which is also showing up here in these reports) are getting
extraordinarily cavalier about valgrind issues.  In the old days, the
general rule was that Linux libraries just did not have valgrind issues.
Sometimes, they had some well-understood special code which generated a
false positive valgrind report, but they were careful to issue a
configuration file to suppress valgrind reports concerning that special code
(see the suppressed results in the two ERROR SUMMARY lines above).  So, for
example, KDE claimed at one point they had no remaining valgrind issues.
Unfortunately, that is no longer the case for KDE and the GTK+ stack of
libraries appears to be even worse from a recent series of valgrind tests
done by Ed Trager and reported to the libLASi list. The unfortunate result
is there is so much valgrind noise from the standard desktop libraries
(especially GTK+) that it is difficult to tell when your own code has memory
management issues. Anyhow, these valgrind reports for the two wxwidgets
cases (use of libplplotwxwidgetsd and use of the wxwidgets device) are
attached here in the spirit of "for what it is worth".

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
__________________________

Attachment: valgrind.out.gz
Description: Compressed valgrind report for wxPLplotDemo

Attachment: valgrind10.out.gz
Description: Compressed valgrind report for -dev wxwidgets and example 10

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to