Mailinglist Archive: opensuse-factory (454 mails)

< Previous Next >
[opensuse-factory] avr-gcc cannot find avr-as
  • From: Frank Kunz <mailinglists@xxxxxxxxxxxxxxxxx>
  • Date: Thu, 07 Dec 2017 22:01:31 +0100
  • Message-id: <2050400.xVSTRcgX6B@donald>
Sorry, I'm not sure if that is the correct list for this issue, but I haven't
found a proper one.

I have installed the packages avr-libc, cross-avr-binutils and cross-avr-gcc
from the
http://download.opensuse.org/repositories/CrossToolchain:/avr/openSUSE_Tumbleweed/
repository.

When I try to compile a simple main.c with avr-gcc:

int main(void)
{
for(;;);
}

I get a
avr-gcc -o file main.c
as: unrecognized option '-mmcu=avr2'

when I run the command with strace I get:

stat("/opt/cross/libexec/gcc/avr/5.4.0/as", 0x7ffe2ea0b150) = -1 ENOENT (No
such file or directory)
stat("/opt/cross/libexec/gcc/avr/5.4.0/as", 0x7ffe2ea0b150) = -1 ENOENT (No
such file or directory)
stat("/opt/cross/libexec/gcc/avr/as", 0x7ffe2ea0b150) = -1 ENOENT (No such file
or directory)
stat("/opt/cross/lib/gcc/avr/5.4.0/as", 0x7ffe2ea0b150) = -1 ENOENT (No such
file or directory)
stat("/opt/cross/lib/gcc/avr/as", 0x7ffe2ea0b150) = -1 ENOENT (No such file or
directory)
stat("/opt/cross/lib/gcc/avr/5.4.0/../../../../avr/bin/avr/5.4.0/as",
0x7ffe2ea0b150) = -1 ENOENT (No such file or directory)
stat("/opt/cross/lib/gcc/avr/5.4.0/../../../../avr/bin/as", 0x7ffe2ea0b150) =
-1 ENOENT (No such file or directory)

then the PATH is searched for an "as" executable and finally it ends up at
/usr/bin/as, which is the host assembler that does not understand the
'-mmcu=avr2' option.

The problem seems to be that the avr-binutils are installed under /usr/avr, but
the avr-gcc is under /opt/cross-avr. The "avr-" binaries are in the PATH, but
avr-gcc is not searching for them.

Is this a bug? Or is there a configuration to get that working?

Br,
Frank
--
To unsubscribe, e-mail: opensuse-factory+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse-factory+owner@xxxxxxxxxxxx

< Previous Next >