1 <!-- 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. -->
12 >Conflicts and constraints</TITLE
13 ><meta name="MSSmartTagsPreventParsing" content="TRUE">
16 CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
19 TITLE="eCos User Guide"
20 HREF="ecos-user-guide.html"><LINK
22 TITLE="Manual Configuration"
23 HREF="manual-configuration.html"><LINK
25 TITLE="Creating the Build Tree"
26 HREF="creating-build-tree.html"><LINK
28 TITLE="Building the System"
29 HREF="building-the-system.html"></HEAD
40 SUMMARY="Header navigation table"
57 HREF="creating-build-tree.html"
65 >Chapter 28. Manual Configuration</TD
71 HREF="building-the-system.html"
85 NAME="CONFLICTS-AND-CONSTRAINTS">Conflicts and constraints</H1
87 >Configuration options are not completely independent. For example
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
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
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
119 > in such circumstances. In fact,
120 any attempt at building <SPAN
123 > is likely to fail. In exceptional cases it is possible to override this by using e.g. the
127 > qualifier with ecosconfig. </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
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
142 >A typical session involving conflicts would look something like this:
151 >$ ecosconfig new pid</PRE
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
159 there may be conflicts and the inference engine would come into play.
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
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
179 >To suppress the inference engine <TT
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
200 Three unresolved conflicts are reported.</P
205 > command can be used to get the current state of the
206 configuration, and the <TT
209 > qualifier will provide additional information: </P
218 >$ ecosconfig --srcdir /home/bartv/ecc/ecc --verbose check
224 C CYGFUN_LIBC_strtod, "requires" constraint not satisfied: CYGPKG_LIBM
226 CYGFUN_LIBC_strtod -> 0
227 CYGSEM_LIBC_STDIO_SCANF_FLOATING_POINT -> 0
228 C CYGSEM_LIBC_STDIO_PRINTF_FLOATING_POINT, "requires" constraint not satisfied: CYGPKG_LIBM
230 CYGSEM_LIBC_STDIO_PRINTF_FLOATING_POINT -> 0
231 C CYGSEM_LIBC_STDIO_SCANF_FLOATING_POINT, "requires" constraint not satisfied: CYGPKG_LIBM
233 CYGSEM_LIBC_STDIO_SCANF_FLOATING_POINT -> 0 </PRE
238 >If the proposed solutions are acceptable, the resolve command can be used to apply them:
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
256 >The current configuration is again conflict-free and it is possible to generate a build tree. The <TT
260 be used to suppress the change messages, if desired.</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:
280 C CYGFUN_LIBC_strtod, "requires" constraint not satisfied: CYGPKG_LIBM
282 C CYGFUN_LIBC_strtod, "requires" constraint not satisfied: CYGPKG_LIBM </PRE
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:
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
306 >It is still possible to generate a build tree:
315 >$ ecosconfig --srcdir /home/bartv/ecc/ecc --ignore-errors tree
316 C CYGFUN_LIBC_strtod, "requires" constraint not satisfied: CYGPKG_LIBM
325 > will fail to build. In other cases of unresolved conflicts <SPAN
328 > may build, but may not run. In
329 general all conflicts should be resolved by editing the <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
343 SUMMARY="Footer navigation table"
354 HREF="creating-build-tree.html"
363 HREF="ecos-user-guide.html"
372 HREF="building-the-system.html"
382 >Creating the Build Tree</TD
388 HREF="manual-configuration.html"
396 >Building the System</TD