[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Adding system dependency path
From: |
Christoph Bartoschek |
Subject: |
Adding system dependency path |
Date: |
Sun, 5 Jun 2005 18:17:13 +0200 |
User-agent: |
KMail/1.8.1 |
Hi,
I try to compile KDE on a very old system and have one problem. Let me first
describe the situation:
I have a directory ROOT where nearly all neccessary software is installed.
First I installed new binutils in ROOT/gcc then a new gcc version in the
same directory. Then I installed nearly all libraries KDE depends on in
ROOT. I guess I only left libc and libdl out. Now I want that each new
application uses the libraries in ROOT/lib and ROOT/gcc/lib. I tried to
achieve it with exporting the following variables:
export CPPFLAGS=-IROOT/include
export LDFLAGS=-LROOT/lib
PATH and LD_LIBRARY_PATH are configured such that ROOT/bin and ROOT/lib are
searched first. This procedure seems to work for the libraries KDE depends
on, but as soon as I start compiling arts the linking of the first
application fails because the wrong libstdc++ is used.
The linking step looks something like:
libtool ... -LROOT/gcc/lib ... -lstdc++ ...
the result is
g++ ... -LROOT/gcc/lib /usr/lib/libstdc++.so
The correct lib would have been ROOT/gcc/lib/libstdc++.so. Now I have several
questions:
Why does libtool resolve -lstdc++ to /usr/lib/libstdc++.so? As far as
I know each g++ knows where its own libstdc++ resides, such that -lstdc++
would be more correct. But because g++ also implies -lstdc++ it should
be omitted at all.
If it is not possible that libtool omits the -lstdc++, how can I achieve
that ROOT/gcc/lib/libstdc++.so is used? Right now I use a dirty hack.
After the configuration step I patch the resulting libtool such that
sys_lib_search_path_spec begins with ROOT/gcc/lib and ROOT/lib.
What is the correct way to force libtool to always first search in ROOT/lib
and ROOT/gcc/lib?
Greets,
Christoph Bartoschek
- Adding system dependency path,
Christoph Bartoschek <=