From: Alan W. I. <ir...@be...> - 2001-11-24 17:00:28
|
On Sat, 24 Nov 2001, [iso-8859-1] Jo=E3o Cardoso wrote: **Reordered to get the small issues out of the way first:** > jcard@rick:~/tmp/plplot/tmp > ./pythondemos.py -dev ps -o po.ps > Device not loaded! > tag=3Dpsm, drvidx=3D5 > Trying to load ps.drv on ./drivers/ps.drv > Opened po.ps > Traceback (innermost last): > File "./pythondemos.py", line 23, in ? > import xw01 > File "/home/jcard/tmp/plplot/tmp/xw01.py", line 141, in ? > main() > File "/home/jcard/tmp/plplot/tmp/xw01.py", line 20, in main > plot1(6., 1., 0., 0.) > File "/home/jcard/tmp/plplot/tmp/xw01.py", line 63, in plot1 > plpoin(xs, ys, 9) > TypeError: Array can not be safely cast to required type > > The above message happens for most, but not all, examples. I believe that is because you didn't configure with double. Currently python only works if double is configured. Anyhow, once you have double configured you should have no problems with the postscript driver and pythondemos.py. > There is some configure problems with pyqt. I dont have it installed, > but it is build anyway! It looks like configure don't check for it. pyqt_plmodule.c is probably misnamed. It has some support functions that are called from the example prova.py+qplplot.py, but those support function= s are generic and and don't actually refer to pyqt. Thus, pyqt_plmodule.c ca= n be built regardless of whether pyqt is there or not. It is only the example prova.py+qplplot.py that imports qt and thus, that is the only place where it makes a difference whether pyqt is available or not. If that module is not available on your system, you just simply get the normal python error message to that effect when you run the example ./prova.py. > > Also, I have problems with "make" after the first sucesseful make, > i.e., the first make runs OK, but the second and next give the > following message: > > > touch plline.c > > make > > .... > > Building Python module. > > echo 'pl plmodule.c plmodule2.c -I. -I/usr/include/python1.5 > -I/usr/include/python1.5/Numeric -L.. -L. -lplplot -ltclmatrix > -ltk8.3 -ltcl8.3 -L/usr/X11R6/lib -lX11 -ldl -lm -Wl,-rpath > -Wl,/home/jcard/tmp/plplot/tmp' >> python_dynamic/Setup.in > cd python_dynamic ; make -s -f Makefile.pre.in boot ; make -s ; \ > mv -f plmodule.so .. > mv: plmodule.so: No such file or directory > make: *** [plmodule.so] Error 1 > Yes, that is a minor configuration issue I have not sorted out. To get around it rm python_dynamic/Setup before each fresh make after the first. > On Saturday 24 November 2001 00:32, Alan W. Irwin wrote: > | With plplot tree freshly updated from CVS, I configure like I > | normally do, e.g., > | > | ./configure --prefix=3D/usr/local/plplot --with-double > | --enable-dynamic-drivers --enable-java --enable-gnome > & ! > | configure.out > | > | Then from tmp I executed > | ./pythondemos.py -dev png > | Unable to load driver: gd.drv. > | Reason: /usr/local/plplot/lib/drivers/gd.drv: undefined symbol: > | plP_setpxl Segmentation fault > | > | First, why should a test in tmp refer to some previously installed > | version in /usr/local/plplot? > | Second, when I removed /usr/local/plplot/* I got a new error > | message: > | > | ./pythondemos.py -dev png -o temp.png > | Unable to load driver: gd.drv. > | Reason: /usr/local/plplot/lib/drivers/gd.drv: cannot open shared > | object file: No such file or directory > | > | So somehow /usr/local/plplot is hardcoded in the python case. With > | /usr/local/plplot removed, I have no trouble with the png driver > | for the x01c example, and the psc driver works both for the x01c > | and pythondemos.py examples. > | > | I am virtually positive I checked the png driver before when I was > | first testing pythondemos.py. Since then, I have changed to > | python-2.1 and Joao has made some driver changes so I don't know > | which is causing the trouble. Joao, can you replicate this problem > | on your (presumably) python-1.5 system? > > Not exactly: > > jcard@rick:~/tmp/plplot/tmp > ./pythondemos.py -dev png -o po.png > Device not loaded! > tag=3Dpng, drvidx=3D4 > Trying to load gd.drv on ./drivers/gd.drv > Trying to load at /usr/local/test/lib/drivers/gd.drv > Unable to load driver: gd.drv. > Reason: /usr/local/test/lib/drivers/gd.drv: cannot open shared object > file: No such file or directory > Segmentation fault > > I have plcore modified to print diagnostics while trying to load > dynamic drivers, thus the more verbose output. > > I'm using python-1.5.2. Once you have changed over to double, pythondemos.py should work fine with the psc driver. It is only the png driver where there is a problem as you confirm above for python-1.5. From your above extra diagonistics it looks like it cannot find gd.drv first in tmp/drivers.gd.drv then in the install location. What is different about the gd.drv setup compared to the ps.drv setup? Alan email: ir...@be... phone: 250-727-2902=09FAX: 250-721-7715 snail-mail: Dr. Alan W. Irwin Department of Physics and Astronomy, University of Victoria, P.O. Box 3055, Victoria, British Columbia, Canada, V8W 3P6 __________________________ Linux-powered astrophysics __________________________ |