Forum: Compiler & IDEs avr-libc kompilieren schlägt fehl


von Nils S. (fitec) Benutzerseite


Lesenswert?

Hallo,

ich nutze gentoo linux und bin dabei mir die avr tools selbst zu bauen 
(keine packages in der repo).

Vorgegangen bin ich nach folgendem howto: 
http://www.nongnu.org/avr-libc/user-manual/install_tools.html

avr-binutils und avr-gcc sind auch dementsprechend korrekt kompiliert 
und installiert.

Doch bei der avr-libc schlägt bereits das configure fehl:
1
~$ ./configure --prefix=/usr/local/avr --build=`./config.guess` --host=avr
Wirft folgendes aus:
1
checking build system type... i686-pc-linux-gnu
2
checking host system type... avr-unknown-none
3
checking if configuring for cross compile... yes
4
checking if target host is avr... yes
5
checking for a BSD-compatible install... /usr/bin/install -c
6
checking whether build environment is sane... yes
7
checking for a thread-safe mkdir -p... /bin/mkdir -p
8
checking for gawk... gawk
9
checking whether make sets $(MAKE)... yes
10
checking for avr-strip... no
11
checking for strip... strip
12
configure: WARNING: In the future, Autoconf will not detect cross-tools
13
whose name does not start with the host triplet.  If you think this
14
configuration is useful to you, please write to autoconf@gnu.org.
15
checking for avr-gcc... no
16
checking for gcc... gcc
17
checking for C compiler default output file name... a.out
18
checking whether the C compiler works... yes
19
checking whether we are cross compiling... yes
20
checking for suffix of executables...
21
checking for suffix of object files... o
22
checking whether we are using the GNU C compiler... yes
23
checking whether gcc accepts -g... yes
24
checking for gcc option to accept ISO C89... none needed
25
checking for style of include used by make... GNU
26
checking dependency style of gcc... gcc3
27
checking for avr-as... no
28
checking for as... as
29
checking dependency style of gcc... gcc3
30
checking for avr-ranlib... no
31
checking for ranlib... ranlib
32
checking for avr-ar... no
33
checking for ar... ar
34
configure: error: Wrong C compiler found; check the PATH!
Wie man sieht scheint die config die avr-binutils und den avr-gcc nicht 
zu finden, wohl aber die Systemeigenen.
Erwartet configure den avr Kram eventuell in /usr/bin ?
Ich habe bereits fleißig gegoogelt, habe aber auch keinerlei Schalter 
gefunden configure beizubringen wo genau binutils und gcc für avr 
liegen.
Sollte es sich bestätigen, dass configure die in /usr/bin will, bin ich 
wohl gezwungen symbolische Links dorthin zu legen, was ich eigentlich 
vermeiden wollte.

Grüße,
Nils

von Bingo (Gast)


Lesenswert?

You need a functioning avr toolchain (compiler) on the "path" , in order 
to build avr-libc.

Make sure the avr toolchain executables are on your path.

/Bingo

von Nils S. (fitec) Benutzerseite


Lesenswert?

Hi Bingo,

which path do you mean? /usr/bin ?
My toolchain is working I think, because configuring, compiling and 
installing ran without errors and the binaries are in /usr/local/avr/bin

Regards,
Nils

von Johann L. (gjlayde) Benutzerseite


Lesenswert?

Nils S. schrieb:
> Hi Bingo,
>
> which path do you mean? /usr/bin ?
> My toolchain is working I think, because configuring, compiling and
> installing ran without errors and the binaries are in /usr/local/avr/bin

Dann muss /usr/local/avr/bin auch im Suchpfad sein, d.h. which avr-gcc 
sollte genau diesen Pfad als Antwort geben.

von Nils S. (fitec) Benutzerseite


Lesenswert?

Hi,

Danke für die schnellen Antworten ;-)
1
~$ which avr-gcc
2
which: no avr-gcc in (/sbin:/bin:/usr/sbin:/usr/bin)

Ok, Problem also wie vermutet.
Wo editiere ich denn die Pfade in denen er die binaries sucht?

Lg,
Nils

von Rolf Magnus (Gast)


Lesenswert?

export $PATH=/usr/local/avr/bin:$PATH

Das kannst du auch in deine ~/.bashrc schreiben, damit es permanent so 
bleibt.

von Rolf Magnus (Gast)


Lesenswert?

Hmpf, gerade beim Absenden gemerkt.

> export $PATH=/usr/local/avr/bin:$PATH

Muß heißen:

export PATH=/usr/local/avr/bin:$PATH

von Bingo (Gast)


Lesenswert?

Have a look here , and maybe in the script (building a full toolchain)
http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=42631

Script
http://www.avrfreaks.net/index.php?name=PNphpBB2&file=download&id=17480


I have added this to my .bash_profile in my /home directory , it sets up 
the path to avr-gcc.

# User specific environment and startup programs
PATH=$PATH:$HOME/bin:/usr/local/avr/bin
export PATH

/Bingo (who made the script)

von Nils S. (fitec) Benutzerseite


Lesenswert?

Hi,

vielen Dank, configure läuft nun sauber durch.
Jedoch schlägt das kompilieren fehl (was denn noch alles? :s).
Hier der Abschnitt:
1
Making all in attiny2313a                                                                                                                                                        
2
make[5]: Entering directory `/usr/local/avr/avr-libc-1.6.8/avr/lib/avr25/attiny2313a'                                                                                            
3
avr-gcc -DHAVE_CONFIG_H -I. -I../../../..  -I../../../../common -I../../../../include -I../../../../include  -I../../../../common -I../../../../include -I../../../../include -x assembler-with-cpp -Wa,-gstabs -mmcu=attiny2313a    -MT gcrt1.o -MD -MP -MF .deps/gcrt1.Tpo -c -o gcrt1.o ../../../../crt1/gcrt1.S                                               
4
unknown MCU 'attiny2313a' specified                                                                                                                                              
5
Known MCU names:                                                                                                                                                                 
6
   avr2                                                                                                                                                                          
7
   at90s2313                                                                                                                                                                     
8
   at90s2323                                                                                                                                                                     
9
   at90s2333                                                                                                                                                                     
10
   at90s2343                                                                                                                                                                     
11
   attiny22                                                                                                                                                                      
12
   attiny26                                                                                                                                                                      
13
   at90s4414                                                                                                                                                                     
14
   at90s4433                                                                                                                                                                     
15
   at90s4434                                                                                                                                                                     
16
   at90s8515                                                                                                                                                                     
17
   at90c8534                                                                                                                                                                     
18
   at90s8535                                                                                                                                                                     
19
   avr25                                                                                                                                                                         
20
   ata6289                                                                                                                                                                       
21
   attiny13                                                                                                                                                                      
22
   attiny13a                                                                                                                                                                     
23
   attiny2313                                                                                                                                                                    
24
   attiny24                                                                                                                                                                      
25
   attiny44                                                                                                                                                                      
26
   attiny84                                                                                                                                                                      
27
   attiny25                                                                                                                                                                      
28
   attiny45                                                                                                                                                                      
29
   attiny85                                                                                                                                                                      
30
   attiny261                                                                                                                                                                     
31
   attiny461                                                                                                                                                                     
32
   attiny861                                                                                                                                                                     
33
   attiny43u                                                                                                                                                                     
34
   attiny87                                                                                                                                                                      
35
   attiny48                                                                                                                                                                      
36
   attiny88                                                                                                                                                                      
37
   at86rf401                                                                                                                                                                     
38
   avr3                                                                                                                                                                          
39
   at43usb355                                                                                                                                                                    
40
   at76c711                                                                                                                                                                      
41
   avr31                                                                                                                                                                         
42
   atmega103                                                                                                                                                                     
43
   at43usb320                                                                                                                                                                    
44
   avr35                                                                                                                                                                         
45
   at90usb82                                                                                                                                                                     
46
   at90usb162                                                                                                                                                                    
47
   atmega8u2                                                                                                                                                                     
48
   atmega16u2                                                                                                                                                                    
49
   atmega32u2                                                                                                                                                                    
50
   attiny167                                                                                                                                                                     
51
   attiny327                                                                                                                                                                     
52
   avr4                                                                                                                                                                          
53
   atmega8                                                                                                                                                                       
54
   atmega48                                                                                                                                                                      
55
   atmega48p                                                                                                                                                                     
56
   atmega88                                                                                                                                                                      
57
   atmega88p                                                                                                                                                                     
58
   atmega8515                                                                                                                                                                    
59
   atmega8535                                                                                                                                                                    
60
   atmega8c1                                                                                                                                                                     
61
   atmega8m1                                                                                                                                                                     
62
   atmega8hva                                                                                                                                                                    
63
   atmega4hvd                                                                                                                                                                    
64
   atmega8hvd                                                                                                                                                                    
65
   at90pwm1                                                                                                                                                                      
66
   at90pwm2                                                                                                                                                                      
67
   at90pwm2b                                                                                                                                                                     
68
   at90pwm3                                                                                                                                                                      
69
   at90pwm3b                                                                                                                                                                     
70
   at90pwm81                                                                                                                                                                     
71
   avr5                                                                                                                                                                          
72
   atmega16                                                                                                                                                                      
73
   atmega161                                                                                                                                                                     
74
   atmega162                                                                                                                                                                     
75
   atmega163                                                                                                                                                                     
76
   atmega164p                                                                                                                                                                    
77
   atmega165                                                                                                                                                                     
78
   atmega165p                                                                                                                                                                    
79
   atmega168                                                                                                                                                                     
80
   atmega168p                                                                                                                                                                    
81
   atmega169                                                                                                                                                                     
82
   atmega169p                                                                                                                                                                    
83
   atmega32                                                                                                                                                                      
84
   atmega323                                                                                                                                                                     
85
   atmega324p                                                                                                                                                                    
86
   atmega325                                                                                                                                                                     
87
   atmega325p                                                                                                                                                                    
88
   atmega3250                                                                                                                                                                    
89
   atmega3250p                                                                                                                                                                   
90
   atmega328p                                                                                                                                                                    
91
   atmega329                                                                                                                                                                     
92
   atmega329p                                                                                                                                                                    
93
   atmega3290                                                                                                                                                                    
94
   atmega3290p                                                                                                                                                                   
95
   atmega406                                                                                                                                                                     
96
   atmega64                                                                                                                                                                      
97
   atmega640                                                                                                                                                                     
98
   atmega644                                                                                                                                                                     
99
   atmega644p                                                                                                                                                                    
100
   atmega645                                                                                                                                                                     
101
   atmega6450                                                                                                                                                                    
102
   atmega649                                                                                                                                                                     
103
   atmega6490                                                                                                                                                                    
104
   atmega16hva                                                                                                                                                                   
105
   atmega16hvb                                                                                                                                                                   
106
   atmega32hvb                                                                                                                                                                   
107
   at90can32                                                                                                                                                                     
108
   at90can64                                                                                                                                                                     
109
   at90pwm216                                                                                                                                                                    
110
   at90pwm316                                                                                                                                                                    
111
   atmega16c1                                                                                                                                                                    
112
   atmega32c1                                                                                                                                                                    
113
   atmega64c1                                                                                                                                                                    
114
   atmega16m1                                                                                                                                                                    
115
   atmega32m1                                                                                                                                                                    
116
   atmega64m1                                                                                                                                                                    
117
   atmega16u4                                                                                                                                                                    
118
   atmega32u4                                                                                                                                                                    
119
   atmega32u6                                                                                                                                                                    
120
   at90scr100                                                                                                                                                                    
121
   at90usb646                                                                                                                                                                    
122
   at90usb647                                                                                                                                                                    
123
   at94k                                                                                                                                                                         
124
   avr51                                                                                                                                                                         
125
   atmega128                                                                                                                                                                     
126
   atmega1280                                                                                                                                                                    
127
   atmega1281                                                                                                                                                                    
128
   atmega1284p                                                                                                                                                                   
129
   atmega128rfa1                                                                                                                                                                 
130
   at90can128                                                                                                                                                                    
131
   at90usb1286                                                                                                                                                                   
132
   at90usb1287                                                                                                                                                                   
133
   m3000f                                                                                                                                                                        
134
   m3000s                                                                                                                                                                        
135
   m3001b                                                                                                                                                                        
136
   avr6                                                                                                                                                                          
137
   atmega2560                                                                                                                                                                    
138
   atmega2561                                                                                                                                                                    
139
   avr1                                                                                                                                                                          
140
   at90s1200                                                                                                                                                                     
141
   attiny11                                                                                                                                                                      
142
   attiny12                                                                                                                                                                      
143
   attiny15                                                                                                                                                                      
144
   attiny28                                                                                                                                                                      
145
In file included from ../../../../common/macros.inc:39:0,                                                                                                                        
146
                 from ../../../../crt1/gcrt1.S:38:                                                                                                                               
147
../../../../include/avr/io.h:404:6: Warnung: #warning "device type not defined"                                                                                                  
148
../../../../crt1/gcrt1.S: Assembler messages:                                                                                                                                    
149
../../../../crt1/gcrt1.S:53: Error: non-constant expression in ".if" statement                                                                                                   
150
../../../../crt1/gcrt1.S:54: Error: non-constant expression in ".if" statement                                                                                                   
151
../../../../crt1/gcrt1.S:55: Error: non-constant expression in ".if" statement                                                                                                   
152
../../../../crt1/gcrt1.S:56: Error: non-constant expression in ".if" statement                                                                                                   
153
../../../../crt1/gcrt1.S:57: Error: non-constant expression in ".if" statement                                                                                                   
154
../../../../crt1/gcrt1.S:58: Error: non-constant expression in ".if" statement                                                                                                   
155
../../../../crt1/gcrt1.S:59: Error: non-constant expression in ".if" statement                                                                                                   
156
../../../../crt1/gcrt1.S:60: Error: non-constant expression in ".if" statement                                                                                                   
157
../../../../crt1/gcrt1.S:61: Error: non-constant expression in ".if" statement                                                                                                   
158
../../../../crt1/gcrt1.S:62: Error: non-constant expression in ".if" statement                                                                                                   
159
../../../../crt1/gcrt1.S:63: Error: non-constant expression in ".if" statement                                                                                                   
160
../../../../crt1/gcrt1.S:64: Error: non-constant expression in ".if" statement                                                                                                   
161
../../../../crt1/gcrt1.S:65: Error: non-constant expression in ".if" statement                                                                                                   
162
../../../../crt1/gcrt1.S:66: Error: non-constant expression in ".if" statement                                                                                                   
163
../../../../crt1/gcrt1.S:67: Error: non-constant expression in ".if" statement                                                                                                   
164
../../../../crt1/gcrt1.S:68: Error: non-constant expression in ".if" statement                                                                                                   
165
../../../../crt1/gcrt1.S:69: Error: non-constant expression in ".if" statement                                                                                                   
166
../../../../crt1/gcrt1.S:70: Error: non-constant expression in ".if" statement                                                                                                   
167
../../../../crt1/gcrt1.S:71: Error: non-constant expression in ".if" statement                                                                                                   
168
../../../../crt1/gcrt1.S:72: Error: non-constant expression in ".if" statement                                                                                                   
169
../../../../crt1/gcrt1.S:73: Error: non-constant expression in ".if" statement                                                                                                   
170
../../../../crt1/gcrt1.S:74: Error: non-constant expression in ".if" statement                                                                                                   
171
../../../../crt1/gcrt1.S:75: Error: non-constant expression in ".if" statement                                                                                                   
172
../../../../crt1/gcrt1.S:76: Error: non-constant expression in ".if" statement                                                                                                   
173
../../../../crt1/gcrt1.S:77: Error: non-constant expression in ".if" statement                                                                                                   
174
../../../../crt1/gcrt1.S:78: Error: non-constant expression in ".if" statement                                                                                                   
175
../../../../crt1/gcrt1.S:79: Error: non-constant expression in ".if" statement                                                                                                   
176
../../../../crt1/gcrt1.S:80: Error: non-constant expression in ".if" statement                                                                                                   
177
../../../../crt1/gcrt1.S:81: Error: non-constant expression in ".if" statement                                                                                                   
178
../../../../crt1/gcrt1.S:82: Error: non-constant expression in ".if" statement                                                                                                   
179
../../../../crt1/gcrt1.S:83: Error: non-constant expression in ".if" statement                                                                                                   
180
../../../../crt1/gcrt1.S:84: Error: non-constant expression in ".if" statement                                                                                                   
181
../../../../crt1/gcrt1.S:85: Error: non-constant expression in ".if" statement                                                                                                   
182
../../../../crt1/gcrt1.S:86: Error: non-constant expression in ".if" statement                                                                                                   
183
../../../../crt1/gcrt1.S:87: Error: non-constant expression in ".if" statement                                                                                                   
184
../../../../crt1/gcrt1.S:88: Error: non-constant expression in ".if" statement                                                                                                   
185
../../../../crt1/gcrt1.S:89: Error: non-constant expression in ".if" statement                                                                                                   
186
../../../../crt1/gcrt1.S:90: Error: non-constant expression in ".if" statement                                                                                                   
187
../../../../crt1/gcrt1.S:91: Error: non-constant expression in ".if" statement                                                                                                   
188
../../../../crt1/gcrt1.S:92: Error: non-constant expression in ".if" statement                                                                                                   
189
../../../../crt1/gcrt1.S:93: Error: non-constant expression in ".if" statement                                                                                                   
190
../../../../crt1/gcrt1.S:94: Error: non-constant expression in ".if" statement                                                                                                   
191
../../../../crt1/gcrt1.S:95: Error: non-constant expression in ".if" statement                                                                                                   
192
../../../../crt1/gcrt1.S:96: Error: non-constant expression in ".if" statement                                                                                                   
193
../../../../crt1/gcrt1.S:97: Error: non-constant expression in ".if" statement                                                                                                   
194
../../../../crt1/gcrt1.S:98: Error: non-constant expression in ".if" statement                                                                                                   
195
../../../../crt1/gcrt1.S:99: Error: non-constant expression in ".if" statement                                                                                                   
196
../../../../crt1/gcrt1.S:100: Error: non-constant expression in ".if" statement                                                                                                  
197
../../../../crt1/gcrt1.S:101: Error: non-constant expression in ".if" statement                                                                                                  
198
../../../../crt1/gcrt1.S:102: Error: non-constant expression in ".if" statement                                                                                                  
199
../../../../crt1/gcrt1.S:103: Error: non-constant expression in ".if" statement                                                                                                  
200
../../../../crt1/gcrt1.S:104: Error: non-constant expression in ".if" statement                                                                                                  
201
../../../../crt1/gcrt1.S:105: Error: non-constant expression in ".if" statement                                                                                                  
202
../../../../crt1/gcrt1.S:106: Error: non-constant expression in ".if" statement                                                                                                  
203
../../../../crt1/gcrt1.S:107: Error: non-constant expression in ".if" statement                                                                                                  
204
../../../../crt1/gcrt1.S:108: Error: non-constant expression in ".if" statement                                                                                                  
205
../../../../crt1/gcrt1.S:109: Error: non-constant expression in ".if" statement                                                                                                  
206
../../../../crt1/gcrt1.S:110: Error: non-constant expression in ".if" statement                                                                                                  
207
../../../../crt1/gcrt1.S:111: Error: non-constant expression in ".if" statement                                                                                                  
208
../../../../crt1/gcrt1.S:112: Error: non-constant expression in ".if" statement                                                                                                  
209
../../../../crt1/gcrt1.S:113: Error: non-constant expression in ".if" statement                                                                                                  
210
../../../../crt1/gcrt1.S:114: Error: non-constant expression in ".if" statement                                                                                                  
211
../../../../crt1/gcrt1.S:115: Error: non-constant expression in ".if" statement                                                                                                  
212
../../../../crt1/gcrt1.S:116: Error: non-constant expression in ".if" statement                                                                                                  
213
../../../../crt1/gcrt1.S:117: Error: non-constant expression in ".if" statement                                                                                                  
214
../../../../crt1/gcrt1.S:118: Error: non-constant expression in ".if" statement                                                                                                  
215
../../../../crt1/gcrt1.S:119: Error: non-constant expression in ".if" statement                                                                                                  
216
../../../../crt1/gcrt1.S:120: Error: non-constant expression in ".if" statement                                                                                                  
217
../../../../crt1/gcrt1.S:121: Error: non-constant expression in ".if" statement                                                                                                  
218
../../../../crt1/gcrt1.S:122: Error: non-constant expression in ".if" statement                                                                                                  
219
../../../../crt1/gcrt1.S:123: Error: non-constant expression in ".if" statement                                                                                                  
220
../../../../crt1/gcrt1.S:124: Error: non-constant expression in ".if" statement                                                                                                  
221
../../../../crt1/gcrt1.S:125: Error: non-constant expression in ".if" statement                                                                                                  
222
../../../../crt1/gcrt1.S:126: Error: non-constant expression in ".if" statement                                                                                                  
223
../../../../crt1/gcrt1.S:127: Error: non-constant expression in ".if" statement                                                                                                  
224
../../../../crt1/gcrt1.S:128: Error: non-constant expression in ".if" statement                                                                                                  
225
../../../../crt1/gcrt1.S:129: Error: non-constant expression in ".if" statement                                                                                                  
226
../../../../crt1/gcrt1.S:130: Error: non-constant expression in ".if" statement                                                                                                  
227
../../../../crt1/gcrt1.S:131: Error: non-constant expression in ".if" statement                                                                                                  
228
../../../../crt1/gcrt1.S:132: Error: non-constant expression in ".if" statement                                                                                                  
229
../../../../crt1/gcrt1.S:133: Error: non-constant expression in ".if" statement                                                                                                  
230
../../../../crt1/gcrt1.S:134: Error: non-constant expression in ".if" statement                                                                                                  
231
../../../../crt1/gcrt1.S:135: Error: non-constant expression in ".if" statement                                                                                                  
232
../../../../crt1/gcrt1.S:136: Error: non-constant expression in ".if" statement                                                                                                  
233
../../../../crt1/gcrt1.S:137: Error: non-constant expression in ".if" statement                                                                                                  
234
../../../../crt1/gcrt1.S:138: Error: non-constant expression in ".if" statement                                                                                                  
235
../../../../crt1/gcrt1.S:139: Error: non-constant expression in ".if" statement                                                                                                  
236
../../../../crt1/gcrt1.S:140: Error: non-constant expression in ".if" statement                                                                                                  
237
../../../../crt1/gcrt1.S:141: Error: non-constant expression in ".if" statement                                                                                                  
238
../../../../crt1/gcrt1.S:142: Error: non-constant expression in ".if" statement                                                                                                  
239
../../../../crt1/gcrt1.S:143: Error: non-constant expression in ".if" statement                                                                                                  
240
../../../../crt1/gcrt1.S:144: Error: non-constant expression in ".if" statement                                                                                                  
241
../../../../crt1/gcrt1.S:145: Error: non-constant expression in ".if" statement
242
../../../../crt1/gcrt1.S:146: Error: non-constant expression in ".if" statement
243
../../../../crt1/gcrt1.S:147: Error: non-constant expression in ".if" statement
244
../../../../crt1/gcrt1.S:148: Error: non-constant expression in ".if" statement
245
../../../../crt1/gcrt1.S:149: Error: non-constant expression in ".if" statement
246
../../../../crt1/gcrt1.S:150: Error: non-constant expression in ".if" statement
247
../../../../crt1/gcrt1.S:151: Error: non-constant expression in ".if" statement
248
../../../../crt1/gcrt1.S:152: Error: non-constant expression in ".if" statement
249
../../../../crt1/gcrt1.S:153: Error: non-constant expression in ".if" statement
250
../../../../crt1/gcrt1.S:154: Error: non-constant expression in ".if" statement
251
../../../../crt1/gcrt1.S:155: Error: non-constant expression in ".if" statement
252
../../../../crt1/gcrt1.S:156: Error: non-constant expression in ".if" statement
253
../../../../crt1/gcrt1.S:157: Error: non-constant expression in ".if" statement
254
../../../../crt1/gcrt1.S:158: Error: non-constant expression in ".if" statement
255
../../../../crt1/gcrt1.S:159: Error: non-constant expression in ".if" statement
256
../../../../crt1/gcrt1.S:160: Error: non-constant expression in ".if" statement
257
../../../../crt1/gcrt1.S:161: Error: non-constant expression in ".if" statement
258
../../../../crt1/gcrt1.S:162: Error: non-constant expression in ".if" statement
259
../../../../crt1/gcrt1.S:163: Error: non-constant expression in ".if" statement
260
../../../../crt1/gcrt1.S:164: Error: non-constant expression in ".if" statement
261
../../../../crt1/gcrt1.S:165: Error: non-constant expression in ".if" statement
262
../../../../crt1/gcrt1.S:166: Error: non-constant expression in ".if" statement
263
../../../../crt1/gcrt1.S:167: Error: non-constant expression in ".if" statement
264
../../../../crt1/gcrt1.S:168: Error: non-constant expression in ".if" statement
265
../../../../crt1/gcrt1.S:169: Error: non-constant expression in ".if" statement
266
../../../../crt1/gcrt1.S:170: Error: non-constant expression in ".if" statement
267
../../../../crt1/gcrt1.S:171: Error: non-constant expression in ".if" statement
268
../../../../crt1/gcrt1.S:172: Error: non-constant expression in ".if" statement
269
../../../../crt1/gcrt1.S:173: Error: non-constant expression in ".if" statement
270
../../../../crt1/gcrt1.S:174: Error: non-constant expression in ".if" statement
271
../../../../crt1/gcrt1.S:175: Error: non-constant expression in ".if" statement
272
../../../../crt1/gcrt1.S:176: Error: non-constant expression in ".if" statement
273
../../../../crt1/gcrt1.S:177: Error: non-constant expression in ".if" statement
274
make[5]: *** [gcrt1.o] Fehler 1
275
make[5]: Leaving directory `/usr/local/avr/avr-libc-1.6.8/avr/lib/avr25/attiny2313a'
276
make[4]: *** [all-recursive] Fehler 1
277
make[4]: Leaving directory `/usr/local/avr/avr-libc-1.6.8/avr/lib/avr25'
278
make[3]: *** [all-recursive] Fehler 1
279
make[3]: Leaving directory `/usr/local/avr/avr-libc-1.6.8/avr/lib'
280
make[2]: *** [all-recursive] Fehler 1
281
make[2]: Leaving directory `/usr/local/avr/avr-libc-1.6.8/avr'
282
make[1]: *** [all-recursive] Fehler 1
283
make[1]: Leaving directory `/usr/local/avr/avr-libc-1.6.8'
284
make: *** [all] Fehler 2
So wie es aussieht hat er ein Problem mit attiny2313a und hört danach 
auf.
Wie man das beheben soll, keinen Schimmer, sieht eigentlich gewaltig 
nach Bug aus, oder?
Allerdings habe ich von diesem Bug noch nichts gehört.

Lg,
Nils

von Niklas G. (erlkoenig) Benutzerseite


Lesenswert?

Gentoo hat ein Script namens crossdev zur automatischen kompilation & 
installation von crosscompilern, auch dem avr-compiler (und u.a. einem 
Compiler für Windows - mingw32).
Siehe hier: http://en.gentoo-wiki.com/wiki/Crossdev
Funktioniert bei mir.

von Bingo (Gast)


Lesenswert?

@Nils

Have you patched binutils & gcc ?

Both binutil & gcc requires some AVR specific patches , to define the 
never AVR devices. This is because it takes a loooong time before the 
patches are accepted into the mainstream gcc surce.

The buildscript i linked to , is not "linux distro" specific. So you 
should be able to run it on gento. But the packages in pre-reqs.txt are 
expected to be installed allready (before building) , but as you have 
allready build binutils & gcc. You probably have the required packages 
installed.
And could give the "getfiles" + "getpatches" + "build-avr-noinsight" a 
go.

That would give you a "WinAVR" lookalike , with the same patches as used 
there.

/Bingo

von Jörg W. (dl8dtl) (Moderator) Benutzerseite


Lesenswert?

Nils S. schrieb:
> unknown MCU 'attiny2313a' specified

Davon abgesehen, dass du dir wohl Bingo's Script auf avrfreaks.net
mal ansehen solltest, weil er allerlei Patches mit einbaut, die
original nicht vorhanden sind, sollte dieser Fehler eigentlich
nicht auftreten können.  avr-libc's configure-Script enthält Code,
der zuerst testet, ob ein bestimmter MCU-Typ auch wirklich vom
Compiler unterstützt wird.   Da müsste dann sowas stehen wie:
1
...
2
checking if avr-gcc has support for attiny2313... yes
3
checking if avr-gcc has support for attiny2313a... yes

Wenn dort "no" steht, sollte er später auch nicht versuchen, für
einen ATtiny2313A überhaupt zu compilieren, wenn dort aber "yes"
steht, dann sollte das Compilieren wohl auch funktionieren.
Irgendwie scheint mir das bei dir alles sehr inkonsistent zu sein.

von Nils S. (fitec) Benutzerseite


Lesenswert?

Hi,

ich habe in der config.log nachgesehen, tatsächlich gibt es dort den 
Eintrag "checking if avr-gcc has support for attiny2313a" und das 
beantwortet er mit "no", danach kommt die Liste mit allen "Known 
controllers" und von da an meckert er bei jedem folgenden Controller 
(wohl gemerkt zählt er immer die Liste auf welche alle bekannt sind, 
obwohl das nicht mal stimmt).
Trotzdem erzeugt er für alle controller Makefiles.
Da scheint tatsächlich irgendwas schief zu laufen, momentan sehe ich 
allerdings noch nicht was.
Dass ich da was patchen muss glaube ich weniger, davon hätte ich sonst 
etwas gelesen.

Lg,
Nils

von Jörg W. (dl8dtl) (Moderator) Benutzerseite


Lesenswert?

Nils S. schrieb:
> Dass ich da was patchen muss glaube ich weniger, davon hätte ich sonst
> etwas gelesen.

Nun gut, dann mach mal weiter, wenn du's uns nicht glaubst.

Also, letzter Tipp: wenn du es schmerzarm haben willst, guck dir den
von Bingo auf avrfreaks.net verlinkten Linux-Buildscript an.

von Nils S. (fitec) Benutzerseite


Lesenswert?

Hi,

melde mich nun nochmal zurück.
Ich habe in den Tiefen eines irc channels den Tipp bekommen, das 
gcc-4.5.0 irgend so einen Bug hat und empfohlen wird auf 4.5.1 zu 
warten. Daraufhin habe ich den gcc-4.4.4 geladen was der latest stable 
vor 4.5.0 ist.
Mit dem hat nun alles geklappt, ohne Patches ...

Danke für die schnelle und umfangreiche Hilfe :-)

Gruß,
Nils

von Bingo (Gast)


Lesenswert?

@Nils

Can you tell why you doesn't build the well tested & supported , 
avr-gcc-4.3.4 ? Where the patches from the WinAVR maintainer Eric 
Weddington , and the patches from the FreeBSD maintainer Jörg Wunsch , 
can be applied wo. problems ?

The Linux buildscript i linked to is using the FreeBSD patches , and 
because of that , you have quite good support.

In some situations "Newer isn't Better" , and i consider this one of 
them.

It's my understanding that there isn't any AVR devices in 4.4.x or 5.x.x 
that isn't already supported in the above mentioned version , as the 
"main gcc" gets/accepts their device patches from the above.
"Jörg please correct me if i'm wrong here"

Anyway it's nice to hear that you have a working toolchain. And OSS is 
all about "the freedom to choose" , including toolchain versions.

Happy compiling

Bingo (Dänemark)

von Nils S. (fitec) Benutzerseite


Lesenswert?

Hi Bingo,

I'm new in gentoo, before I used Debian, there were binary packages for 
everything. So compiling stuff like that myself is new to me and it's a 
lesson I learned, that the newest is not the best ;-)
Well, maybe I should have used better the gcc 4.3.4, it's the latest 
stable gcc for x86 in gentoo, too. But the 4.4.4 supports most of the 
avr controllers and compiling code for avr works :-) so I won't change 
the release of gcc any more.
Unfortunately, the avr-binutils and avr-gcc aren't in the gentoo 
repository (but the avr-libc, that doesn't make sense to me, because it 
depends on avr-gcc and binutils...), so I hope when I have more expert 
knowledge in gentoo, I'll make some ebuilds for the missing gcc/binutils 
for avr.

Regards,
Nils

von Jörg W. (dl8dtl) (Moderator) Benutzerseite


Lesenswert?

Wenn du eine neuere Version benutzen willst, solltest du dir zumindest
die Patches, die Bingo genannt hat, mal ansehen.  Es könnte andernfalls
sein, dass du diesen oder jenen wichtigen Bugfix verpasst hast, und
Support für die Xmega-Serie bekommst du (derzeit) ohne externe Patches
gar nicht.

von Bernd D. (bdemuth)


Lesenswert?

Hello,

I got the same problem with gcc 4.5.0 & avr-libc. I needed these version 
for the ATtiny4313.

I looked for a patch and found one which added the definitions of a 
couple of new AVR specially ATtiny4313. See:

http://gcc.gnu.org/ml/gcc-patches/2010-04/msg01210.html

If somebody wish I can upload the revised patch.

This patch added the definition of ATtiny2313a so you won't get the 
error anymore. But we aware, you have to correct the patch with "," in 
the middle column of the new definitions.

I didn't found the scripts from bingo. Maybe those scripts would do the 
job too or better.

Where can I find those scripts?

Do they add the new AVR definitions too?

Kind Regards

Bernd

Bitte melde dich an um einen Beitrag zu schreiben. Anmeldung ist kostenlos und dauert nur eine Minute.
Bestehender Account
Schon ein Account bei Google/GoogleMail? Keine Anmeldung erforderlich!
Mit Google-Account einloggen
Noch kein Account? Hier anmelden.