trouble building avr-gcc 4.5.1 [solved: missing dependency]

Go To Last Post
6 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello,

I decided to use the latest version of gcc for my avr. Thus I went on and installed the binutils for avr in /usr/local/avr/bin ... all fine. Then I installed the latest versions of gmp, mcfr and mcp (required for gcc) and then I wanted to install gcc.
So I created a folder "obj-avr" in the gcc source directory and used this for configure:
../configure --prefix=$PREFIX --target=avr --enable-languages=c,c++ --disable-nls --disable-libssp --with-dwarf2

Then I run the make command but I got this error:

checking for suffix of object files... configure: error: in `/local/scratch/osc22/dwl/gcc-4.5.1/obj-avr/avr/libgcc':
configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.

I've checked many posts online but I am not able to figure the exact problem, so maybe someone already knows what can it be. By looking at the config.log I can see a strange thing, in that the config is using some binutils from a different folder:
configure:13579: checking where to find the target ar
configure:13607: result: pre-installed in /usr/local/avr/avr/bin
..
ac_cv_path_AR_FOR_TARGET=/usr/local/avr/avr/bin/ar
ac_cv_path_AS_FOR_TARGET=/usr/local/avr/avr/bin/as

the above paths are a bit strange, as I have the avr-as, and avr-ar on the /usr/local/avr/bin folder and that is where my PATH variable points as well. So I believe that somehow the configure script or the make process has messed up with the folders. I am not sure if this is the problem. However if you think this might be the issue let me know how to specify the correct path for the as/ar and any other necessary tools.
Also for the record, the $PREFIX is set to /usr/local/avr

Another thing to mention on the config.log is that there are a couple errors but which don't seem to affect the make process:
configure:6487: gcc -c -g -O2 -I/usr/include/libelf -I/usr/include/libelf conftest.c >&5
conftest.c:53:18: error: gelf.h: No such file or directory
...
configure:6475: gcc -c -g -O2 -I/usr/include/libelf -I/usr/include/libelf conftest.c >&5
conftest.c:53:20: error: libelf.h: No such file or directory

Thanks.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

> See `config.log' for more details.

Did you follow that advise?

Jörg Wunsch

Please don't send me PMs, use email if you want to approach me personally.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I posted what I understood and thought relevant from that file. I would like to know if this is a common error as I have seen many posts about it and what is a fix to it.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

What's the exact error that caused the compilation of conftest.c
for *this* test to fail? It can be found towards the end of the
file config.log, above the printout of all the variables.

Just ignore all other test compilation failures there. After all,
it's an auto-probing process.

You could also attach config.log to a message here if you are unsure what
you are looking for.

Jörg Wunsch

Please don't send me PMs, use email if you want to approach me personally.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Also important, do you have any idea why I see the /usr/local/avr/avr folder? (my tools should be in /usr/local/avr/bin not in /usr/local/avr/avr/bin)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Nevermind...

It seems that after installing the following packages (mentioned either in the errors of config.log or the prerequisites of gcc) the problem has gone:
libelf-dev
libgnat-4.4
libppl0.10-dev

Thanks.