Re: hardcoded dependencies problem with building/installing GTK+

> 1. "configure --prefix=my_build_dir"
> 2. "make"
> 3. "make install".
> 4. cp my_build_dir/lib my_install_dir/lib

This probably is a stupid question, but why didn't you run configure
--prefix=my_install_dir then?

> But I'm now facing with another problem. The application would try to look
> for "my_build_dir/etc/gtk-2.0/gdk-pixbuf.loaders" and
> "my_build_dir/etc/pango/pango.modules" and complains when not found.

Yes. That is how GTK+ (and lots of other software) works on Unix
systems: there are hardcoded paths to run-time files in the binaries.
This is usually not a problem. (The situation is vastly different on
Windows, of course. And indeed the GTK+ stack does not use hardcoded
paths on Windows.)

Can you explain what kind of Unix system it is that you intend to
deploy your build of GTK+ on, if you can't know beforehand what the
actual installation root will be? Is it not even possible to install a
symbolic link as the configure-time prefix, pointing to a different
installation root?

> How to prevent my_build_dir from being written into the library? In
> particular, how could I make my application look for the gdk-pixbuf.loaders
> and pango.modules in my_install_dir instead of my_build_dir?

I guess what you don't tell us is that you don't know my_install_dir
beforehand, that it will perhaps be different on each machine?


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