Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Discussion & Documentation Documentation, Tips & Tricks
  • Search

HOWTO: Use a Windows box as a distcc server for linux.

Unofficial documentation for various parts of Gentoo Linux. Note: This is not a support forum.
Post Reply
Advanced search
131 posts
  • Previous
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • Next
Author
Message
PowerFactor
Veteran
Veteran
User avatar
Posts: 1693
Joined: Thu Jan 30, 2003 7:45 pm
Location: out of it

  • Quote

Post by PowerFactor » Tue Sep 21, 2004 8:05 pm

I think I've got a slightly easier way to build glibc now. See the wiki for details.
Top
purevirtual
n00b
n00b
Posts: 4
Joined: Thu Sep 23, 2004 1:34 am

  • Quote

Post by purevirtual » Thu Sep 23, 2004 1:43 am

I'm currently working on a minimal gcc/distcc - Package. So far I've managed a working package of 3.5 MB (uncompressed!).
At the moment I'm developing a small Windows App for configuration purposes etc.

I hope to get stable packages for various target platforms online within the next few weeks.
Top
Veto
Tux's lil' helper
Tux's lil' helper
Posts: 83
Joined: Fri Jul 04, 2003 12:31 am

  • Quote

Post by Veto » Thu Sep 23, 2004 4:24 am

hotplainrice wrote:Veto, can I still use the distcc binaries that you provide even though I have changed to linux26-headers, glibc for nptl?
I doubt it'll work with nptl as I'm running without. I -think- built this with 2.6 headers....but I'm not 100% certain (just got in from a trip, won't be clear headed enough to check until tomorrow).

-Veto
Top
hotplainrice
Tux's lil' helper
Tux's lil' helper
Posts: 92
Joined: Sun Apr 25, 2004 1:07 pm

  • Quote

Post by hotplainrice » Thu Sep 23, 2004 7:16 am

Thx.
Top
john.robinson
n00b
n00b
Posts: 24
Joined: Tue Oct 21, 2003 4:17 am

  • Quote

Post by john.robinson » Wed Nov 03, 2004 2:35 am

I have wiped lots of the cross-linux produced by Veto, and so for those who want a smaller download (6.2M rather than 22M) and smaller runtime (19M rather than 84M) and who are definitely only interested in distcc for Gentoo may visit ftp://ftp.yuiop.co.uk/gentoo/win32/cros ... im.tar.bz2 then should follow the same process as per Veto's instructions (roughly: unpack to /usr/local then use /usr/local/bin/mkservice).

Veto, Powerfactor, I just thought that seeing as distcc only sends compile jobs (no preprocess, no linking) over to slaves, we could cope without includes and libraries, and I wiped manuals etc. too. I can send you an `ls -R` of my cross-linux-not-needed directory if you like, but I'm not honestly sure I've got it entirely right :D but I expect that since no headers, libraries are required by distcc it should either work or not :)

Just my 0.000005c to the Gentoo community... but if my ISP bandwidth leaps too much I'll cut it off (sorry).
Top
TiCpu
n00b
n00b
Posts: 29
Joined: Tue Mar 23, 2004 4:44 am
Location: Québec in Canada

  • Quote

Post by TiCpu » Thu Nov 04, 2004 3:12 pm

Will that last file work with gcc 3.4.x ? I unpacked it and I can see it contains gcc 3.3.4 only, will that create broken executable if my client have gcc 3.4.2-r3 installed (not realy installed but I wanted to compile it with distcc then use it) Thanks for any info.
Top
john.robinson
n00b
n00b
Posts: 24
Joined: Tue Oct 21, 2003 4:17 am

  • Quote

Post by john.robinson » Thu Nov 04, 2004 5:32 pm

It's gcc-3.3.4-r1 built by Veto. It'll certainly work with your own 3.3.4 to help you build 3.4.x; once that's done, though, according to http://distcc.samba.org/faq.html#mixed-gcc it's probably not a good idea to mix versions.
Top
zealott
n00b
n00b
User avatar
Posts: 11
Joined: Thu Nov 25, 2004 2:12 am
Location: Minnesota

  • Quote

Post by zealott » Fri Dec 03, 2004 9:13 pm

Power Factor:
I appreciate your howto on this subject. I have followed it, and it works. I now have a working toolchain to make Gentoo binaries on my Windows box :D though, not very well tested.

To all you gurus and people who know this subject:
What would you do if you installed distcc per this howto, and invoking distccd --daemon does not open a tcp port? That is where I am stuck :evil: I am talking about distccd under Cygwin. I get an error saying something to the effect that connection to the host was refused on the Gentoo side. nmap confirms that the port is not open. Why would a computer refuse to open a port :?:

In case some backgound info will help you. . .
- Latest version of Cygwin as of this post
- distccd 2.16 on both Cygwin and Gentoo
- Win98se with all known patches, updates, etc.
- Using gcc 3.3.4 -r1 (binaries downloaded from Veto)
- P4 2GHz, 256 DDR
- Ethernet adapter built into Asus P4S533 mobo.

Please help, I am a major n00b, almost any advice will help me, seriously.
Zealot
-------------------------------------------------------
I need your two cents to support my Gentoo addiction.
Top
john.robinson
n00b
n00b
Posts: 24
Joined: Tue Oct 21, 2003 4:17 am

  • Quote

Post by john.robinson » Sat Dec 04, 2004 1:11 am

Well first off, you're not looking for an open port under Gentoo, you're looking for it under Windows (waiting for distcc to send a job).

Secondly, if you get a command prompt - or Cygwin shell - under Windows, you can see if distccd is running OK; say `netstat -a` and if you see port 3632 open, distccd is running.

If you have Windows XP SP2 - or any other with the firewall stuff running - you need to make a hole in the firewall; go to the Windows Security Centre (under SP2) or the properties of your network connection (under the others) and make sure the machine will accept connections on TCP port 3632.

I've just got back from the pub, so I'm probably talking rubbish; if the above doesn't help, please do ask again in the morning. Actually, afternoon (GMT), give me a chance to sober up and get over my (inevitable) hangover ;-)
Top
zealott
n00b
n00b
User avatar
Posts: 11
Joined: Thu Nov 25, 2004 2:12 am
Location: Minnesota

  • Quote

Post by zealott » Sat Dec 04, 2004 1:23 am

Thanks man! I never knew what netstat was for. It shows a buttload of ports "listening" that are not found to be open from nmap, but no 3632. . . DAMN!

--btw, I have no firewall on this machine. What's the point when nmap says, in regards to the sequence number predictability, "trivial joke?" :roll:
Zealot
-------------------------------------------------------
I need your two cents to support my Gentoo addiction.
Top
john.robinson
n00b
n00b
Posts: 24
Joined: Tue Oct 21, 2003 4:17 am

  • Quote

Post by john.robinson » Sat Dec 04, 2004 12:23 pm

Today I shall mostly be hung over :cry:

Yes, netstat shows you what ports are open on the local machine; whether or not these are really exposed to the network depends on (i) what address they're bound to - many are only bound to localhost; (ii) whether you've got a firewall.

I just looked at your post again, I see you're using Windows 98. It's a long time since I fired up a Win98 machine, so just for fun this morning I got my trusty old Pentium 166 machine out. Actually it runs Windows ME, but it's nearly the same. I found that running `distccd --daemon` didn't work - distccd just quit - but `distccd --daemon --no-detach` did. Perhaps Win9x can't detach child processes. Anyway: I just used /usr/local/bin/distccd.sh from Veto's package, which includes this option, and successfully sent a job from my Gentoo box.

I don't know what you'll have to do to get distccd running as a service from boot-up, though; perhaps there's some kind of wrapper but I doubt the Cygwin widget cygrunsrv works on anything other than NT and its derivatives.
Top
zealott
n00b
n00b
User avatar
Posts: 11
Joined: Thu Nov 25, 2004 2:12 am
Location: Minnesota

  • Quote

Post by zealott » Sat Dec 04, 2004 7:39 pm

Thanks John,
The --no-detach argument seems to have done it! I will do some further testing today, but I emerged a small package just a little while ago, and got no errors.

later---
Zealot
-------------------------------------------------------
I need your two cents to support my Gentoo addiction.
Top
JazzSax006
n00b
n00b
Posts: 38
Joined: Tue Jun 03, 2003 8:25 pm

AMD64 cygwin/gcc

  • Quote

Post by JazzSax006 » Mon Dec 06, 2004 3:18 am

Has anybody been able to get a gcc 3.4.x build on a windows/cygwin for x86_64 target? I've tried compiling several different gcc versions and all have died with an error message (though the error differs for different gcc versions)
Top
zealott
n00b
n00b
User avatar
Posts: 11
Joined: Thu Nov 25, 2004 2:12 am
Location: Minnesota

  • Quote

Post by zealott » Mon Dec 06, 2004 10:14 pm

I just wanted to confirm that I am running distccd under Win98se/Cygwin. The --no-detach argument is essential. Also, make sure that you explicitly run. . .

Code: Select all

distccd.sh
. . .if you would like to run the included script with the environment and arguments 'canned.' To make this script slightly more convenient, add '&' at the end of the exec statement to put distccd in the background and allwo you to continue using the same terminal for other purposes.
Zealot
-------------------------------------------------------
I need your two cents to support my Gentoo addiction.
Top
antiflag1980
n00b
n00b
User avatar
Posts: 65
Joined: Mon Nov 01, 2004 3:58 am
Location: cincinnati usa

  • Quote

Post by antiflag1980 » Sun Dec 12, 2004 10:50 pm

I just set up gentoo colinux and installed distcc and ccache on my moms P4 and I'ts been a great contributor to my distcc farm for months now and it's completely hassle free, I've set up a batch file for launching it and I always just close the monitor window right away and everythings completely maninance free, as far as she's concerned it's just a minimized command line window sitting on her computer. With the occasional mantinance of me sshing and emerge syncing and emerge -uDv world to keep everything up to date. If I ever get around to it, I'll make a stage 4 dvd for bittorent distribution, installation on another persons p4 would be as simple as burning the dvd and installing colinux and overwriting all the files in the C:\colinux folder on their hardrive with the files from the dvd, that is considering my settings are sufficient for their computer as in the ram amount setting and stuff, but my installation is kind of large (around 4GB I think) because I made separate extra loopback partitions to be mounted by fstab as swap and /usr maybe a couple others I don't remember. All the end user would have to do is get the tap driver working for their system. before overwriting all the colinux files. I find it a much easier solution than cgywin, just to use a windows box in your distcc farm.
Top
jago25_98
Apprentice
Apprentice
Posts: 180
Joined: Fri Aug 23, 2002 6:41 pm

  • Quote

Post by jago25_98 » Tue Dec 14, 2004 11:13 am

Another option could be running a stripped down coLinux image with distccd on it and minimal gcc related tools.

I guess a start could be to take the coLinux gentoo image, add distccd and then start cutting it down.
Top
john.robinson
n00b
n00b
Posts: 24
Joined: Tue Oct 21, 2003 4:17 am

  • Quote

Post by john.robinson » Tue Dec 14, 2004 1:25 pm

I just don't see the Cygwin setup as difficult:
(i) run Cygwin setup (remember to include cygrunsrv);
(ii) untar Veto's tarball into /usr/local;
(iii) run a script (/usr/local/bin/mkservice)
is about all it involves...

It's different if you're working from source; I guess it depends on what you want it for.
Top
jago25_98
Apprentice
Apprentice
Posts: 180
Joined: Fri Aug 23, 2002 6:41 pm

  • Quote

Post by jago25_98 » Tue Dec 14, 2004 4:07 pm

I heard that because you're (cross compiling) or using cygwin that can cause problems.

running a .exe is preferrable. remember these are all sorts of windows users - i.e. dads computer upstairs... better have it running as low priority eh?
Top
jago25_98
Apprentice
Apprentice
Posts: 180
Joined: Fri Aug 23, 2002 6:41 pm

  • Quote

Post by jago25_98 » Tue Dec 14, 2004 4:16 pm

Might be a good idea to do testing with a normal but small ./configure && make

, and replcae make with distcc. oh and set /etc/distcc* (off the op of my head; at work) to use only the Windows cygwin computer.
Top
CtHu
n00b
n00b
User avatar
Posts: 13
Joined: Thu Dec 16, 2004 12:48 pm

  • Quote

Post by CtHu » Tue Jan 18, 2005 10:18 am

hi al, thanks for your nice work here ;)

still no update since 13 sep?
Top
jago25_98
Apprentice
Apprentice
Posts: 180
Joined: Fri Aug 23, 2002 6:41 pm

  • Quote

Post by jago25_98 » Tue Jan 18, 2005 8:07 pm

still think it should be easier. can't get it working :/
Top
FuriousGeorge
Apprentice
Apprentice
Posts: 160
Joined: Thu Mar 03, 2005 8:41 pm

  • Quote

Post by FuriousGeorge » Mon May 23, 2005 4:01 am

jago25_98 wrote:still think it should be easier. can't get it working :/
i think i found an easier way

on cygwin:

1> get and unpack Dan Kegel's Crosstool http://www.kegel.com/crosstool/ , a script which builds a crosscompiler

2> get and unpack http://www.research.ibm.com/trl/projects/security/ssp/ gcc patch

3> read the howto and set up the script for crosstool. real easy. basically consists of making the /opt/crosstool folder on your cygwin system and a few other details:
-for it to work out of the box on fresh cygwin installs you will need some sutff like automake, autoconf, gcc, make, bison, flex,wget for automagic and all the obvious things.
-i find that installing everything under libs and devel takes less time than having it fail because you forgot flex
-assuming youre installing on a cygwin system like miine, uncomment the line in demo-i686.sh of crosstools script that reflects what gcc and glibc version combination you want
-in i686.dat file, change the target= line from i686-unknown-linux-gnu to i686-pc-linux-gnu, or youre gonna have to do some linking for distcc to work with your toolchain

UPDATE: even easier way

3.5 on gentoo box "ebuild /usr/portage/sys-devel/gcc/gcc-(yourversion).ebuild unpack"
-tar.bz2 the patched gcc source it puts in /var/temp/portage/gcc-(ver)/work/gcc-(ver)/ and get it to your cygwin box. warning, if you dont do this, copying file by file could cause winodows to fubar the permissions on the files, and give you a "Cannot find Makefile.in" (and ls M* will tell you cannot find Makefile.in. wierd"

-now you have to stop dan's great script from getting unpacking and patching its own gcc. open the file getandunpack.sh and comment out the two lines that look like this:

Code: Select all

case $GCC_DIR in
   gcc-2.95.3)
      getUnpackAndPatch ftp://ftp.gnu.org/pub/gnu/gcc/$GCC_DIR.tar.gz ;;
  # gcc-3.3.3)  <--- This one and the one below it commented by default i believe in version whatever.i.have (FG)
     # getUnpackAndPatch ftp://ftp.gnu.org/pub/gnu/gcc/releases/$GCC_DIR/$GCC_D$
  # gcc-3.3.5)  <----  I commented this one and the one below it.
   #   getUnpackAndPatch ftp://gcc.gnu.org/pub/gcc/releases/$GCC_DIR/$GCC_DIR.t$
   gcc-4.0.[012345]-200*)
      dir=`echo $GCC_DIR | sed s/gcc-/prerelease-/`
      getUnpackAndPatch ftp://gcc.gnu.org/pub/gcc/$dir/$GCC_DIR.tar.gz ;;
   gcc-3.[345]-200*|gcc-4.0-200*)
-then run demo-i686.sh and your done

4. when its done your toolchain will be in /opt/crosstool/i686-pc-linux-gnu/

5. remember to use the same version of distcc on both systems. use ebuild /path/to/distcc.ver.u.have.ebuild unpack to unpack and patch the source and copy your version to cygwin

6. Put your toolchain in the path

7. run distccd.exe --alllow (ip.of.client) --deamon

So far ive installed some thirty pacakges and only one gave me problems: gkellm. i'm trying to find a way to ebuild gcc.ebuild unpack and drop that in the build dir so you dont have to worry about any patches, but that doesnt work yet

use at your own risk, not well tested at all, requires looking at by someone qualified (not me), your mialage may vary
Top
dundas
Guru
Guru
User avatar
Posts: 317
Joined: Thu Dec 16, 2004 6:28 am
Location: China, Earth

  • Quote

Post by dundas » Tue Jul 19, 2005 5:28 pm

john.robinson wrote:I just don't see the Cygwin setup as difficult:
(i) run Cygwin setup (remember to include cygrunsrv);
(ii) untar Veto's tarball into /usr/local;
(iii) run a script (/usr/local/bin/mkservice)
is about all it involves...

It's different if you're working from source; I guess it depends on what you want it for.


This sounds neat, and I do have some newbie questions, I've installed cygwin as instructed in the howto already, and did the above instructions by john.robinson,

at the (iii), I just did

Code: Select all

cd /usr/local/bin
and then

Code: Select all

./mkservice
but I guess this only makes distcc as a service?and how do I actually install veto's package (installing all binutils, distcc, gcc manually also?btw, I think gcc is already installed, since gcc -v returns the version, but I'm not sure about the others)

and in the gentoo, I've already set up distcc, set hosts to be "localhost cygwin_pc's_ip" and started it successfully, then I switched in XP and started the "Cygwin distcc" service, however, when I'm emerging something, and opened disctccmon-gui and found nothing, also in windows, the task manager shows, distccd.exe is not doing anything.......

btw the following stuff from powerfactory's wiki is not working for me, so something is wrong?
Now test to see if we have binutils working.

cygwin$ $TARGET-ld --version
GNU ld version 2.13.1
Copyright 2002 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License. This program has absolutely no warranty.
I used gcc 3.3.3-3 in cygwin and 3.3.5 in gentoo box, and I untared veto's latest bzip2 as instructed in the 3 steps.



so I'm wondering if I've missed something?I have to go through the details in the wiki howto to install binutils, even I used veto's great script?or...?

thx a lot!
Appreciate Gentoo: Best Devs, Best Forums. YOU could help too: Help Answer
Top
Veto
Tux's lil' helper
Tux's lil' helper
Posts: 83
Joined: Fri Jul 04, 2003 12:31 am

Updated cross-linux tool-chain

  • Quote

Post by Veto » Sun Jul 31, 2005 2:26 am

I've FINALLY updated my cross-linux tool-chain to stable. Download and read more HERE.
Top
Kow
Apprentice
Apprentice
Posts: 227
Joined: Sun Dec 28, 2003 6:51 am

  • Quote

Post by Kow » Mon Aug 01, 2005 8:21 pm

So.. yea... how would u do this on a windows xp comp with an athlonxp cross compiling x86_64 code for an amd64 install? I'm assuming you have to change some of those BUILD/TARGET/HOST vars, which I thought I did right (changed TARGET to x86_64-whatevertherestis) and got to the gcc compile process and then it errored out. I lost the error message but basically it was looking for asm-x86_64/errno.h but none of it exists. I followed the guide which is the first posting[/code] in this thread.
-Kow
Top
Post Reply

131 posts
  • Previous
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • Next

Return to “Documentation, Tips & Tricks”

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