Re: distributed builds with different kernel versions error
Re: distributed builds with different kernel versions error
- Subject: Re: distributed builds with different kernel versions error
- From: Adam Cohen <email@hidden>
- Date: Sun, 6 Feb 2005 16:17:44 -0500
Xcode's distributed compiling mechanism is basically just a GUI
wrapper for distcc (http://distcc.samba.org/) with Rendezvous support.
Xcode is pretty strict about having the system and gcc versions match
exactly amongst distributed machines. You can, however, obtain the
source and modify this information (it's called the text record in
Rendezvous/Zeroconf parlance), so that it matches your kernel version.
While this probably wouldn't work from Jaguar to Panther, I'm sure
you won't have any problems with your minor kernel revision, although
you must also make sure that both machines are using the same version
of gcc.
I've created a patch which should modify the distccd source so that it
responds with an OS version of 7.7.2, which you may have to change
depending upon which computer you're using as the source machine. ie,
if you're using a PowerMac with Darwin 7.7.0 as the source machine,
then you'll need to change this value to 7.7.0.
Note that you'll also have to change this value and recompile distccd
every time a new OS update is released (such as for the upcoming
10.3.8 update, you'll have to change it to 7.8.0 - although I'm sure
you won't even need to use the patched distccd by that time, as 10.3.8
will probably merge the differences in the 7.7.2 kernel anyways).
You can download the distcc-17 source from:
http://www.opensource.apple.com/darwinsource/tarballs/other/distcc-17.tar.gz
After downloading and extracting, copy the contents of the patch
provided below (everything from the "---
distcc-17/src/zeroconf_util.c Fri Oct 24 18:47:25 2003" line to the
"return txtRecord;" line) to a file such as
"distcc-17_zeroconf_util.patch", and place this file in the same
directory as the distcc-17 directory. Your directory should look like
the following:
drwxr-xr-x 37 adam adam 1258 6 Feb 15:29 distcc-17/
-rw-r--r-- 1 adam adam 313880 24 Oct 2003 distcc-17.tar.gz
-rw-r--r-- 1 adam adam 1479 6 Feb 15:27 distcc-17_zeroconf_util.patch
now apply the patch:
patch -p0 -b < distcc-17_zeroconf_util.patch
then change to the distcc-17 directory and run make (don't run
configure first). You can then rename the copy of distccd in
/usr/bin/ to distccd.old and place the newly compiled distccd into
/usr/bin (or you can of course make a symlink).
Note that the modified distccd should be placed on the machines you
want to distribute the build to, not the source machine.
Good luck,
Adam Cohen
BEGIN PATCH FILE:
--- distcc-17/src/zeroconf_util.c Fri Oct 24 18:47:25 2003
+++ distcc-17/src/zeroconf_util.c Sun Feb 6 15:26:38 2005
@@ -294,7 +294,7 @@
**/
char *dcc_generate_txt_record(void)
{
- char *osRelease;
+ char *osRelease = "7.7.2";
int releaseMib[2];
size_t releaseLen;
char *osType;
@@ -338,24 +338,15 @@
strerror(errno));
}
- if ( sysctl(releaseMib, 2, NULL, &releaseLen, NULL, 0) ) {
- rs_log_error("Unable to get length for kern.osrelease: (%d) %s", errno,
- strerror(errno));
- }
+ releaseLen = strlen(osRelease);
osType = (char *) malloc(typeLen);
- osRelease = (char *) malloc(releaseLen);
if ( sysctl(typeMib, 2, osType, &typeLen, NULL, 0) ) {
rs_log_error("Unable to get kern.ostype: (%d) %s", errno,
strerror(errno));
}
- if ( sysctl(releaseMib, 2, osRelease, &releaseLen, NULL, 0) ) {
- rs_log_error("Unable to get kern.osrelease: (%d) %s", errno,
- strerror(errno));
- }
-
if ( gccVersion != NULL && osType != NULL && osRelease != NULL ) {
txtRecord = malloc(1 + strlen(txtVers) + 1 + 1 +
strlen(protoVers) + 1 +
1 + strlen(comAppleOS) + typeLen + 1 + releaseLen +
@@ -414,10 +405,6 @@
if ( osType != NULL ) {
free(osType);
- }
-
- if ( osRelease != NULL ) {
- free(osRelease);
}
return txtRecord;
END PATCH FILE
On Sun, 6 Feb 2005 00:42:14 -0500, Ivan Kourtev <email@hidden> wrote:
> Thanks for the replies. This makes sense. So I guess I am out of luck
> until they bring the kernel versions up to the same versions (I am not
> sure I have the skills to update the powermacs to 7.7.2).
>
> -- ivan
>
> On Feb 6, 2005, at 12:33 AM, Kevin Ballard wrote:
>
> > I have a 1Ghz 17" powerbook and it has version 7.7.0. I'm guessing
> > that 7.7.2 is for the new powerbooks only (it's already obvious that
> > they have to have a new trackpad driver to support the new scrolling
> > feature, so it's not surprising that it's a bumped kernel version
> > too).
> >
> > On Feb 6, 2005, at 12:15 AM, Ivan Kourtev wrote:
> >
> >> Could this be the problem? Could anyone try to replicate the problem
> >> (I know the new PB's just came out last week but maybe...). And
> >> what's with the different kernel versions anyway? Ot is there
> >> supposed to be a difference between the kernel versions that run on
> >> desktops and portables?
> >
> > --
> > Kevin Ballard
> > email@hidden
> > http://www.tildesoft.com
> > http://kevin.sb.org
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Cocoa-dev mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden