How to install GTK in linux

View: New views
9 Messages — Rating Filter:   Alert me  

How to install GTK in linux

by Ian P :: Rate this Message:

| View Threaded | Show Only this Message

Hi,

What am I doing wrong here? I'm trying to install the latest GTK/GLIB on a
Linux Fedora 9 system that currently has GTK 2.12 and GLIB 2.16, which are
the versions yum installs.

I downloaded the gtk 2.14 and glib 2.18 .tar.gz packages, unpacked them and
ran configure, make and make install. But they install into /usr/local/lib
and so the app still picks up the older versions from /usr/lib. I tried
"make install prefix=/usr" but that failed with an error.

I can hack the app's makefile to add a "-I/usr/local/include/..." and that
works to include the newer gtk/glib headers, but "-L/usr/local/lib/..." does
not get it to pick up the correct libraries.

One thing I noticed is that this is a 64-bit system and the GTK/GLIB
libraries are located under /usr/lib64, but the above make installed
libraries into /usr/local/lib, not lib64. Is that correct?

Ian


_______________________________________________
gtk-list mailing list
gtk-list@...
http://mail.gnome.org/mailman/listinfo/gtk-list

Re: How to install GTK in linux

by YuriyRusinov :: Rate this Message:

| View Threaded | Show Only this Message

Hello, Ian !

> What am I doing wrong here? I'm trying to install the latest GTK/GLIB on a
> Linux Fedora 9 system that currently has GTK 2.12 and GLIB 2.16, which are
> the versions yum installs.
>
> I downloaded the gtk 2.14 and glib 2.18 .tar.gz packages, unpacked them and
> ran configure, make and make install. But they install into /usr/local/lib
> and so the app still picks up the older versions from /usr/lib. I tried
> "make install prefix=/usr" but that failed with an error.

You shound try to run ./configure --prefix=<your target dir>.
>
> One thing I noticed is that this is a 64-bit system and the GTK/GLIB
> libraries are located under /usr/lib64, but the above make installed
> libraries into /usr/local/lib, not lib64. Is that correct?

If libraries are 64 bit then this is correct. But in another case you
can say ./configure --prefix=... --libdir=... and libraries will be
set to your target directory.

--
Best regards,
Sincerely yours,
Yuriy Rusinov.
_______________________________________________
gtk-list mailing list
gtk-list@...
http://mail.gnome.org/mailman/listinfo/gtk-list

Re: How to install GTK in linux

by Jean Brefort-2 :: Rate this Message:

| View Threaded | Show Only this Message

You should add /usr/local/lib to your /etc/ld.so.conf

Le dimanche 02 novembre 2008 à 10:52 +0300, Yuriy Rusinov a écrit :

> Hello, Ian !
>
> > What am I doing wrong here? I'm trying to install the latest GTK/GLIB on a
> > Linux Fedora 9 system that currently has GTK 2.12 and GLIB 2.16, which are
> > the versions yum installs.
> >
> > I downloaded the gtk 2.14 and glib 2.18 .tar.gz packages, unpacked them and
> > ran configure, make and make install. But they install into /usr/local/lib
> > and so the app still picks up the older versions from /usr/lib. I tried
> > "make install prefix=/usr" but that failed with an error.
>
> You shound try to run ./configure --prefix=<your target dir>.
> >
> > One thing I noticed is that this is a 64-bit system and the GTK/GLIB
> > libraries are located under /usr/lib64, but the above make installed
> > libraries into /usr/local/lib, not lib64. Is that correct?
>
> If libraries are 64 bit then this is correct. But in another case you
> can say ./configure --prefix=... --libdir=... and libraries will be
> set to your target directory.
>

_______________________________________________
gtk-list mailing list
gtk-list@...
http://mail.gnome.org/mailman/listinfo/gtk-list

Re: How to install GTK in linux

by jcupitt :: Rate this Message:

| View Threaded | Show Only this Message

008/11/2 Ian Puleston <ian@...>:
> I downloaded the gtk 2.14 and glib 2.18 .tar.gz packages, unpacked them and
> ran configure, make and make install. But they install into /usr/local/lib
> and so the app still picks up the older versions from /usr/lib. I tried
> "make install prefix=/usr" but that failed with an error.

I wouldn't install to /usr, that area is managed by fedora for you and
you are likely to break everything horribly if you start messing with
it.

The best way to do this, in my opinion, is to install the new gtk to
/usr/local/ and then to build and run your app against that. This way
you won't disturb your system or any of the other applications you
have installed.

You need to set PKG_CONFIG_PATH so that your new gtk appears before
the system one for apps you build. Put something like this in your
.bashrc:

export PKG_CONFIG_PATH=/usr/local/liib/pkgconfig

then at the command-line, try:

$ source ~/.bashrc
$ pkg-config gtk+-2.0 --cflags

and verify that its seeing the version in /usr/local

Other stuff to set:

- add /usr/local/bin to your path so that you pick up the new versions
of any gtk/glib utilities
- add /usr/local/lib to LD_LIBRARY_PATH so that your app picks up the
gtk/glib libraries at run time
- you can add /usr/local/share/man to MANPATH, though I can't remember
if gtk still makes man pages

John
_______________________________________________
gtk-list mailing list
gtk-list@...
http://mail.gnome.org/mailman/listinfo/gtk-list

Re: How to install GTK in linux

by Chris Moller-3 :: Rate this Message:

| View Threaded | Show Only this Message

Jean Bréfort wrote:
> You should add /usr/local/lib to your /etc/ld.so.conf
>  
And then run /sbin/ldconfig (as root)


_______________________________________________
gtk-list mailing list
gtk-list@...
http://mail.gnome.org/mailman/listinfo/gtk-list

Re: How to install GTK in linux

by Maciej Marcin Piechotka :: Rate this Message:

| View Threaded | Show Only this Message

"Ian Puleston" <ian@...> writes:

> Hi,
>
> What am I doing wrong here? I'm trying to install the latest GTK/GLIB on a
> Linux Fedora 9 system that currently has GTK 2.12 and GLIB 2.16, which are
> the versions yum installs.
>

One question - why you don't install older versions from repository
using standard tools? In 99% compiling from sources is a way of having
mess on FS and nothing in exchange.

Regards
--
I've probably left my head... somewhere. Please wait untill I find it.
Homepage (pl_PL): http://uzytkownik.jogger.pl/
(GNU/)Linux User: #425935 (see http://counter.li.org/)

_______________________________________________
gtk-list mailing list
gtk-list@...
http://mail.gnome.org/mailman/listinfo/gtk-list

RE: How to install GTK in linux

by Ian P :: Rate this Message:

| View Threaded | Show Only this Message

> -----Original Message-----
> From: Maciej Piechotka
> Sent: Sunday, November 02, 2008 3:47 PM
>
> One question - why you don't install older versions from repository
> using standard tools? In 99% compiling from sources is a way of having
> mess on FS and nothing in exchange.

Because I was about to file a bug report (just filed it - see my other email
with subject " RE: Missing blank lines in a GtkLabel") and I wanted to check
if the problem happens in Linux  with the same versions that I was seeing it
with in Windows. As it turned out it's a bug in Pango 1.22 and the
repositories still have Pango 1.20.

Worst case, if I was to screw up it up by installing incompatible versions
"yum reinstall" should get it back to an operable state.

Ian




_______________________________________________
gtk-list mailing list
gtk-list@...
http://mail.gnome.org/mailman/listinfo/gtk-list

Re: How to install GTK in linux

by Maciej Marcin Piechotka :: Rate this Message:

| View Threaded | Show Only this Message

"Ian Puleston" <ian@...> writes:

>> -----Original Message-----
>> From: Maciej Piechotka
>> Sent: Sunday, November 02, 2008 3:47 PM
>>
>> One question - why you don't install older versions from repository
>> using standard tools? In 99% compiling from sources is a way of having
>> mess on FS and nothing in exchange.
>
> Because I was about to file a bug report (just filed it - see my other email
> with subject " RE: Missing blank lines in a GtkLabel") and I wanted to check
> if the problem happens in Linux  with the same versions that I was seeing it
> with in Windows. As it turned out it's a bug in Pango 1.22 and the
> repositories still have Pango 1.20.
>

Well - from my experience the less mess is done by installing to the
~/.applications or similar:
1) It is easily removable
2) No root privilages required
3) You can use them iff and when you want (only put into
PATH/LD_LIBRARY_PATH etc. when you need)

Regards
--
I've probably left my head... somewhere. Please wait untill I find it.
Homepage (pl_PL): http://uzytkownik.jogger.pl/
(GNU/)Linux User: #425935 (see http://counter.li.org/)

_______________________________________________
gtk-list mailing list
gtk-list@...
http://mail.gnome.org/mailman/listinfo/gtk-list

Re: How to install GTK in linux

by Michael Torrie :: Rate this Message:

| View Threaded | Show Only this Message

Ian Puleston wrote:

> Hi,
>
> What am I doing wrong here? I'm trying to install the latest GTK/GLIB on a
> Linux Fedora 9 system that currently has GTK 2.12 and GLIB 2.16, which are
> the versions yum installs.
>
> I downloaded the gtk 2.14 and glib 2.18 .tar.gz packages, unpacked them and
> ran configure, make and make install. But they install into /usr/local/lib
> and so the app still picks up the older versions from /usr/lib. I tried
> "make install prefix=/usr" but that failed with an error.
>
> I can hack the app's makefile to add a "-I/usr/local/include/..." and that
> works to include the newer gtk/glib headers, but "-L/usr/local/lib/..." does
> not get it to pick up the correct libraries.
>
> One thing I noticed is that this is a 64-bit system and the GTK/GLIB
> libraries are located under /usr/lib64, but the above make installed
> libraries into /usr/local/lib, not lib64. Is that correct?

As others have said, overriding system-installed libraries is a recipe
for disaster, since so many packages depend on the libraries you are
replacing.

As I see it, you have two options here.  First is to do as you have done
and put the new versions in /usr/local.  If you want to override system
libraries with your new libraries for certain apps, set the
LD_LIBRARY_PATH environment variable to point at the /usr/local/lib
location.  then just run your binary and the linker will grab the newer
gtk libs.  Or compile your test programs against your new libraries by
setting PKG_CONFIG_PATH to /usr/local/lib/pkgconfig:/usr/lib/pkgconfig.

The second possibility is to get the SRPMS from Fedora 10 which
presumably are closer to the version you want, and build them on your F9
machine with rpmbuild.  This could cause compatibility issues down the
line and strange crashes but it's much safer than configure --prefix=/usr
_______________________________________________
gtk-list mailing list
gtk-list@...
http://mail.gnome.org/mailman/listinfo/gtk-list