Re: Adding default RUNPATH to compiled binaries

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

 



"Maciej (Matchek) Bliziński" <maciej@xxxxxxxxxxx> writes:

> I've seen this topic discussed many times. The problem seems to come
> up every time gcc is compiled with prefix != /usr/bin. The way to
> reproduce it is simple:
>
> echo "int main() {}" > t.c; g++ -o t t.c ; ./t
>
> The result:
>
> ld.so.1: t: fatal: libstdc++.so.6: open failed: No such file or directory
> Killed
>
> I just had a bug filed against my gcc packages[1].  I did some
> research, and I found information about a number of approaches, which
> aren't really consistent and none of them is explained or
> self-explanatory.
>
> In some instances GCC sources were patched[2], in other the spec
> information was dumped, modified and placed where it would be taken as
> the default[3].
>
> What's the recommended way of doing it?


It depends.  One good approach is to add the appropriate directory to
/etc/ld.so.conf and run ldconfig.

Ian



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux