[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gnokii 0.4.3: smsd leading zero truncation problem.
From: |
Jan Derfinak |
Subject: |
Re: gnokii 0.4.3: smsd leading zero truncation problem. |
Date: |
Tue, 11 Feb 2003 15:54:03 +0100 (CET) |
On Tue, 11 Feb 2003, Pawel Kot wrote:
> > I don't understand Pawel's answer.
> > This is error during compilation.
>
> No, this is the error during the linking.
Yes I know, I only want to point out that it is not runtime.
> > But we have -L../common switch.
> > I have never copied libgnokii to /usr/local/lib but compilation works
> for me.
>
> Yeah, that's the other option. But once you have
> libgnokii.so installed in /usr/local/lib it takes the
> precedence over ../common location.
This is absolutly wrong. If it is true, you will be unable linking own
binaries with own libraries as normal user. This isn't unix behaviour. The
command line options must override default values. This behaviour is
described in manual page:
-Lsearchdir
--library-path=searchdir
Add path searchdir to the list of paths that ld will
search for archive libraries and ld control scripts.
You may use this option any number of times. The
directories are searched in the order in which they
are specified on the command line. Directories speci?
fied on the command line are searched before the
^^^^^^
default directories. All -L options apply to all -l
options, regardless of the order in which the options
appear.
The problem I see in this case is that we have -rpath on the front of line.
The manual page says:
The -rpath option is also used when locating shared
objects which are needed by shared objects explicitly
included in the link
The directory order is taken from command line options order which is wrong
in this case. User can very easly link binaries with old libraries.
Why we need -Wl,--rpath -Wl,/usr/local/lib in command line?
jano