Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[faq]L'aggiornamento del compilatore.
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) Risorse italiane (documentazione e tools)
View previous topic :: View next topic  
Author Message
cloc3
Advocate
Advocate


Joined: 13 Jan 2004
Posts: 4809
Location: http://www.gentoo-users.org/user/cloc3/

PostPosted: Sat Mar 12, 2005 3:19 pm    Post subject: [faq]L'aggiornamento del compilatore. Reply with quote

In questo post mi sono preso un impegno superiore alle mie qualità tecniche, ma, d'altra parte, avevo notato che nessuno ancora si era posto il problema di scrivere questa faq.
Non sono un programmatore, e quindi temo di non essere esauriente, come vorrei.
Spero che altri esperti vogliano correggere, integrare o rielaborare completamente il testo che segue.
Una volta sistemato, lo metterei nelle faq, sezione amministrazione di sistema.

YhuHu! Lo hanno fatto.
Come ha fatto notare randomaze qui sotto, questo topic non è più attuale. Leggete la guida.
_________________
vu vu vu
gentù
mi piaci tu


Last edited by cloc3 on Mon Jan 09, 2006 10:16 am; edited 1 time in total
Back to top
View user's profile Send private message
cloc3
Advocate
Advocate


Joined: 13 Jan 2004
Posts: 4809
Location: http://www.gentoo-users.org/user/cloc3/

PostPosted: Sat Mar 12, 2005 3:19 pm    Post subject: Reply with quote

Ogni volta, dopo la pubblicazione di una versione aggiornata di gcc, compaiono sul forum (spesso con notevole ritardo temporale) richieste di consulenza per errori di compilazione.
Un howto autorevole che affronta la questione è stato scritto da motaboy, in questo post. Un altro è sul wiki in lingua inglese.
Qui mi voglio occupare di un problema circoscritto, e molto più banale.
Solitamente, si associa a errori simili a questo:
Code:

libtool: link: `/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/libstdc++.la' is not a valid libtool archive

Di conseguenza, diventa quasi impossibile qualunque ulteriore aggiornamento del sistema.

*** Qui servirebbe una breve spiegazione o un approfondimento ***.

In questi casi, bisogna fare ricorso al comando fix_libtool_files.sh:
Code:

cloc3@gentoo-amd ~ $ qpkg -fp fix_libtool_files.sh
sys-devel/gcc *

Chiamandolo senza argomenti si ottiene un help sull'utilizzo.

L'argomento necessario è la versione vecchie delle librerie del compilatore.
Nel mio caso, ad esempio:
Code:

cloc3@gentoo-amd ~ $ ls /usr/lib/gcc/i686-pc-linux-gnu/
3.3.4/  3.4.3/

Dovrei dare:
Code:

fix_libtool_files.sh 3.3.4

Dopo di ciò, tutti i problemi precedenti scompaiono d'incanto.
_________________
vu vu vu
gentù
mi piaci tu
Back to top
View user's profile Send private message
Luca89
Advocate
Advocate


Joined: 27 Apr 2005
Posts: 2107
Location: Agrigento (Italy)

PostPosted: Sun Oct 09, 2005 10:40 am    Post subject: Reply with quote

Salve,

Riesumo questo vecchio post perchè ho un piccolo problema e cercando nel forum mi pare di capire che sia molto attinente all'argomento trattato in questa faq.

Questo è l'errore che mi da quando tento di aggiornare k3b alla versione 0.12.4a:

Code:
 -Wno-non-virtual-dtor -fno-exceptions -fno-check-new -fno-common -fpermissive -c -o k3bcdtext.lo `test -f 'k3bcdtext.cpp' || echo './'`k3bcdtext.cpp
/bin/sh ../libtool --silent --mode=link --tag=CXX i686-pc-linux-gnu-g++  -Wno-long-long -Wundef -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -DNDEBUG -DNO_DEBUG -O2 -Os -march=pentium4 -fomit-frame-pointer -pipe -mmmx -msse2 -mfpmath=sse -Wformat-security -Wmissing-format-attribute -Wno-non-virtual-dtor -fno-exceptions -fno-check-new -fno-common -fpermissive   -o libk3bdevice.la -rpath /usr/lib -L/usr/kde/3.4/lib -L/usr/qt/3/lib -L/usr/lib    -version-info 2:0:0 -no-undefined k3bdevice.lo k3bdevice_mmc.lo k3bscsicommand.lo k3btrack.lo k3btoc.lo k3bdevicemanager.lo k3bmsf.lo k3bdiskinfo.lo k3bdeviceglobals.lo k3bcrc.lo k3bcdtext.lo -lkio    -lm -L/usr/kde/3.4/lib -L/usr/qt/3/lib -L/usr/lib
grep: /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.5-20050130/libstdc++.la: No such file or directory
/bin/sed: can't read /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.5-20050130/libstdc++.la: No such file or directory
libtool: link: `/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.5-20050130/libstdc++.la' is not a valid libtool archive
make[2]: *** [libk3bdevice.la] Error 1
make[2]: Leaving directory `/var/tmp/portage/k3b-0.12.4a/work/k3b-0.12.4a/libk3bdevice'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/k3b-0.12.4a/work/k3b-0.12.4a'
make: *** [all] Error 2


Recentemente ho aggiornato gcc da sys-devel/gcc-3.3.5.20050130-r1 a sys-devel/gcc-3.3.6, seguendo questa faq ho provato a dare:

Code:
# fix_libtool_files.sh 3.3.5
# fix_libtool_files.sh 3.3.5-20050130
# fix_libtool_files.sh 3.3.5.20050130


Tutti e tre mi danno questo output:

Code:
 * Scanning libtool files for hardcoded gcc library paths...
 *   [1/8] Scanning /lib ...
 *   [2/8] Scanning /usr/lib ...
 *   [3/8] Scanning /opt/blackdown-jdk-1.4.2.02/jre/lib/i386 ...
 *   [4/8] Scanning /usr/games/lib ...
 *   [5/8] Scanning /usr/i686-pc-linux-gnu/lib ...
 *   [6/8] Scanning //usr/lib/opengl/nvidia/lib ...
 *   [7/8] Scanning /usr/local/lib ...
 *   [8/8] Scanning /usr/qt/3/lib ...


Dopo aver eseguito questi comandi provando a riemergere k3b ma purtroppo l'errore è sempre lo stesso.

Questo è l'output di gcc-config:
Code:
Panther ~ # gcc-config -l
 [1] i686-pc-linux-gnu-3.3.6 *
 [2] i686-pc-linux-gnu-3.3.6-hardened
 [3] i686-pc-linux-gnu-3.3.6-hardenednopie
 [4] i686-pc-linux-gnu-3.3.6-hardenednopiessp
 [5] i686-pc-linux-gnu-3.3.6-hardenednossp
Panther ~ #


Questo invece è l'output di emerge --info:

Code:
Portage 2.0.51.22-r3 (default-linux/x86/2005.1, gcc-3.3.6, glibc-2.3.5-r2, 2.6.13-gentoo-r3 i686)
=================================================================
System uname: 2.6.13-gentoo-r3 i686 Intel(R) Pentium(R) 4 CPU 2.66GHz
Gentoo Base System version 1.6.13
dev-lang/python:     2.3.5-r2, 2.4.1-r1
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.15.92.0.2-r10
sys-devel/libtool:   1.5.18-r1
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-Os -march=pentium4 -fomit-frame-pointer -pipe -mmmx -msse2 -mfpmath=sse"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/splash /etc/terminfo /etc/env.d"
CXXFLAGS="-Os -march=pentium4 -fomit-frame-pointer -pipe -mmmx -msse2 -mfpmath=sse"
DISTDIR="/mnt/distfiles"
FEATURES="autoconfig distlocks sandbox sfperms strict"
GENTOO_MIRRORS="ftp://ftp.unina.it/pub/linux/distributions/gentoo http://pandemonium.tiscali.de/pub/gentoo/ http://mir.zyrianes.net/gentoo/"
LANG="it_IT@euro"
LINGUAS="it"
PKGDIR="/mnt/backup/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="x86 X acpi alsa avi bash-completion berkdb bitmap-fonts cdr crypt cups curl dvd dvdr emboss encode foomaticdb fortran gdbm gif gnome gpm gstreamer gtk gtk2 howl imagemagick imlib java jpeg libg++ libwww mad mikmod mmx motif mp3 mpeg ncurses nls ogg oggvorbis opengl pam pdflib perl png python quicktime readline samba sdl slang spell sse sse2 ssl svga tcltk tcpd tiff truetype truetype-fonts type1-fonts vorbis xine xml2 xmms xv zlib linguas_it userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LC_ALL, LDFLAGS, MAKEOPTS


Spero di aver dato tutte le informazioni necessarie e che qualcuno sia in grado di aiutarmi.
Back to top
View user's profile Send private message
fabius
Guru
Guru


Joined: 29 Nov 2004
Posts: 525

PostPosted: Sun Oct 09, 2005 8:08 pm    Post subject: Reply with quote

ricompila libtool
Back to top
View user's profile Send private message
N|ghTm4r3
n00b
n00b


Joined: 27 Oct 2004
Posts: 70
Location: Urbe(Roma), Italy

PostPosted: Sun Oct 09, 2005 10:10 pm    Post subject: Reply with quote

fabius wrote:
ricompila libtool

quoto

Prova anche con:
Code:
# revdep-rebuild -p

_________________
Gentoo: The Power Of Gods
Back to top
View user's profile Send private message
Luca89
Advocate
Advocate


Joined: 27 Apr 2005
Posts: 2107
Location: Agrigento (Italy)

PostPosted: Mon Oct 10, 2005 11:40 am    Post subject: Reply with quote

fabius wrote:
ricompila libtool


Nulla da fare, k3b da sempre lo stesso errore

N|ghTm4r3 wrote:
Prova anche con:
Code:
# revdep-rebuild -p


Mi segnala solo questi pacchetti, credo sia inutile reinstallarli:

Code:
Calculating dependencies ...done!
[ebuild   R   ] app-office/openoffice-bin-2.0.0_rc2
[ebuild   R   ] games-sports/racer-bin-0.5.0-r1
[ebuild   R   ] www-client/mozilla-firefox-bin-1.0.7
Back to top
View user's profile Send private message
N|ghTm4r3
n00b
n00b


Joined: 27 Oct 2004
Posts: 70
Location: Urbe(Roma), Italy

PostPosted: Mon Oct 10, 2005 1:53 pm    Post subject: Reply with quote

In questo modo dovresti risolvere, cmq prendila come soluzione temporanea...
Code:
cd /usr/lib/gcc-lib/i686-pc-linux-gnu/
ln -s 3.3.6/libstdc++.la 3.3.5-20050130/libstdc++.la

_________________
Gentoo: The Power Of Gods
Back to top
View user's profile Send private message
fabius
Guru
Guru


Joined: 29 Nov 2004
Posts: 525

PostPosted: Mon Oct 10, 2005 5:55 pm    Post subject: Reply with quote

Luca89 wrote:
fabius wrote:
ricompila libtool

Nulla da fare, k3b da sempre lo stesso errore

Scusa, mi ero confuso con un altro errore. Cosa ti dà
Code:
find /usr/kde/3.4/lib/ -iname \*.la -exec grep -l 3.3.5 \{\} \;
find /usr/qt/3/lib/ -iname \*.la -exec grep -l 3.3.5 \{\} \;
find /usr/lib/ -iname \*.la -exec grep -l 3.3.5 \{\} \;

Dovresti trovare dei riferimenti al vecchio gcc. Se ci sono, ricompila i pacchetti che contengono le librerie riportate dai comandi precedenti
Back to top
View user's profile Send private message
fabius
Guru
Guru


Joined: 29 Nov 2004
Posts: 525

PostPosted: Mon Oct 10, 2005 5:56 pm    Post subject: Reply with quote

N|ghTm4r3 wrote:
In questo modo dovresti risolvere, cmq prendila come soluzione temporanea...

Effettivamente è meglio risolvere i problemi alla radice :wink:
Back to top
View user's profile Send private message
Luca89
Advocate
Advocate


Joined: 27 Apr 2005
Posts: 2107
Location: Agrigento (Italy)

PostPosted: Mon Oct 10, 2005 7:07 pm    Post subject: Reply with quote

fabius wrote:

Scusa, mi ero confuso con un altro errore. Cosa ti dà
Code:
find /usr/kde/3.4/lib/ -iname \*.la -exec grep -l 3.3.5 \{\} \;
find /usr/qt/3/lib/ -iname \*.la -exec grep -l 3.3.5 \{\} \;
find /usr/lib/ -iname \*.la -exec grep -l 3.3.5 \{\} \;

Dovresti trovare dei riferimenti al vecchio gcc. Se ci sono, ricompila i pacchetti che contengono le librerie riportate dai comandi precedenti


Ecco qui cosa mi esce:

Code:
luca@Panther ~ $ sh <<EOF
> find /usr/kde/3.4/lib/ -iname \*.la -exec grep -l 3.3.5 \{\} \;
> find /usr/qt/3/lib/ -iname \*.la -exec grep -l 3.3.5 \{\} \;
> find /usr/lib/ -iname \*.la -exec grep -l 3.3.5 \{\} \;
> EOF
/usr/kde/3.4/lib/libkabc_ldapkio.la
/usr/kde/3.4/lib/kde3/kdeprint_ext.la
/usr/kde/3.4/lib/kde3/kspell_ispell.la
/usr/kde/3.4/lib/kde3/kded_kpasswdserver.la
/usr/kde/3.4/lib/kde3/kaddprinterwizard.la
/usr/kde/3.4/lib/kde3/kded_kdetrayproxy.la
/usr/kde/3.4/lib/kde3/kded.la
/usr/kde/3.4/lib/kde3/kabc_net.la
/usr/kde/3.4/lib/kde3/kdeprint_lpr.la
/usr/kde/3.4/lib/kde3/kdeprint_tool_escputil.la
/usr/kde/3.4/lib/kde3/libkatepart.la
/usr/kde/3.4/lib/kde3/kwin3_smoothblend.la
/usr/kde/3.4/lib/kde3/kconf_update.la
/usr/kde/3.4/lib/kde3/kio_help.la
/usr/kde/3.4/lib/kde3/libshellscript.la
/usr/kde/3.4/lib/kde3/kded_proxyscout.la
/usr/kde/3.4/lib/kde3/kbuildsycoca.la
/usr/kde/3.4/lib/kde3/kcm_kresources.la
/usr/kde/3.4/lib/kde3/kgzipfilter.la
/usr/kde/3.4/lib/kde3/kio_http.la
/usr/kde/3.4/lib/kde3/kded_kssld.la
/usr/kde/3.4/lib/kde3/kio_uiserver.la
/usr/kde/3.4/lib/kde3/kio_metainfo.la
/usr/kde/3.4/lib/kde3/kspell_aspell.la
/usr/kde/3.4/lib/kde3/ktexteditor_insertfile.la
/usr/kde/3.4/lib/kde3/kio_ftp.la
/usr/kde/3.4/lib/kde3/kabc_ldapkio.la
/usr/kde/3.4/lib/kde3/kjavaappletviewer.la
/usr/kde/3.4/lib/kde3/kimg_dds.la
/usr/kde/3.4/lib/kde3/ktexteditor_isearch.la
/usr/kde/3.4/lib/kde3/kimg_eps.la
/usr/kde/3.4/lib/kde3/klauncher.la
/usr/kde/3.4/lib/kde3/kabcformat_binary.la
/usr/kde/3.4/lib/kde3/kimg_ico.la
/usr/kde/3.4/lib/kde3/kded_kdeprintd.la
/usr/kde/3.4/lib/kde3/libkhtmlpart.la
/usr/kde/3.4/lib/kde3/kcmshell.la
/usr/kde/3.4/lib/kde3/kded_kcookiejar.la
/usr/kde/3.4/lib/kde3/kio_ghelp.la
/usr/kde/3.4/lib/kde3/kded_kwalletd.la
/usr/kde/3.4/lib/kde3/kdeprint_lpdunix.la
/usr/kde/3.4/lib/kde3/kimg_pcx.la
/usr/kde/3.4/lib/kde3/kimg_psd.la
/usr/kde/3.4/lib/kde3/ktexteditor_docwordcompletion.la
/usr/kde/3.4/lib/kde3/kimg_rgb.la
/usr/kde/3.4/lib/kde3/kimg_tiff.la
/usr/kde/3.4/lib/kde3/kimg_xview.la
/usr/kde/3.4/lib/kde3/kimg_tga.la
/usr/kde/3.4/lib/kde3/kio_http_cache_cleaner.la
/usr/kde/3.4/lib/kde3/kabc_file.la
/usr/kde/3.4/lib/kde3/ktexteditor_kdatatool.la
/usr/kde/3.4/lib/kde3/khtmlimagepart.la
/usr/kde/3.4/lib/kde3/kimg_xcf.la
/usr/kde/3.4/lib/kde3/kdeprint_rlpr.la
/usr/kde/3.4/lib/kde3/dcopserver.la
/usr/kde/3.4/lib/kde3/libkdeprint_management_module.la
/usr/kde/3.4/lib/kde3/kbzip2filter.la
/usr/kde/3.4/lib/kde3/kstyle_plastik_config.la
/usr/kde/3.4/lib/kde3/libkmultipart.la
/usr/kde/3.4/lib/kde3/plugins/styles/highcolor.la
/usr/kde/3.4/lib/kde3/plugins/styles/plastik.la
/usr/kde/3.4/lib/kde3/plugins/styles/keramik.la
/usr/kde/3.4/lib/kde3/plugins/styles/highcontrast.la
/usr/kde/3.4/lib/kde3/plugins/styles/light.la
/usr/kde/3.4/lib/kde3/plugins/styles/kthemestyle.la
/usr/kde/3.4/lib/kde3/plugins/designer/kdewidgets.la
/usr/kde/3.4/lib/kde3/kio_file.la
/usr/kde/3.4/lib/kde3/kwin_smoothblend_config.la
/usr/kde/3.4/lib/kde3/kabc_dir.la
/usr/kde/3.4/lib/kde3/kcookiejar.la
/usr/kde/3.4/lib/kde3/libkcertpart.la
/usr/kde/3.4/lib/libkjava.la
/usr/kde/3.4/lib/libkabc_file.la
/usr/kde/3.4/lib/libkdeinit_kcookiejar.la
/usr/kde/3.4/lib/libkio.la
/usr/kde/3.4/lib/libkjs.la
/usr/kde/3.4/lib/libkparts.la
/usr/kde/3.4/lib/libkabc_dir.la
/usr/kde/3.4/lib/libknewstuff.la
/usr/kde/3.4/lib/libkdeprint_management.la
/usr/kde/3.4/lib/libkwalletbackend.la
/usr/kde/3.4/lib/libkimproxy.la
/usr/kde/3.4/lib/libkdefx.la
/usr/kde/3.4/lib/libkdesu.la
/usr/kde/3.4/lib/libkdeui.la
/usr/kde/3.4/lib/libkdeinit_kaddprinterwizard.la
/usr/kde/3.4/lib/libkdeinit_kconf_update.la
/usr/kde/3.4/lib/libkspell2.la
/usr/kde/3.4/lib/libkscript.la
/usr/kde/3.4/lib/libkabc_net.la
/usr/kde/3.4/lib/libkdeprint.la
/usr/kde/3.4/lib/libkdeinit_kbuildsycoca.la
/usr/kde/3.4/lib/libkdeinit_klauncher.la
/usr/kde/3.4/lib/libktexteditor.la
/usr/kde/3.4/lib/libkmdi2.la
/usr/kde/3.4/lib/libkdeinit_kio_http_cache_cleaner.la
/usr/kde/3.4/lib/libkdeinit_kio_uiserver.la
/usr/kde/3.4/lib/libkscreensaver.la
/usr/kde/3.4/lib/libDCOP.la
/usr/kde/3.4/lib/libkatepartinterfaces.la
/usr/kde/3.4/lib/libkresources.la
/usr/kde/3.4/lib/libvcard.la
/usr/kde/3.4/lib/libkabc.la
/usr/kde/3.4/lib/libkdecore.la
/usr/kde/3.4/lib/libkmediaplayer.la
/usr/kde/3.4/lib/libkdeinit_kcmshell.la
/usr/kde/3.4/lib/libkutils.la
/usr/kde/3.4/lib/libkdnssd.la
/usr/kde/3.4/lib/libkmdi.la
/usr/kde/3.4/lib/libkntlm.la
/usr/kde/3.4/lib/libkmid.la
/usr/kde/3.4/lib/libkdesasl.la
/usr/kde/3.4/lib/libkdeinit_kded.la
/usr/kde/3.4/lib/libkspell.la
/usr/kde/3.4/lib/libkwalletclient.la
/usr/kde/3.4/lib/libkdeinit_dcopserver.la
/usr/kde/3.4/lib/libkhtml.la
luca@Panther ~ $


Credo proprio che il pacchetto incriminato siano le kdelibs, come soluzione però ho preferito il workaround di N|ghTm4r3 perchè non avevo voglia di ricompilare le kdelibs solo per k3b. Vi ringrazio tutti e due per l'interessamento :wink:
Back to top
View user's profile Send private message
randomaze
Bodhisattva
Bodhisattva


Joined: 21 Oct 2003
Posts: 9985

PostPosted: Mon Jan 09, 2006 9:04 am    Post subject: Reply with quote

Moved from Forum italiano (Italian) to Documentazione italiana.

Anche se si tratta comunque di un interessante lettura questo post é stato reso obsoleto dalla guida Guida all'aggiornamento di GCC per Gentoo Linux.
_________________
Ciao da me!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) Risorse italiane (documentazione e tools) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum