From: Alan W. I. <ir...@be...> - 2001-11-06 16:34:02
|
On Tue, 6 Nov 2001, Victor Munoz wrote: > > I'm working with a Debian potato Linux distribution, and instead of > dowloading the distribution's release 4.99j, which a friend of mine > (who's much more expert than me in Linux) told me had compilation > problems. Anyway, he gave me the 5.0.4 tar file, which worked for him > without much difficulty. That is correct. 5.0.4 is the version we support. 4.99j is from many years ago with a large number of bugs which have been fixed in 5.0.4. > I followed the installation steps (configure, > make, make install), and when I tried to compile the demos (make x01c, for > instance), I had no xwin terminal listed, though I could save the output > as postscript, for instance. The command line I gave to configure was > > configure --with-double --enable-xwin --enable-octave --enable-gnome X and octave are found by default so you don't need those options. The default prefix is /usr/local/plplot according to ./configure --help, but I always specify it so I haven't actually tested that default. gnome does have to be specified because it is experimental. So on my potato system (which was actually a test bed for the 5.0.4 release) I used ./configure --prefix=/usr/local/plplot --with-double --enable-gnome and the config summary showed it set everything to "yes" (see next comment). > > However, as I said, the config summary stated "enable_xwin: no", > "enable_octave: no" and "enable_gnome: no". You cannot force these options. The config summary shows "yes" only if you have specified yes (or it is the default) *AND* you have installed the "devel" versions of all the relevant packages. For example, to compile anything against the XFree86 library, you need both the xlibs and xlibs-dev packages installed on your system. Presumably, at the time you tried this you didn't have those. Thus, the configure could not find the relevant X files so it rightly turned off X (and therefore lots of other things that depend on X). > > I tried deleting installed files and starting again, or > copying the already configured files which worked so fine for my friend, > but it did not work. Eventually, my friend told me not to try > --enable-octave and --enable-gnome, because he had the same problem I had, > that somehow the "yes" turned out to be a "no". He also suggested to > install the Debian distribution's plplot version to have octave support, > because this did work well, and I did. Was that the 5.0.2 version available for potato from our web site? Instructions about how to obtain those versions for potato=stable are given on http://plplot.sourceforge.net/resources/index.html. That version is not bad, but there are still some bugs in it that have been fixed in 5.0.4, and also the debian 5.0.2 package does not include octave. The debian package for 5.0.4 (including octave) is being held up because, Rafael, a member of our core team and also the official Debian packager has been busy for several months with his new job. Thus, for now, until he can find time to officially package 5.0.4, I would recommend for all Debian users the 5.0.4 tarball approach that you have used. > > We don't know what happened with all these trials, but the fact is that > the next time I untared the 5.0.4 files to try again, and I typed > > configure --with-double > > xwin appeared among the enabled options in the config summary! This was > not the only weird thing, because the prefix had been changed to /usr, > instead of /usr/local/plplot. All my previous trials had the > /usr/local/plplot prefix, so I don't know. My friend's configured version > (which I also tried to install as I said) had the /usr prefix, but I > couldn't guess why this could affect later installations (I logged out in > case some environment variable was somehow set, but the prefix still was > /usr). So I ended up saying > > configure --with-double --prefix=/usr/local/plplot > > and everything worked fine. See comments above. At some time in your trials you must have installed xlibs-dev. Also, I am quite concerned that you now have bits and pieces of different versions of plplot scattered all over your system. Make sure you remove all debian packages having to do with plplot. They are either extremely dated (4.99j) or somewhat dated (5.0.2), and you don't want those bits and pieces interfering with your good 5.0.4 version installed in /usr/local/plplot. Also, you apparently did an install with prefix /usr (via your friend's configuration file) which will add more possible bits and pieces that have to be removed from /usr. > At least with compiling and viewing the demos in my screen, because I > had to spent some hours to have a personal example work, until I found the > correct combination of compiler options which works. I finally used the > following Makefile to compile and link a prueba.cpp C++ program: > > prueba.o: prueba.cpp > g++ -c -O -I. -I/usr/local/plplot/include prueba.cpp > > prueba: prueba.o > g++ -Wall -L/usr/X11R6/lib prueba.o -lplcxxd -lplplotd -o prueba > -lX11 -ldl -lm -lg++ -Wl,-rpath -Wl,/usr/local/plplot/lib To find out exactly what compile and linker options to use that are suitable for your system use /usr/local/plplot/bin/plplot-config. On my system (now Debian woody rather than potato) I get the following results (although yours may be different, use plplot-config to find out.) /usr/local/plplot/bin/plplot-config --libs --with-c++ -L/usr/local/plplot/lib -Llib -lplplotd -ltclmatrixd -litk3.1 -ltk8.3 -litcl3.1 -ltcl8.3 -L/usr/X11R6/lib -lX11 -lgd -lpng -ljpeg -lz -ldl -lm -lg2c -Wl,-rpath,/usr/local/plplot/lib -lplcxxd /usr/local/plplot/bin/plplot-config --cflags -I/usr/local/plplot/include -I. -I/usr/include/tcl8.3 -I/usr/include/tcl8.3/itcl-private/generic -I/usr/X11R6/include In fact I run plplot-config directly in my Makefiles so there is never any uncertainty. > > The last option -Wl,/usr/local/plplot/lib was unavoidable if I wanted the > executable file prueba to find the libplplotd.so.5 file (without it, the > program compiled and linked, but could not execute because it didn't file > this shared object). This was unexpected, because my friend did not need > such line to compile his programs, which is partly why it took so long for > me to realize how to make it. You seemed to have found the correct rpath solution (note plplot-config also gives this). However, another option is to set LD_LIBRARY_PATH at run time to point to /usr/local/plplot/lib. > > That's about all I think. Thanks for your patience, and regards, > > Victor Munoz > Dept. of Physics > U. of Chile > I congratulate you on your persistence! It seems you got everything to work for 5.0.4 (with the possible exception of getting rid of the bits and pieces from your many different tries). If configure is not giving you all the options you want, it is usually because it cannot find something (required devel package not installed on the system or you have a package installed in a non-standard place where configure needs special help to find that place.) I hope my comments have helped you to understand what was going on during your many different kinds of plplot installation attempts. Alan email: ir...@be... phone: 250-727-2902 FAX: 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 __________________________ |