libtool and pango
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.
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.
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:
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;
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.
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
# gcc: unrecognized options `-pthreads'
# ignore them, they don't hurt anything. I'm still trying to find out why the libtool one
#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.
make clean #if dirty do.
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.
./configure --disable-csharp --prefix=/usr
# 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.
#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.
ln -s `which glibtool` ./libtool # Make sure the gnu libtool is used, not mac!
./configure --prefix=/usr --enable-shared
make install # if passes test, obviously!
make install-lib # it does not automatically install the library.
./configure # not much in the way of options, it installs where it wants to.
# 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... )
#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
vi /usr/lib/pkgconfig/xrender.pc # or use your favorite word processor, text only!
mv /usr/X11/lib/pkgconfig/xft.pc /usr/lib/pkgconfig/ # all .pc files in one place for me.
#This is a *&*&!@@@! if not right.
# Make clean seems very important if you need to redo anything that went before!
#After ./configure the last line should say:
# backends: FreeType X Xft
# FreeType and Xft must *both* be there.
# else go back and figure out what went wrong.
./configure --prefix=/usr # debated this, should it be in X11 w/ gtk?
make -j6 # Go get coffee or whatever.
make -j6 cheks # lots more coffee. Take a walk.
mv /usr/X11/lib/pkgconfig/* /usr/lib/pkgconfig/ # all in one place again.
./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 07:11 PM.|