View previous topic :: View next topic |
Author |
Message |
MonsterMord Guru
Joined: 28 Apr 2004 Posts: 395 Location: Italy --> Forli'
|
Posted: Mon Jul 18, 2005 7:30 am Post subject: [SYSTEM]Nuove glibc |
|
|
A proposito delle nuove glibc-2.3.5 ho le use flags messe cosi'
"+nls -nptl -nptlonly"
Ha senso abilitare la nptl e/o la nptlonly?
Che vantaggio ne otterrei?
Grazie. _________________ Gentoo GNU/Linux on DELL Inspiron 8500 |
|
Back to top |
|
|
SilverXXX l33t
Joined: 18 Sep 2004 Posts: 885
|
Posted: Mon Jul 18, 2005 8:04 am Post subject: |
|
|
Si ha un grosso vantaggio in java, e in alcuni applicazioni che fanno grosso uso di thread (es. un dbms con accessi multipli) principalmente. Cmq dovrebbe essere meglio in generale. Se metti nptl, ti compila sia la nuova che la vecchia libreria per compatibilità, con nptlonly solo la nuova. Ormai cmq non ci dovrebbero essere problemi anche con nptlonly. _________________ about:mozilla |
|
Back to top |
|
|
Kernel78 Moderator
Joined: 24 Jun 2005 Posts: 3654
|
Posted: Mon Jul 18, 2005 8:31 am Post subject: Re: [SYSTEM]Nuove glibc |
|
|
MonsterMord wrote: | A proposito delle nuove glibc-2.3.5 ho le use flags messe cosi'
"+nls -nptl -nptlonly" |
di sicuro devi togliere il + davanti alle USE che vuoi abilitare
altrimenti ottieni errori Code: | USE flags should not start with a '+': +nls |
|
|
Back to top |
|
|
CRV§ADER//KY Guru
Joined: 30 Aug 2004 Posts: 405 Location: Torino
|
Posted: Mon Jul 18, 2005 5:56 pm Post subject: |
|
|
SilverXXX wrote: | Ormai cmq non ci dovrebbero essere problemi anche con nptlonly. |
Ho sempre saputo che le applicazioni closed source non funzionano con nptlonly... _________________ Kyrie, Ignis Divine, Eleison ~ Elfen Lied |
|
Back to top |
|
|
SilverXXX l33t
Joined: 18 Sep 2004 Posts: 885
|
Posted: Mon Jul 18, 2005 6:41 pm Post subject: |
|
|
Non so, a me pare che applicazioni recenti non diano problemi (al momento però non ho nptlonly), ma per certezza si dovrebbero fare un pò di prove. _________________ about:mozilla |
|
Back to top |
|
|
Kernel78 Moderator
Joined: 24 Jun 2005 Posts: 3654
|
Posted: Mon Jul 18, 2005 6:41 pm Post subject: |
|
|
CRV§ADER//KY wrote: | SilverXXX wrote: | Ormai cmq non ci dovrebbero essere problemi anche con nptlonly. |
Ho sempre saputo che le applicazioni closed source non funzionano con nptlonly... |
Non saprei cosa dire, è una vita che non uso più sw closed quindi uso tranquillamente nptlonly |
|
Back to top |
|
|
.:chrome:. Advocate
Joined: 19 Feb 2005 Posts: 4588 Location: Brescia, Italy
|
Posted: Mon Jul 18, 2005 7:29 pm Post subject: |
|
|
NPTL è l'acronimo di Native POSIX Threading Library.
in sostanza quando compili con NPTL passi da un modello a processi ad uno a thread.
la differenza sta nel modo in cui il sistema operativo gestisce lo scheduling. i programmi sono divisi in processi (per intenderci... ogni processo ha un PID, in UNIX) e i processi hanno una gerarchia di sottoprocessi.
per passare da un processo all'altro (interazione fra programmi, chiamata di librerie, o semplice prelazione dello scheduler) si deve generare unìinterruzione, passare da user-mode a kernel-mode, selezionare il nuovo processo ed attivarlo (questo si chiama context-switch).
se hai un modello a thread, hai sempre i processi, ma non i sottoprocessi. al posto di questi trovi i thread, e quelli sono gestiti direttamente dal processo supervisore. per passare dall'uno all'altro non è necessario alcun context-switch, perché resta tutto all'interno del processo supervisore (i panni sporchi si lavano in casa).
questo da un discreto vantaggio di prestazioni.
nptl compila DUE VOLTE glibc, una volta con il tradizionale LinuxThreads e una volta con NPTL (se fai attenzione all'output di compilazione, all'inizio lo leggi), in modo da offrire ai programmi che lo supportano anche NPTL.
nptlonly compila UNA VOLTA glibc, solo con supporto POSIX Threads e senza LinuxThreads. a tua discrezione: il supporto ai LinuxThreads lo si potrebbe mantenere per compatibilità. il computer da cui sto scrivendo ora non ha mai visto nemmeno per sbaglio il supporto a LinuxThreads e non mi ha mai dato nessun tipo di noia...
spero di essere riuscito a spiegarmi |
|
Back to top |
|
|
Kernel78 Moderator
Joined: 24 Jun 2005 Posts: 3654
|
Posted: Mon Jul 18, 2005 7:40 pm Post subject: |
|
|
k.gothmog wrote: | il computer da cui sto scrivendo ora non ha mai visto nemmeno per sbaglio il supporto a LinuxThreads e non mi ha mai dato nessun tipo di noia...
|
il mio pc invece l'ha visto per sbaglio (avevo scritto ntplonly invece di nptlonly )
Quote: |
spero di essere riuscito a spiegarmi |
Si, in maniera molto chiara. |
|
Back to top |
|
|
.:chrome:. Advocate
Joined: 19 Feb 2005 Posts: 4588 Location: Brescia, Italy
|
Posted: Mon Jul 18, 2005 7:51 pm Post subject: |
|
|
Kernel78 wrote: | k.gothmog wrote: | il computer da cui sto scrivendo ora non ha mai visto nemmeno per sbaglio il supporto a LinuxThreads e non mi ha mai dato nessun tipo di noia... |
il mio pc invece l'ha visto per sbaglio (avevo scritto ntplonly invece di nptlonly ) |
secondo me è buona abitudine usare emerge -v |
|
Back to top |
|
|
Kernel78 Moderator
Joined: 24 Jun 2005 Posts: 3654
|
Posted: Mon Jul 18, 2005 7:56 pm Post subject: |
|
|
k.gothmog wrote: | secondo me è buona abitudine usare emerge -v |
Io la uso sempre (in genere anche con -a), tranne quando faccio emerge -f ma avevo dato per scontato di aver scritto tutte le use correttamente quindi non ho controllato più di tanto, me ne sono accorto quando ho letto l'avvertimento sulla compilazione doppia in quanto non era specificato nptlonly |
|
Back to top |
|
|
.:chrome:. Advocate
Joined: 19 Feb 2005 Posts: 4588 Location: Brescia, Italy
|
Posted: Mon Jul 18, 2005 9:54 pm Post subject: |
|
|
ecco quell'avviso di cui parlavo:
Code: | * Warning! Gentoo's GLIBC with NPTL enabled now behaves like the
* glibc from almost every other distribution out there. This means
* that glibc is compiled -twice-, once with linuxthreads and once
* with nptl. The NPTL version is installed to lib/tls and is still
* used by default. If you do not need nor want the linuxthreads
* fallback, you can disable this behavior by adding nptlonly to
* USE to save yourself some compile time. |
|
|
Back to top |
|
|
CRV§ADER//KY Guru
Joined: 30 Aug 2004 Posts: 405 Location: Torino
|
Posted: Mon Jul 18, 2005 10:18 pm Post subject: |
|
|
E' solo una mia impressione o con le nuove glibc il mio tempo di boot (da lilo ad XFCE, col login automatico) è calato da 2m30s a 2m10s? _________________ Kyrie, Ignis Divine, Eleison ~ Elfen Lied |
|
Back to top |
|
|
MonsterMord Guru
Joined: 28 Apr 2004 Posts: 395 Location: Italy --> Forli'
|
Posted: Tue Jul 19, 2005 9:42 am Post subject: |
|
|
k.gothmog wrote: |
spero di essere riuscito a spiegarmi |
Pure troppo
Alla fine ho optato per "+nls +nptl +userlocales", gli aggiornamenti delle glibc non vengono rilasciati di frequente e compilare due volte non e' un problema. In piu' avere una retrocompatilbilta' non guasta (ho diversi vecchi giochi closed che temo possano dare problemi).
Se posso aggiungere una considerazione:
era ora che mettessero stabili le 2.3.5 invece che partire dalle 2.3.3 patcharle con un snapshot a caso del CVS e creare quell'obrobrio di 2.3.4-qualchedataacasochenonvabeneperniente (vedi bug #90825)
Mi sembra che gli sviluppatori gentoo prendano un po' troppo alla leggera le glibc, e' un componente _fondamentale_
Saluti. _________________ Gentoo GNU/Linux on DELL Inspiron 8500 |
|
Back to top |
|
|
Kernel78 Moderator
Joined: 24 Jun 2005 Posts: 3654
|
Posted: Tue Jul 19, 2005 11:36 am Post subject: |
|
|
MonsterMord wrote: | Alla fine ho optato per "+nls +nptl +userlocales" |
e hai sbagliato, se vuoi attivare una use basta il nome, non devi metter il + davanti |
|
Back to top |
|
|
MonsterMord Guru
Joined: 28 Apr 2004 Posts: 395 Location: Italy --> Forli'
|
Posted: Tue Jul 19, 2005 11:54 am Post subject: |
|
|
Kernel78 wrote: | e hai sbagliato, se vuoi attivare una use basta il nome, non devi metter il + davanti |
Ho messo il "+" solo nel post per specificare meglio le USE flag attive, come vuole la sintassi del portage
Code: |
sys-libs/glibc-2.3.5 -build -debug -erandom -hardened (-multilib) +nls +nptl -nptlonly -pic (-selinux) +userlocales
|
_________________ Gentoo GNU/Linux on DELL Inspiron 8500 |
|
Back to top |
|
|
Kernel78 Moderator
Joined: 24 Jun 2005 Posts: 3654
|
Posted: Tue Jul 19, 2005 1:06 pm Post subject: |
|
|
MonsterMord wrote: | Kernel78 wrote: | e hai sbagliato, se vuoi attivare una use basta il nome, non devi metter il + davanti |
Ho messo il "+" solo nel post per specificare meglio le USE flag attive, come vuole la sintassi del portage
|
Pensavo l'avessi messo in make.conf (ho visto motli farlo e ignorare gli errori USE flags should not start with a '+': +<USE>) |
|
Back to top |
|
|
horace Tux's lil' helper
Joined: 13 Jul 2005 Posts: 95
|
Posted: Tue Jul 19, 2005 1:28 pm Post subject: |
|
|
ho un problema nell'emerge glibc con il supporto nptl
Code: |
In file included from ../nptl/sysdeps/unix/sysv/linux/i386/fork.c:31:
../nptl/sysdeps/unix/sysv/linux/fork.c: In function `__libc_fork':
../nptl/sysdeps/unix/sysv/linux/fork.c:203: error: can't find a register in class `BREG' while reloading `asm'
make[2]: *** [/var/tmp/portage/glibc-2.3.5/work/build-default-i686-pc-linux-gnu-nptl/posix/fork.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory `/var/tmp/portage/glibc-2.3.5/work/glibc-2.3.5/posix'
make[1]: *** [posix/subdir_lib] Error 2
make[1]: Leaving directory `/var/tmp/portage/glibc-2.3.5/work/glibc-2.3.5'
make: *** [all] Error 2
!!! ERROR: sys-libs/glibc-2.3.5 failed.
!!! Function toolchain-glibc_src_compile, Line 244, Exitcode 2
!!! (no error message)
!!! If you need support, post the topmost build error, NOT this status message.
|
ed ecco le mio info
Code: | Portage 2.0.51.19 (default-linux/x86/2005.0, gcc-3.3.5-20050130, glibc-2.3.4.20041102-r1, 2.6.11-gentoo-r11 i686)
=================================================================
System uname: 2.6.11-gentoo-r11 i686 Intel(R) Pentium(R) M processor 1500MHz
Gentoo Base System version 1.4.16
Python: dev-lang/python-2.3.5 [2.3.5 (#1, May 6 2005, 19:19:55)]
dev-lang/python: 2.3.5
sys-apps/sandbox: [Not Present]
sys-devel/autoconf: 2.59-r6, 2.13
sys-devel/automake: 1.7.9-r1, 1.8.5-r3, 1.5, 1.4_p6, 1.6.3, 1.9.5
sys-devel/binutils: 2.15.92.0.2-r10
sys-devel/libtool: 1.5.16
virtual/os-headers: 2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-march=pentium3 -fomit-frame-pointer -pipe -O2 -mfpmath=sse -mmmx -msse -msse2 -fprefetch-loop-arrays -falign-functions=32 -fPIC "
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=pentium3 -fomit-frame-pointer -pipe -O2 -mfpmath=sse -mmmx -msse -msse2 -fprefetch-loop-arrays -falign-functions=32 -fPIC "
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://www.die.unipd.it/pub/Linux/distributions/gentoo-sources/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.de.gentoo.org/gentoo-portage"
USE="x86 X a52 aac aalib accessibility acl acpi adns alsa apache2 arts atlas audiofile avi bash-completion berkdb bidi bitmap-fonts bmp bzlib canna cdb cdparanoia cdr cjk crypt cscope cups curl dga dio directfb divx4linux doc dvd dvdread encode esd ethereal exif fam fbcon ffmpeg fftw flac foomaticdb freetds freewn ftp gdbm geoip gif glut gmp gphoto2 gpm gstreamer gtk2 gtkhtml icc icc-pgo iconv ieee1394 imagemagick imap imlib innodb iodbc ipv6 java javascript jikes jpeg kde kdeenablefinal kdexdeltas kerberos ldap libcaca libg++ libwww lirc lm_sensors mad matroska mikmod mime mmx mono motif mozilla mp3 mpeg msn nas ncurses nls nptl odbc offensive ogg oggvorbis opengl oss pam pcmcia pcntl pdflib perl png posix python qt quicktime readline ruby samba scanner sdl snmp sockets socks5 speex spell sse ssl svga symlink tcpd tetex threads tiff truetype truetype-fonts type1-fonts unicode usb v4l vcd vorbis wifi win32codecs wxwindows xine xinerama xml xml2 xmms xv xvid zlib userland_GNU kernel_linux elibc_glibc"
Unset: ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY
|
avete qualche consiglio da darmi?
ho provato a seguire quello che c'è scritto qui
https://forums.gentoo.org/viewtopic-t-329143-highlight-error+syslibs+glibc2+3+5+toolchainglibcsrccompile+244+exitcode+2.html
ma complice il mio scarso inglese e la poca conoscenza di linux non ho capito molto bene quale sia la soluzione...grazie! |
|
Back to top |
|
|
MonsterMord Guru
Joined: 28 Apr 2004 Posts: 395 Location: Italy --> Forli'
|
Posted: Tue Jul 19, 2005 2:09 pm Post subject: |
|
|
Sembra un problema di registri macchina assembler (ma potrei aver detto una grossa cavolta). Come mai hai un kernel per Pentium M (centrino immagino) e le CFLAG per Pentium3?
Ad ogni modo, anche se il processore e' corretto prova a tagliare le opzioni esotiche dalla CFLAGS _________________ Gentoo GNU/Linux on DELL Inspiron 8500 |
|
Back to top |
|
|
horace Tux's lil' helper
Joined: 13 Jul 2005 Posts: 95
|
Posted: Tue Jul 19, 2005 2:32 pm Post subject: |
|
|
MonsterMord wrote: | Sembra un problema di registri macchina assembler (ma potrei aver detto una grossa cavolta). Come mai hai un kernel per Pentium M (centrino immagino) e le CFLAG per Pentium3?
Ad ogni modo, anche se il processore e' corretto prova a tagliare le opzioni esotiche dalla CFLAGS |
ho trovato da qualche parte che si risolve tolgiendo l'opzione
(che tra l'altro non mi ricordo neanche perchè l'avevo messa )
non ho la CFLAG per pentium M perchè le gcc 3.3.5 non supportano il pentium M (centrino) e ho quindi settato pentium 3
EDIT: ortografia |
|
Back to top |
|
|
Lucacri Tux's lil' helper
Joined: 27 Jan 2005 Posts: 147 Location: 2a Curva di Lesmo!
|
Posted: Tue Jul 19, 2005 2:50 pm Post subject: |
|
|
-fPIC dovrebbe essere necessaria per effettuare un buon Prelink, o sbaglio? _________________ [img:8419689fe2]http://www.ibicocca.it/lucacri/mysig.jpg[/img:8419689fe2] |
|
Back to top |
|
|
.:chrome:. Advocate
Joined: 19 Feb 2005 Posts: 4588 Location: Brescia, Italy
|
Posted: Tue Jul 19, 2005 3:00 pm Post subject: |
|
|
Lucacri wrote: | -fPIC dovrebbe essere necessaria per effettuare un buon Prelink, o sbaglio? |
sbagli, e pure alla grande.
PIC = Position Indipendent Code, e non è una cosa da abilitare su un desktop
tornando al problema della compilazione, suggerisco di leggere l'OT che è saltato fuori in questo thread: https://forums.gentoo.org/viewtopic-t-360820.html |
|
Back to top |
|
|
horace Tux's lil' helper
Joined: 13 Jul 2005 Posts: 95
|
Posted: Tue Jul 19, 2005 3:10 pm Post subject: |
|
|
Lucacri wrote: | -fPIC dovrebbe essere necessaria per effettuare un buon Prelink, o sbaglio? |
da http://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html#index-fverbose_002dasm-1581
Quote: |
-fpic
Generate position-independent code (PIC) suitable for use in a shared library, if supported for the target machine. Such code accesses all constant addresses through a global offset table (GOT). The dynamic loader resolves the GOT entries when the program starts (the dynamic loader is not part of GCC; it is part of the operating system). If the GOT size for the linked executable exceeds a machine-specific maximum size, you get an error message from the linker indicating that -fpic does not work; in that case, recompile with -fPIC instead. (These maximums are 8k on the SPARC and 32k on the m68k and RS/6000. The 386 has no such limit.)
Position-independent code requires special support, and therefore works only on certain machines. For the 386, GCC supports PIC for System V but not for the Sun 386i. Code generated for the IBM RS/6000 is always position-independent.
-fPIC
If supported for the target machine, emit position-independent code, suitable for dynamic linking and avoiding any limit on the size of the global offset table. This option makes a difference on the m68k, PowerPC and SPARC.
Position-independent code requires special support, and therefore works only on certain machines.
|
devo dire che quando ho installato, nella scelte delle CFLAGS mi sono fidato di un amico che mi ha consigliato questa opzione, ma non ci ho capito un gran che (cmq ora le glibc si stanno compilando a dovere). |
|
Back to top |
|
|
horace Tux's lil' helper
Joined: 13 Jul 2005 Posts: 95
|
Posted: Tue Jul 19, 2005 3:22 pm Post subject: |
|
|
grazie, ho letto e terrò presente, ma non ho una gran conoscenza delle USE flag...
potresti fare un esempio della decina di flag base da mantenere nel make.conf? inoltre, come faccio a sapere il significato di una flag se non usando
ma che funziona solo su pacchetti già installati? |
|
Back to top |
|
|
Onip Advocate
Joined: 02 Sep 2004 Posts: 2912 Location: Parma (Italy)
|
Posted: Tue Jul 19, 2005 3:27 pm Post subject: |
|
|
con Code: | #euse -i elenco_use_da_esaminare |
ti dice pure se sono globali (==> adatte a stare nel make-conf)
oppure locali ( ==> con un po' di sbatti puoi metterle in /etc/portage/package.use)
Byez
P.S. Volendo puoi anche guardarti ufed
_________________ Linux Registered User n. 373835
Titus Lucretius Carus, De Rerum Natura - Tantum religio potuit suadere malorum |
|
Back to top |
|
|
CRV§ADER//KY Guru
Joined: 30 Aug 2004 Posts: 405 Location: Torino
|
Posted: Tue Jul 19, 2005 3:32 pm Post subject: |
|
|
ho googlato un po': Quote: | To create shared library, you have to use -fPIC or -fpic options beside -shared options. A function in shared library will be placed different address in memory for each program. For that reason we have to generate position indipendent code (PIC). -fPIC option generates larger object file then -fpic. -fpic generates smaller and faster objects. But they will be platform dependent and they will include less debug informations. |
Quote: | Librerie condivise nel formato ELF
Le DLL in formato ELF non vengono caricate in indirizzi prefissati di memoria ma possono apparire ad indirizzi diversi a seconda del programma.
Per far ciò le librerie sono scritte in codice PIC (Position Indipendent Code). Nel codice della libreria non vengono mai generati indirizzi assoluti ma solo relativi, sarà il runtime linker a generare quelli assoluti a tempo di esecuzione..
Ogni DLL si chiama generalmente libXXX.so.x.y. Dove so sta per shared object ed x ed y sono identificativi della versione. |
Da questi articoli sembra che -fPIC sia indispensabile per una libreria condivisa..... ci capisco sempre meno _________________ Kyrie, Ignis Divine, Eleison ~ Elfen Lied |
|
Back to top |
|
|
|