Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Portage & Programming
  • Search

Distcc on a different distro?

Problems with emerge or ebuilds? Have a basic programming question about C, PHP, Perl, BASH or something else?
Post Reply
Advanced search
17 posts • Page 1 of 1
Author
Message
woolsherpahat
Guru
Guru
User avatar
Posts: 347
Joined: Tue Mar 09, 2004 4:27 am

Distcc on a different distro?

  • Quote

Post by woolsherpahat » Sun May 09, 2004 7:32 pm

Is it possible to install distcc on another linux box running a different distro? I'd like to be able to use a Mandrake 9.2 box as a member of my distcc network. I know that Knoppix comes with distcc and that it can interface with a distcc network fine so I ASSUME it will work with other distros as well.

Any ideas on this one?

Thanks.
Top
abracadaver
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 125
Joined: Mon Feb 03, 2003 4:42 am

  • Quote

Post by abracadaver » Sun May 09, 2004 8:20 pm

Should work just fine. If I recall correctly there have even been threads on how to get distcc to work with Windows. Check out the official homepage to see how to set it up on a non-gentoo distro. The only problem I can think of is your GCC versions. I don't know if distcc works with different ones, and I don't know how much of a pain it'd be to upgrade Mandrake's GCC if it doesn't work. Might want to check that out first, but otherwise you're good to go.
Top
turtlendog
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 107
Joined: Sat Jan 31, 2004 5:36 am
Location: East AZ

  • Quote

Post by turtlendog » Mon May 10, 2004 1:20 am

I was using distcc with Mandrake 9.2 on my wifes computer until yesterday. Worked fine. (even though she had a different version of GCC, which I think I read can cause trouble) She's on Gentoo now...

I booted a Knoppix (3.2) cd yesterday looking for distcc (wanted to get as many computers compiling her distro as possible) but didn't find it. Now I'm going to see if there is a new release that has it. Thanks for that tip.

Edit: s/troubel/trouble/g
Top
caffeine_junkie
Tux's lil' helper
Tux's lil' helper
Posts: 133
Joined: Thu Jan 08, 2004 8:32 am
Location: Vienna, Austria

  • Quote

Post by caffeine_junkie » Mon May 10, 2004 6:04 am

should work as long you got the same compiler. most of you will have i686-pc-linux-gnu-gcc. no matter what distribution, but be careful with different versions!
Top
woolsherpahat
Guru
Guru
User avatar
Posts: 347
Joined: Tue Mar 09, 2004 4:27 am

  • Quote

Post by woolsherpahat » Mon May 10, 2004 6:25 am

@turtlendog

How did you get Mandrake 9.2 to handle that? I can't figure out how to start distccd...
Top
turtlendog
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 107
Joined: Sat Jan 31, 2004 5:36 am
Location: East AZ

  • Quote

Post by turtlendog » Mon May 10, 2004 7:09 am

I can't figure out how to start distccd...
Probably someting like

Code: Select all

urpmi distcc
chkconfig distcc on
service xinetd restart
Ohhh... that's right.... At first I had a problem relating to TMPDIR. For some reason the distcc daemon want's to use roots TMPDIR as the working dir (even thought it's running as nobody). The problem with that is that under certain security settings roots TMPDIR is /root/tmp and innacessable to nobody. So the logs fill with associated errors when trying to compile jobs. Going to check my wifes MDK 9.2 partition to see what I did to fix it BRB...

Code: Select all

root@jemima /mnt/tmp/etc/profile.d
 ><> cat tmpdir.sh
#!/bin/sh
# $Id: tmpdir.sh,v 1.12 2003/09/02 09:37:49 flepied Exp $
# Set TMPDIR to ~/tmp and create it if directory not exist.

if [ -f /etc/sysconfig/system ];then
    . /etc/sysconfig/system
fi

if [ -f /etc/sysconfig/msec ];then
    eval `grep ^SECURE_LEVEL= /etc/sysconfig/msec | head -1`
fi

[b]if [[ "$SECURE_TMP" = "yes" || "$SECURE_TMP" = "1" || "$SECURE_TMP" = "YES" || "$SECURE_LEVEL" -ge 2 ]];then[/b]
    if [ -d ${HOME}/tmp -a -w ${HOME}/tmp ];then
        export TMPDIR=${HOME}/tmp
        export TMP=${HOME}/tmp
    elif mkdir -p ${HOME}/tmp >/dev/null 2>&1;then
        chmod 700 ${HOME}/tmp
        export TMPDIR=${HOME}/tmp
        export TMP=${HOME}/tmp
    else
        export TMPDIR=/tmp/
        export TMP=/tmp/
    fi
fi

root@jemima /mnt/tmp/etc/profile.d
 ><> cat ../sysconfig/msec
UMASK_ROOT=022
SECURE_LEVEL=1
UMASK_USER=022
TMOUT=0
Looks like I just set SECURE_LEVEL=1 in /etc/sysconfig/msec

Hope that helps!
Top
woolsherpahat
Guru
Guru
User avatar
Posts: 347
Joined: Tue Mar 09, 2004 4:27 am

  • Quote

Post by woolsherpahat » Tue May 11, 2004 2:54 am

Okay. Here's what I've done so far. I've downloaded the rpm packages for distcc and installed them no problem. I then did a chkconfig -add distcc && chkconfig distcc on. No errors on either of those. I then added the "SECURE_LEVEL=1" per your advice to /etc/sysconfig/msec. Next I restarted xinetd and made sure to set the $DISTCC_HOSTS variable correctly.

My gentoo box was configured per the distcc guide.

I started distccmon-gnome on my gentoo box and emerged mplayer but nothing seemed to be forked over to the Mandrake 9.2 machine. Netstat says that distcc is up and listening but nmap doesn't show an open port. Can't find any errors in the /var/log/daemons/errors log either.

In Mandrake 9.2 I can start sshd with the /etc/init.d/sshd start command. Anyway to get distcc to work that way too?

Hmmm. :(
Top
woolsherpahat
Guru
Guru
User avatar
Posts: 347
Joined: Tue Mar 09, 2004 4:27 am

  • Quote

Post by woolsherpahat » Tue May 11, 2004 3:05 am

Code: Select all

May  3 18:58:35 localhost distccd[3127]: (dcc_make_tmpnam) failed to create /root/tmp/distcc_38ee2358.stderr: Per
mission denied
That error look familar?
Top
turtlendog
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 107
Joined: Sat Jan 31, 2004 5:36 am
Location: East AZ

  • Quote

Post by turtlendog » Tue May 11, 2004 3:53 am

That error look familar?
Sure does.

Code: Select all

$SECURE_TMP" = "yes" || "$SECURE_TMP" = "1" || "$SECURE_TMP" = "YES" || "$SECURE_LEVEL"
This is the area in /etc/profile.d/ tmpdir.sh where Mandrake decides if you get a secure tmp dir.

I looked for SECURE_TMP in her old /etc dir and didn't find anything.

You might want to do the same and see if it's set in one of your config files.

Code: Select all

root@jemima /mnt
 ><> mount /dev/hda6 tmp/; cd tmp/etc/

root@jemima /mnt/tmp/etc
 ><> find -type f | while read i; do if grep 'SECURE_TMP' "$i"; then echo $i; fi; done

if [[ "$SECURE_TMP" = "yes" || "$SECURE_TMP" = "1" || "$SECURE_TMP" = "YES" || "$SECURE_LEVEL" -ge 2 ]];then
./profile.d/tmpdir.sh

If you don't find it, your profile has probably not been updated. You might want to try

Code: Select all

source /etc/profile
as root (might be better to reboot so you don't mess up a program that has something cooking in TMPDIR.)
Top
turtlendog
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 107
Joined: Sat Jan 31, 2004 5:36 am
Location: East AZ

  • Quote

Post by turtlendog » Tue May 11, 2004 4:00 am

As a last resort you could try someting as ugly as this.

Before:

Code: Select all

if [ -f /etc/sysconfig/msec ];then
    eval `grep ^SECURE_LEVEL= /etc/sysconfig/msec | head -1`
fi

if [[ "$SECURE_TMP" = "yes" || "$SECURE_TMP" = "1" || "$SECURE_TMP" = "YES" || "$SECURE_LEVEL" -ge 2 ]];then
After:

Code: Select all

if [ -f /etc/sysconfig/msec ];then
    eval `grep ^SECURE_LEVEL= /etc/sysconfig/msec | head -1`
fi

# begin dirty, dirty hack
unset $SECURE_TMP
# end dirty, dirty hack

if [[ "$SECURE_TMP" = "yes" || "$SECURE_TMP" = "1" || "$SECURE_TMP" = "YES" || "$SECURE_LEVEL" -ge 2 ]];then
Top
woolsherpahat
Guru
Guru
User avatar
Posts: 347
Joined: Tue Mar 09, 2004 4:27 am

  • Quote

Post by woolsherpahat » Wed May 12, 2004 6:14 am

Uhh. I'm sorry but I just don't quite understand what your talking about. Do I need to change anything in tmpdir.sh or should I just execute it? The one on my box looks similar to yours as far as I can tell.

Thanks for your paitence.
Top
turtlendog
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 107
Joined: Sat Jan 31, 2004 5:36 am
Location: East AZ

  • Quote

Post by turtlendog » Wed May 12, 2004 5:43 pm

Do I need to change anything in tmpdir.sh or should I just execute it?
Unfortunately only you can decide that. I would do it like this. Now that you have set SECURE_LEVEL=1 in /etc/sysconfig/msec

Code: Select all

unset TMP TPMDIR;
source /etc/profile.d/tmpdir.sh;
service inetd restart;
if that doesn't work, try to find out which file is setting SECURE_TMP (probably /etc/sysconfig/system) and edit it addordingly. Any value but '1' 'yes' or 'YES' would be fine. I would pick 'no'. The command below will show you which files have those variable assignments. You still have to do the work of editing the files if needed.

Code: Select all

find /etc/sysconfig -type f | while read i; do if grep 'SECURE_' "$i"; then echo $i; fi; done 
Repair the offending file and

Code: Select all

unset TMP TPMDIR;
source /etc/profile.d/tmpdir.sh;
service inetd restart;
If it's still not working, try this:

Code: Select all

echo '#Remove these when you figure out why they are being set incorrectly above' >> /etc/profile.d/tmpdir.sh;
echo "export TMPDIR=/tmp/" >> /etc/profile.d/tmpdir.sh;
echo "export TMP=/tmp/" >> /etc/profile.d/tmpdir.sh;
unset TMP TPMDIR;
source /etc/profile;
service inetd restart;
Top
woolsherpahat
Guru
Guru
User avatar
Posts: 347
Joined: Tue Mar 09, 2004 4:27 am

  • Quote

Post by woolsherpahat » Wed May 12, 2004 8:52 pm

Okay, here's what happened.

1)I added the SECURE_LEVEL=1 in /etc/sysconfig/msec
2)unset TMP TPMDIR
3)source /etc/profile.d/tmpdir.sh
4)service inetd restart
5)export $DISTCC_HOSTS='blah, blah, blah'
6)Started distcc on my gentoo box and emerged rhythmbox
7)tail -f /var/log/syslog

Instead of constantly reporting the error like it did last time it reported a whole bunch crap about distcc. As far as I could tell it was receiving data, using my gcc flags from my gentoo box and compiling c files related to the ebuild I was emerging. Yah! :D

Now, one more question...

Any idea of why both distccmon-gnome and distccmon-text didn't report any of this while running on either box?

I am in awe of your paitence and bash scripting skills.

Thanks, again.
Top
turtlendog
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 107
Joined: Sat Jan 31, 2004 5:36 am
Location: East AZ

  • Quote

Post by turtlendog » Wed May 12, 2004 9:21 pm

You're logs look someting like this normal daemon logging?

Code: Select all

May 12 14:10:43 hp4365 distccd[8610]: (dcc_check_client) connection from 192.168.0.5:37018
May 12 14:10:43 hp4365 distccd[8610]: compile from simple-x-f.tmp.ben.23105.i to tmp.hash.ben.23105.o
May 12 14:10:43 hp4365 distccd[8610]: (dcc_r_file_timed) 1212170 bytes received in 0.100423s, rate 11788kB/s
May 12 14:10:46 hp4365 distccd[8610]: (dcc_collect_child) cc times: user 2.319647s, system 0.122981s, 5754 minflt, 0 majflt
May 12 14:10:46 hp4365 distccd[8610]: gcc on localhost completed ok
May 12 14:10:46 hp4365 distccd[8610]: job complete
Any idea of why both distccmon-gnome and distccmon-text didn't report any of this while running on either box?
I don't use them, so I can't really speculate about that.
Top
dmoulton
n00b
n00b
User avatar
Posts: 72
Joined: Mon Jul 07, 2003 2:03 pm
Location: Somewhere in the Rockies
Contact:
Contact dmoulton
Website

  • Quote

Post by dmoulton » Wed May 12, 2004 10:16 pm

turtlendog wrote:I booted a Knoppix (3.2) cd yesterday looking for distcc (wanted to get as many computers compiling her distro as possible) but didn't find it. Now I'm going to see if there is a new release that has it.
http://opendoorsoftware.com/cgi/http.pl ... tccKNOPPIX
Top
woolsherpahat
Guru
Guru
User avatar
Posts: 347
Joined: Tue Mar 09, 2004 4:27 am

  • Quote

Post by woolsherpahat » Thu May 13, 2004 1:11 am

I get stuff like this in my logs on the Mandrake9.2 box:

Code: Select all

May  5 17:09:40 localhost distccd[7886]: (dcc_r_file) received 154250 bytes to file /tmp/distccd_bf390b53.i
May  5 17:09:40 localhost distccd[7886]: (dcc_r_file_timed) 154250 bytes received in 0.599968s, rate 251kB/s
....
May  5 17:09:41 localhost distccd[7886]: gcc on localhost completed ok
May  5 17:09:41 localhost distccd[7886]: job complete
I'm pretty sure that means everything's working right even if it doesn't show up under distccmon-gnome.
Top
woolsherpahat
Guru
Guru
User avatar
Posts: 347
Joined: Tue Mar 09, 2004 4:27 am

  • Quote

Post by woolsherpahat » Thu May 13, 2004 1:40 am

Okay on my Gentoo box this works for distccmon-gnome:

Code: Select all

DISTCC_DIR="${PORTAGE_TMPDIR}/.distcc" distccmon-gnome
Still working on the Mandrake machine.
Top
Post Reply

17 posts • Page 1 of 1

Return to “Portage & Programming”

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