avr-gcc funktioniert nach Update nicht mehr (Linux)

Gast #2668332
Lesenswert?

Guten Abend,

Ich habe (blöderweise) ein update meines Kubuntu gemacht. Ich bin jetzt 
mit der wohl neuesten 12.04 oder sowas unterwegs. Leider schmeißt mir 
mein make seit dem nur noch grütze raus. Undzwar:
1
In file included from /usr/lib/gcc/avr/4.5.3/include/stdint.h:3:0,
2
                 from /usr/lib/gcc/avr/4.5.3/../../../avr/include/inttypes.h:37,
3
                 from /usr/lib/gcc/avr/4.5.3/../../../avr/include/stdio.h:44,
4
                 from main.c:32:
5
/usr/lib/gcc/avr/4.5.3/../../../avr/include/stdint.h:121:1: error: expected =, ,, ;, asm or __attribute__ before typedef
6
In file included from /usr/lib/gcc/avr/4.5.3/include/stdint.h:3:0,
7
                 from /usr/lib/gcc/avr/4.5.3/../../../avr/include/inttypes.h:37,
8
                 from /usr/lib/gcc/avr/4.5.3/../../../avr/include/stdio.h:44,
9
                 from main.c:32:
10
/usr/lib/gcc/avr/4.5.3/../../../avr/include/stdint.h:159:16: error: expected =, ,, ;, asm or __attribute__ before int_least8_t
11
In file included from /usr/lib/gcc/avr/4.5.3/include/stdint.h:3:0,
12
                 from /usr/lib/gcc/avr/4.5.3/../../../avr/include/inttypes.h:37,
13
                 from /usr/lib/gcc/avr/4.5.3/../../../avr/include/stdio.h:44,
14
                 from main.c:32:
15
/usr/lib/gcc/avr/4.5.3/../../../avr/include/stdint.h:213:16: error: expected =, ,, ;, asm or __attribute__ before int_fast8_t
16
In file included from main.c:36:0:
17
/usr/lib/gcc/avr/4.5.3/../../../avr/include/avr/pgmspace.h:221:16: error: expected =, ,, ;, asm or __attribute__ before prog_int8_t

Meine Versuche: Ich habe zuerst avr-gcc und avr-libc deinstalliert, dann 
apt-get update gemacht, autoremove und dann wieder installiert. Hat 
nichts gebracht.
Leider bin ich nicht so der Held was Linux und AVR angeht, würde aber 
gerne bisschen weiter programmieren. Lösungsvorschläge irgendjemand?

Grüße
Gast #2668403
Lesenswert?

Johann L. schrieb:
> Du installierst in /usr/lib? Klingt seltsam...
Wenn du das sagst, scheints zu stimmen... Ich hab keine Ahnung. Ich 
benutze sudo apt-get install
Bis jetzt hat das immer einwandfrei mit allem und jedem geklappt. Wie 
kann ich denn den Installationspfad überhaupt beeinflussen? Dachte unter 
Linux wird das alles automatisch gemacht.

Ich habe jetzt mal nur: avr-gcc main.c -v eingegeben.
1
avr-gcc main.c -v
2
Using built-in specs.
3
COLLECT_GCC=avr-gcc
4
COLLECT_LTO_WRAPPER=/usr/lib/gcc/avr/4.5.3/lto-wrapper
5
Target: avr
6
Configured with: ../src/configure -v --enable-languages=c,c++ --prefix=/usr/lib --infodir=/usr/share/info --mandir=/usr/share/man --bindir=/usr/bin --libexecdir=/usr/lib --libdir=/usr/lib --enable-shared --with-system-zlib --enable-long-long --enable-nls --without-included-gettext --disable-libssp --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=avr
7
Thread model: single
8
gcc version 4.5.3 (GCC) 
9
COLLECT_GCC_OPTIONS='-v'
10
 /usr/lib/gcc/avr/4.5.3/cc1 -quiet -v main.c -quiet -dumpbase main.c -auxbase main -version -o /tmp/cchoxGF8.s
11
GNU C (GCC) version 4.5.3 (avr)
12
        compiled by GNU C version 4.6.2, GMP version 5.0.2, MPFR version 3.1.0-p3, MPC version 0.9
13
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
14
ignoring nonexistent directory "/usr/lib/gcc/avr/4.5.3/../../../avr/sys-include"
15
#include "..." search starts here:
16
#include <...> search starts here:
17
 /usr/lib/gcc/avr/4.5.3/include
18
 /usr/lib/gcc/avr/4.5.3/include-fixed
19
 /usr/lib/gcc/avr/4.5.3/../../../avr/include
20
End of search list.
21
GNU C (GCC) version 4.5.3 (avr)
22
        compiled by GNU C version 4.6.2, GMP version 5.0.2, MPFR version 3.1.0-p3, MPC version 0.9
23
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
24
Compiler executable checksum: a178c2de5985e958d5ea3a6b75766c05
25
In file included from /usr/lib/gcc/avr/4.5.3/include/stdint.h:3:0,
26
                 from /usr/lib/gcc/avr/4.5.3/../../../avr/include/inttypes.h:37,
27
                 from /usr/lib/gcc/avr/4.5.3/../../../avr/include/stdio.h:44,
28
                 from main.c:32:
29
/usr/lib/gcc/avr/4.5.3/../../../avr/include/stdint.h:121:1: error: expected =, ,, ;, asm or __attribute__ before typedef
30
/usr/lib/gcc/avr/4.5.3/../../../avr/include/stdint.h:159:18: error: expected =, ,, ;, asm or __attribute__ before int_least8_t
31
/usr/lib/gcc/avr/4.5.3/../../../avr/include/stdint.h:213:16: error: expected =, ,, ;, asm or __attribute__ before int_fast8_t
32
In file included from main.c:33:0:
33
/usr/lib/gcc/avr/4.5.3/../../../avr/include/avr/io.h:428:6: warning: #warning "device type not defined"
34
In file included from main.c:35:0:
35
/usr/lib/gcc/avr/4.5.3/../../../avr/include/util/delay.h:95:3: warning: #warning "Compiler optimizations disabled; functions from <util/delay.h> won't work as designed"
36
In file included from main.c:36:0:
37
/usr/lib/gcc/avr/4.5.3/../../../avr/include/avr/pgmspace.h:221:19: error: expected =, ,, ;, asm or __attribute__ before prog_int8_t
38
main.c: In function init:
39
main.c:102:3: error: DDRB undeclared (first use in this function)
40
main.c:102:3: note: each undeclared identifier is reported only once for each function it appears in
41
main.c:102:16: error: PB5 undeclared (first use in this function)
42
main.c:102:29: error: PB3 undeclared (first use in this function)
43
main.c:102:42: error: PB2 undeclared (first use in this function)
44
main.c:103:3: error: SPCR undeclared (first use in this function)
45
main.c:103:17: error: SPE undeclared (first use in this function)
46
main.c:103:30: error: MSTR undeclared (first use in this function)
47
main.c:104:2: error: SPSR undeclared (first use in this function)
48
main.c:104:16: error: SPI2X undeclared (first use in this function)
49
main.c:107:2: error: TCCR0 undeclared (first use in this function)
50
main.c:107:17: error: CS01 undeclared (first use in this function)
51
main.c:107:31: error: CS00 undeclared (first use in this function)
52
main.c:108:2: error: TIMSK undeclared (first use in this function)
53
main.c:108:17: error: TOIE0 undeclared (first use in this function)
54
main.c:111:2: error: TCCR1B undeclared (first use in this function)
55
main.c:111:18: error: CS11 undeclared (first use in this function)
56
main.c:111:32: error: WGM12 undeclared (first use in this function)
57
main.c:112:17: error: OCIE1A undeclared (first use in this function)
58
main.c:113:2: error: OCR1A undeclared (first use in this function)
59
main.c: In function SPI_schiebe:
60
main.c:245:2: error: SPDR undeclared (first use in this function)
61
main.c:247:10: error: SPSR undeclared (first use in this function)
62
main.c:247:23: error: SPIF undeclared (first use in this function)
63
main.c:249:2: error: PORTB undeclared (first use in this function)
64
main.c:249:17: error: PB2 undeclared (first use in this function)

Das ist die Ausgabe direkt aus dem Terminal kopiert. Ich kann damit 
leider herzlich wenig anfangen...
Gast #2668426
Lesenswert?

Kann es sein, dass es an der Zeile liegt?: ignoring nonexistent 
directory "/usr/lib/gcc/avr/4.5.3/../../../avr/sys-include"
1
Using built-in specs.
2
COLLECT_GCC=avr-gcc
3
COLLECT_LTO_WRAPPER=/usr/lib/gcc/avr/4.5.3/lto-wrapper
4
Target: avr
5
Configured with: ../src/configure -v --enable-languages=c,c++ --prefix=/usr/lib --infodir=/usr/share/info --mandir=/usr/share/man --bindir=/usr/bin --libexecdir=/usr/lib --libdir=/usr/lib --enable-shared --with-system-zlib --enable-long-long --enable-nls --without-included-gettext --disable-libssp --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=avr
6
Thread model: single
7
gcc version 4.5.3 (GCC) 
8
COLLECT_GCC_OPTIONS='-v' '-mmcu='
9
 /usr/lib/gcc/avr/4.5.3/cc1 -quiet -v main.c -quiet -dumpbase main.c -mmcu= -auxbase main -version -o /tmp/cckpf3kr.s
10
cc1: error: missing argument to "-mmcu="
11
GNU C (GCC) version 4.5.3 (avr)
12
        compiled by GNU C version 4.6.2, GMP version 5.0.2, MPFR version 3.1.0-p3, MPC version 0.9
13
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
14
ignoring nonexistent directory "/usr/lib/gcc/avr/4.5.3/../../../avr/sys-include"
15
#include "..." search starts here:
16
#include <...> search starts here:
17
 /usr/lib/gcc/avr/4.5.3/include
18
 /usr/lib/gcc/avr/4.5.3/include-fixed
19
 /usr/lib/gcc/avr/4.5.3/../../../avr/include
20
End of search list.
21
GNU C (GCC) version 4.5.3 (avr)
22
        compiled by GNU C version 4.6.2, GMP version 5.0.2, MPFR version 3.1.0-p3, MPC version 0.9
23
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Gast #2668450
Lesenswert?

Ok, da hab ich dann mal substituiert und nun kommen wieder mehr 
Fehlermeldungen.
1
Using built-in specs.
2
COLLECT_GCC=avr-gcc
3
COLLECT_LTO_WRAPPER=/usr/lib/gcc/avr/4.5.3/lto-wrapper
4
Target: avr
5
Configured with: ../src/configure -v --enable-languages=c,c++ --prefix=/usr/lib --infodir=/usr/share/info --mandir=/usr/share/man --bindir=/usr/bin --libexecdir=/usr/lib --libdir=/usr/lib --enable-shared --with-system-zlib --enable-long-long --enable-nls --without-included-gettext --disable-libssp --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=avr
6
Thread model: single
7
gcc version 4.5.3 (GCC) 
8
COLLECT_GCC_OPTIONS='-v' '-mmcu=atmega8'
9
 /usr/lib/gcc/avr/4.5.3/cc1 -quiet -v -imultilib avr4 main.c -quiet -dumpbase main.c -mmcu=atmega8 -auxbase main -version -o /tmp/ccOK4yeg.s
10
GNU C (GCC) version 4.5.3 (avr)
11
        compiled by GNU C version 4.6.2, GMP version 5.0.2, MPFR version 3.1.0-p3, MPC version 0.9
12
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
13
ignoring nonexistent directory "/usr/lib/gcc/avr/4.5.3/../../../avr/sys-include"
14
#include "..." search starts here:
15
#include <...> search starts here:
16
 /usr/lib/gcc/avr/4.5.3/include
17
 /usr/lib/gcc/avr/4.5.3/include-fixed
18
 /usr/lib/gcc/avr/4.5.3/../../../avr/include
19
End of search list.
20
GNU C (GCC) version 4.5.3 (avr)
21
        compiled by GNU C version 4.6.2, GMP version 5.0.2, MPFR version 3.1.0-p3, MPC version 0.9
22
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
23
Compiler executable checksum: a178c2de5985e958d5ea3a6b75766c05
24
In file included from /usr/lib/gcc/avr/4.5.3/include/stdint.h:3:0,
25
                 from /usr/lib/gcc/avr/4.5.3/../../../avr/include/inttypes.h:37,
26
                 from /usr/lib/gcc/avr/4.5.3/../../../avr/include/stdio.h:44,
27
                 from main.c:32:
28
/usr/lib/gcc/avr/4.5.3/../../../avr/include/stdint.h:121:1: error: expected =, ,, ;, asm or __attribute__ before typedef
29
/usr/lib/gcc/avr/4.5.3/../../../avr/include/stdint.h:159:18: error: expected =, ,, ;, asm or __attribute__ before int_least8_t
30
/usr/lib/gcc/avr/4.5.3/../../../avr/include/stdint.h:213:16: error: expected =, ,, ;, asm or __attribute__ before int_fast8_t
31
In file included from main.c:35:0:
32
/usr/lib/gcc/avr/4.5.3/../../../avr/include/util/delay.h:95:3: warning: #warning "Compiler optimizations disabled; functions from <util/delay.h> won't work as designed"
33
In file included from main.c:36:0:
34
/usr/lib/gcc/avr/4.5.3/../../../avr/include/avr/pgmspace.h:221:19: error: expected =, ,, ;, asm or __attribute__ before prog_int8_t
Gast #2668472
Lesenswert?

Yalu X. schrieb:
> Ich bin mir fast sicher, dass in den ersten 31 Zeilen deines main.c
> etwas Böses steht oder etwas Böses includet wird.
>
> Böses entfernen oder korrigieren und noch einmal probieren.

Boah wie ich mein Leben hasse... Ich habe bestimmt schon 4 Stunden 
versucht das zu reparieren und habs aufs Update geschoben und da ist VOR 
dem ersten #define ein Buchstabe gerutscht. Wie der da hingekommen ist, 
ist mir ein Rätsel.... Bah.

So. Genug geflucht.

Danke für die Hilfe! Tut mir wirklich leid, dass ich mich da so tierisch 
blöd bei angestellt habe!

Grüße!

Antwort schreiben

Bitte melde dich an, um einen Beitrag zu schreiben.

oder

Mit Google-Account einloggen

Die Registrierung ist kostenlos und dauert nur eine Minute.

Jetzt registrieren