﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc
1228	pcontrol compilation fails on G4 with MacOS 10.4.11	Sebastian Jester	eugene	"Ohana refuses to compile on my G4 with MacOS 10.4.11. There's a preprocessing problem in pcontrol.h, both in the Ohana from the standalone tarball
http://kiawe.ifa.hawaii.edu/eugene/downloads/Ohana.20081024.tgz
and in Ohana exported from svn with -r {2009-04-14}

The problem occurs because pcontrol.h has a typedef struct { ... } Job; and in that typedef, the following fields are defined:
{{{
  JobOutput    stdout;
  JobOutput    stderr;
}}}
However, on my G4 MacOS 10.4.11, /usr/include/stdio.h contains the following defines:
{{{
#define stdout  (&__sF[1])
#define stderr  (&__sF[2])
}}}
so that those apparently innocuous lines get turned into
{{{
  JobOutput (&__sF[1]);
  JobOutput (&__sF[2]);
}}}
It looks like adding a compiler flag 
`-D__DARWIN_UNIX03=1`
fixes this; maybe also `-D__DARWIN_UNIX03=0` is what's needed (according to http://trac.macports.org/ticket/13963 ). I get 'multiple symbol definition' errors after that, but I can at least start and exit pcontrol.

However, I don't know how to tell psbuild to use that flag, and we should test that pcontrol indeed works with this additional compiler flag.

The error message was:

{{{
gcc -g -O0 -D_DARWIN_C_SOURCE -Wall -Werror  -I/Users/jester/usrdevel/ipp/Ohana/src/opihi/include -I/Users/jester/psconfig/Ohana-mybranch.darwin/include -I/usr/include -I/usr/local/include -I/Users/jester/psconfig//Ohana-mybranch.darwin/include  -Ddarwin -c /Users/jester/usrdevel/ipp/Ohana/src/opihi/pcontrol/delete.c -o /Users/jester/usrdevel/ipp/Ohana/src/opihi/pcontrol/delete.darwin.o
In file included from /Users/jester/usrdevel/ipp/Ohana/src/opihi/pcontrol/delete.c:1:
/Users/jester/usrdevel/ipp/Ohana/src/opihi/include/pcontrol.h:111: error: parse error before '&' token
cc1: warnings being treated as errors
}}}"	defect	closed	low		Ohana		blocker	fixed		
