On 2015-02-23 21:51-0000 Phil Rosenberg wrote: > Hi Alan and Jim > I just tested the patch on my Centos machine and got the following build error > > make[3]: *** No rule to make target `/usr/lib64/libltdl.so', needed by > `src/libplplot.so.12.0.1'. Stop. > > make[2]: *** [src/CMakeFiles/plplot.dir/all] Error 2 > > make[1]: *** [utils/CMakeFiles/wxPLViewer.dir/rule] Error 2 > > make: *** [wxPLViewer] Error 2 > > I don't know if this is a show stopper?
@Phil: libltdl is a necessary library for PLplot in the shared library case so that it can dynamically load driver dll's. So this is indeed a showstopper on CentOS, but since this error has nothing to do with my patch (or yours, if that is what you were referring to), and you did not encounter this missing libltdl.so before I am wondering if there was something different concerning your test conditions for CentOS. For example, did you try static libraries before (which would not required libltdl), but default shared libraries this time? In any case, the solution is to install libltdl on CentOS. > > However, I have just been looking at random number generation code. A > basic random number generator is only a handful of lines of code and > it can be seeded from the system entropy using either rand_s on > windows or /dev/random on Linux/mac. I have attached a patch. This > works on Windows fine, but I can't test it on Linux until tomorrow > morning. You can test it by applying it to the current master branch. Your patch applies fine to master tip, but there is an obvious parentheses error in the result for the Unix case which I had to fix as follows: software@raven> git diff diff --git a/drivers/wxwidgets_dev.cpp b/drivers/wxwidgets_dev.cpp index 5caabcd..bcd2860 100644 --- a/drivers/wxwidgets_dev.cpp +++ b/drivers/wxwidgets_dev.cpp @@ -113,7 +113,7 @@ public: rand_s( &m_seed ); #else std::fstream fin( "/dev/random", std::ios::in ); - fin.read( (char*)(&m_seed), sizeof( m_seed); + fin.read( (char*)(&m_seed), sizeof( m_seed) ); fin.close(); #endif } @Jim: Forget my patch and instead apply Phil's (to master tip). You will also have to edit wxwidgets_dev.cpp to make the above further change as well before you test wxwidgets. @Phil: Once I made that above change, everything worked fine on Debian stable, e.g., the following results were found for three successive invocations of example 1 with -debug: wxPLDevice::SetupMemoryMap: nTries = 0, mapName = plplotMemoryMapEYTRFDKWTD wxPLDevice::SetupMemoryMap: nTries = 0, mutexName = plplotMemoryMapEYTRFDKWTDmut wxPLDevice::SetupMemoryMap: nTries = 0, mapName = plplotMemoryMapULZJXZHJXL wxPLDevice::SetupMemoryMap: nTries = 0, mutexName = plplotMemoryMapULZJXZHJXLmut wxPLDevice::SetupMemoryMap: nTries = 0, mapName = plplotMemoryMapWBNAXBQUSR wxPLDevice::SetupMemoryMap: nTries = 0, mutexName = plplotMemoryMapWBNAXBQUSRmut So it is producing the desired different randomized names each time. Therefore, assuming Jim finds similar good results on Mac OS X and you can verify your (parentheses-modified) patch also works on CentOS and Ubuntu, then it appears we have a winner! Anticipating that good result, thanks very much for hanging in there to finally find a cross-platform fix for this issue that we can all be happy with. 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 __________________________ ------------------------------------------------------------------------------ Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk _______________________________________________ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel