Re: Installing more than 1 version of Gtk+



On Sun, 2006-07-02 at 18:09 +0800, Stephen Ng wrote:
> Michael,
> 
> Thanks for taking the trouble to reply.
> 
> I hope you don't mind is I pick your brain i order to get this right!!
> 
> When compiling gtk+, I should use -
> 
> ./configure --prefix=/opt/gtk2.8
> make
> make install
> 
> I believe I should then include the new path in /etc/ld.so.conf and run 
> ldconfig to update the database.

No, don't put this path in ld.so.conf; it will just confuse apps that
are wanting gtk 2.4 in the normal paths.  Rather, before running apps
you've compiled to use /opt/gtk2.8, do:

export LD_LIBRARY_PATH=/opt/gtk2.8

> 
> Then when compiling any gtk based program, I should set
>     PKG_CONFIG_PATH=/opt/gtk2.8/lib/pkgconfig

add "export" to the front of that.

> 
> In order for the compile to work, I should use -
> `pkg-config --cflags gtk-2.0 --libs gtk-2.0`

Yeah.

> 
> in the script. I note that the version number in that script is the same 
> for gtk v2.4.

Yup.

> 
> Si, if I wish to go back to my v2.4 install, I should change 
> PKG_CONFIG_PATH back to the default

If you wish to compile against the stock gtk install, just unset
PKG_CONFIG_PATH.  Pre-compiled apps don't care about this variable.

> 
> Is this right?
> 
> Another question: will I have to install the new versions of glib, pango 
> and atk in the same way i.e. in different directory e.g /opt/glib2.8 etc ?

Yes.  All the dependencies should be built to be in the same place.
This actually don't need to be strictly true, but it makes it easier.
You might find it useful to download and use the garnome builder utility
to automate setting up the latest gtk (and optionally gnome 2.14 or
whatever).

Michael


> 
> Regards.
> 
> Stephen
> 
> Michael Torrie wrote:
> > On Sat, 2006-07-01 at 14:01 +0800, Stephen Ng wrote:
> >   
> >> Hi!
> >>
> >> I am running on a standard FC3 and was wondering if it is possible to 
> >> install the latest Gtk+ (v2.8) simultaneously with the existing v2.4. If 
> >> so, how do I do that and when linking what do I need to do to pick the 
> >> right version of the library?
> >>     
> >
> > Sure you can, as long as the prefix the new version installs to is not
> > in /usr.  If the prefix you installed gtk to was /opt/garnome, for
> > example you would configure like so:
> >
> > PKG_CONFIG_PATH=/opt/garnome/lib/pkgconfig ./configure
> >
> >
> >   
> >> Thanks.
> >>
> >> Stephen
> >> _______________________________________________
> >> gtk-list mailing list
> >> gtk-list gnome org
> >> http://mail.gnome.org/mailman/listinfo/gtk-list
> >>
> >>     
> >
> >
> >   
> 




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]