0

I'm trying to build binutils-2.39 and gcc-7.5.0 following the instruction here:

https://www.nongnu.org/avr-libc/user-manual/install_tools.html

These instructions have worked for me in the past. However with the above versions at least I get a non-working compiler. It fails like this:

$ avr-gcc test.c -o test
/home/tuser/local/avr/lib/gcc/avr/7.5.0/../../../../avr/bin/ld: cannot find -lm: No such file or directory
/home/tuser/local/avr/lib/gcc/avr/7.5.0/../../../../avr/bin/ld: cannot find -lc: No such file or directory

I haven't had much luck with google for these errors. Ideas?

1 Answer 1

0

It looks like my mistake was expecting the link step of compilation to work before avr-libc was installed. The above "cannot find" messages apparently refer to components normally provided by avr-libc.

Since the compile and link of a simple test file didn't work, I didn't think building avr-libc would either. But it did, and after installation then building of the original (basically empty) test program did also.

This probably should have been obvious but something pathological in my normal (non-test user) setup is causing the ./configure of avr-libc to fail in a way that let me astray. Sorry if this cost anyone any time.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.