[lfs-support] GCC-4.7.1-Pass 2 MPC configure fails

Whitequill Riclo whitequill.bj at gmail.com
Wed Sep 19 23:26:29 PDT 2012


On Wed, Sep 19, 2012 at 9:11 PM, Bruce Dubbs <bruce.dubbs at gmail.com> wrote:

> Whitequill Riclo wrote:
> > On Wed, Sep 19, 2012 at 9:35 AM, Feuerbacher, Alan <
> > AFeuerbacher at allegromicro.com> wrote:
> >
> >> William Harrington wrote:
> >>
> >>> Sometimes you can't build mpfr mpc and gmp within the gcc source tree
> >>> for some targets. We found that out in CLFS. That's we we don't build
> >>> gmp mpc and mpfr within the tree. Works okay for x86 and x86_64,
> >>> however, when you start building for other targets, it becomes hairy.
> >>> You may want to try to build gmp mpfr and mpc separately.
> >>
> >> I've been mostly quietly keeping up with this question on several lists:
> >> is it better to build those programs in the source tree or separately?
> >> There's a discussion somewhere (on a gcc list?) that comes down
> strongly on
> >> the side of building them in the source tree. It even asks why anyone
> would
> >> want to do it differently. Yet the programs contain instructions for
> >> tuning, which requires them to be built separately.
> >>
> >> During the 1 1/2 years I've been playing around with compiling gcc and
> all
> >> of the LFS programs, I've experimented with building separately many
> times.
> >> No problem building them, but gcc usually fails to find at least one of
> >> them.
> >>
> >> Now, I'm a real newbie when it comes to all this, but if anyone knows
> why
> >> gcc can't seem to find the programs, I'd sure like to know. I'm trying
> to
> >> understand all the ins and outs of everything covered by LFS and a lot
> more
> >> besides.
> >>
> >> Alan
> >>
> > I've already succeeded at building gmp, and mpc with in the gcc build
> > directory, I need to make mpfr, what do you suggest I do?
> >
> > Is there a way to just build the following code block;
>
> Needs #include <mpfr.h>
>
> >     1. | int
> >     2. | main ()
> >     3. | {
> >     4. | mpfr_t x;  mpfr_init(x) ; mpfr_clear(x);
> >     5. |
> >     6. |   ;
> >     7. |   return 0;
> >     8. | }
> >
> > and then re-run make?
>
> After lfs is completed, there are the files /usr/lib/libmpfr.{a,so).
> How about:
>
> gcc -o xyz xyz.c -lmpfr
>
> Works for me.
>
> $ ldd xyz
>          linux-gate.so.1 (0xffffe000)
>          libmpfr.so.4 => /usr/lib/libmpfr.so.4 (0xb7735000)
>          libc.so.6 => /lib/libc.so.6 (0xb7584000)
>          libgmp.so.10 => /usr/lib/libgmp.so.10 (0xb751f000)
>          /lib/ld-linux.so.2 (0xb77a7000)
>
>    -- Bruce
> I think I know what I'm doing wrong finally, all the command flags I'm
> using to find mpfr are to find the mpfr library/header file, rather then
> find the source to build the library.
>
What is the appropriate flag to tell gcc the source path rather then the
library path?

> --
> http://linuxfromscratch.org/mailman/listinfo/lfs-support
> FAQ: http://www.linuxfromscratch.org/lfs/faq.html
> Unsubscribe: See the above information page
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxfromscratch.org/pipermail/lfs-support/attachments/20120920/3138e9c7/attachment.html>


More information about the lfs-support mailing list