Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index International Gentoo Users Forum italiano (Italian)
  • Search

[RISOLTO] Configurare distcc e crossdev:dubbi sulla docum.

Questa è la sezione italiana del forum gentoo destinata a fornire supporto all'omonima distribuzione.

Moderator: ago

Post Reply
  • Print view
Advanced search
19 posts • Page 1 of 1
Author
Message
fbcyborg
Advocate
Advocate
User avatar
Posts: 3056
Joined: Sun Oct 16, 2005 12:08 pm
Location: ROMA

[RISOLTO] Configurare distcc e crossdev:dubbi sulla docum.

  • Quote

Post by fbcyborg » Mon Oct 20, 2008 6:47 pm

Ciao a tutti,

è più di un anno che voglio installare distcc ma per diversi motivi ho abbandonato tante volte.
Di recente mi ci sono rimesso con l'impegno e vorrei riuscirci.
Sto seguendo le guide ufficiali, in modo da non fare casini, ma alcuni punti mi rimangono oscuri.
Riporto per completezza le guide che sto seguendo:
  • Documentazione Distcc per Gentoo
  • Guida al cross-compiling con DistCC
Il motivo per cui sto seguendo anche la seconda guida che ho citato è molto semplice: in rete ho due PC. Il primo è un vecchio amd64 (monocore), compilato per architettura x86_64 e il secondo è un Core 2 Duo, con architettura i686.
Riassumo subito la situazione: quando devo emergere qualcosa sul pc i686 vorrei poter compilare con distcc sia usando l'i686 sia l'x86_64; quando devo emergere qualcosa sul pc x86_64 vorrei poter compilare con distcc sia usando l'x86_64 sia l'i686.
Il PC x86_64 ha come IP 192.168.1.100 e l'i686 192.168.1.101.

Per fare ciò ho seguito la prima guida fino al punto "3. Cross-Compiling" incluso e poi mi sono documentato nella seconda guida.
Prima vi dico a grandi linee cosa ho fatto e poi vi elenco i dubbi/problemi che ho incontrato.

Modifica del file /etc/make.conf:
su i686 e x86_64:
MAKEOPTS="-j4" (2 cpu del dual core + la cpu dell'amd64 + 1 = 4)
FEATURES="distcc"

Definizione degli host:
su i686: localhost/4 192.168.1.100/2
su x86_64: localhost/2 192.168.1.101/4

File di configurazione /etc/conf.d/distccd:
i686:

Code: Select all

DISTCCD_OPTS="${DISTCCD_OPTS} --port 3632"
DISTCCD_OPTS="${DISTCCD_OPTS} --listen 192.168.1.101"
[...]
DISTCCD_OPTS="${DISTCCD_OPTS} --allow 192.168.1.0/24"
DISTCCD_OPTS="${DISTCCD_OPTS} --allow 192.168.1.100"
x86_64:

Code: Select all

DISTCCD_OPTS="${DISTCCD_OPTS} --port 3632"
DISTCCD_OPTS="${DISTCCD_OPTS} --allow 192.168.1.0/24"
DISTCCD_OPTS="${DISTCCD_OPTS} --allow 192.168.1.101"
DISTCCD_OPTS="${DISTCCD_OPTS} --listen 192.168.1.101"
Quì ho paura di non aver impostato bene qualcosa perché sinceramente non mi sento molto sicuro di ciò che ho fatto.

A questo punto passo alla guida del Cross Compiling ed ho pensato così: dal momento che dall'i686 devo compilare dei sorgenti per un'architettura x86_64, sull'i686 ho fatto:

Code: Select all

crossdev -t x86_64
e viceversa sull'x86_64.
Già quì però non ho la certezza di aver fatto bene. Quindi vorrei una conferma.

Arrivato al "Codice 1.1: Compilatori disponibili" della seconda guida, se faccio un ls -l /usr/lib/distcc/bin su i686 ottengo:

Code: Select all

lrwxrwxrwx 1 root   root   30 Dec 13  2006 c++ -> i686-unknown-linux-gnu-wrapper
lrwxrwxrwx 1 root   root   30 Dec 13  2006 cc -> i686-unknown-linux-gnu-wrapper
lrwxrwxrwx 1 root   root   30 Dec 13  2006 g++ -> i686-unknown-linux-gnu-wrapper
lrwxrwxrwx 1 root   root   30 Dec 13  2006 gcc -> i686-unknown-linux-gnu-wrapper
lrwxrwxrwx 1 root   root   15 Dec  8  2006 i686-pc-linux-gnu-c++ -> /usr/bin/distcc
lrwxrwxrwx 1 root   root   15 Dec  8  2006 i686-pc-linux-gnu-g++ -> /usr/bin/distcc
lrwxrwxrwx 1 root   root   15 Dec  8  2006 i686-pc-linux-gnu-gcc -> /usr/bin/distcc
-rwxr-xr-x 1 distcc daemon 77 Dec 13  2006 i686-unknown-linux-gnu-wrapper
che differisce dalla guida per quanto riguarda la prima parte.

mentre su x86_64:

Code: Select all

lrwxrwxrwx 1 root root 15 Jul 10  2007 c++ -> /usr/bin/distcc
lrwxrwxrwx 1 root root 15 Jul 10  2007 cc -> /usr/bin/distcc
lrwxrwxrwx 1 root root 15 Jul 10  2007 g++ -> /usr/bin/distcc
lrwxrwxrwx 1 root root 15 Jul 10  2007 gcc -> /usr/bin/distcc
lrwxrwxrwx 1 root root 15 Jul 10  2007 x86_64-pc-linux-gnu-c++ -> /usr/bin/distcc
lrwxrwxrwx 1 root root 15 Jul 10  2007 x86_64-pc-linux-gnu-g++ -> /usr/bin/distcc
lrwxrwxrwx 1 root root 15 Jul 10  2007 x86_64-pc-linux-gnu-gcc -> /usr/bin/distcc
Questo invece si avvicina di più a quello della guida, ma qualcosa mi dice che c'è da aggiustare qualche cosa.. Ma non so come/cosa. Help! :roll:

Mi fermo quì, perché se andassi avanti avrei paura di fare un casino, non avendo ben chiara la situazione.

Grazie in anticipo per l'aiuto.
Last edited by fbcyborg on Mon Nov 03, 2008 1:33 pm, edited 1 time in total.
[HOWTO] Come criptare la /home usando cryptsetup e luks
[HOWTO] Abilitare il supporto al dom0 XEN su kernel 3.X
Help answer the unanswered
Top
maurs
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 85
Joined: Sun Oct 16, 2005 8:57 am
Contact:
Contact maurs
Website

Re: Configurare distcc con crossdev: dubbi sulla documentazi

  • Quote

Post by maurs » Wed Oct 29, 2008 2:40 pm

Code: Select all

lrwxrwxrwx 1 root   root   15 Dec  8  2006 i686-pc-linux-gnu-gcc -> /usr/bin/distcc
-rwxr-xr-x 1 distcc daemon 77 Dec 13  2006 i686-unknown-linux-gnu-wrapper
Il problema è che il wrapper dovrebbe chiamarsi i686-pc-linux-gnu-wrapper e non i686-unknown...

Cambia prima questa cosa.
Poi, per vedere se funziona, prova a fare un emerge nano su una console, mentre sul sistema dove dovrebbe scattare distcc lancia ps -u distcc (e vedi se qualche processo viene lanciato).

Infine, fai anche a mano
distcc-config --set-hosts "i tuoi hosts" e sii sicuro di aver fatto distcc-config --install
Nelle FEATURES del PC dove devi compilare (e che deve usufruire dell'altro), hai aggiunto distcc?

Pastami il tuo make.conf ;)
MaUrS
[HOW-TO] Gentoo su PC datati (aka Portatile Felice)
Maurs' Blog
VDD Project
Top
fbcyborg
Advocate
Advocate
User avatar
Posts: 3056
Joined: Sun Oct 16, 2005 12:08 pm
Location: ROMA

  • Quote

Post by fbcyborg » Wed Oct 29, 2008 7:16 pm

Ciao maurs, grazie innanzitutto per essermi venuto in aiuto! ;)

Per quanto riguarda il wrapper, lo vedi così, perché ho seguito la guida al cross-compiling con DistCC e alla fine devo avere quel tipo di situazione.

Infatti sul notebook i686 ho questa situazione:

Code: Select all

lrwxrwxrwx 1 root root 30 Oct 29 19:18 c++ -> i686-unknown-linux-gnu-wrapper
lrwxrwxrwx 1 root root 30 Oct 29 19:18 cc -> i686-unknown-linux-gnu-wrapper
lrwxrwxrwx 1 root root 30 Oct 29 19:18 g++ -> i686-unknown-linux-gnu-wrapper
lrwxrwxrwx 1 root root 30 Oct 29 19:18 gcc -> i686-unknown-linux-gnu-wrapper
lrwxrwxrwx 1 root root 15 Dec  8  2006 i686-pc-linux-gnu-c++ -> /usr/bin/distcc
lrwxrwxrwx 1 root root 15 Dec  8  2006 i686-pc-linux-gnu-g++ -> /usr/bin/distcc
lrwxrwxrwx 1 root root 15 Dec  8  2006 i686-pc-linux-gnu-gcc -> /usr/bin/distcc
-rwxr-xr-x 1 root root 77 Oct 29 19:17 i686-unknown-linux-gnu-wrapper
Mentre sull'amd64 ora ho:

Code: Select all

lrwxrwxrwx 1 root root 32 Oct 29 19:21 c++ -> x86_64-unknown-linux-gnu-wrapper
lrwxrwxrwx 1 root root 32 Oct 29 19:20 cc -> x86_64-unknown-linux-gnu-wrapper
lrwxrwxrwx 1 root root 32 Oct 29 19:21 g++ -> x86_64-unknown-linux-gnu-wrapper
lrwxrwxrwx 1 root root 32 Oct 29 19:20 gcc -> x86_64-unknown-linux-gnu-wrapper
lrwxrwxrwx 1 root root 15 Jul 10  2007 x86_64-pc-linux-gnu-c++ -> /usr/bin/distcc
lrwxrwxrwx 1 root root 15 Jul 10  2007 x86_64-pc-linux-gnu-g++ -> /usr/bin/distcc
lrwxrwxrwx 1 root root 15 Jul 10  2007 x86_64-pc-linux-gnu-gcc -> /usr/bin/distcc
-rwxr-xr-x 1 root root 79 Oct 29 19:20 x86_64-unknown-linux-gnu-wrapper
Ho fatto un emerge nano ma non ha funzionato. Chiaramente ho fatto lo start di /etc/init.d/distccd e si è avviato.
Se faccio ps -u distcc sull'altro PC (non quello dove ho lanciato l'emerge) ottengo:

Code: Select all

# ps -u distcc
  PID TTY          TIME CMD
11778 ?        00:00:00 distccd
11779 ?        00:00:00 distccd
11786 ?        00:00:00 distccd
11787 ?        00:00:00 distccd
Ma questo lo ottengo anche quando l'emerge è finito.
Anche distccmon-gui non mostra nulla.
A mano avevo già fatto il set-hosts, ed effettivamente avevo omesso il distcc-config --install perché era relativo al bootstrap, nella guida, e pensavo non servisse.
Comunue poi l'ho fatto.

Nelle FEATURES ho ovviamente aggiunto distcc, ma a quanto pare non lo usa.

make.conf dell'i686:

Code: Select all

USE=" 3dnow a52 aac acpi arts bluetooth cdr dri dv dvd dvdr \
     dvdread -esd extensions fat fbcon fbsplash ffmpeg gimp gimpprint \
     -gnome ithreads jfs john mmx mpeg2 mpeg4 mplayer nfs nptlonly \
     nsplugin ntfs ntlm nvidia ppds rar real samba sensord stream \
     threads toolbar utempter wifi win32codecs xchatdccserver xprint tetex"
CHOST="i686-pc-linux-gnu"
CFLAGS="-march=prescott -O2 -pipe -fomit-frame-pointer"
ACCEPT_KEYWORDS="x86"
PORTAGE_TMPDIR=/var/tmp
PORTDIR=/usr/portage
DISTDIR=${PORTDIR}/distfiles
PKGDIR=${PORTDIR}/packages
PORT_LOGDIR=/var/log/portage
PORTDIR_OVERLAY="/usr/local/portage"
source /usr/local/portage/layman/make.conf #Layman overlays
GENTOO_MIRRORS="ftp://ftp.unina.it/pub/linux/distributions/gentoo http://mirror.jamit.de/gentoo/ http://mirror.switch.ch/ftp/mirror/gentoo/"
MAKEOPTS="-j4"
CXXFLAGS="${CFLAGS}"
PORTAGE_NICENESS=15
AUTOCLEAN="yes"
PORTAGE_TMPFS="/dev/shm"
FEATURES="ccache distcc metadata-transfer"
DISTCC_DIR="/var/tmp/portage/.distcc/"
CCACHE_SIZE="1G"
CCACHE_DIR="/var/tmp/ccache"
PORTAGE_RSYNC_RETRIES=3
RSYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
VIDEO_CARDS="nvidia vesa i810"
INPUT_DEVICES="evdev keyboard mouse synaptics"
ALSA_CARDS="hda-intel usb-audio"
make.conf dell'amd64:

Code: Select all

CFLAGS="-march=k8 -pipe -O2"
CHOST="x86_64-pc-linux-gnu"
CXXFLAGS="${CFLAGS}"
CCACHE_SIZE="1G"
CCACHE_DIR="/var/tmp/ccache"
ACCEPT_KEYWORDS="amd64"
LINGUAS="it"
MAKEOPTS="-j4" #distcc yes
FEATURES="distcc ccache"
PORTAGE_NICENESS=15
PORTAGE_TMPFS=/dev/shm
AUTOCLEAN="yes"
USE="a52 aac aiglx -arts alsa bluetooth composite dv dvd dvdr glx -gnome mp4 ogg oss pdf ppds \
     samba userlocales utempter vorbis x264 xprint"
PORTDIR="/usr/portage/"
SYNC="rsync://rsync.de.gentoo.org/gentoo-portage"
DISTCC_DIR="/var/tmp/portage/.distcc/"
PORTDIR_OVERLAY="/usr/local/portage /usr/local/portage/xeffects/trunk"
ALSA_CARDS="emu10k1"
VIDEO_CARDS="nvidia vesa"
GENTOO_MIRRORS="http://mirror.switch.ch/ftp/mirror/gentoo/ http://de-mirror.org/distro/gentoo/ http://mirror.cambrium.nl/pub/os/linux/gentoo/"
[HOWTO] Come criptare la /home usando cryptsetup e luks
[HOWTO] Abilitare il supporto al dom0 XEN su kernel 3.X
Help answer the unanswered
Top
Scen
Retired Dev
Retired Dev
User avatar
Posts: 2470
Joined: Tue Jul 29, 2003 9:44 am
Location: Padova, Italy
Contact:
Contact Scen
Website

  • Quote

Post by Scen » Wed Oct 29, 2008 11:15 pm

fbcyborg wrote:Per quanto riguarda il wrapper, lo vedi così, perché ho seguito la guida al cross-compiling con DistCC e alla fine devo avere quel tipo di situazione.

Infatti sul notebook i686 ho questa situazione:

Code: Select all

lrwxrwxrwx 1 root root 30 Oct 29 19:18 c++ -> i686-unknown-linux-gnu-wrapper
lrwxrwxrwx 1 root root 30 Oct 29 19:18 cc -> i686-unknown-linux-gnu-wrapper
lrwxrwxrwx 1 root root 30 Oct 29 19:18 g++ -> i686-unknown-linux-gnu-wrapper
lrwxrwxrwx 1 root root 30 Oct 29 19:18 gcc -> i686-unknown-linux-gnu-wrapper
lrwxrwxrwx 1 root root 15 Dec  8  2006 i686-pc-linux-gnu-c++ -> /usr/bin/distcc
lrwxrwxrwx 1 root root 15 Dec  8  2006 i686-pc-linux-gnu-g++ -> /usr/bin/distcc
lrwxrwxrwx 1 root root 15 Dec  8  2006 i686-pc-linux-gnu-gcc -> /usr/bin/distcc
-rwxr-xr-x 1 root root 77 Oct 29 19:17 i686-unknown-linux-gnu-wrapper
Mentre sull'amd64 ora ho:

Code: Select all

lrwxrwxrwx 1 root root 32 Oct 29 19:21 c++ -> x86_64-unknown-linux-gnu-wrapper
lrwxrwxrwx 1 root root 32 Oct 29 19:20 cc -> x86_64-unknown-linux-gnu-wrapper
lrwxrwxrwx 1 root root 32 Oct 29 19:21 g++ -> x86_64-unknown-linux-gnu-wrapper
lrwxrwxrwx 1 root root 32 Oct 29 19:20 gcc -> x86_64-unknown-linux-gnu-wrapper
lrwxrwxrwx 1 root root 15 Jul 10  2007 x86_64-pc-linux-gnu-c++ -> /usr/bin/distcc
lrwxrwxrwx 1 root root 15 Jul 10  2007 x86_64-pc-linux-gnu-g++ -> /usr/bin/distcc
lrwxrwxrwx 1 root root 15 Jul 10  2007 x86_64-pc-linux-gnu-gcc -> /usr/bin/distcc
-rwxr-xr-x 1 root root 79 Oct 29 19:20 x86_64-unknown-linux-gnu-wrapper
In effetti la guida (anche l'originale inglese) può trarre facilmente in inganno :P

Le frasi chiave sono
Guida al cross-compiling con DistCC wrote: Ogni volta che vedi sparc-unknown-linux-gnu qui sotto, devi inserire il tuo CHOST (x86_64-pc-linux-gnu per una macchina AMD64, ad esempio).
e
Guida al cross-compiling con DistCC wrote: poi salvalo come sparc-unknown-linux-gnu-wrapper. Ricordati di sostituire il CHOST (in questo caso, sparc-unknown-linux-gnu) con il vero CHOST della macchina che eseguirà emerge.
Per cui devi rinominare il wrapper in
  • x86_64-pc-linux-gnu-wrapper sulla macchina AMD64
  • i686-pc-linux-gnu-wrapper sulla macchina i686
Prova così, e facci sapere!

Altra cosa: per testare in modo efficare il cross-compiling, prova ad utilizzare pacchetti più "corposi", inoltre tieni presente che alcune ebuild disabilitano la compilazione distribuita.
I was born in a deep forest/I wish I could live here all my life/I am made from stones and roots/My home, these woods and roads
All my life I loved this sound/Of the woods all around/Eagles flies where the winds blows free
Journey is my destiny
Top
fbcyborg
Advocate
Advocate
User avatar
Posts: 3056
Joined: Sun Oct 16, 2005 12:08 pm
Location: ROMA

  • Quote

Post by fbcyborg » Thu Oct 30, 2008 8:37 am

Grazie,

ho rimesso a posto quei link simbolici in /usr/lib/distcc/bin ed ora ho
amd64:

Code: Select all

lrwxrwxrwx 1 root   root   27 Oct 30 09:22 c++ -> x86_64-pc-linux-gnu-wrapper
lrwxrwxrwx 1 root   root   27 Oct 30 09:22 cc -> x86_64-pc-linux-gnu-wrapper
lrwxrwxrwx 1 root   root   27 Oct 30 09:23 g++ -> x86_64-pc-linux-gnu-wrapper
lrwxrwxrwx 1 root   root   27 Oct 30 09:23 gcc -> x86_64-pc-linux-gnu-wrapper
lrwxrwxrwx 1 root   root   15 Jul 10  2007 x86_64-pc-linux-gnu-c++ -> /usr/bin/distcc
lrwxrwxrwx 1 root   root   15 Jul 10  2007 x86_64-pc-linux-gnu-g++ -> /usr/bin/distcc
lrwxrwxrwx 1 root   root   15 Jul 10  2007 x86_64-pc-linux-gnu-gcc -> /usr/bin/distcc
-rwxr-xr-x 1 distcc daemon 74 Oct 30 09:22 x86_64-pc-linux-gnu-wrapper
E nel file x86_64-pc-linux-gnu-wrapper ho:

Code: Select all

#!/bin/bash
exec /usr/lib/distcc/bin/x86_64-pc-linux-gnu-g${0:$[-2]} "$@"
Mentre sull'i686:

Code: Select all

lrwxrwxrwx 1 root   root   25 Oct 30 09:18 c++ -> i686-pc-linux-gnu-wrapper
lrwxrwxrwx 1 root   root   25 Oct 30 09:18 cc -> i686-pc-linux-gnu-wrapper
lrwxrwxrwx 1 root   root   25 Oct 30 09:18 g++ -> i686-pc-linux-gnu-wrapper
lrwxrwxrwx 1 root   root   25 Oct 30 09:19 gcc -> i686-pc-linux-gnu-wrapper
lrwxrwxrwx 1 root   root   15 Dec  8  2006 i686-pc-linux-gnu-c++ -> /usr/bin/distcc
lrwxrwxrwx 1 root   root   15 Dec  8  2006 i686-pc-linux-gnu-g++ -> /usr/bin/distcc
lrwxrwxrwx 1 root   root   15 Dec  8  2006 i686-pc-linux-gnu-gcc -> /usr/bin/distcc
-rwxr-xr-x 1 distcc daemon 72 Oct 30 09:22 i686-pc-linux-gnu-wrapper
E nel file i686-pc-linux-gnu-wrapper ho:

Code: Select all

#!/bin/bash
exec /usr/lib/distcc/bin/i686-pc-linux-gnu-g${0:$[-2]} "$@"
Ecco i miei files di configurazione /etc/conf.d/distccd , e questi ho ancora dubbio che siano errati:
amd64 con ip 192.168.1.100:

Code: Select all

DISTCCD_OPTS=""
DISTCCD_EXEC="/usr/bin/distccd"
DISTCCD_PIDFILE="/var/run/distccd/distccd.pid"
DISTCCD_OPTS="${DISTCCD_OPTS} --port 3632"
DISTCCD_OPTS="${DISTCCD_OPTS} --listen 192.168.1.100"
DISTCCD_OPTS="${DISTCCD_OPTS} --log-level critical"
DISTCCD_OPTS="${DISTCCD_OPTS} --allow 192.168.1.0/24"
DISTCCD_OPTS="${DISTCCD_OPTS} --allow 192.168.1.101"
DISTCCD_NICE="15"
i686 con IP 192.168.1.101:

Code: Select all

DISTCCD_OPTS=""
DISTCCD_EXEC="/usr/bin/distccd"
DISTCCD_PIDFILE="/var/run/distccd/distccd.pid"
DISTCCD_OPTS="${DISTCCD_OPTS} --port 3632"
DISTCCD_OPTS="${DISTCCD_OPTS} --listen 192.168.1.101"
DISTCCD_OPTS="${DISTCCD_OPTS} --log-level critical"
DISTCCD_OPTS="${DISTCCD_OPTS} --allow 192.168.1.0/24"
DISTCCD_OPTS="${DISTCCD_OPTS} --allow 192.168.1.100"
DISTCCD_NICE="15"
Ho provato a compilare firefox, ma anche con quello nessun risultato positivo.

Grazie ancora per il supporto.
[HOWTO] Come criptare la /home usando cryptsetup e luks
[HOWTO] Abilitare il supporto al dom0 XEN su kernel 3.X
Help answer the unanswered
Top
Scen
Retired Dev
Retired Dev
User avatar
Posts: 2470
Joined: Tue Jul 29, 2003 9:44 am
Location: Padova, Italy
Contact:
Contact Scen
Website

  • Quote

Post by Scen » Mon Nov 03, 2008 9:15 am

Quella doppia assegnazione di --allow è ridondante, per semplicità lascia solo

Code: Select all

DISTCCD_OPTS="${DISTCCD_OPTS} --allow 192.168.1.0/24" 
Puoi riportare l'output di

Code: Select all

distcc-config --get-hosts
e di

Code: Select all

emerge --info|grep -i distcc
su entrambe le macchine?

Per scrupolo ho appena fatto una prova sulle mie Gentoo box aziendali: prova con l'emerge di glibc, se tutto è configurato correttamente, dovresti vedere distcc al lavoro.
I was born in a deep forest/I wish I could live here all my life/I am made from stones and roots/My home, these woods and roads
All my life I loved this sound/Of the woods all around/Eagles flies where the winds blows free
Journey is my destiny
Top
fbcyborg
Advocate
Advocate
User avatar
Posts: 3056
Joined: Sun Oct 16, 2005 12:08 pm
Location: ROMA

  • Quote

Post by fbcyborg » Mon Nov 03, 2008 10:01 am

Questo fine settimana ho smanettato un altro po' e ho fatto qualche modifica.
Prima di tutto ho riaggiustato il file /etc/conf.d/distccd:
i686:

Code: Select all

DISTCCD_OPTS=""
DISTCCD_EXEC="/usr/bin/distccd"
DISTCCD_PIDFILE="/var/run/distccd/distccd.pid"
DISTCCD_OPTS="${DISTCCD_OPTS} --port 3632"
DISTCCD_OPTS="${DISTCCD_OPTS} --log-level critical"
DISTCCD_OPTS="${DISTCCD_OPTS} --allow 192.168.1.0/24"
DISTCCD_OPTS="${DISTCCD_OPTS} --listen 192.168.1.101"
DISTCCD_NICE="15"
x86_64:

Code: Select all

DISTCCD_OPTS=""
DISTCCD_EXEC="/usr/bin/distccd"
DISTCCD_PIDFILE="/var/run/distccd/distccd.pid"
DISTCCD_OPTS="${DISTCCD_OPTS} --port 3632"
DISTCCD_OPTS="${DISTCCD_OPTS} --log-level critical"
DISTCCD_OPTS="${DISTCCD_OPTS} --allow 192.168.1.0/24"
DISTCCD_OPTS="${DISTCCD_OPTS} --listen 192.168.1.100"
DISTCCD_NICE="15"
Al momento ho cambiato anche il file /etc/distcc/hosts tramite il comando apposito, per vedere come andava ed il contenuto è il seguente:
i686: 192.168.1.100 #ovvero l'IP dell'x86_64
x86_64: 192.168.1.101 #ovvero l'IP dell'i686

Ovviamente quanto ho appena scritto coincide con gli output di distcc-config --get-hosts.

Nel tentare di mettere le cose a posto, mi sono accorto di aver commesso un errore grave con crossdev, e l'ho prontamente risistemato. In pratica crossdev mi aveva installato delle versioni diverse di gcc, per cui non poteva certo funzionare.
i686:

Code: Select all

# gcc-config -l
 [1] i686-pc-linux-gnu-4.1.2 *
 [2] x86_64-pc-linux-gnu-4.1.2 *
(Quì sopra mi incuriosisce che l'asterisco (verde sul primo e azzurro sul secondo) sia su entrambi)

x86_64:

Code: Select all

# gcc-config -l
 [1] i686-pc-linux-gnu-4.1.2

 [2] x86_64-pc-linux-gnu-4.1.2 *
(Quì invece non capisco perché c'è uno spazio fra la prima e la seconda riga; spero non sia sintomo di problemi)

Dunque il problema prima stava nel fatto che crossdev mi aveva installato x86_64-pc-linux-gnu-4.3.1-r1 sull'i686 e i686-pc-linux-gnu-4.3.1-r1, il che non andava d'accordo con le versioni di gcc correntemente installate su ciascun sistema.

Corretto questo problema ho voluto appunto fare delle prove emergendo nano e questi sono i risultati che ho ottenuto:

Code: Select all

gcc-config error: Could not run/locate "i686-pc-linux-gnu-gcc"
distcc[12247] ERROR: compile cut.c on 192.168.1.100 failed
make[2]: *** [cut.o] Error 1
make[2]: *** Waiting for unfinished jobs....
gcc-config error: Could not run/locate "i686-pc-linux-gnu-gcc"
distcc[12244] ERROR: compile color.c on 192.168.1.100 failed
make[2]: *** [color.o] Error 1
gcc-config error: Could not run/locate "i686-pc-linux-gnu-gcc"
distcc[12241] ERROR: compile chars.c on 192.168.1.100 failed
make[2]: *** [chars.o] Error 1
gcc-config error: Could not run/locate "i686-pc-linux-gnu-gcc"
distcc[12238] ERROR: compile browser.c on 192.168.1.100 failed
make[2]: *** [browser.o] Error 1
make[2]: Leaving directory `/var/tmp/portage/app-editors/nano-2.1.5/work/nano-2.1.5/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/app-editors/nano-2.1.5/work/nano-2.1.5'
make: *** [all] Error 2
Cosa un po' strana perché quel gcc è presente sull'x86_64.
Se invece faccio emerge nano su x86_64, la compilazione va a buon fine, ma se lancio distccmon-gui, sia sull'x86_64 che sull'i686 non vedo niente. C'è da dire però che facendo top -u distcc sull'i686, vedo che viene utilizzato il compilatore per x86_64, quindi penso che funzioni (in effetti la ventola del portatile aumenta la velocità, quindi immagino che compili). Ma a questo punto non mi spiego perché la gui non mostri nulla. In realtà, anche lanciando il top -u distcc sull'x86_64 si vede qualcosa relativo a i686-blablabla, ma a quanto pare non funziona, visto che poi si blocca come ho appena riportato.

Se invece lancio un emerge nano sull'x86_64, e l'i686 è spento, la compilazione va lo stesso a buon fine ma ottengo:

Code: Select all

distcc[30498] (dcc_writex) ERROR: failed to write: No route to host
distcc[30498] (dcc_writex) ERROR: failed to write: Broken pipe
distcc[30498] Warning: failed to distribute browser.c to 192.168.1.101, running locally instead
distcc[30506] (dcc_writex) ERROR: failed to write: No route to host
distcc[30506] (dcc_writex) ERROR: failed to write: Broken pipe
distcc[30506] Warning: failed to distribute cut.c to 192.168.1.101, running locally instead
distcc[30504] (dcc_writex) ERROR: failed to write: No route to host
distcc[30504] (dcc_writex) ERROR: failed to write: Broken pipe
distcc[30504] Warning: failed to distribute color.c to 192.168.1.101, running locally instead
Perché non accade la stessa cosa se lancio l'emerge sull'i686? Quì sull'am64 vede che l'altro host non è disponibile e si arrangia da solo.

Code: Select all

emerge --info|grep -i distcc
i686:

Code: Select all

distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled]
FEATURES="distcc distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch"
x86_64:

Code: Select all

distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled]
FEATURES="distcc distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch"
Grazie mille per tutto.
[HOWTO] Come criptare la /home usando cryptsetup e luks
[HOWTO] Abilitare il supporto al dom0 XEN su kernel 3.X
Help answer the unanswered
Top
Scen
Retired Dev
Retired Dev
User avatar
Posts: 2470
Joined: Tue Jul 29, 2003 9:44 am
Location: Padova, Italy
Contact:
Contact Scen
Website

  • Quote

Post by Scen » Mon Nov 03, 2008 10:46 am

distccmon-{text,gui} vanno lanciati valorizzando la variabile DISTCC_DIR, esempio:

Code: Select all

DISTCC_DIR=/var/tmp/portage/.distcc distccmon-text 5
altrimenti non vedrai nulla.

Riguardo l'errore.... mi viene un dubbio (non sono ferrato in materia): ma su un i686 è possibile compilare codice per x86_64? Io a casa ho compilato con successo codice i686 su piattaforma x86_64, ma non viceversa :?

Passo la palla a chi ne sa + di me :roll:
I was born in a deep forest/I wish I could live here all my life/I am made from stones and roots/My home, these woods and roads
All my life I loved this sound/Of the woods all around/Eagles flies where the winds blows free
Journey is my destiny
Top
fbcyborg
Advocate
Advocate
User avatar
Posts: 3056
Joined: Sun Oct 16, 2005 12:08 pm
Location: ROMA

  • Quote

Post by fbcyborg » Mon Nov 03, 2008 11:29 am

Scen wrote:distccmon-{text,gui} vanno lanciati valorizzando la variabile DISTCC_DIR, esempio:

Code: Select all

DISTCC_DIR=/var/tmp/portage/.distcc distccmon-text 5
altrimenti non vedrai nulla.
Ok, quindi nel mio caso dovrei solo fare

Code: Select all

distccmon-gui 5
dal momento che DISTCC_DIR è già definita nel make.conf. Peccato però che continui a non vedere nulla!

Se però uso il monitor testuale qualcosa sembra andare per il verso giusto(sempre emergendo da amd64):

Code: Select all

 13278  Compile     global.c                                  192.168.1.101[0]
 13274  Compile     files.c                                   192.168.1.101[1]
 13255  Compile     browser.c                                     localhost[0]
 13282  Compile     help.c                                        localhost[1]

 13305  Compile     search.c                                  192.168.1.101[0]
 13309  Preprocess  text.c                                    192.168.1.101[1]
 13300  Compile     rcfile.c                                      localhost[0]
 13291  Compile     nano.c                                        localhost[1]

 13317  Compile     winio.c                                   192.168.1.101[1]
 13291  Compile     nano.c                                        localhost[1]
Scen wrote:
Riguardo l'errore.... mi viene un dubbio (non sono ferrato in materia): ma su un i686 è possibile compilare codice per x86_64? Io a casa ho compilato con successo codice i686 su piattaforma x86_64, ma non viceversa :?

Passo la palla a chi ne sa + di me :roll:
Questo non lo so! però mi sembra un po' strano che non si possa fare! Comunque non saprei proprio!
[HOWTO] Come criptare la /home usando cryptsetup e luks
[HOWTO] Abilitare il supporto al dom0 XEN su kernel 3.X
Help answer the unanswered
Top
Scen
Retired Dev
Retired Dev
User avatar
Posts: 2470
Joined: Tue Jul 29, 2003 9:44 am
Location: Padova, Italy
Contact:
Contact Scen
Website

  • Quote

Post by Scen » Mon Nov 03, 2008 1:23 pm

fbcyborg wrote:Ok, quindi nel mio caso dovrei solo fare

Code: Select all

distccmon-gui 5
dal momento che DISTCC_DIR è già definita nel make.conf. Peccato però che continui a non vedere nulla!
Perchè, anche definendolo in make.conf, non diventa automaticamente una variabile d'ambiente "di sistema"!

Le variabili definite in tale file vengono prese in considerazione solo nel momento in cui esegui emerge.

Per cui devi lanciare anche la versione grafica del monitor di distcc nello stesso modo in cui lanci quella testuale.
I was born in a deep forest/I wish I could live here all my life/I am made from stones and roots/My home, these woods and roads
All my life I loved this sound/Of the woods all around/Eagles flies where the winds blows free
Journey is my destiny
Top
fbcyborg
Advocate
Advocate
User avatar
Posts: 3056
Joined: Sun Oct 16, 2005 12:08 pm
Location: ROMA

  • Quote

Post by fbcyborg » Mon Nov 03, 2008 1:32 pm

Allora ho risolto il problema dell'asterisco mancante.
Sull'amd64 ho fatto un

Code: Select all

gcc-config 1
e ora:

Code: Select all

# gcc-config -l
 [1] i686-pc-linux-gnu-4.1.2 *

 [2] x86_64-pc-linux-gnu-4.1.2 *
Quindi ora non ci sono problemi.. Distcc funziona. Finalmente! Quindi l'amd64 può compilare per i686.

Ora finalmente funziona tutto.. GRAZIE a voi! :) Anche distccmon-gui!

Grazie ancora!!!
[HOWTO] Come criptare la /home usando cryptsetup e luks
[HOWTO] Abilitare il supporto al dom0 XEN su kernel 3.X
Help answer the unanswered
Top
fbcyborg
Advocate
Advocate
User avatar
Posts: 3056
Joined: Sun Oct 16, 2005 12:08 pm
Location: ROMA

  • Quote

Post by fbcyborg » Tue Dec 30, 2008 11:10 am

Ultimamente sto notando una cosa strana quando uso distcc per compilare sul mio portatile.
Nonostante il contenuto del mio file /etc/distcc/hosts sia il seguente:

Code: Select all

localhost/4 192.168.1.100/2
distccmon-gui mi mostra sempre un numero di righe superiore a 2, per quanto riguarda l'IP 192.168.1.100. Perché?

Link a foto.

In realtà credo che non ci vadano più di due processi sulla CPU, ma questa cosa mi suona strana. Addirittura arrivo ad avere 1,2,2,3,4,4,5 per quanto riguarda gli slot. Se killo distccmon-gui e lo faccio ripartire, all'inizio si comporta normalmente.

Sull'altro pc, non ho questo problema invece.
[HOWTO] Come criptare la /home usando cryptsetup e luks
[HOWTO] Abilitare il supporto al dom0 XEN su kernel 3.X
Help answer the unanswered
Top
fbcyborg
Advocate
Advocate
User avatar
Posts: 3056
Joined: Sun Oct 16, 2005 12:08 pm
Location: ROMA

  • Quote

Post by fbcyborg » Tue Apr 14, 2009 5:55 pm

Rinnovo la mia domanda, e ne aggiungo un'altra.

Sto usando un Quad core per compilare Gentoo su un portatile, ma nonostante in /etc/distccd/host io abbia impostato che debba mandarci sopra 8 files da compilare in parallelo, al massimo ne vedo 4. Perchè?
[HOWTO] Come criptare la /home usando cryptsetup e luks
[HOWTO] Abilitare il supporto al dom0 XEN su kernel 3.X
Help answer the unanswered
Top
oRDeX
Veteran
Veteran
User avatar
Posts: 1325
Joined: Sun Oct 19, 2003 12:08 pm
Location: Italy
Contact:
Contact oRDeX
Website

  • Quote

Post by oRDeX » Wed Apr 15, 2009 10:18 pm

hai modificato di conseguenza il -jN nelle MAKEOPTS?
Top
fbcyborg
Advocate
Advocate
User avatar
Posts: 3056
Joined: Sun Oct 16, 2005 12:08 pm
Location: ROMA

  • Quote

Post by fbcyborg » Thu Apr 16, 2009 12:41 pm

Sì ho messo -j13. Ma 8 in parallelo sul quad core ancora non li ho mai visti.
[HOWTO] Come criptare la /home usando cryptsetup e luks
[HOWTO] Abilitare il supporto al dom0 XEN su kernel 3.X
Help answer the unanswered
Top
oRDeX
Veteran
Veteran
User avatar
Posts: 1325
Joined: Sun Oct 19, 2003 12:08 pm
Location: Italy
Contact:
Contact oRDeX
Website

  • Quote

Post by oRDeX » Thu Apr 16, 2009 12:49 pm

non vorrei dire una cretinata, ma è probabile anche che non riesca a generare così tanti oggetti da compilare da distribuire, cioè finchè li crea tutti si liberano slot con maggiore priorità, quindi non li distribuisce come immagini. _IMHO_
Top
fbcyborg
Advocate
Advocate
User avatar
Posts: 3056
Joined: Sun Oct 16, 2005 12:08 pm
Location: ROMA

  • Quote

Post by fbcyborg » Thu Apr 16, 2009 1:14 pm

Ho capito, quindi distcc ha certi limiti.. ?
Limiti che dipendono poi anche da emerge stesso?

E per quanto riguarda il problema dei "socket duplicati" in distccmon-gui?
Che mi sapete dire?

Grazie a tutti
[HOWTO] Come criptare la /home usando cryptsetup e luks
[HOWTO] Abilitare il supporto al dom0 XEN su kernel 3.X
Help answer the unanswered
Top
oRDeX
Veteran
Veteran
User avatar
Posts: 1325
Joined: Sun Oct 19, 2003 12:08 pm
Location: Italy
Contact:
Contact oRDeX
Website

  • Quote

Post by oRDeX » Thu Apr 16, 2009 5:42 pm

bah non è un limite di distcc ma semplicemente se devi compilare un pacchetto in cui devi compilare 8 oggetti separatamente, ovviamente devi prepararli per distribuirli. se questi sono piccoli e veloci da compilare, probabilmente il primo host (localhost) avrà finito di compilare i vecchi, quindi li prenderà lui da compilare invece di darli in giro. IMHO
Top
fbcyborg
Advocate
Advocate
User avatar
Posts: 3056
Joined: Sun Oct 16, 2005 12:08 pm
Location: ROMA

  • Quote

Post by fbcyborg » Thu Apr 16, 2009 5:58 pm

Ma ad esempio gcc, non si può proprio compilare con distcc? Forse le ragioni sono ovvie, ma se un pacchetto con distcc non funziona (e ce ne sono diversi ho visto), si può segnalare a qualcuno perché faccia sì da renderlo compilabile con distcc?
[HOWTO] Come criptare la /home usando cryptsetup e luks
[HOWTO] Abilitare il supporto al dom0 XEN su kernel 3.X
Help answer the unanswered
Top
Post Reply
  • Print view

19 posts • Page 1 of 1

Return to “Forum italiano (Italian)”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic