/[gentoo]/xml/htdocs/doc/en/gcc-upgrading.xml
Gentoo

Diff of /xml/htdocs/doc/en/gcc-upgrading.xml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.7 Revision 1.8
1<?xml version='1.0' encoding="UTF-8"?> 1<?xml version='1.0' encoding="UTF-8"?>
2<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/gcc-upgrading.xml,v 1.7 2006/02/09 16:06:51 jkt Exp $ --> 2<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/gcc-upgrading.xml,v 1.8 2006/02/09 16:15:21 jkt Exp $ -->
3 3
4<!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> 4<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
5 5
6<guide link="/doc/en/gcc-upgrading.xml"> 6<guide link="/doc/en/gcc-upgrading.xml">
7<title>Gentoo Linux GCC Upgrade Guide</title> 7<title>Gentoo Linux GCC Upgrade Guide</title>
23 23
24<!-- The content of this document is licensed under the CC-BY-SA license --> 24<!-- The content of this document is licensed under the CC-BY-SA license -->
25<!-- See http://creativecommons.org/licenses/by-sa/2.5 --> 25<!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
26<license/> 26<license/>
27 27
28<version>6</version> 28<version>7</version>
29<date>2006-02-09</date> 29<date>2006-02-09</date>
30 30
31<chapter id="intro"> 31<chapter id="intro">
32<title>Introduction</title> 32<title>Introduction</title>
33<section> 33<section>
287It is also safe to remove older GCC versions at this time: 287It is also safe to remove older GCC versions at this time:
288</p> 288</p>
289 289
290<pre caption="Cleaning up"> 290<pre caption="Cleaning up">
291# <i>emerge -aC =sys-devel/gcc-3.3*</i> 291# <i>emerge -aC =sys-devel/gcc-3.3*</i>
292</pre>
293
294</body>
295</section>
296</chapter>
297
298<chapter id="common-pitfalls">
299<title>Common Pitfalls</title>
300<section>
301<body>
302
303<p>
304It's important to disable <c>distcc</c> during upgrade. Mixing compiler versions
305on your nodes <e>will</e> cause build issues. This is not required for ccache,
306as the cache objects will be invalidated anyway.
307</p>
308
309<p>
310Always use same GCC version for your kernel and additional kernel modules. Once
311you rebuild your world with new GCC, external modules (like
312<c>app-emulation/qemu-softmmu</c>) will fail to load. Please rebuild your kernel
313with new GCC to fix that.
314</p>
315
316</body>
317</section>
318<section>
319<title>Frequent Error Messages</title>
320<body>
321
322<p>
323If your system complains about something like <e>libtool: link:
324`/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6/libstdc++.la' is not a valid libtool
325archive</e>, please run <c>/sbin/fix_libtool_files.sh 3.3.6</c> (substitute
326"3.3.6" with the version numbers from the error message).
327</p>
328
329<p>
330If you see the <e>error: /usr/bin/gcc-config: line 632:
331/etc/env.d/gcc/i686-pc-linux-gnu-3.3.5: No such file or directory</e>, then try
332deleting <path>/etc/env.d/gcc/config-i686-pc-linux-gnu</path> and running
333<c>gcc-config</c> again, followed by <c>source /etc/profile</c>. Only do this if
334you do not have any cross-compilers set up, though.
335</p>
336
337<p>
338If a package fails during <c>emerge -e system</c> or <c>emerge -e world</c>,
339you can resume operation with <c>emerge --resume</c>. If a package fails
340repeatedly, skip it with <c>emerge --resume --skipfirst</c>. Don't run any
341other instances of emerge in between or you will lose the resume information.
342</p>
343
344<p>
345If you get an error message <e>spec failure: unrecognized spec option</e> while
346upgrading your compiler, try to switch back to your default compiler, unset the
347<c>GCC_SPECS</c> variable and upgrade GCC again:
348</p>
349
350<pre caption="Restoring primary specs">
351# <i>gcc-config 1</i>
352# <i>source /etc/profile</i>
353# <i>unset GCC_SPECS</i>
354# <i>emerge -uav gcc</i>
355</pre> 292</pre>
356 293
357</body> 294</body>
358</section> 295</section>
359</chapter> 296</chapter>
501</pre> 438</pre>
502 439
503</body> 440</body>
504</section> 441</section>
505</chapter> 442</chapter>
443
444<chapter id="common-pitfalls">
445<title>Common Pitfalls</title>
446<section>
447<body>
448
449<p>
450It's important to disable <c>distcc</c> during upgrade. Mixing compiler versions
451on your nodes <e>will</e> cause build issues. This is not required for ccache,
452as the cache objects will be invalidated anyway.
453</p>
454
455<p>
456Always use same GCC version for your kernel and additional kernel modules. Once
457you rebuild your world with new GCC, external modules (like
458<c>app-emulation/qemu-softmmu</c>) will fail to load. Please rebuild your kernel
459with new GCC to fix that.
460</p>
461
462</body>
463</section>
464<section>
465<title>Frequent Error Messages</title>
466<body>
467
468<p>
469If your system complains about something like <e>libtool: link:
470`/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6/libstdc++.la' is not a valid libtool
471archive</e>, please run <c>/sbin/fix_libtool_files.sh 3.3.6</c> (substitute
472"3.3.6" with the version numbers from the error message).
473</p>
474
475<p>
476If you see the <e>error: /usr/bin/gcc-config: line 632:
477/etc/env.d/gcc/i686-pc-linux-gnu-3.3.5: No such file or directory</e>, then try
478deleting <path>/etc/env.d/gcc/config-i686-pc-linux-gnu</path> and running
479<c>gcc-config</c> again, followed by <c>source /etc/profile</c>. Only do this if
480you do not have any cross-compilers set up, though.
481</p>
482
483<p>
484If a package fails during <c>emerge -e system</c> or <c>emerge -e world</c>,
485you can resume operation with <c>emerge --resume</c>. If a package fails
486repeatedly, skip it with <c>emerge --resume --skipfirst</c>. Don't run any
487other instances of emerge in between or you will lose the resume information.
488</p>
489
490<p>
491If you get an error message <e>spec failure: unrecognized spec option</e> while
492upgrading your compiler, try to switch back to your default compiler, unset the
493<c>GCC_SPECS</c> variable and upgrade GCC again:
494</p>
495
496<pre caption="Restoring primary specs">
497# <i>gcc-config 1</i>
498# <i>source /etc/profile</i>
499# <i>unset GCC_SPECS</i>
500# <i>emerge -uav gcc</i>
501</pre>
502
503</body>
504</section>
505</chapter>
506</guide> 506</guide>

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

  ViewVC Help
Powered by ViewVC 1.1.20