crtm328p.o: No such file: No such file or director

hi everyone!

i installed everything and when i try to compile program in arduino ide i get following error:

/usr/libexec/gcc/avr/ld: crtm328p.o: No such file: No such file or directory

Couldn't determine program size: avr-size: '/tmp/build60175.tmp/Button.hex': No such file

i searched and discovered that i have crtm328p.o in /usr/local/avr/lib/avr5/crtm328p.o but i don't know how to tell it it is there.

btw i am using gentoo linux and the board is duemilanove.

please help!

It looks like you might have two different versions of the AVR-GCC tools installed, since one is looking in /usr/libexec and the other is looking in /usr/local

Older versions of the tools don't have support for the ATmega328.

i installed avr-gcc-4.3.2-r3 from portage and compiled avr-libc-1.6.6 by hand (it should support atmega328). but i don't know how to tell ld to look in /usr/local/avr for libs - i tried setting LD_LIBRARY_PATH and LIBRARY_PATH variables but that didn't help.

i also searched inside arduino directory for a place where the linker is called to pass it library path directly but i couldn't find it.

I don't have a good answer...the internals of the GCC toolchain are very complicated and still a bit mysterious.

Try recompiling AVR-LIBC making sure you specify a --prefix that is the same as your AVR-GCC compiler (looks like /usr).

i did that with prefix and it worked. thank you very much!