Re: hardcoded dependencies problem with building/installing GTK+

Hi Tor,
This looks like a promising solution.
I built glib-2.0 successfully and the generated files were installed at /tmp/runtime/prefix instead of /runtime/prefix.
However, when I was about to build ATK using the "configure" line as below:
export LD_LIBRARY_PATH=/tmp/runtime/prefix/lib
export PKG_CONFIG_PATH=/tmp/runtime/prefix/lib/pkgconfig
./configure --prefix=/runtime/prefix PKG_CONFIG=/tmp/runtime/prefix/bin/pkg-config LDFLAGS=-L/tmp/runtime/prefix/lib 'CFLAGS=-I/tmp/runtime/prefix/include/glib-2.0 -I/tmp/runtime/prefix/lib/glib-2.0/include'
The configureation passed, but "make" failed with the following errors:
/usr/bin/make  all-am
make[3]: Entering directory `/GTK2.16/i686-DESTDIR/atk-1.24.0/atk'
make[4]: Entering directory `/GTK2.16/i686-DESTDIR/atk-1.24.0'
make[4]: Leaving directory `/GTK2.16/i686-DESTDIR/atk-1.24.0'
/bin/sh ../libtool --tag=CC --mode=link gcc  -I/tmp/runtime/prefix/include/glib-2.0 -I/tmp/runtime/prefix/lib/glib-2.0/include -Wall  -L/tmp/runtime/prefix/lib -o -rpath /runtime/prefix/lib -version-info 2409:1:2409   atkaction.lo atkcomponent.lo atkdocument.lo atkeditabletext.lo atkgobjectaccessible.lo atkhyperlink.lo atkhyperlinkimpl.lo atkhypertext.lo atkimage.lo atknoopobject.lo atknoopobjectfactory.lo atkobject.lo atkobjectfactory.lo atkregistry.lo atkrelation.lo atkrelationset.lo atkselection.lo atkstate.lo atkstateset.lo atkstreamablecontent.lo atktable.lo atktext.lo atkutil.lo atkmisc.lo atkvalue.lo atk-enum-types.lo -L/runtime/prefix/lib -lgobject-2.0 -lgmodule-2.0 -lglib-2.0  
libtool: link: warning: library `/tmp/runtime/prefix/lib/' was moved.
grep: /runtime/prefix/lib/ No such file or directory
/bin/sed: can't read /runtime/prefix/lib/ No such file or directory
libtool: link: `/runtime/prefix/lib/' is not a valid libtool archive
make[3]: *** [] Error 1
make[3]: Leaving directory `/GTK2.16/i686-DESTDIR/atk-1.24.0/atk'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/GTK2.16/i686-DESTDIR/atk-1.24.0/atk'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/GTK2.16/i686-DESTDIR/atk-1.24.0'
make: *** [all] Error 2
+ '[' '!' 2 -eq 0 ']'
+ echo 'Failed at make!'
Failed at make!
+ exit 1

Any ideas how to get around this?
On Wed, Aug 19, 2009 at 8:33 AM, Tor Lillqvist <tml iki fi> wrote:
2009/8/19 Qing Men <maggie eclipse gmail com>:
> Yes, using "configure --prefix=my_install_dir" would have solved all the
> problems. But we can't write to my_install_dir from the host where we do the
> build. my_install_dir is a mirrored filer which has mirroring sites around
> the world. Only one host can write to the master location.

Ah ok. Then you can set the DESTDIR variable on the "make install"
command line. Hopefully that will work, i.e. the makefiles have been
written to honor DESTDIR in all places. For instance, if you have
configured with

./configure --prefix=/runtime/prefix

but /runtime/prefix doesn't exist on the build machine (or cannot be
written), you can create a directory /tmp/runtime/prefix and then

make install DESTDIR=/tmp

will cause the installation to go into /tmp/runtime/prefix. The
software can't be run correctly from /tmp/runtime/prefix though, it
has to be copied using some other mechanism then so that it ends up in

(Of course, in some situations it might be that the DESTDIR-prefixed
installation prefix actually *is* the same location as the bare
prefix, but mounted read-write instead of read-only.)

Would this be enough to solve your problem?

By the way, you are using the term "build directory" a bit differently
from its normal meaning. Usually with "build directory" one means the
directory tree where the build is taking place, where the object files
and executables are after compilation and linking. (Usually, but not
necessarily, the build directory is simply the same as the source


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