OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [rtos/] [ecos-2.0/] [doc/] [html/] [user-guide/] [conflicts-and-constraints.html] - Blame information for rev 446

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 28 unneback
<!-- Copyright (C) 2003 Red Hat, Inc.                                -->
2
<!-- This material may be distributed only subject to the terms      -->
3
<!-- and conditions set forth in the Open Publication License, v1.0  -->
4
<!-- or later (the latest version is presently available at          -->
5
<!-- http://www.opencontent.org/openpub/).                           -->
6
<!-- Distribution of the work or derivative of the work in any       -->
7
<!-- standard (paper) book form is prohibited unless prior           -->
8
<!-- permission is obtained from the copyright holder.               -->
9
<HTML
10
><HEAD
11
><TITLE
12
>Conflicts and constraints</TITLE
13
><meta name="MSSmartTagsPreventParsing" content="TRUE">
14
<META
15
NAME="GENERATOR"
16
CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
17
"><LINK
18
REL="HOME"
19
TITLE="eCos User Guide"
20
HREF="ecos-user-guide.html"><LINK
21
REL="UP"
22
TITLE="Manual Configuration"
23
HREF="manual-configuration.html"><LINK
24
REL="PREVIOUS"
25
TITLE="Creating the Build Tree"
26
HREF="creating-build-tree.html"><LINK
27
REL="NEXT"
28
TITLE="Building the System"
29
HREF="building-the-system.html"></HEAD
30
><BODY
31
CLASS="SECT1"
32
BGCOLOR="#FFFFFF"
33
TEXT="#000000"
34
LINK="#0000FF"
35
VLINK="#840084"
36
ALINK="#0000FF"
37
><DIV
38
CLASS="NAVHEADER"
39
><TABLE
40
SUMMARY="Header navigation table"
41
WIDTH="100%"
42
BORDER="0"
43
CELLPADDING="0"
44
CELLSPACING="0"
45
><TR
46
><TH
47
COLSPAN="3"
48
ALIGN="center"
49
>eCos User Guide</TH
50
></TR
51
><TR
52
><TD
53
WIDTH="10%"
54
ALIGN="left"
55
VALIGN="bottom"
56
><A
57
HREF="creating-build-tree.html"
58
ACCESSKEY="P"
59
>Prev</A
60
></TD
61
><TD
62
WIDTH="80%"
63
ALIGN="center"
64
VALIGN="bottom"
65
>Chapter 28. Manual Configuration</TD
66
><TD
67
WIDTH="10%"
68
ALIGN="right"
69
VALIGN="bottom"
70
><A
71
HREF="building-the-system.html"
72
ACCESSKEY="N"
73
>Next</A
74
></TD
75
></TR
76
></TABLE
77
><HR
78
ALIGN="LEFT"
79
WIDTH="100%"></DIV
80
><DIV
81
CLASS="SECT1"
82
><H1
83
CLASS="SECT1"
84
><A
85
NAME="CONFLICTS-AND-CONSTRAINTS">Conflicts and constraints</H1
86
><P
87
>Configuration options are not completely independent. For example
88
the C library's <TT
89
CLASS="FUNCTION"
90
>strtod()</TT
91
> and <TT
92
CLASS="FUNCTION"
93
>atof()</TT
94
>
95
functions rely on the math library package to provide certain functionality. If the math library package is removed then the C
96
library can no longer provide these functions. Each package describes constraints like these in CDL <SPAN
97
CLASS="emphasis"
98
><I
99
CLASS="EMPHASIS"
100
>"requires"</I
101
></SPAN
102
> properties. If a constraint is not satisfied, then the configuration contains a conflict. For any given conflict there can
103
be several resolution options. For example, it would be possible to add the math library package back to the
104
configuration, or to disable the <TT
105
CLASS="FUNCTION"
106
>strtod()</TT
107
> and <TT
108
CLASS="FUNCTION"
109
>atof()</TT
110
> functions.</P
111
><P
112
>The <SPAN
113
CLASS="PRODUCTNAME"
114
>eCos</SPAN
115
> configuration tools will report any conflicts in the current configuration. If there are any such conflicts
116
then the configuration is usually unsafe and it makes no sense to build and run <SPAN
117
CLASS="PRODUCTNAME"
118
>eCos</SPAN
119
> in such circumstances. In fact,
120
any attempt at building <SPAN
121
CLASS="PRODUCTNAME"
122
>eCos</SPAN
123
> is likely to fail. In exceptional cases it is possible to override this by using e.g. the
124
<TT
125
CLASS="OPTION"
126
>--ignore-errors</TT
127
> qualifier with ecosconfig. </P
128
><P
129
>Many constraints are fairly simple in nature, and the configuration tools contain an inference engine which can
130
resolve the associated conflicts automatically. For example, if the math library package is removed then the
131
inference engine can resolve the resulting conflict by disabling the configuration option for <TT
132
CLASS="FUNCTION"
133
>strtod()</TT
134
> and <TT
135
CLASS="FUNCTION"
136
>atof()</TT
137
>. All
138
such changes will be reported. Sometimes the inference engine cannot resolve a conflict, for example it is not
139
allowed to override a change that has been made explicitly by the user. Sometimes it will find a solution which does
140
not match the application's requirements. </P
141
><P
142
>A typical session involving conflicts would look something like this:
143
<TABLE
144
BORDER="5"
145
BGCOLOR="#E0E0F0"
146
WIDTH="70%"
147
><TR
148
><TD
149
><PRE
150
CLASS="SCREEN"
151
>$ ecosconfig new pid</PRE
152
></TD
153
></TR
154
></TABLE
155
>This creates a new configuration with the default template. For most targets this will not result in any conflicts,
156
because the default settings for the various options meet the requirements of the default template.</P
157
><P
158
> For some targets
159
there may be conflicts and the inference engine would come into play.
160
<TABLE
161
BORDER="5"
162
BGCOLOR="#E0E0F0"
163
WIDTH="70%"
164
><TR
165
><TD
166
><PRE
167
CLASS="SCREEN"
168
>$ ecosconfig remove libm
169
U CYGSEM_LIBC_STDIO_SCANF_FLOATING_POINT, new inferred value 0
170
U CYGFUN_LIBC_strtod, new inferred value 0
171
U CYGSEM_LIBC_STDIO_PRINTF_FLOATING_POINT, new inferred value 0 </PRE
172
></TD
173
></TR
174
></TABLE
175
>
176
ecosconfig reports that this change caused three conflicts, all in the C library. The inference engine was able to
177
resolve all the conflicts and update the relevant configuration options accordingly. </P
178
><P
179
>To suppress the inference engine <TT
180
CLASS="OPTION"
181
>--no-resolve</TT
182
> can be used:
183
<TABLE
184
BORDER="5"
185
BGCOLOR="#E0E0F0"
186
WIDTH="70%"
187
><TR
188
><TD
189
><PRE
190
CLASS="SCREEN"
191
>$ ecosconfig new pid
192
$ ecosconfig --no-resolve remove libm
193
C CYGSEM_LIBC_STDIO_SCANF_FLOATING_POINT, "requires" constraint not satisfied:      CYGPKG_LIBM
194
C CYGSEM_LIBC_STDIO_PRINTF_FLOATING_POINT, "requires" constraint not satisfied:      CYGPKG_LIBM
195
C CYGFUN_LIBC_strtod, "requires" constraint not satisfied: CYGPKG_LIBM </PRE
196
></TD
197
></TR
198
></TABLE
199
>
200
Three unresolved conflicts are reported.</P
201
><P
202
>The <B
203
CLASS="COMMAND"
204
>check</B
205
> command can be used to get the current state of the
206
configuration, and the <TT
207
CLASS="OPTION"
208
>--verbose</TT
209
> qualifier will provide additional information: </P
210
><TABLE
211
BORDER="5"
212
BGCOLOR="#E0E0F0"
213
WIDTH="70%"
214
><TR
215
><TD
216
><PRE
217
CLASS="SCREEN"
218
>$ ecosconfig --srcdir /home/bartv/ecc/ecc --verbose check
219
Target: pid
220
Template: default
221
Removed:
222
 CYGPKG_LIBM
223
3 conflict(s):
224
C CYGFUN_LIBC_strtod, "requires" constraint not satisfied: CYGPKG_LIBM
225
 Possible solution:
226
    CYGFUN_LIBC_strtod -&#62; 0
227
    CYGSEM_LIBC_STDIO_SCANF_FLOATING_POINT -&#62; 0
228
C CYGSEM_LIBC_STDIO_PRINTF_FLOATING_POINT, "requires" constraint not satisfied:      CYGPKG_LIBM
229
 Possible solution:
230
    CYGSEM_LIBC_STDIO_PRINTF_FLOATING_POINT -&#62; 0
231
C CYGSEM_LIBC_STDIO_SCANF_FLOATING_POINT, "requires" constraint not satisfied:      CYGPKG_LIBM
232
 Possible solution:
233
    CYGSEM_LIBC_STDIO_SCANF_FLOATING_POINT -&#62; 0 </PRE
234
></TD
235
></TR
236
></TABLE
237
><P
238
>If the proposed solutions are acceptable, the resolve command can be used to apply them:
239
<TABLE
240
BORDER="5"
241
BGCOLOR="#E0E0F0"
242
WIDTH="70%"
243
><TR
244
><TD
245
><PRE
246
CLASS="SCREEN"
247
>$ ecosconfig resolve
248
U CYGSEM_LIBC_STDIO_SCANF_FLOATING_POINT, new inferred value 0
249
U CYGFUN_LIBC_strtod, new inferred value 0
250
U CYGSEM_LIBC_STDIO_PRINTF_FLOATING_POINT, new inferred value 0 </PRE
251
></TD
252
></TR
253
></TABLE
254
></P
255
><P
256
>The current configuration is again conflict-free and it is possible to generate a build tree. The <TT
257
CLASS="OPTION"
258
>--quiet</TT
259
> qualifier can
260
be used to suppress the change messages, if desired.</P
261
><P
262
>When changing individual configuration options by editing the ecos.ecc file (as described below), the resulting
263
system should be checked and any problems should be resolved. For example, if CYGFUN_LIBC_strtod is
264
explicitly enabled in the savefile:
265
<TABLE
266
BORDER="5"
267
BGCOLOR="#E0E0F0"
268
WIDTH="70%"
269
><TR
270
><TD
271
><PRE
272
CLASS="SCREEN"
273
>$ edit ecos.ecc
274
$ ecosconfig check
275
Target: pid
276
Template: default
277
Removed:
278
    CYGPKG_LIBM
279
1 conflict(s):
280
C CYGFUN_LIBC_strtod, "requires" constraint not satisfied: CYGPKG_LIBM
281
$ ecosconfig resolve
282
C CYGFUN_LIBC_strtod, "requires" constraint not satisfied: CYGPKG_LIBM </PRE
283
></TD
284
></TR
285
></TABLE
286
>
287
In this case the inference engine cannot resolve the conflict automatically because that would involve changing a
288
user setting. Any attempt to generate a build tree will fail:
289
<TABLE
290
BORDER="5"
291
BGCOLOR="#E0E0F0"
292
WIDTH="70%"
293
><TR
294
><TD
295
><PRE
296
CLASS="SCREEN"
297
>$ ecosconfig --srcdir /home/bartv/ecc/ecc tree
298
C CYGFUN_LIBC_strtod, "requires" constraint not satisfied: CYGPKG_LIBM
299
Unable to generate build tree, this configuration still contains conflicts.
300
Either resolve the conflicts or use --ignore-errors </PRE
301
></TD
302
></TR
303
></TABLE
304
></P
305
><P
306
>It is still possible to generate a build tree:
307
<TABLE
308
BORDER="5"
309
BGCOLOR="#E0E0F0"
310
WIDTH="70%"
311
><TR
312
><TD
313
><PRE
314
CLASS="SCREEN"
315
>$ ecosconfig --srcdir /home/bartv/ecc/ecc --ignore-errors tree
316
C CYGFUN_LIBC_strtod, "requires" constraint not satisfied: CYGPKG_LIBM
317
$ make </PRE
318
></TD
319
></TR
320
></TABLE
321
>
322
In this case <SPAN
323
CLASS="PRODUCTNAME"
324
>eCos</SPAN
325
> will fail to build. In other cases of unresolved conflicts <SPAN
326
CLASS="PRODUCTNAME"
327
>eCos</SPAN
328
> may build, but may not run. In
329
general all conflicts should be resolved by editing the <TT
330
CLASS="FILENAME"
331
>ecos.ecc</TT
332
> file, by letting the inference engine make appropriate
333
changes, or by other means, before any attempt is made to build or run <SPAN
334
CLASS="PRODUCTNAME"
335
>eCos</SPAN
336
>. </P
337
></DIV
338
><DIV
339
CLASS="NAVFOOTER"
340
><HR
341
ALIGN="LEFT"
342
WIDTH="100%"><TABLE
343
SUMMARY="Footer navigation table"
344
WIDTH="100%"
345
BORDER="0"
346
CELLPADDING="0"
347
CELLSPACING="0"
348
><TR
349
><TD
350
WIDTH="33%"
351
ALIGN="left"
352
VALIGN="top"
353
><A
354
HREF="creating-build-tree.html"
355
ACCESSKEY="P"
356
>Prev</A
357
></TD
358
><TD
359
WIDTH="34%"
360
ALIGN="center"
361
VALIGN="top"
362
><A
363
HREF="ecos-user-guide.html"
364
ACCESSKEY="H"
365
>Home</A
366
></TD
367
><TD
368
WIDTH="33%"
369
ALIGN="right"
370
VALIGN="top"
371
><A
372
HREF="building-the-system.html"
373
ACCESSKEY="N"
374
>Next</A
375
></TD
376
></TR
377
><TR
378
><TD
379
WIDTH="33%"
380
ALIGN="left"
381
VALIGN="top"
382
>Creating the Build Tree</TD
383
><TD
384
WIDTH="34%"
385
ALIGN="center"
386
VALIGN="top"
387
><A
388
HREF="manual-configuration.html"
389
ACCESSKEY="U"
390
>Up</A
391
></TD
392
><TD
393
WIDTH="33%"
394
ALIGN="right"
395
VALIGN="top"
396
>Building the System</TD
397
></TR
398
></TABLE
399
></DIV
400
></BODY
401
></HTML
402
>

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.