[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-libc-dev] RE: Probs building avr-gcc

From: Rick Altherr
Subject: Re: [avr-libc-dev] RE: Probs building avr-gcc
Date: Sun, 14 Oct 2007 09:26:47 -0700

You need to install the gmp library (http://gmplib.org/).
Rick Altherr

"He said he hadn't had a byte in three days. I had a short, so I split it with him."
 -- Slashdot signature

On Oct 11, 2007, at 1:05 AM, leehj wrote:

Added more complete error from config.log in Build (objdir) folder

configure:2341:17: error: gmp.h: No such file or directory
configure: In function 'main':
configure:2345: error: 'choke' undeclared (first use in this function)
configure:2345: error: (Each undeclared identifier is reported only once
configure:2345: error: for each function it appears in.)
configure:2345: error: expected ';' before 'me'
configure: failed program was:
#line 2340 "configure"
#include "confdefs.h"
#include "gmp.h"
int main() {

< 1)
choke me


I have actually have the same error of :-

configure:2341:17: error: gmp.h: No such file or directory

when I tried compiling gcc-4.2.1 with a separate BUILD folder apart from its
source file folder.

I did ../configure --prefix=/local/gcc/gcc-4.2.1/

but when I do a make bootstrap, the above error is displayed in config.log.
And i just coudl not proceed. Please advise what I could do.



Eric Weddington wrote:

-----Original Message-----
From: Rich Teer [mailto:address@hidden
Sent: Friday, August 31, 2007 5:00 PM
To: Eric Weddington
Cc: address@hidden
Subject: RE: [avr-libc-dev] Probs building avr-gcc

On Wed, 29 Aug 2007, Eric Weddington wrote:

Wow! You're one of the few pioneers to build and use the
AVR toolchain on

Cool!  :-)

Considering that binutils 2.18 just came out *yesterday*,
and the other
distro maintainers (myself and Joerg Wunsch) haven't had a
chance to try it
out yet, you would be going into new territory. A slightly
safer bet is to
use binutils 2.17 with gcc 4.2.1. That combination has had
a bit more

binutils 2.18 compiled and installed without fuss, so I'm pretty sure
that's not the problem.

The most common build error is configuring gcc in its own
source directory.
But you're following the directions in the avr-libc user
manual, so I assume
that you have avoided doing this? Was your configuration successful?

Yes, and I think so.

Can you attach the output from configure and from make so
we can have more

Here it is; I'm installing into /usr/local, so I don't set $PREFIX.
NOte that I use gmake instead of make.  Take a deep breath 'cause
there's lots of it!  :-)

address@hidden pwd
address@hidden mkdir obj-avr
address@hidden cd obj-avr
address@hidden ../configure --target=avr
--enable-languages=c --disable-nls --disable-libssp --with-dwarf2
creating cache ./config.cache
checking host system type... i386-pc-solaris2.11
checking target system type... avr-unknown-none
checking build system type... i386-pc-solaris2.11
checking for a BSD compatible install... /usr/bin/ginstall -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for gcc... gcc
checking whether the C compiler (gcc  ) works... yes
checking whether the C compiler (gcc  ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking for gnatbind... no
checking whether compiler driver understands Ada... no
checking how to compare bootstrapped objects... cmp $$f1 $$f2 16 16
checking for correct version of gmp.h... no

GCC now depends on the GMP and MPFR packages.

Building and installation of these libraries is pretty easy. MPFR depends
GMP, so build GMP first:

./configure --disabled-shared 2>&1 | tee gmp-configure.log
make         2>&1 | tee gmp-make.log
make check   2>&1 | tee gmp-make-check.log
make install 2>&1 | tee gmp-make-install.log

Then MPFR:

./configure --with-gmp=/usr/local --disable-shared 2>&1 | tee
make         2>&1 | tee mpfr-make.log
make check   2>&1 | tee mpfr-make-check.log
make install 2>&1 | tee mpfr-make-install.log

Then you have to tell GCC where these libraries reside, during the

../gcc-$version/configure \
   --prefix=$installdir \
   --target=$target \
   --enable-languages=c,c++,objc \
   --with-dwarf2 \
   --enable-win32-registry=WinAVR-$release \
   --disable-nls \
   --with-gmp=/usr/local \
   --with-mpfr=/usr/local \
   --enable-doc \
   --disable-shared \
   2>&1 | tee $package-configure.log

(Ignore the win32/WinAVR flag. And don't build the objc front-end without
the patch I have.)

See if this gets you any farther.

Eric Weddington

AVR-libc-dev mailing list

View this message in context: 
Sent from the AVR - Libc - Dev mailing list archive at Nabble.com.

AVR-libc-dev mailing list

Attachment: smime.p7s
Description: S/MIME cryptographic signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]