libtool and pango
Hi,
I am compiling GTK2.0 suite for my custom linux installation which is going to eventually go to a BSD (temporary) installation. I am forced to install the software under /usr instead of /usr/local which is the normal place to do so. I have (so far) compiled pkgconfig-0.15.0, jpeg-6b, libpng-1.2.8, tiff-v3.6.1, fontconfig-2.2.2, atk-1.9.0, freetype-2.1.9, expat-1.95.7 ( No unusual problems ) . With the exception of fontconfig, all packages are compiled from source with no previous version to interfere. At each step of the package compilations, all new compiles successfully found their dependencies and linked correctly. (fontconfig successfully installed over the old installation, and appears to work). All I have left to do is compile pango-1.8.1 and Gtk+-2.6.7. Pango is the problem, and it doesn't appear to matter which system I compile it on. (I get the same error on a BSD system or a slackware system -- BSD, Mac OS X). It configures correctly, even detecting the freetype package I installed. ./configure --prefix=/usr Quote:
Quote:
It happens on my slackware installation too, so it can't be any of the tools which differ between the systems (e.g. the linker ld, or any of the low level tools/compiler) The usr/local path does not even exist on my BSD system, so it shouldn't have been 'found' or preprogrammed into libtool. If I do a symlink: ln -s /usr /usr/local and remake, the make succeeds but with odd warnings. Quote:
So, clearly there is a bug in the configure script itself for Pango. It works fine when the /usr/local directory exists, but not when installing to the /usr directory. Is anyone familiar with how configuration scripts generate the directories for linking/ and/or know of a good tutorial on debugging ./configure scripts? I studied the libtool manual, and it is really not of much help in understanding how one might approach debugging the script. Any other hints on how to attack the problem? --Thanks in advance. |
This should find the problem:
Code:
grep -rnH /usr/local /usr/lib/pkgconfig/* |
Thanks for the try, unfortuantely those greps produce no results.
The error appears to be in the configure script itself, which generates the make file to compile the Pango package in the /usr/ directory. pkg-config is correct, and all previous libraries are installed exactly where pkgconfig says they are. it is the .configure program included with the Pango package which has 'potential' directories hardcoded into it. For some reason the logic of the script is incorrectly 'locating' items in a directory which does not exist -- "/usr/local". It also has the bad habit of giving error messageswith the trailing slash such that the directories are of the form /usr/local// ... I am just not a Bash script type of person. I know the rudiments, but am more comfortable with PHP, C, C++, Java than bash. How does one go about debugging it? Is there an interactive debugger one might use or a way to determine which branches of logic and variables were actually modified? Turning on the trace just prints the if statement with no indication of whether or not it was executed nor what values were assigned at each step of the script. For example: here is the beginning of the section designed to locate the X11 headers; Code:
# Standard set of common directories for X headers. There are several such code segments, for libfreetype, X11, etc. I would like to be able to trace script execution, perhaps to a log file, such that every if statement evaluation was listed such that I know what the result was, and every assignment dumped so I know why the script is choosing /usr/local as a valid library directory for these libraries (and not for others). I would like to make a diff file, and send it to the GTK group for inclusion in Pango so others don't have to mess with this again like I am. |
Wierd!
I just yanked the entire install of X11, and reinstalled it. The script now works without detecting /usr/local/lib which doesn't exist! It added some .pc files, I think to /usr/lib/pkgconfig. It still gives the wierd warnings about moved libs, and still has the // seperator, so I would like to finish tracing the problem out, but at least the install works now. |
I have full GTK operation under BSD. Wasn't too much harder than slackware from source.
This isn't a FINK install, but a sourcecode install. Hints for others who follow and don't like FINK. Most of this is applicable to LINUX or BSD. Linux users might want to do a ldconfig to insure that any new libraries which are installed are in fact found. BSD users don't need to bother. Hopefully, this will give you ideas of what might be wrong in your install even if this isn't your exact system. Make sure to uninstall conflicting libraries, and only install the libraries you have to. #Under Panther OSX (BSD unix), the following formula works pretty well. # Install the X11 library from your system disk -- restore apps icon. # It first installs the installer, so you need to get past that. # Then install the developer tools package, and the X11 package. # You have to find the tools installer on your hard drive once the packages are installed and # start them. (Applications/installers/...). # when compiling the later packages under OS X: there will be lots of warnings like: # libtool: link: warning: `/usr/lib//libintl.la' seems to be moved # and # gcc: unrecognized options `-pthreads' # ignore them, they don't hurt anything. I'm still trying to find out why the libtool one # happens. #I used the following packages, and installed them in the order given. #I needed to install into the /usr directory, not /usr local. Use your own discretion. #I have a lot of memory, so I use -j6 on the make for a little more speed. #Get the packages, e.g. start with pkgconfig-0.15.0, unpack it, enter the directory, #Obviously, become root, and quit being root at the appropriate places. I didn't include those. #and then the commands that follow show how I installed each package. #pkgconfig-0.15.0 ./configure --prefix=/usr make clean #if dirty do. make -j6 make install mv /usr/X11/lib/pkgconfig/* /usr/lib/pkgconfig # I like all .pc files in one place. #I don't need to change the path variable that way. You may not wish to do that. #gettext-0.14 ./configure --disable-csharp --prefix=/usr make clean make -j6 make install # gettext makes the libintl file, which is circularly dependant on the libiconv file # already present on the system. If you don't remake iconv you will get warnings, # but they can be ignored. I ignored the warnings. #glib-2.6.4 ./configure --prefix=/usr make clean make -j6 make install #libpng-1.2.8 #tricky! Mac OSX already has zlib, so don't install it, unless you don't have it. cp scripts/makefile.darwin makefile # or your system if it isn't a mac. vi makefile # or use your favorite text editor. # make the following changes to prefix, ZLIBLIB, ZLIBINC in the make file. Code:
# where "make install" puts libpng.a, libpng12.dylib, png.h and pngconf.h make -j6 make install #jpeg-6b ln -s `which glibtool` ./libtool # Make sure the gnu libtool is used, not mac! ./configure --prefix=/usr --enable-shared make clean make -j6 make test make install # if passes test, obviously! make install-lib # it does not automatically install the library. #tiff-v3.6.1 ./configure --prefix=/usr make clean make make install #freetype-2.1.9 ./configure # not much in the way of options, it installs where it wants to. make clean make -j6 make install #expat-1.95.7 # expat is installed on OS X, but no .pc file, so reinstall was easier. rm /usr/X11/lib/libexpat* # (perhaps you would like to move it instead...) rm /usr/X11/include/expat.h # (to some backup whatever... ) make clean make -j6 make install #xft2.1.7 #a similar is installed in OS X, but outdated. Reinstall is a must. # lots of deps are requred for this so I decided to fake the dep's .pc file for less work overall. # rather than reinstall xrender, and render, and ... rm /usr/X11/libs/libXft* #get rid of old Xft -- it is NO GOOD. mv /usr/X11/include/X11/Xft . # this might not be the correct file, I didn't write it down. rm -rf Xft rm /usr/lib/pkgconfig/xft.pc vi /usr/lib/pkgconfig/xrender.pc # or use your favorite word processor, text only! Code:
prefix=/usr/X11 ./configure --prefix=/usr/X11 make clean make -j6 make install mv /usr/X11/lib/pkgconfig/xft.pc /usr/lib/pkgconfig/ # all .pc files in one place for me. #pango-1.8.1 #This is a *&*&!@@@! if not right. # Make clean seems very important if you need to redo anything that went before! ./configure --prefix=/usr make -j6 #After ./configure the last line should say: #configuration: # backends: FreeType X Xft # FreeType and Xft must *both* be there. # else go back and figure out what went wrong. #atk-1.9.0 ./configure --prefix=/usr # debated this, should it be in X11 w/ gtk? make clean make -j6 make install #gtk+2.6.7 ./configure --prefix=/usr/X11 make clean make -j6 # Go get coffee or whatever. make -j6 cheks # lots more coffee. Take a walk. make install mv /usr/X11/lib/pkgconfig/* /usr/lib/pkgconfig/ # all in one place again. cd tests ./testgtk # that should be it. all installed and a handy test will come So NOW if I blow my system up, I can always come back here and do it nearly the right way the first time, and so can you. :) |
All times are GMT -5. The time now is 08:36 PM. |