Bug in Build System of gcc-4.5.1? Cannot Find libmpc.so.2

Andrew Haley aph@redhat.com
Fri Aug 27 14:08:00 GMT 2010


On 08/27/2010 01:18 PM, Tom Browder wrote:
> On Fri, Aug 27, 2010 at 07:09, Andrew Haley <aph@redhat.com> wrote:
>> On 08/27/2010 12:58 PM, Tom Browder wrote:
>>> I have been wrestling with building gcc-4.5.1 on an old Linux i686
>>> machine running SuSE 10 with gcc-4.0.3.
>>>
>>> Note that the fatal error is that libmpc.so.2 cannot be found yet I
>>> can see it in the place I told configure to look.
>>
>> I suspect that LD_LIBRARY_PATH does not include the directory in which
>> you placed libmpc, so nothing can find it at runtime.
> 
> Okay, but I didn't use it because I keep reading advice NOT to use it.

OK, so you have to give ld.so some other way to find those libraries.

> I'll try that.
> 
> But shouldn't gcc's build system work as advertised?  Otherwise, what
> good are those options to pass flags to the various stages?

You'd still have to include the libraries in your runtime path when
you use gcc, even if gcc did some LD_LIBRARY_PATH heroics at build
time.

The rule is really simple: for any libraries you build, if they are to
be used, you have to tell ld.so how to find them.  LD_LIBRARY_PATH,
ld.so.conf, whatever.

>> It's a lot easier to build the prerequisites as part of gcc.  See the
>> script in http://gcc.gnu.org/svn/gcc/trunk/contrib/download_prerequisites
> 
> I used to do that but have had problems with recent builds.

Hmm, that is bad, then.

Andrew.



More information about the Gcc-help mailing list