cpunion / iphone-dev

Automatically exported from code.google.com/p/iphone-dev
1 stars 0 forks source link

HelloWorld will not compile cleanly #66

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Get http://ellkro.jot.com/WikiHome/iPhoneHacking/hello_src.zip
2. Change the flags in the Makefile to
      CC=arm-apple-darwin-gcc
      LD=$(CC)
      CXX=arm-apple-darwin-g++
      CFLAGS=-fsigned-char
      LDFLAGS=-Wl,-syslibroot,$(HEAVENLY) -lobjc

3. run make

What is the expected output? What do you see instead?
    Lots of redefined variable types

What version of the product are you using? On what operating system?
lastest svn revision 197
 10.4.10 PPC

Please provide any additional information below.

greg-cockrofts-xserve:~/src/uikithelloworld gregshell$ make
arm-apple-darwin-gcc -c -fsigned-char  hello.m -o hello.o
In file included from 
/usr/local/lib/gcc/arm-apple-darwin/4.0.1/../../../../arm-apple-darwin/
include/CarbonCore/ConditionalMacros.h:42,
                 from /usr/local/lib/gcc/arm-apple-darwin/4.0.1/../../../../arm-apple-darwin/
include/CarbonCore/MacTypes.h:20,
                 from /usr/local/lib/gcc/arm-apple-darwin/4.0.1/../../../../arm-apple-darwin/
include/CoreFoundation/CFBase.h:38,
                 from /usr/local/lib/gcc/arm-apple-darwin/4.0.1/../../../../arm-apple-darwin/
include/CoreFoundation/CFByteOrder.h:16,
                 from /usr/local/lib/gcc/arm-apple-darwin/4.0.1/../../../../arm-apple-darwin/
include/CoreGraphics/CGGeometry.h:10,
                 from /usr/local/lib/gcc/arm-apple-darwin/4.0.1/../../../../arm-apple-darwin/
include/CoreGraphics/CGAffineTransform.h:12,
                 from /usr/local/lib/gcc/arm-apple-darwin/4.0.1/../../../../arm-apple-darwin/
include/CoreGraphics/CoreGraphics.h:12,
                 from /usr/local/lib/gcc/arm-apple-darwin/4.0.1/../../../../arm-apple-darwin/
include/UIKit/UIKit.h:3,
                 from hello.m:1:
/usr/local/lib/gcc/arm-apple-darwin/4.0.1/../../../../arm-apple-darwin/include/
TargetConditionals.h:110:10: error: #error unrecognized GNU C compiler
In file included from 
/usr/local/lib/gcc/arm-apple-darwin/4.0.1/../../../../arm-apple-darwin/
include/CarbonCore/DriverServices.h:32,
                 from /usr/local/lib/gcc/arm-apple-darwin/4.0.1/../../../../arm-apple-darwin/
include/CarbonCore/CarbonCore.h:125,
                 from /usr/local/lib/gcc/arm-apple-darwin/4.0.1/../../../../arm-apple-darwin/
include/CoreServices/CoreServices.h:21,
                 from /usr/local/lib/gcc/arm-apple-darwin/4.0.1/../../../../arm-apple-darwin/
include/CoreGraphics/CGEvent.h:17,
                 from /usr/local/lib/gcc/arm-apple-darwin/4.0.1/../../../../arm-apple-darwin/
include/CoreGraphics/CoreGraphics.h:24,
                 from /usr/local/lib/gcc/arm-apple-darwin/4.0.1/../../../../arm-apple-darwin/
include/UIKit/UIKit.h:3,
                 from hello.m:1:
/usr/local/lib/gcc/arm-apple-darwin/4.0.1/../../../../arm-apple-darwin/include/C
arbonCore/
MachineExceptions.h:340: error: parse error before '*' token
/usr/local/lib/gcc/arm-apple-darwin/4.0.1/../../../../arm-apple-darwin/include/C
arbonCore/
MachineExceptions.h:374: error: parse error before '*' token
In file included from 
/usr/local/lib/gcc/arm-apple-darwin/4.0.1/../../../../arm-apple-darwin/
include/CarbonCore/CarbonCore.h:161,
                 from /usr/local/lib/gcc/arm-apple-darwin/4.0.1/../../../../arm-apple-darwin/
include/CoreServices/CoreServices.h:21,
                 from /usr/local/lib/gcc/arm-apple-darwin/4.0.1/../../../../arm-apple-darwin/
include/CoreGraphics/CGEvent.h:17,
                 from /usr/local/lib/gcc/arm-apple-darwin/4.0.1/../../../../arm-apple-darwin/
include/CoreGraphics/CoreGraphics.h:24,
                 from /usr/local/lib/gcc/arm-apple-darwin/4.0.1/../../../../arm-apple-darwin/
include/UIKit/UIKit.h:3,
                 from hello.m:1:
/usr/local/lib/gcc/arm-apple-darwin/4.0.1/../../../../arm-apple-darwin/include/C
arbonCore/
fp.h:93:2: error: #error unsupported CPU
In file included from 
/usr/local/lib/gcc/arm-apple-darwin/4.0.1/../../../../arm-apple-darwin/
include/CarbonCore/CarbonCore.h:161,
                 from /usr/local/lib/gcc/arm-apple-darwin/4.0.1/../../../../arm-apple-darwin/
include/CoreServices/CoreServices.h:21,
                 from /usr/local/lib/gcc/arm-apple-darwin/4.0.1/../../../../arm-apple-darwin/
include/CoreGraphics/CGEvent.h:17,
                 from /usr/local/lib/gcc/arm-apple-darwin/4.0.1/../../../../arm-apple-darwin/
include/CoreGraphics/CoreGraphics.h:24,
                 from /usr/local/lib/gcc/arm-apple-darwin/4.0.1/../../../../arm-apple-darwin/
include/UIKit/UIKit.h:3,
                 from hello.m:1:
/usr/local/lib/gcc/arm-apple-darwin/4.0.1/../../../../arm-apple-darwin/include/C
arbonCore/
fp.h:471: error: conflicting types for 'scalb'
/usr/local/lib/gcc/arm-apple-darwin/4.0.1/../../../../arm-apple-darwin/include/C
arbonCore/
fp.h:885: error: conflicting types for '__fpclassifyd'
/usr/local/lib/gcc/arm-apple-darwin/4.0.1/../../../../arm-apple-darwin/include/a
rchitecture/
arm/math.h:138: error: previous declaration of '__fpclassifyd' was here
/usr/local/lib/gcc/arm-apple-darwin/4.0.1/../../../../arm-apple-darwin/include/C
arbonCore/
fp.h:896: error: conflicting types for '__fpclassifyf'
/usr/local/lib/gcc/arm-apple-darwin/4.0.1/../../../../arm-apple-darwin/include/a
rchitecture/
arm/math.h:137: error: previous declaration of '__fpclassifyf' was here
/usr/local/lib/gcc/arm-apple-darwin/4.0.1/../../../../arm-apple-darwin/include/C
arbonCore/
fp.h:908: error: conflicting types for '__fpclassify'
/usr/local/lib/gcc/arm-apple-darwin/4.0.1/../../../../arm-apple-darwin/include/a
rchitecture/
arm/math.h:139: error: previous declaration of '__fpclassify' was here
/usr/local/lib/gcc/arm-apple-darwin/4.0.1/../../../../arm-apple-darwin/include/C
arbonCore/
fp.h:1338: error: 'SIGDIGLEN' undeclared here (not in a function)
In file included from 
/usr/local/lib/gcc/arm-apple-darwin/4.0.1/../../../../arm-apple-darwin/
include/OSServices/OSServices.h:45,
                 from /usr/local/lib/gcc/arm-apple-darwin/4.0.1/../../../../arm-apple-darwin/
include/CoreServices/CoreServices.h:25,
                 from /usr/local/lib/gcc/arm-apple-darwin/4.0.1/../../../../arm-apple-darwin/
include/CoreGraphics/CGEvent.h:17,
                 from /usr/local/lib/gcc/arm-apple-darwin/4.0.1/../../../../arm-apple-darwin/
include/CoreGraphics/CoreGraphics.h:24,
                 from /usr/local/lib/gcc/arm-apple-darwin/4.0.1/../../../../arm-apple-darwin/
include/UIKit/UIKit.h:3,
                 from hello.m:1:
/usr/local/lib/gcc/arm-apple-darwin/4.0.1/../../../../arm-apple-darwin/include/O
SServices/
OpenTransport.h:359: error: parse error before numeric constant
In file included from 
/usr/local/lib/gcc/arm-apple-darwin/4.0.1/../../../../arm-apple-darwin/
include/OSServices/OSServices.h:47,
                 from /usr/local/lib/gcc/arm-apple-darwin/4.0.1/../../../../arm-apple-darwin/
include/CoreServices/CoreServices.h:25,
                 from /usr/local/lib/gcc/arm-apple-darwin/4.0.1/../../../../arm-apple-darwin/
include/CoreGraphics/CGEvent.h:17,
                 from /usr/local/lib/gcc/arm-apple-darwin/4.0.1/../../../../arm-apple-darwin/
include/CoreGraphics/CoreGraphics.h:24,
                 from /usr/local/lib/gcc/arm-apple-darwin/4.0.1/../../../../arm-apple-darwin/
include/UIKit/UIKit.h:3,
                 from hello.m:1:
/usr/local/lib/gcc/arm-apple-darwin/4.0.1/../../../../arm-apple-darwin/include/O
SServices/
OpenTransportProtocol.h:121: error: conflicting types for 'uid_t'
/usr/local/lib/gcc/arm-apple-darwin/4.0.1/../../../../arm-apple-darwin/include/s
ys/types.h:
167: error: previous declaration of 'uid_t' was here
/usr/local/lib/gcc/arm-apple-darwin/4.0.1/../../../../arm-apple-darwin/include/O
SServices/
OpenTransportProtocol.h:122: error: conflicting types for 'gid_t'
/usr/local/lib/gcc/arm-apple-darwin/4.0.1/../../../../arm-apple-darwin/include/s
ys/types.h:
114: error: previous declaration of 'gid_t' was here
/usr/local/lib/gcc/arm-apple-darwin/4.0.1/../../../../arm-apple-darwin/include/O
SServices/
OpenTransportProtocol.h:124: error: conflicting types for 'dev_t'
/usr/local/lib/gcc/arm-apple-darwin/4.0.1/../../../../arm-apple-darwin/include/s
ys/types.h:
97: error: previous declaration of 'dev_t' was here
make: *** [hello.o] Error 1

Original issue reported on code.google.com by Greg.Coc...@gmail.com on 28 Sep 2007 at 2:56

GoogleCodeExporter commented 8 years ago
Mac PPC is currently not working...

Original comment by co...@compuserve.com on 28 Sep 2007 at 11:59

GoogleCodeExporter commented 8 years ago
Don't use -Wl,-syslibroot,$(HEAVENLY).

Original comment by nightwat...@gmail.com on 30 Sep 2007 at 1:58

GoogleCodeExporter commented 8 years ago
I'm on Intel and having the same problem.

Original comment by knyghtf...@gmail.com on 14 Oct 2007 at 12:55

GoogleCodeExporter commented 8 years ago
I'm on 10.4.10 ppc, and also having this exact same problem..

Original comment by anthony....@gmail.com on 16 Oct 2007 at 9:39

GoogleCodeExporter commented 8 years ago
I'm on Ubuntu 7.10 and am also having this exact same problem.
..
/usr/local/lib/gcc/arm-apple-darwin/4.0.1/../../../../arm-apple-darwin/include/s
ys/types.h:97:
error: previous declaration of ‘dev_t’ was here

Original comment by paulspit...@gmail.com on 28 Oct 2007 at 1:02

GoogleCodeExporter commented 8 years ago
This can be fixed, on ubuntu 7.10, by installing "patch" ('sudo apt-get install 
patch') and rerunning the step 'sudo bash install-headers.sh'.

Original comment by paulspit...@gmail.com on 3 Nov 2007 at 2:15

GoogleCodeExporter commented 8 years ago
I had the same problem on an Intel Mac with 10.4.10 and found out the source of 
the problem. While preparing 
the header files, the script is supposed to patch the problematic 
TargetConditionals.h header file. Somehow this 
patch failed; those of you having the same problem will find 
TargetConditionals.rej which contains the result of 
the rejected patch.

I fixed this by manually applying what the patch file suggested. You can find 
the patch file at:

iphone-dev/include/include/TargetConditionals.h.diff

Original comment by ntro...@gmail.com on 13 Nov 2007 at 8:51