Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SYSTEM]Nuove glibc
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian)
View previous topic :: View next topic  
Author Message
MonsterMord
Guru
Guru


Joined: 28 Apr 2004
Posts: 395
Location: Italy --> Forli'

PostPosted: Mon Jul 18, 2005 7:30 am    Post subject: [SYSTEM]Nuove glibc Reply with quote

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
View user's profile Send private message
SilverXXX
l33t
l33t


Joined: 18 Sep 2004
Posts: 885

PostPosted: Mon Jul 18, 2005 8:04 am    Post subject: Reply with quote

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
View user's profile Send private message
Kernel78
Moderator
Moderator


Joined: 24 Jun 2005
Posts: 3654

PostPosted: Mon Jul 18, 2005 8:31 am    Post subject: Re: [SYSTEM]Nuove glibc Reply with quote

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 :wink:
altrimenti ottieni errori
Code:
USE flags should not start with a '+': +nls
Back to top
View user's profile Send private message
CRV§ADER//KY
Guru
Guru


Joined: 30 Aug 2004
Posts: 405
Location: Torino

PostPosted: Mon Jul 18, 2005 5:56 pm    Post subject: Reply with quote

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
View user's profile Send private message
SilverXXX
l33t
l33t


Joined: 18 Sep 2004
Posts: 885

PostPosted: Mon Jul 18, 2005 6:41 pm    Post subject: Reply with quote

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
View user's profile Send private message
Kernel78
Moderator
Moderator


Joined: 24 Jun 2005
Posts: 3654

PostPosted: Mon Jul 18, 2005 6:41 pm    Post subject: Reply with quote

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 8) quindi uso tranquillamente nptlonly
Back to top
View user's profile Send private message
.:chrome:.
Advocate
Advocate


Joined: 19 Feb 2005
Posts: 4588
Location: Brescia, Italy

PostPosted: Mon Jul 18, 2005 7:29 pm    Post subject: Reply with quote

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
View user's profile Send private message
Kernel78
Moderator
Moderator


Joined: 24 Jun 2005
Posts: 3654

PostPosted: Mon Jul 18, 2005 7:40 pm    Post subject: Reply with quote

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 :oops: )

Quote:

spero di essere riuscito a spiegarmi

Si, in maniera molto chiara.
Back to top
View user's profile Send private message
.:chrome:.
Advocate
Advocate


Joined: 19 Feb 2005
Posts: 4588
Location: Brescia, Italy

PostPosted: Mon Jul 18, 2005 7:51 pm    Post subject: Reply with quote

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 :oops: )

secondo me è buona abitudine usare emerge -v
Back to top
View user's profile Send private message
Kernel78
Moderator
Moderator


Joined: 24 Jun 2005
Posts: 3654

PostPosted: Mon Jul 18, 2005 7:56 pm    Post subject: Reply with quote

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 :roll:
Back to top
View user's profile Send private message
.:chrome:.
Advocate
Advocate


Joined: 19 Feb 2005
Posts: 4588
Location: Brescia, Italy

PostPosted: Mon Jul 18, 2005 9:54 pm    Post subject: Reply with quote

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
View user's profile Send private message
CRV§ADER//KY
Guru
Guru


Joined: 30 Aug 2004
Posts: 405
Location: Torino

PostPosted: Mon Jul 18, 2005 10:18 pm    Post subject: Reply with quote

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
View user's profile Send private message
MonsterMord
Guru
Guru


Joined: 28 Apr 2004
Posts: 395
Location: Italy --> Forli'

PostPosted: Tue Jul 19, 2005 9:42 am    Post subject: Reply with quote

k.gothmog wrote:

spero di essere riuscito a spiegarmi


Pure troppo :-P

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
View user's profile Send private message
Kernel78
Moderator
Moderator


Joined: 24 Jun 2005
Posts: 3654

PostPosted: Tue Jul 19, 2005 11:36 am    Post subject: Reply with quote

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 :roll:
Back to top
View user's profile Send private message
MonsterMord
Guru
Guru


Joined: 28 Apr 2004
Posts: 395
Location: Italy --> Forli'

PostPosted: Tue Jul 19, 2005 11:54 am    Post subject: Reply with quote

Kernel78 wrote:
e hai sbagliato, se vuoi attivare una use basta il nome, non devi metter il + davanti :roll:


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
View user's profile Send private message
Kernel78
Moderator
Moderator


Joined: 24 Jun 2005
Posts: 3654

PostPosted: Tue Jul 19, 2005 1:06 pm    Post subject: Reply with quote

MonsterMord wrote:
Kernel78 wrote:
e hai sbagliato, se vuoi attivare una use basta il nome, non devi metter il + davanti :roll:


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
View user's profile Send private message
horace
Tux's lil' helper
Tux's lil' helper


Joined: 13 Jul 2005
Posts: 95

PostPosted: Tue Jul 19, 2005 1:28 pm    Post subject: Reply with quote

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
View user's profile Send private message
MonsterMord
Guru
Guru


Joined: 28 Apr 2004
Posts: 395
Location: Italy --> Forli'

PostPosted: Tue Jul 19, 2005 2:09 pm    Post subject: Reply with quote

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
View user's profile Send private message
horace
Tux's lil' helper
Tux's lil' helper


Joined: 13 Jul 2005
Posts: 95

PostPosted: Tue Jul 19, 2005 2:32 pm    Post subject: Reply with quote

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
Code:
-fPIC

(che tra l'altro non mi ricordo neanche perchè l'avevo messa :D :roll: )

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
View user's profile Send private message
Lucacri
Tux's lil' helper
Tux's lil' helper


Joined: 27 Jan 2005
Posts: 147
Location: 2a Curva di Lesmo!

PostPosted: Tue Jul 19, 2005 2:50 pm    Post subject: Reply with quote

-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
View user's profile Send private message
.:chrome:.
Advocate
Advocate


Joined: 19 Feb 2005
Posts: 4588
Location: Brescia, Italy

PostPosted: Tue Jul 19, 2005 3:00 pm    Post subject: Reply with quote

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
View user's profile Send private message
horace
Tux's lil' helper
Tux's lil' helper


Joined: 13 Jul 2005
Posts: 95

PostPosted: Tue Jul 19, 2005 3:10 pm    Post subject: Reply with quote

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
View user's profile Send private message
horace
Tux's lil' helper
Tux's lil' helper


Joined: 13 Jul 2005
Posts: 95

PostPosted: Tue Jul 19, 2005 3:22 pm    Post subject: Reply with quote

k.gothmog wrote:

tornando al problema della compilazione, suggerisco di leggere l'OT che è saltato fuori in questo thread: https://forums.gentoo.org/viewtopic-t-360820.html


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
Code:
equery uses XXX

ma che funziona solo su pacchetti già installati?
Back to top
View user's profile Send private message
Onip
Advocate
Advocate


Joined: 02 Sep 2004
Posts: 2912
Location: Parma (Italy)

PostPosted: Tue Jul 19, 2005 3:27 pm    Post subject: Reply with quote

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

Code:
#emerge ufed

_________________
Linux Registered User n. 373835

Titus Lucretius Carus, De Rerum Natura - Tantum religio potuit suadere malorum
Back to top
View user's profile Send private message
CRV§ADER//KY
Guru
Guru


Joined: 30 Aug 2004
Posts: 405
Location: Torino

PostPosted: Tue Jul 19, 2005 3:32 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
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