From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14179 invoked by alias); 22 Dec 2011 17:36:50 -0000 Received: (qmail 14150 invoked by uid 22791); 22 Dec 2011 17:36:46 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-ww0-f51.google.com (HELO mail-ww0-f51.google.com) (74.125.82.51) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 22 Dec 2011 17:36:32 +0000 Received: by wgbdr1 with SMTP id dr1so14466137wgb.8 for ; Thu, 22 Dec 2011 09:36:31 -0800 (PST) MIME-Version: 1.0 Received: by 10.227.199.14 with SMTP id eq14mr14062438wbb.14.1324575389758; Thu, 22 Dec 2011 09:36:29 -0800 (PST) Received: by 10.180.97.229 with HTTP; Thu, 22 Dec 2011 09:36:29 -0800 (PST) In-Reply-To: <4EF2349D.4030700@eagerm.com> References: <4EF2349D.4030700@eagerm.com> Date: Thu, 22 Dec 2011 17:42:00 -0000 Message-ID: Subject: Re: microblaze: error while loading shared libraries: libmpc.so.2 From: naga raj To: Jonathan Wakely , Michael Eager Cc: gcc-help Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2011-12/txt/msg00214.txt.bz2 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. What changes should we do so that gmp, mpc and mpfr libraries are built along with gcc Thanks, Nagaraju On Thu, Dec 22, 2011 at 1:03 AM, Michael Eager wrote: > On 12/21/2011 09:11 AM, Jonathan Wakely wrote: >> >> On 21 December 2011 16:56, naga raj wrote: >>> >>> Hi, >>> >>> =A0I have build a microblaze toolchain with Gcc version 4.6.2. >>> =A0I was successful in building the toolchain but when i try to compile >>> a program it is generating following message. >>> >>> =A0[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 >>> >>> =A0If 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. >>> >>> =A0My configure options are: >>> >>> . /configure =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 \ >> >> >> Don't do this, the installation docs strongly recommend not running >> configure in the source directory. > > > See: http://gcc.gnu.org/install/configure.html > > >> >>> =A0 =A0--with-gmp=3D/home/nagaraju/tools/abc/ =A0 =A0 \ >>> =A0 =A0--with-mpfr=3D/home/nagaraju/tools/abc/ =A0 =A0\ >>> =A0 =A0--with-mpc=3D/home/nagaraju/tools/abc/ =A0 =A0 \ >> >> >> 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 =A0 =A0eager@eagercon.com > 1960 Park Blvd., Palo Alto, CA 94306 =A0650-325-8077