View previous topic :: View next topic |
Author |
Message |
ErniBrown Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/10540427541f3c25e119b3.jpg)
Joined: 19 Jan 2005 Posts: 276 Location: Seconda stella a destra e poi dritto fino al mattino...
|
Posted: Tue Mar 29, 2005 11:43 pm Post subject: Compilazione con linuxthreads |
|
|
Problemone: ho installato jack-audio-connection-kit, ma non riesco ad usare le realtime capabilities: guardo sul foru, sul sito di jack e scopro che c'è un problema con le nptl: ok, non ho messo nptlonly nelle flags apposta, quindi siamo salvi.
Adesso però sto cercando di capire come devo fare per ricompilarlo con le linuxthreads invece che con le nptl: non ho nemmeno idea di dove siano state salvate le glibc con le threads standard! Esiste per caso un programmino intelligente e cool come gcc-config? _________________ There are 10 kind of people:
those who understand binaries and
those who don't. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
n3m0 l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
![](images/avatars/14509762944294be8b0712e.png)
Joined: 08 Feb 2004 Posts: 798 Location: Richville, Naples, Italy, Europe
|
Posted: Tue Mar 29, 2005 11:52 pm Post subject: |
|
|
Vado insicuro, ma potrebbe bastare
Code: | > LD_ASSUME_KERNEL=2.4.1 <comando-che-necessita-di-linuxthreads> <command-option> |
_________________ Lenergia è la civiltà. Lasciarla in mano ai piromani/petrolieri è criminale. Perché aspettare che finisca il petrolio?
Letà della pietra non è mica finita per mancanza di pietre. - B.G.
Site/Blog: http://www.neminis.org |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
AlterX l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
![](images/avatars/gallery/The Matrix/movie_the_matrix_neo_2.gif)
Joined: 03 Apr 2004 Posts: 754 Location: rm -rf /*
|
Posted: Wed Mar 30, 2005 9:39 am Post subject: Re: Compilazione con linuxthreads |
|
|
ErniBrown wrote: | Problemone: ho installato jack-audio-connection-kit, ma non riesco ad usare le realtime capabilities: guardo sul foru, sul sito di jack e scopro che c'è un problema con le nptl: ok, non ho messo nptlonly nelle flags apposta, quindi siamo salvi.
Adesso però sto cercando di capire come devo fare per ricompilarlo con le linuxthreads invece che con le nptl: non ho nemmeno idea di dove siano state salvate le glibc con le threads standard! Esiste per caso un programmino intelligente e cool come gcc-config? |
Allora...
da console scrivi: /lib/libc.so.6
Ti dovrebbe apparire:
Code: |
GNU C Library 20041102 release version 2.3.4, by Roland McGrath et al.
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 3.3.5 (Gentoo Linux 3.3.5-r1, ssp-3.3.2-3, pie-8.7.7.1).
Compiled on a Linux 2.6.8 system on 2005-03-24.
Available extensions:
GNU libio by Per Bothner
crypt add-on version 2.1 by Michael Glad and others
linuxthreads-0.10 by Xavier Leroy <-------------------------------------------
The C stubs add-on version 2.1.2.
GNU Libidn by Simon Josefsson
BIND-8.2.3-T5B
libthread_db work sponsored by Alpha Processor Inc
NIS(YP)/NIS+ NSS modules 0.19 by Thorsten Kukuk
Thread-local storage support included.
For bug reporting instructions, please see:
<http://www.gnu.org/software/libc/bugs.html>.
|
Se nella linea segnata vedi "linuxthreads", significa che hai quelli "standard" ovvero pthreads.
Se invece non è quella la scritta, allora dovresti aggiungere in /etc/make.conf la flag use -nptl
e ricompilare le glibc e poi tutto il resto che ti interessa o che non funziona più. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
ErniBrown Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/10540427541f3c25e119b3.jpg)
Joined: 19 Jan 2005 Posts: 276 Location: Seconda stella a destra e poi dritto fino al mattino...
|
Posted: Wed Mar 30, 2005 4:40 pm Post subject: |
|
|
no no, aspetta: se tu metti la flag nptl portage compila le glibc sia con le nptl che con le linuxthreads! Ora, il punto è: a me serve compilare jack con le linuxthreads, non funziona con le nptl, come faccio? di default tutto viene compilato con la versione nptl delle glibc! Come attivo le altre?
EDIT: molto strano: ho lanciato adesso il comando che hai detto: mi dice che ho le linuxthreads!!! Ma io la flag nptl ce l'ho nel make.config da sempre!!! E ricordo benissimo i warning durante il bootstrap per questa cosa!! _________________ There are 10 kind of people:
those who understand binaries and
those who don't. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
gutter Bodhisattva
![Bodhisattva Bodhisattva](/images/ranks/rank-bodhisattva.gif)
![](images/avatars/67030318436dd16c1dd5e.jpg)
Joined: 13 Mar 2004 Posts: 7162 Location: Aarau, Aargau, Switzerland
|
Posted: Wed Mar 30, 2005 4:54 pm Post subject: |
|
|
Hai provato a compilare e seguire il consiglio di nem0. _________________ Registered as User #281564 and Machines #163761 |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
ErniBrown Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/10540427541f3c25e119b3.jpg)
Joined: 19 Jan 2005 Posts: 276 Location: Seconda stella a destra e poi dritto fino al mattino...
|
Posted: Wed Mar 30, 2005 4:55 pm Post subject: |
|
|
Partita adesso la ricompilazione delle glibc, fra una mezz'ora vediamo _________________ There are 10 kind of people:
those who understand binaries and
those who don't. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
gutter Bodhisattva
![Bodhisattva Bodhisattva](/images/ranks/rank-bodhisattva.gif)
![](images/avatars/67030318436dd16c1dd5e.jpg)
Joined: 13 Mar 2004 Posts: 7162 Location: Aarau, Aargau, Switzerland
|
Posted: Wed Mar 30, 2005 5:28 pm Post subject: Re: Compilazione con linuxthreads |
|
|
@AlterX: In realtà non è proprio così:
Quando si usa solo la use nptl vengono compilate due versioni delle libc una sta in /lib e querata ritorna:
Code: | /gutter@giskard ~ $ /lib/libc.so.6
GNU C Library 20041102 release version 2.3.4, by Roland McGrath et al.
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 3.3.5 (Gentoo Linux 3.3.5-r1, ssp-3.3.2-3, pie-8.7.7.1).
Compiled on a Linux 2.6.8 system on 2005-03-28.
Available extensions:
GNU libio by Per Bothner
crypt add-on version 2.1 by Michael Glad and others
linuxthreads-0.10 by Xavier Leroy
The C stubs add-on version 2.1.2.
GNU Libidn by Simon Josefsson
BIND-8.2.3-T5B
libthread_db work sponsored by Alpha Processor Inc
NIS(YP)/NIS+ NSS modules 0.19 by Thorsten Kukuk
Thread-local storage support included.
For bug reporting instructions, please see:
<http://www.gnu.org/software/libc/bugs.html>. |
evidentemente questa è quella senza nptl.
La versione nptl della libc sta in /lib/tls:
Code: |
gutter@giskard ~ $ /lib/tls/libc.so.6
GNU C Library 20041102 release version 2.3.4, by Roland McGrath et al.
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 3.3.5 (Gentoo Linux 3.3.5-r1, ssp-3.3.2-3, pie-8.7.7.1).
Compiled on a Linux 2.6.8 system on 2005-03-28.
Available extensions:
GNU libio by Per Bothner
crypt add-on version 2.1 by Michael Glad and others
Native POSIX Threads Library by Ulrich Drepper et al
The C stubs add-on version 2.1.2.
GNU Libidn by Simon Josefsson
BIND-8.2.3-T5B
NIS(YP)/NIS+ NSS modules 0.19 by Thorsten Kukuk
Thread-local storage support included.
For bug reporting instructions, please see:
<http://www.gnu.org/software/libc/bugs.html>.
|
Se usi la use nptlonly ne viene compilata solo una ovvero quella con nptl che viene messa in /lib. _________________ Registered as User #281564 and Machines #163761 |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
ErniBrown Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/10540427541f3c25e119b3.jpg)
Joined: 19 Jan 2005 Posts: 276 Location: Seconda stella a destra e poi dritto fino al mattino...
|
Posted: Wed Mar 30, 2005 5:45 pm Post subject: |
|
|
ok, un passo avanti l'ho fatto, ho capito dove sono le due librerie: adesso devo capire due cose:
1) di default vengono usate quelle in lib/tls/?
2) come faccio a passare da una all'altra? _________________ There are 10 kind of people:
those who understand binaries and
those who don't. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
gutter Bodhisattva
![Bodhisattva Bodhisattva](/images/ranks/rank-bodhisattva.gif)
![](images/avatars/67030318436dd16c1dd5e.jpg)
Joined: 13 Mar 2004 Posts: 7162 Location: Aarau, Aargau, Switzerland
|
Posted: Wed Mar 30, 2005 5:58 pm Post subject: |
|
|
gutter wrote: | Hai provato a compilare e seguire il consiglio di nem0. |
_________________ Registered as User #281564 and Machines #163761 |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
ErniBrown Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/10540427541f3c25e119b3.jpg)
Joined: 19 Jan 2005 Posts: 276 Location: Seconda stella a destra e poi dritto fino al mattino...
|
Posted: Wed Mar 30, 2005 6:19 pm Post subject: |
|
|
Sta ancora compilando! Ho una panda, non un pc!! L'unica panda diesel x86!!! Vabbè, così intanto avrò le glibc compilate con il gcc 3,4 e un paio di cosette che ho aggiunto...
Comunque secondo me erano a posto, /lib/libc.so.6 restituisce linuxthreads, /lib/tls/libc.so.6 restituisce Native Posix Threads. Davo un occhiata ai vari man di gcc, mi sono fatto l'idea di dover cambiare qualcosa relativo a ld, ma ancora non ho capito cosa... E poi ho guardato sul forum, ma una chiave di ricerca nptl o linuxthreads restituisce una marea di robe!
EDIT: Finita la compilazione, tutto esattamente come prima.. _________________ There are 10 kind of people:
those who understand binaries and
those who don't. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
AlterX l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
![](images/avatars/gallery/The Matrix/movie_the_matrix_neo_2.gif)
Joined: 03 Apr 2004 Posts: 754 Location: rm -rf /*
|
Posted: Wed Mar 30, 2005 7:24 pm Post subject: Re: Compilazione con linuxthreads |
|
|
gutter wrote: | @AlterX: In realtà non è proprio così:
Quando si usa solo la use nptl vengono compilate due versioni delle libc una sta in /lib e querata ritorna:
Code: | /gutter@giskard ~ $ /lib/libc.so.6
GNU C Library 20041102 release version 2.3.4, by Roland McGrath et al.
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 3.3.5 (Gentoo Linux 3.3.5-r1, ssp-3.3.2-3, pie-8.7.7.1).
Compiled on a Linux 2.6.8 system on 2005-03-28.
Available extensions:
GNU libio by Per Bothner
crypt add-on version 2.1 by Michael Glad and others
linuxthreads-0.10 by Xavier Leroy
The C stubs add-on version 2.1.2.
GNU Libidn by Simon Josefsson
BIND-8.2.3-T5B
libthread_db work sponsored by Alpha Processor Inc
NIS(YP)/NIS+ NSS modules 0.19 by Thorsten Kukuk
Thread-local storage support included.
For bug reporting instructions, please see:
<http://www.gnu.org/software/libc/bugs.html>. |
evidentemente questa è quella senza nptl.
La versione nptl della libc sta in /lib/tls:
Code: |
gutter@giskard ~ $ /lib/tls/libc.so.6
GNU C Library 20041102 release version 2.3.4, by Roland McGrath et al.
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 3.3.5 (Gentoo Linux 3.3.5-r1, ssp-3.3.2-3, pie-8.7.7.1).
Compiled on a Linux 2.6.8 system on 2005-03-28.
Available extensions:
GNU libio by Per Bothner
crypt add-on version 2.1 by Michael Glad and others
Native POSIX Threads Library by Ulrich Drepper et al
The C stubs add-on version 2.1.2.
GNU Libidn by Simon Josefsson
BIND-8.2.3-T5B
NIS(YP)/NIS+ NSS modules 0.19 by Thorsten Kukuk
Thread-local storage support included.
For bug reporting instructions, please see:
<http://www.gnu.org/software/libc/bugs.html>.
|
Se usi la use nptlonly ne viene compilata solo una ovvero quella con nptl che viene messa in /lib. |
Ok...quindi senza nptlonly, vengono usate entrambi la dove necessarie!?
usandola, il sistema usa esclusivamente le nptl; ma poi tutti i prog devono essere ricompilati giusto??? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
ErniBrown Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/10540427541f3c25e119b3.jpg)
Joined: 19 Jan 2005 Posts: 276 Location: Seconda stella a destra e poi dritto fino al mattino...
|
Posted: Wed Mar 30, 2005 7:34 pm Post subject: Re: Compilazione con linuxthreads |
|
|
AlterX wrote: | ma poi tutti i prog devono essere ricompilati giusto??? |
E' quello che sto cercando di capire, ho sentito due spiegazioni fino ad ora: una dice che i programmi vengono compilati senza glibc e poi viene fatto un linkin' dinamico: mi sembra strano, quando le avevo cancellate per sbaglio tempo fa non compilavo niente, ma funzionava tutto.
L'altra dice che le glibc vengono usate durante la compilazione, e se non sbaglio dovrebero essere linkate da ld
Qualche guru che sveli l'arcano? _________________ There are 10 kind of people:
those who understand binaries and
those who don't. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
n3m0 l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
![](images/avatars/14509762944294be8b0712e.png)
Joined: 08 Feb 2004 Posts: 798 Location: Richville, Naples, Italy, Europe
|
Posted: Wed Mar 30, 2005 10:05 pm Post subject: |
|
|
Vado veloce, perchè stasera è serataccia
In generale quando compili un programma, la fase finale è riservata al linking verso le librerie.
In link può essere statico o dinamico.
Statico: il codice delle funzioni di libreria usato dal tuo programma viene inglobato nel file eseguibile del tuo programma, permettendo agli utenti finali di poter eseguire il programma anche senza essere in possesso dei binari delle librerie che tu hai usato per sviluppare.
Dinamico: il codice delle funzioni di libreria non viene incluso nell'eseguibile. In questi invece è presente una serie di simboli che permettono all'eseguibile di "ritrovare" le funzioni all'interno delle librerie dinamiche condivise (*.so). Chi esegue il programma necessita anche dei binari delle librerie usate.
Esistono anche librerie statiche (*.a), vecchia roba, che consistono in un archivio (un vero e proprio archivio fatto con ar) di file oggetto (*.o) che vengono poi linkati staticamente all'eseguibile.
Per ulteriori dettagli, spero in altri, o in me quando ho più tempo, o in te che cerchi doc ![Wink ;)](images/smiles/icon_wink.gif) _________________ Lenergia è la civiltà. Lasciarla in mano ai piromani/petrolieri è criminale. Perché aspettare che finisca il petrolio?
Letà della pietra non è mica finita per mancanza di pietre. - B.G.
Site/Blog: http://www.neminis.org |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|