|
From: | David Grundberg |
Subject: | Re: linking changes for ftgl and qrupdate? |
Date: | Thu, 06 Aug 2009 22:28:24 +0200 |
User-agent: | Thunderbird 2.0.0.22 (X11/20090608) |
John W. Eaton skrev:
On 6-Aug-2009, David Grundberg wrote:| I'm having trouble linking to FTGL since I updated from 9476 to 9498. | Anyone have the same problem? | | My FTGL is a custom install, not obtained using a package manager. The | ./configure checks works fine for FTGL but linking liboctinterp fails | during make. (paraphrase: cannot find -lftgl) Also, qrupdate seems to | have similar problems. I'm setting up LDFLAGS and CPPFLAGS as before, | passing them as arguments to configure.I recently made some changes to the way things are linked. My intent was to not list all libraries on the final link for building Octave, but have library dependencies resolved by linking the required dependencies with each shared library. Looking at src/Makefile.in, it seems that SH_LDFLAGS needs to have some extra directories in it. But I guess I'd rather avoid putting all directories in that, and somehow group the FTGL -LDIR options with the -lftgl option, so that the special FTGL directory only appears when linking liboctinterp, not also when linking libcruft, or liboctave, which don't depend on FTGL (for example).
It occurs to me that FTGL uses pkg-config. I should have set that up correctly instead of just building LDFLAGS and CPPFLAGS. Missed that completely. But on the other hand, looking in the configure script, pkg-config isn't used for ftgl. And there is no way -lftgl will be accompanied with a -L flag to point out the ftgl library. (But LDFLAGS used to accompany before, apparently, since I was able to build earlier) I think configure.in needs to add a -L flag together with the -lftgl to $OPENGL_LIBS, or something like that.
If you install FTGL in a custom directory that is not searched by default when linking, are you arranging for the FTGL library to be found at run time through ld.so.conf or similar? Or do we also need to add an --rpath option for your custom directory? Or should we leave it up to you to do the configuration or set LD_LIBRARY_PATHappropriately?jwe
I'm used to having to set LD_LIBRARY_PATH properly. I wouldn't expect rpath to be set.
David
[Prev in Thread] | Current Thread | [Next in Thread] |