[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] Trouble compiling avr-gcc > 4.4.4 on Mac OS X Leopard
From: |
Jens Bauer |
Subject: |
Re: [avr-gcc-list] Trouble compiling avr-gcc > 4.4.4 on Mac OS X Leopard with gcc-4.2 (Solved) |
Date: |
Fri, 14 Oct 2011 21:50:30 +0200 |
Hi Johann and Mark,
Good news to those, who got here, because they searched for this error-message.
I finally got gcc-4.5.3 to build, and 4.6.1 as well, without problems, read
on...
Johann wrote...
>> It seems that I *must* build the GMP/MPFR/MPC-libraries.
>
>Strings GCC should build it for you. It must see the lib's sources in the
>source tree, of course.
>
>>> make[2]: Nothing to be done for `all'.
>>> mkdir ./mpfr
>>> Configuring in ./mpfr
>>> configure: error: --target is not appropriate for GMP
>>> Use --build=CPU-VENDOR-OS if you need to specify your CPU and/or system
>>> explicitly. Use --host if cross-compiling (see "Installing GMP" in the
>>> manual for more on this).
>>> make[1]: *** [configure-mpfr] Error 1
>>> make: *** [all] Error 2
>
>Is that a message from an in-tree build?
>Or from you stand-alone build of mpfr?
I did a complete build of gmp, mpfr and mpc.
-I had a bash-function, which built these for me, so I only had to supply the
name of the library and some extra information; all were treated the same way.
However, I made a stupid mistake, which was very hard to see; I guess that
looking at the same lines over and over does not always discover the errors.
I had...
ln -s "$SOURCEDIR/$GMP" "$SOURCEDIR/$GCC/$NAME"
where $GCC was gcc-4.5.3, $GMP was gmp-5.0.2 and $NAME was one of these: gmp,
mpfr or mpc.
The error is quite clear to anyone who reads this too, isn't it ?
But building gcc-4.4.x and below worked fine. This is probably because I could
build the libraries and then supply their installdirs to gcc's configure for
these versions. Perhaps the 4.4.x and earlier reads the --with-gmp/mpfr/mpc
parameters (perhaps more 'relaxed'), where the newer versions might not?
Worst thing is that I copied this error to my arm-toolchain script too, so I
confused myself even more.
I thought that I would 'get help' from building a Yagarto toolchain (as it
builds gcc-4.6.0 for ARM), but Yagarto (currently) fails on my system; this is
because it for some reason reverts to using gcc-4.0 instead of gcc-4.2! -I'll
try see if I can find the fix and report that to Michael.
Mark wrote...
>Thought occurs to me ... stop building the libs (there are build
>configure flags for that), you do not need an AVR GMP library, only
>the native library as part of the build of the gcc executable.
I've tried this, and it works for me now.
My idea was to have a 'bunch' of separate compilers, all sharing the same
gmp/mpfr/mpc.
I believed that I was using the libraries as shared libraries, however they
probably were hard-linked static libraries instead (in gcc >= 4.5 anyway).
Conclusion: if you get the above configure-error, you've most likely got the
same error as I had.
First try...
cd into your gcc source directory, then issue.
ls -la gmp mpfr mpc
And make sure, that gmp points to gmp-5.0.2, mpfr points to mpfr-3.0.1 and mpc
points to mpc-0.9
(or which versions you're using).
Another hint: before each compile starts, delete the above 3 folders/links and
try copying the files in, instead of making symbolic links.
As both Johann and Mark told me, it should not be necessary to build
gmp/mpfr/mpc each time, but making a soft-link from to the source-directories
from within gcc's source-directory should be enough. By doing that, you'll save
a lot of hours on compiling code that isn't used anyway. :)
I applied the patches for binutils and avr-libc, and everything builds,
including binutils, gcc, avr-libc and a LED-flasher.
Thank you again Johann, Mark, Bingo and Eric for leading me on the right track.
:)
Love,
Jens
- Re: [avr-gcc-list] Trouble compiling avr-gcc > 4.4.4 on Mac OS X Leopard with gcc-4.2, (continued)
- Re: [avr-gcc-list] Trouble compiling avr-gcc > 4.4.4 on Mac OS X Leopard with gcc-4.2, Georg-Johann Lay, 2011/10/11
- Re: [avr-gcc-list] Trouble compiling avr-gcc > 4.4.4 on Mac OS X Leopard with gcc-4.2, Jens Bauer, 2011/10/11
- Re: [avr-gcc-list] Trouble compiling avr-gcc > 4.4.4 on Mac OS X Leopard with gcc-4.2, Erik Christiansen, 2011/10/11
- Re: [avr-gcc-list] Trouble compiling avr-gcc > 4.4.4 on Mac OS X Leopard with gcc-4.2, Georg-Johann Lay, 2011/10/11
- Re: [avr-gcc-list] Trouble compiling avr-gcc > 4.4.4 on Mac OS X Leopard with gcc-4.2, Bingo, 2011/10/11
- Re: [avr-gcc-list] Trouble compiling avr-gcc > 4.4.4 on Mac OS X Leopard with gcc-4.2, Jens Bauer, 2011/10/11
- Re: [avr-gcc-list] Trouble compiling avr-gcc > 4.4.4 on Mac OS X Leopard with gcc-4.2, Bingo, 2011/10/11
- Re: [avr-gcc-list] Trouble compiling avr-gcc > 4.4.4 on Mac OS X Leopard with gcc-4.2, Jens Bauer, 2011/10/11
- Re: [avr-gcc-list] Trouble compiling avr-gcc > 4.4.4 on Mac OS X Leopard with gcc-4.2, Jens Bauer, 2011/10/12
- Re: [avr-gcc-list] Trouble compiling avr-gcc > 4.4.4 on Mac OS X Leopard with gcc-4.2, Georg-Johann Lay, 2011/10/12
- Re: [avr-gcc-list] Trouble compiling avr-gcc > 4.4.4 on Mac OS X Leopard with gcc-4.2 (Solved),
Jens Bauer <=
- Re: [avr-gcc-list] Trouble compiling avr-gcc > 4.4.4 on Mac OS X Leopard with gcc-4.2 (Solved), Joerg Wunsch, 2011/10/14
- Re: [avr-gcc-list] Trouble compiling avr-gcc > 4.4.4 on Mac OS X Leopard with gcc-4.2 (Solved), Jens Bauer, 2011/10/15
- Re: [avr-gcc-list] Trouble compiling avr-gcc > 4.4.4 on Mac OS X Leopard with gcc-4.2 (Solved), Joerg Wunsch, 2011/10/20
- Re: [avr-gcc-list] Trouble compiling avr-gcc > 4.4.4 on Mac OS X Leopard with gcc-4.2 (Solved), Bingo, 2011/10/20
- Re: [avr-gcc-list] Trouble compiling avr-gcc > 4.4.4 on Mac OS X Leopard with gcc-4.2 (Solved), Jens Bauer, 2011/10/20
- Re: [avr-gcc-list] Trouble compiling avr-gcc > 4.4.4 on Mac OS X Leopard with gcc-4.2 (Solved), Joerg Wunsch, 2011/10/27
- Re: [avr-gcc-list] Trouble compiling avr-gcc > 4.4.4 on Mac OS X Leopard with gcc-4.2 (Solved), Jens Bauer, 2011/10/27
- Re: [avr-gcc-list] Trouble compiling avr-gcc > 4.4.4 on Mac OS X Leopard with gcc-4.2 (Solved), Weddington, Eric, 2011/10/27
- Re: [avr-gcc-list] Trouble compiling avr-gcc > 4.4.4 on Mac OS X Leopard with gcc-4.2 (Solved), Jens Bauer, 2011/10/27
- Re: [avr-gcc-list] Trouble compiling avr-gcc > 4.4.4 on Mac OS X Leopard with gcc-4.2 (Solved), Joerg Wunsch, 2011/10/27