LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-19-2008, 09:00 AM   #1
iamharpreet
LQ Newbie
 
Registered: May 2005
Location: Bangalore, India
Posts: 6

Rep: Reputation: 0
Question Errors while installing GTK+-2.0


Hi,

I want to install XFCE4.4.2 to use as desktop for my vnc at a corporate office. So whatever I install is at my home (/home/hsaluja).

XFCE demands some recent version of GTK which is not present on the system.

I installed all the dependencies required for gtk successfully except pango where I ran into the following problem.

make[2]: Entering directory `/home/hsaluja/local/sources/pango-1.18.4/examples'
/bin/sh ../libtool --tag=CC --mode=link gcc -g -O2 -Wall -o cairosimple cairosimple.o ../pango/libpango-1.0.la ../pango/libpangocairo-1.0.la -L/home/hsaluja/local/lib -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 -L/home/hsaluja/local/lib -lcairo ../pango/libpangoft2-1.0.la
gcc -g -O2 -Wall -o .libs/cairosimple cairosimple.o ../pango/.libs/libpango-1.0.so -L/home/hsaluja/local/lib ../pango/.libs/libpangocairo-1.0.so -L/usr/X11R6/lib /home/hsaluja/local/sources/pango-1.18.4/pango/.libs/libpangoft2-1.0.so /home/hsaluja/local/lib/libcairo.so /home/hsaluja/local/lib/libpng12.so -lXrender -lSM -lICE -lX11 ../pango/.libs/libpangoft2-1.0.so /home/hsaluja/local/sources/pango-1.18.4/pango/.libs/libpango-1.0.so /home/hsaluja/local/lib/libgobject-2.0.so /home/hsaluja/local/lib/libgmodule-2.0.so -ldl /home/hsaluja/local/lib/libglib-2.0.so /home/hsaluja/local/lib/libfontconfig.so /usr/lib/libfreetype.so /usr/lib/libexpat.so /home/hsaluja/local/lib/libfreetype.so -lz -lm -Wl,--rpath -Wl,/home/hsaluja/local/lib
/home/hsaluja/local/lib/libcairo.so: undefined reference to `FT_GlyphSlot_Embolden'
collect2: ld returned 1 exit status
make[2]: *** [cairosimple] Error 1
make[2]: Leaving directory `/home/hsaluja/local/sources/pango-1.18.4/examples'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/hsaluja/local/sources/pango-1.18.4'
make: *** [all] Error 2


I went through several threads on linuxquestions.org and googled for a solution and all seemed to suggest the problem with freetype lib (in bold above).

I have freetype installed locally (/home/hsaluja/local) on my system. All the required files for installing GTK were installed at this location by using the --prefix option. LD_LIBRARY_PATH, PKG_CONFIG and PKG_CONFIG_PATH were also set appropriately to use the locally installed files. Yet I face issues with freetype lib.

I came across solutions with cleaning(better still - removing) all the old freetype font libs from /usr/libs but I have the problem that I can't do it since I am not the system administrator

Can anybody help me in resolving this ?

Thanks and Regards.
 
Old 03-19-2008, 10:38 AM   #2
teddyt
Member
 
Registered: Dec 2007
Location: US
Distribution: Slackware 12.1
Posts: 119

Rep: Reputation: 15
Which distribution are you using? Pardon my question, but is there a reason that you are compiling this rather than installing a package? Is it because you don't have root priviledges?

I don't know this particular program, but if the solution is that you need to remove certain libs, then it appears you have the answer. You should talk to the system administrator.
 
Old 03-19-2008, 10:54 AM   #3
iamharpreet
LQ Newbie
 
Registered: May 2005
Location: Bangalore, India
Posts: 6

Original Poster
Rep: Reputation: 0
The distribution I am using is Red Hat Enterprise Linux WS release 3 (Taroon Update 2).

I can't ask the SysAds to update it as there are several engineers who are logged on the server and IT department can't spend time on installing a newer distro and then have issues with it. They have a hard time maintaining network related problems . They are happy with the tried and tested environment.

That's the reason I want to compile and install it locally in my home area. I think it is possible. I just don't know how to work around it.
 
Old 03-19-2008, 04:33 PM   #4
berbae
Member
 
Registered: Jul 2005
Location: France
Distribution: Arch Linux
Posts: 540

Rep: Reputation: Disabled
Hi
Can you post what you have in the LD_LIBRARY_PATH, PKG_CONFIG and PKG_CONFIG_PATH variables ?
Can you post the output of :
Code:
pkg-config --cflags --libs freetype2
ls -l /home/hsaluja/local/lib/libfreetype*
ls -l /home/hsaluja/local/lib/pkgconfig/*
It's clear that the configure script didn't take the right freetype2.pc file to find what it needs.
Waiting for your answers...

Edit : I am not convinced that what you intend to do is feasible without being able to run the 'ldconfig' command under root.

Last edited by berbae; 03-19-2008 at 04:39 PM.
 
Old 03-20-2008, 01:45 AM   #5
iamharpreet
LQ Newbie
 
Registered: May 2005
Location: Bangalore, India
Posts: 6

Original Poster
Rep: Reputation: 0
Here are the results of what you wanted to know:

>echo $LD_LIBRARY_PATH
/home/hsaluja/local/lib:.

> echo $PKG_CONFIG
/home/hsaluja/local/bin/pkg-config

>echo $PKG_CONFIG_PATH
/home/hsaluja/local/lib/pkgconfig

> pkg-config --cflags --libs freetype2
-I/home/hsaluja/local/include/freetype2 -I/home/hsaluja/local/include -L/home/hsaluja/local/lib -lfreetype -lz

> ls -l /home/hsaluja/local/lib/libfreetype*
-rw-r--r-- 1 hsaluja group 1958168 Mar 19 18:00 /home/hsaluja/local/lib/libfreetype.a
-rwxr-xr-x 1 hsaluja group 835 Mar 19 18:00 /home/hsaluja/local/lib/libfreetype.la*
lrwxrwxrwx 1 hsaluja group 21 Mar 19 18:00 /home/hsaluja/local/lib/libfreetype.so -> libfreetype.so.6.3.16*
lrwxrwxrwx 1 hsaluja group 21 Mar 19 18:00 /home/hsaluja/local/lib/libfreetype.so.6 -> libfreetype.so.6.3.16*
-rwxr-xr-x 1 hsaluja group 1320145 Mar 19 18:00 /home/hsaluja/local/lib/libfreetype.so.6.3.16*

> ls -l /home/hsaluja/local/lib/pkgconfig/*
-rw-r--r-- 1 hsaluja group 269 Mar 19 15:57 /home/hsaluja/local/lib/pkgconfig/atk.pc
-rw-r--r-- 1 hsaluja group 278 Mar 19 18:05 /home/hsaluja/local/lib/pkgconfig/cairo-ft.pc
-rw-r--r-- 1 hsaluja group 368 Mar 19 18:05 /home/hsaluja/local/lib/pkgconfig/cairo.pc
-rw-r--r-- 1 hsaluja group 243 Mar 19 18:05 /home/hsaluja/local/lib/pkgconfig/cairo-pdf.pc
-rw-r--r-- 1 hsaluja group 248 Mar 19 18:05 /home/hsaluja/local/lib/pkgconfig/cairo-png.pc
-rw-r--r-- 1 hsaluja group 249 Mar 19 18:05 /home/hsaluja/local/lib/pkgconfig/cairo-ps.pc
-rw-r--r-- 1 hsaluja group 239 Mar 19 18:05 /home/hsaluja/local/lib/pkgconfig/cairo-svg.pc
-rw-r--r-- 1 hsaluja group 300 Mar 19 18:05 /home/hsaluja/local/lib/pkgconfig/cairo-xlib.pc
-rw-r--r-- 1 hsaluja group 272 Mar 19 18:05 /home/hsaluja/local/lib/pkgconfig/cairo-xlib-xrender.pc
-rw-r--r-- 1 hsaluja group 243 Feb 20 12:08 /home/hsaluja/local/lib/pkgconfig/dbh-1.0.pc
-rw-r--r-- 1 hsaluja group 273 Mar 19 17:58 /home/hsaluja/local/lib/pkgconfig/fontconfig.pc
-rw-r--r-- 1 hsaluja group 293 Mar 19 18:00 /home/hsaluja/local/lib/pkgconfig/freetype2.pc
-rw-r--r-- 1 hsaluja group 345 Mar 19 12:53 /home/hsaluja/local/lib/pkgconfig/glib-2.0.pc
-rw-r--r-- 1 hsaluja group 288 Mar 19 12:53 /home/hsaluja/local/lib/pkgconfig/gmodule-2.0.pc
-rw-r--r-- 1 hsaluja group 288 Mar 19 12:53 /home/hsaluja/local/lib/pkgconfig/gmodule-export-2.0.pc
-rw-r--r-- 1 hsaluja group 267 Mar 19 12:53 /home/hsaluja/local/lib/pkgconfig/gmodule-no-export-2.0.pc
-rw-r--r-- 1 hsaluja group 255 Mar 19 12:53 /home/hsaluja/local/lib/pkgconfig/gobject-2.0.pc
-rw-r--r-- 1 hsaluja group 255 Mar 19 12:53 /home/hsaluja/local/lib/pkgconfig/gthread-2.0.pc
-rw-r--r-- 1 hsaluja group 250 Feb 20 11:48 /home/hsaluja/local/lib/pkgconfig/imlibgdk.pc
-rw-r--r-- 1 hsaluja group 386 Feb 20 11:48 /home/hsaluja/local/lib/pkgconfig/imlib.pc
-rw-r--r-- 1 hsaluja group 233 Mar 19 17:12 /home/hsaluja/local/lib/pkgconfig/libpng12.pc
lrwxrwxrwx 1 hsaluja group 11 Mar 19 17:12 /home/hsaluja/local/lib/pkgconfig/libpng.pc -> libpng12.pc
-rw-r--r-- 1 hsaluja group 350 Feb 20 12:09 /home/hsaluja/local/lib/pkgconfig/libxfce4mcs-client-1.0.pc
-rw-r--r-- 1 hsaluja group 353 Feb 20 12:09 /home/hsaluja/local/lib/pkgconfig/libxfce4mcs-manager-1.0.pc
-rw-r--r-- 1 hsaluja group 282 Feb 20 12:09 /home/hsaluja/local/lib/pkgconfig/libxfce4util-1.0.pc
-rw-r--r-- 1 hsaluja group 346 Feb 20 12:09 /home/hsaluja/local/lib/pkgconfig/libxfcegui4-1.0.pc
-rw-r--r-- 1 hsaluja group 355 Feb 20 12:10 /home/hsaluja/local/lib/pkgconfig/xfce4-panel-1.0.pc
-rw-r--r-- 1 hsaluja group 279 Feb 20 12:11 /home/hsaluja/local/lib/pkgconfig/xfce4-session-1.0.pc
-rw-r--r-- 1 hsaluja group 339 Feb 20 12:10 /home/hsaluja/local/lib/pkgconfig/xfce-mcs-manager.pc
-rw-r--r-- 1 hsaluja group 278 Feb 20 12:13 /home/hsaluja/local/lib/pkgconfig/xffm-1.0.pc
 
Old 03-20-2008, 06:06 AM   #6
berbae
Member
 
Registered: Jul 2005
Location: France
Distribution: Arch Linux
Posts: 540

Rep: Reputation: Disabled
Everything seems ok, apart from not having ran the 'ldconfig' command under root.
But for some reason the configure script has not correctly detected the path to your freetype2 libraries.
You may try to force the right path like that :
Code:
export XFT_CFLAGS="-I/home/hsaluja/local/include/freetype2 -I/home/hsaluja/local/include"
export XFT_LIBS="-L/home/hsaluja/local/lib -lfreetype -lz"
./configure <your options>
make
And also ask a system administrator to run as root, after each new installed package with shared libraries :
Code:
ldconfig /home/hsaluja/local/lib
You can verify the presence of your libraries in the cache doing :
Code:
ldconfig -p|less
I think, as far as I know, that the 'ldconfig' command is necessary for your programs to use your local libraries, and furthermore they have to find them before the system wide libraries. So your shared libraries must appear before the system wide ones, but in this case I'm afraid the other programs which require freetype2 will use yours, rather than the system wide ones (normally that should not be a problem as they should be compatible).
I hope you will be able to obtain what you want, but without root privileges not everything is possible.
 
Old 03-20-2008, 10:12 AM   #7
iamharpreet
LQ Newbie
 
Registered: May 2005
Location: Bangalore, India
Posts: 6

Original Poster
Rep: Reputation: 0
Hi.

Thanks for the suggestions but I actually root-caused the problem to something else. While compiling cairo, I didn't use the right FreeType lib path. I fixed that and after that pango got installed successfully.

But I am still having issues with installing GTK.

Following is some truncated output from config.log:
Code:
configure:21947: $PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.13.5    atk >= 1.9.0    pango >= 1.17.3    cairo >= 1.2.0"
configure:21950: $? = 0
configure:21965: $PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.13.5    atk >= 1.9.0    pango >= 1.17.3    cairo >= 1.2.0"
configure:21968: $? = 0
configure:34872: checking Pango flags
*** Pango not found. Pango built with Cairo support is required
*** to build GTK+. See http://www.pango.org for Pango information.
pkg_cv_BASE_DEPENDENCIES_CFLAGS='-I/home/hsaluja/local/include/glib-2.0 -I/home/hsaluja/local/lib/glib-2.0/include -I/home/hsaluja/local/include/atk-1.0 -I/home/hsaluja/local/include/pango-1.0 -I/home/hsaluja/local/include/cairo -I/home/hsaluja/local/include/freetype2 -I/home/hsaluja/local/include -I/home/hsaluja/local/include/libpng12  '
pkg_cv_BASE_DEPENDENCIES_LIBS='-L/home/hsaluja/local/lib -latk-1.0 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 -lcairo  '
BASE_DEPENDENCIES_CFLAGS='-I/home/hsaluja/local/include/glib-2.0 -I/home/hsaluja/local/lib/glib-2.0/include -I/home/hsaluja/local/include/atk-1.0 -I/home/hsaluja/local/include/pango-1.0 -I/home/hsaluja/local/include/cairo -I/home/hsaluja/local/include/freetype2 -I/home/hsaluja/local/include -I/home/hsaluja/local/include/libpng12  '
BASE_DEPENDENCIES_LIBS='-L/home/hsaluja/local/lib -latk-1.0 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 -lcairo  '
PANGO_PREFIX=''
To confirm that pango did get installed successfully, here's the output of:
Code:
>ls -al libpango*

-rwxr-xr-x    1 hsaluja  group      989 Mar 20 14:15 libpango-1.0.la*
lrwxrwxrwx    1 hsaluja  group       24 Mar 20 14:15 libpango-1.0.so -> libpango-1.0.so.0.1800.4*
lrwxrwxrwx    1 hsaluja  group       24 Mar 20 14:15 libpango-1.0.so.0 -> libpango-1.0.so.0.1800.4*
-rwxr-xr-x    1 hsaluja  group   529050 Mar 20 14:15 libpango-1.0.so.0.1800.4*
-rwxr-xr-x    1 hsaluja  group     1347 Mar 19 21:26 libpangocairo-1.0.la*
lrwxrwxrwx    1 hsaluja  group       29 Mar 19 21:26 libpangocairo-1.0.so -> libpangocairo-1.0.so.0.1800.4*
lrwxrwxrwx    1 hsaluja  group       29 Mar 19 21:26 libpangocairo-1.0.so.0 -> libpangocairo-1.0.so.0.1800.4*
-rwxr-xr-x    1 hsaluja  group   109846 Mar 19 21:26 libpangocairo-1.0.so.0.1800.4*
-rw-rw-r--    1 hsaluja  group      849 Mar 20 14:15 libpangoft2-1.0.la
lrwxrwxrwx    1 hsaluja  group       27 Mar 20 14:15 libpangoft2-1.0.so -> libpangoft2-1.0.so.0.1800.4*
lrwxrwxrwx    1 hsaluja  group       27 Mar 20 14:15 libpangoft2-1.0.so.0 -> libpangoft2-1.0.so.0.1800.4*
-rwxr-xr-x    1 hsaluja  group   495181 Mar 20 14:15 libpangoft2-1.0.so.0.1800.4*
-rw-rw-r--    1 hsaluja  group      837 Mar 20 14:15 libpangox-1.0.la
lrwxrwxrwx    1 hsaluja  group       25 Mar 20 14:15 libpangox-1.0.so -> libpangox-1.0.so.0.1800.4*
lrwxrwxrwx    1 hsaluja  group       25 Mar 20 14:15 libpangox-1.0.so.0 -> libpangox-1.0.so.0.1800.4*
-rwxr-xr-x    1 hsaluja  group   130156 Mar 20 14:15 libpangox-1.0.so.0.1800.4*
 
Old 03-20-2008, 06:26 PM   #8
berbae
Member
 
Registered: Jul 2005
Location: France
Distribution: Arch Linux
Posts: 540

Rep: Reputation: Disabled
The part of the configure script which causes that error is :
Code:
# Check for Pango flags

if test "x$gdktarget" = "xwin32"; then
	PANGO_PACKAGES="pangowin32 pangocairo"
else
	PANGO_PACKAGES="pango pangocairo"
fi

echo "$as_me:$LINENO: checking Pango flags" >&5
echo $ECHO_N "checking Pango flags... $ECHO_C" >&6
if $PKG_CONFIG --exists $PANGO_PACKAGES ; then
        PANGO_CFLAGS=`$PKG_CONFIG --cflags $PANGO_PACKAGES`
        PANGO_LIBS=`$PKG_CONFIG --libs $PANGO_PACKAGES`

        echo "$as_me:$LINENO: result: $PANGO_CFLAGS $PANGO_LIBS" >&5
echo "${ECHO_T}$PANGO_CFLAGS $PANGO_LIBS" >&6
else
        { { echo "$as_me:$LINENO: error:
*** Pango not found. Pango built with Cairo support is required
*** to build GTK+. See http://www.pango.org for Pango information.
" >&5
echo "$as_me: error:
*** Pango not found. Pango built with Cairo support is required
*** to build GTK+. See http://www.pango.org for Pango information.
" >&2;}
   { (exit 1); exit 1; }; }
fi
So the command 'pkg-config --exists pango pangocairo' gives a false result.
See with 'ls -l /home/hsaluja/local/lib/pkgconfig/pango*' if you have pango.pc and pangocairo.pc files.
If not, you missed something with the pango installation.
The above procedure shows you that you can look in the configure script to understand why an error occurs. And so discover the answer by yourselves.
I remind you of these lines from previous posts :
Quote:
I am not convinced that what you intend to do is feasible without being able to run the 'ldconfig' command under root.
Quote:
And also ask a system administrator to run as root, after each new installed package with shared libraries :

ldconfig /home/hsaluja/local/lib

You can verify the presence of your libraries in the cache doing :

ldconfig -p|less

I think, as far as I know, that the 'ldconfig' command is necessary for your programs to use your local libraries, and furthermore they have to find them before the system wide libraries. So your shared libraries must appear before the system wide ones, but in this case I'm afraid the other programs which require freetype2 will use yours, rather than the system wide ones (normally that should not be a problem as they should be compatible).
Read 'man ldconfig' for details about that command.

Last edited by berbae; 03-20-2008 at 06:29 PM.
 
  


Reply

Tags
freetype, gtk, pango



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Errors installing gtk+ cucolin@ Linux - Software 18 12-31-2006 03:52 PM
Errors using TB or FF (gtk?) BroX Slackware 3 07-15-2005 12:26 PM
problems installing bluefish (gtk-config errors) a_morgan Linux - Software 3 09-05-2003 08:58 PM
gtk errors chrismiceli Linux - General 1 03-12-2003 03:59 AM
gtk errors chrismiceli Linux - Software 0 03-10-2003 07:49 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:40 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration