microblaze: error while loading shared libraries: libmpc.so.2

Jonathan Wakely jwakely.gcc@gmail.com
Thu Dec 22 20:01:00 GMT 2011


On 22 December 2011 17:36, naga raj wrote:
> Hi Mike,
>
>  Thanks for your suggestions. It was working fine.
>
>
> Hi Jonathan,
>
>   I tried including gmp/mpc/mpfr sources in gcc source folder as you
> suggested and added --with-gmp-dir option to configure but it was
> throwing an error saying  that it is deprecated. Same with the case
> with mpc and mpfr.

So don't use --with-gmp-dir

If I meant you should use option that I would have said so.

I provided a link to my blog post
http://advogato.org/person/redi/diary/253.html which shows exactly how
to do it, and that doesn't use --with-gmp-dir.  Sometimes I feel like
I explain this exact same thing over and over again and noone ever
actually reads what I've written, but because I'm too stupid to give
up I've written this wiki page to try and stop people from using
unnecessary options that cause problems:
http://gcc.gnu.org/wiki/InstallingGCC

Feel free to not read it.

>  What changes should we do so that gmp, mpc and mpfr libraries are
> built along with gcc

Just put the sources in the gcc dir. That's all.


> Thanks,
> Nagaraju
>
>
>
> On Thu, Dec 22, 2011 at 1:03 AM, Michael Eager <eager@eagerm.com> wrote:
>> On 12/21/2011 09:11 AM, Jonathan Wakely wrote:
>>>
>>> On 21 December 2011 16:56, naga raj wrote:
>>>>
>>>> Hi,
>>>>
>>>>  I have build a microblaze toolchain with Gcc version 4.6.2.
>>>>  I was successful in building the toolchain but when i try to compile
>>>> a program it is generating following message.
>>>>
>>>>  [nagaraju]$ /home/gnu/microblaze/lin/bin/mb-gcc swap.c
>>>> /home/gnu/microblaze/lin/libexec/gcc/microblaze-xilinx-elf/4.6.2/cc1:
>>>> error while loading shared libraries: libmpc.so.2: cannot open shared
>>>> object file: No such file or directory
>>>>
>>>>  If I add libmpc.so.2 path to my LD_LIBRARY_PATH it is working fine.
>>>> My question is, what should I add to build scripts so that I need not
>>>> explicitly add this library path to LD_LIBRARY_PATH.
>>>>
>>>>  My configure options are:
>>>>
>>>> . /configure                       \
>>>
>>>
>>> Don't do this, the installation docs strongly recommend not running
>>> configure in the source directory.
>>
>>
>> See: http://gcc.gnu.org/install/configure.html
>>
>>
>>>
>>>>    --with-gmp=/home/nagaraju/tools/abc/     \
>>>>    --with-mpfr=/home/nagaraju/tools/abc/    \
>>>>    --with-mpc=/home/nagaraju/tools/abc/     \
>>>
>>>
>>> Don't do this, put the GMP, MPFR amd MPC sources in the GCC source
>>> directory, in directories named "gmp", "mpfr" and "mpc" respectively.
>>>
>>> This is done automatically for you if you run the
>>> contrib/download_prerequisites script
>>>
>>> See http://advogato.org/person/redi/diary/253.html for more details.
>>
>>
>> An alternate is to build and install the pre-req libraries in
>> /usr/local and then update /etc/ld.config to search /usr/local/lib.
>>
>> --
>> Michael Eager    eager@eagercon.com
>> 1960 Park Blvd., Palo Alto, CA 94306  650-325-8077



More information about the Gcc-help mailing list