From: Alan W. I. <ir...@be...> - 2008-01-16 07:20:32
|
On 2008-01-15 22:33-0800 Zev Weiss wrote: > > On 14-Jan-08, at 11:39 PM, Alan W. Irwin wrote: > >> On 2008-01-14 20:59-0800 Zev Weiss wrote: >> >>> Hi, I'm new to plplot and I'm having some trouble with compilation/ >>> linking now that I've installed it. With gcc 4.1.2 and plplot 5.8.0 >>> (installed via pirut on Fedora 8 x86_64), for every call to a plplot >>> function I get a corresponding "undefined reference to <function- >>> name>" error at link time (e.g. "undefined reference to `c_plinit'"), >>> and gcc reports ld as having returned a 1 exit status. Sorry if >>> there's an obvious answer to this, I'm pretty new to sorting out >>> linking problems - thanks in advance for any/all help. >> >> Follow the directions at >> http://www.miscdebris.net/plplot_wiki/index.php? >> title=The_PLplot_install-tree_test >> for testing that the installed PLplot library can be used to build and >> execute all the examples. Then look at the "make_examples.out" file >> generated as part of that process to see the actual build commands >> that work >> with PLplot, then use those same build commands for your own >> software that >> is using the PLplot library. >> >> Alan > > OK, I followed those steps and all the output .psc files came out > looking fine, but the file "make_examples.out" shows the same error > from ld on c, c++, f77, and f95: "ld: cannot find -lltdl" (and ld > returns 1 as it did when I was trying my code). I tried compiling my > own code with this command as it appeared in the .out file: > > /usr/bin/gcc sourcefile.c -o targetfile -Wl,-rpath -Wl,/usr/lib64:/ > usr/lib64 `PKG_CONFIG_PATH=/usr/lib64/pkgconfig pkg-config --cflags -- > libs plplotd` > > but (unsurprisingly) I got the same error. > > Additionally, the file "plplot_test.out" contained this: > > Testing front-end c > ./test_c.sh: line 34: ./c/x01c: No such file or directory > Testing front-end cxx > ./test_cxx.sh: line 32: ./c++/x01cc: No such file or directory > ./test_cxx.sh: line 38: ./c++/x01: No such file or directory > Testing front-end f77 > ./test_f77.sh: line 37: ./f77/x16af: No such file or directory > Testing front-end f95 > ./test_f95.sh: line 37: ./f95/x16af: No such file or directory > Testing front-end java > chmod: cannot access `./test_java.sh': No such file or directory > /bin/bash: ./test_java.sh: No such file or directory > Testing front-end octave > chmod: cannot access `./test_octave.sh': No such file or directory > /bin/bash: ./test_octave.sh: No such file or directory > Testing front-end python > PLplot library version: 5.8.0 > Testing front-end tcl > ./test_tcl.sh: line 29: cd: ./tcl: No such file or directory > ./test_tcl.sh: line 30: pltcl: command not found > Testing front-end perl > chmod: cannot access `./test_perl.sh': No such file or directory > /bin/bash: ./test_perl.sh: No such file or directory > Testing front-end ada > ./test_ada.sh: line 31: ./ada/x01a: No such file or directory > > So...what does this all indicate, and what's the next step? Well, at least python worked. :-) (That's why you got at least some of the results.) So it looks like the core library knows where to find libltdl, but this information has been somehow lost when building applications against the core library. Could you please send the exact command line you used for cmake and the full output from that command? Where is libltdl installed on your system? Is it a standard place? If non-standard, how does the make command (following cmake to build the library and devices) find that non-standard place? Use "make verbose=1" to get the exact linking command involving libltdl (plus a lot more). Could you please run PKG_CONFIG_PATH=/home/software/plplot_cvs/installcmake/lib/pkgconfig \ pkg-config --cflags --libs plplot where you set PKG_CONFIG_PATH appropriate to where you installed PLplot with "make install"? The result on my system was -I/home/software/plplot_cvs/installcmake/include/plplot -L/home/software/plplot_cvs/installcmake/lib -L/usr/lib64 -lplplot -lltdl -ldl -lm -lcsirocsa -lcsironn -lqhull -lfreetype Note that -lltdl is there, but there is no corresponding -L flag because it is installed in a standard location. Sorry for so many questions, but I need the answers in order to make further progress in sorting out this libltdl issue. 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 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 __________________________ |