| 1 |
|
| 2 |
pyPloticus is a python wrapper for libploticus. On my Mandriva 2009.1 system I was having trouble |
| 3 |
with an undefined symbol error after compiling libploticus 2.41 and then installing pyPloticus. |
| 4 |
It all compiled and installed OK but on importing the python module from inside the python |
| 5 |
interpreter I would get and "undefined symbol PLGG_pixpt" error. |
| 6 |
|
| 7 |
A small change to the ploticus Makefile has fixed this. As Steve says in his Makefile the shared |
| 8 |
library part of the Makefile hasn't been tested - well on Mandriva 2009.1 at least, it now has. |
| 9 |
|
| 10 |
The key changes to Makefile are |
| 11 |
|
| 12 |
1. Select option 5 by commenting out line 28 (option 1) and uncommenting lines 74 to 78. |
| 13 |
|
| 14 |
2. Lines 223 to 226 should look like this |
| 15 |
libploticus-static: $(OBJ) api.o gd00files gd16files |
| 16 |
$(RMCOM) libploticus.$(LIBEXT) |
| 17 |
$(ARCOM) libploticus.$(LIBEXT) $(OBJ) api.o $(GD16) $(GD) |
| 18 |
|
| 19 |
3. Add $(FPIC) to the compilation of gd00files and gd16files [THIS HAS BEEN DONE IN THE MAKEFILE -SG] |
| 20 |
|
| 21 |
4. Now "make clean" then "make" |
| 22 |
|
| 23 |
5. Copy your squeaky new libploticus.a file to /usr/lib (or if like me you have a 64 bit machine then |
| 24 |
/usr/lib64) but in the process rename the file to libploticus.so.0.0 (you have actually created a |
| 25 |
shared library but I think pyPloticus compilation expects a file with a ".a" extension). |
| 26 |
|
| 27 |
6. Run ldconfig -n /usr/lib (ldconfig -n /usr/lib64 for 64 bitters) |
| 28 |
|
| 29 |
7. You can now go to pyPloticus and first edit the setup.py file changing the plot_src_path to point to |
| 30 |
the location of the newly created libploticus.a file (something like plot_src_path="../pl241src/src/") |
| 31 |
|
| 32 |
8. Run "python setup.py install" |
| 33 |
|
| 34 |
You should now have it all set to go. |
| 35 |
Testing |
| 36 |
|
| 37 |
1. Start the python interpreter "python" |
| 38 |
|
| 39 |
2. try to import the ploticus module "import ploticus" |
| 40 |
You should get no errors at this point |
| 41 |
|
| 42 |
3. You can now try the pyPloticus examples "python plot.py graph.html" |
| 43 |
I get some errors listed but the graph srcc.png still get produced. |
| 44 |
|
| 45 |
Hope this help someone please tell me if you have other errors of if this works for you. |
| 46 |
|