
iphone-dev - issue #139
Toolchain will not compile code after what seems to be an successful toolchain compilation
What steps will reproduce the problem? 1. Sucessfully compiled the toolchain on Ubuntu 7.10 2. Ran makefile:
CC = /usr/local/bin/arm-apple-darwin-gcc LD = $(CC) LDFLAGS = -lobjc \ -framework CoreFoundation \ -framework Foundation \ -framework UIKit \ -framework CoreGraphics \ -framework CoreTelephony \ -framework CoreAudio\ -framework Celestial CFLAGS=
vrecorder: main.o $(LD) $(LDFLAGS) main.o -o vrecorder
main.o: main.m main.h $(CC) -c main.m
3.
What is the expected output? What do you see instead?
It should have been a compiled w/o any warnings or errors. On my other system also running Ubuntu 7.10 and the toolchain (compiled a month ago) the source code for my app compiled without any errors. On the box I installed the toolchain on today I got:
make /usr/local/bin/arm-apple-darwin-gcc -c main.m 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/CoreFoundation.h:38, from main.h:1, from main.m:1: /usr/local/lib/gcc/arm-apple-darwin/4.0.1/../../../../arm-apple-darwin/include/TargetConditionals.h:123: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 main.h:2, from main.m:1: /usr/local/lib/gcc/arm-apple-darwin/4.0.1/../../../../arm-apple-darwin/include/CarbonCore/MachineExceptions.h:286: error: syntax error before ‘’ token /usr/local/lib/gcc/arm-apple-darwin/4.0.1/../../../../arm-apple-darwin/include/CarbonCore/MachineExceptions.h:320: error: syntax 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 main.h:2, from main.m:1: /usr/local/lib/gcc/arm-apple-darwin/4.0.1/../../../../arm-apple-darwin/include/CarbonCore/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 main.h:2, from main.m:1: /usr/local/lib/gcc/arm-apple-darwin/4.0.1/../../../../arm-apple-darwin/include/CarbonCore/fp.h:471: error: conflicting types for ‘scalb’ /usr/local/lib/gcc/arm-apple-darwin/4.0.1/../../../../arm-apple-darwin/include/CarbonCore/fp.h:885: error: conflicting types for ‘__fpclassifyd’ /usr/local/lib/gcc/arm-apple-darwin/4.0.1/../../../../arm-apple-darwin/include/architecture/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/CarbonCore/fp.h:896: error: conflicting types for ‘__fpclassifyf’ /usr/local/lib/gcc/arm-apple-darwin/4.0.1/../../../../arm-apple-darwin/include/architecture/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/CarbonCore/fp.h:908: error: conflicting types for ‘__fpclassify’ /usr/local/lib/gcc/arm-apple-darwin/4.0.1/../../../../arm-apple-darwin/include/architecture/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/CarbonCore/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 main.h:2, from main.m:1: /usr/local/lib/gcc/arm-apple-darwin/4.0.1/../../../../arm-apple-darwin/include/OSServices/OpenTransport.h:359: error: syntax 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 main.h:2, from main.m:1: /usr/local/lib/gcc/arm-apple-darwin/4.0.1/../../../../arm-apple-darwin/include/OSServices/OpenTransportProtocol.h:121: error: conflicting types for ‘uid_t’ /usr/local/lib/gcc/arm-apple-darwin/4.0.1/../../../../arm-apple-darwin/include/sys/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/OSServices/OpenTransportProtocol.h:122: error: conflicting types for ‘gid_t’ /usr/local/lib/gcc/arm-apple-darwin/4.0.1/../../../../arm-apple-darwin/include/sys/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/OSServices/OpenTransportProtocol.h:124: error: conflicting types for ‘dev_t’ /usr/local/lib/gcc/arm-apple-darwin/4.0.1/../../../../arm-apple-darwin/include/sys/types.h:97: error: previous declaration of ‘dev_t’ was here make: * [main.o] Error 1
Comment #1
Posted on May 18, 2008 by Massive LionSuggested trying using common easily available source: If I compile using the example helloworld application from www.idevdocs.com/tutorial.php?t=9 :
make /usr/local/bin/arm-apple-darwin-gcc -v -c hello.m -o hello.o Using built-in specs. Target: arm-apple-darwin Configured with: ../../llvm-gcc-4.0-iphone/configure --enable-llvm=/home/doug/iphone/llvm-svn --enable-languages=c,c++,objc,obj-c++ --target=arm-apple-darwin --enable-sjlj-exceptions --with-heavenly= --with-as=/usr/local/bin/arm-apple-darwin-as --with-ld=/usr/local/bin/arm-apple-darwin-ld --enable-wchar_t=no : (reconfigured) ../../llvm-gcc-4.0-iphone/configure --enable-llvm=/home/doug/iphone/llvm-svn --enable-languages=c,c++,objc,obj-c++ --target=arm-apple-darwin --enable-sjlj-exceptions --with-heavenly=/usr/local/share/iphone-filesystem --with-as=/usr/local/bin/arm-apple-darwin-as --with-ld=/usr/local/bin/arm-apple-darwin-ld --enable-wchar_t=no Thread model: posix gcc version 4.0.1 (Apple Computer, Inc. build 5449)(LLVM build 2.0-svn-iphone-dev-0.3-svn) /usr/local/libexec/gcc/arm-apple-darwin/4.0.1/cc1obj -quiet -v -D__DYNAMIC__ hello.m -fPIC -mmacosx-version-min=10.4 -mfpu=vfp -mcpu=arm1176jzf-s -quiet -dumpbase hello.m -auxbase-strip hello.o -version -o /tmp/ccfC2kja.s ignoring nonexistent directory "/usr/local/lib/gcc/arm-apple-darwin/4.0.1/../../../../arm-apple-darwin/sys-include" ignoring nonexistent directory "/System/Library/Frameworks" ignoring nonexistent directory "/Library/Frameworks"
include "..." search starts here:
include <...> search starts here:
/usr/local/lib/gcc/arm-apple-darwin/4.0.1/include /usr/local/lib/gcc/arm-apple-darwin/4.0.1/../../../../arm-apple-darwin/include End of search list. GNU Objective-C version 4.0.1 (Apple Computer, Inc. build 5449)(LLVM build 2.0-svn-iphone-dev-0.3-svn) (arm-apple-darwin) compiled by GNU C version 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2). GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 Compiler executable checksum: b228bfc0b1e7e126df7c3b444d63632e 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:123: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/CarbonCore/MachineExceptions.h:286: error: syntax error before ‘’ token /usr/local/lib/gcc/arm-apple-darwin/4.0.1/../../../../arm-apple-darwin/include/CarbonCore/MachineExceptions.h:320: error: syntax 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/CarbonCore/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/CarbonCore/fp.h:471: error: conflicting types for ‘scalb’ /usr/local/lib/gcc/arm-apple-darwin/4.0.1/../../../../arm-apple-darwin/include/CarbonCore/fp.h:885: error: conflicting types for ‘__fpclassifyd’ /usr/local/lib/gcc/arm-apple-darwin/4.0.1/../../../../arm-apple-darwin/include/architecture/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/CarbonCore/fp.h:896: error: conflicting types for ‘__fpclassifyf’ /usr/local/lib/gcc/arm-apple-darwin/4.0.1/../../../../arm-apple-darwin/include/architecture/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/CarbonCore/fp.h:908: error: conflicting types for ‘__fpclassify’ /usr/local/lib/gcc/arm-apple-darwin/4.0.1/../../../../arm-apple-darwin/include/architecture/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/CarbonCore/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/OSServices/OpenTransport.h:359: error: syntax 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/OSServices/OpenTransportProtocol.h:121: error: conflicting types for ‘uid_t’ /usr/local/lib/gcc/arm-apple-darwin/4.0.1/../../../../arm-apple-darwin/include/sys/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/OSServices/OpenTransportProtocol.h:122: error: conflicting types for ‘gid_t’ /usr/local/lib/gcc/arm-apple-darwin/4.0.1/../../../../arm-apple-darwin/include/sys/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/OSServices/OpenTransportProtocol.h:124: error: conflicting types for ‘dev_t’ /usr/local/lib/gcc/arm-apple-darwin/4.0.1/../../../../arm-apple-darwin/include/sys/types.h:97: error: previous declaration of ‘dev_t’ was here make: * [hello.o] Error 1
Comment #2
Posted on May 20, 2008 by Massive LionSOLVED: Similar to the error seen in error #66. Solved by:
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'.
This works the same for ubuntu 8.
Status: New
Labels:
Type-Defect
Priority-Medium