Xcode 4.2를 설치 한 라이온 (10.7.1) 시스템이 있습니다. 다음과 같이 내가 helloWorld.c
간단한 C 프로그램이 있다고 가정 :Lion 아래의 Xcode 4.2에 PPC/PPC64 지원을 다시 추가하려면 어떻게합니까?
#include <stdio.h>
main() {
printf("hello, world\n");
}
이 설정을 사용하여, 나는 PPC 및 PPC64 아키텍처, 예에서 사용하기 위해 helloWorld.c
을 컴파일하려고 싶습니다 :
$ gcc -arch ppc helloWorld.c -o helloWorld
이 다음과 같은 오류 메시지가 있습니다 :
llvm-gcc-4.2: error trying to exec '/usr/bin/../llvm-gcc-4.2/bin/powerpc-apple-darwin11-llvm-gcc-4.2': execvp: No such file or directory
어떻게 내 엑스 코드 4 설치에 파워에 대한 지원을 복원 할를?
this previous Stack Overflow post에 설명 된 지시 사항을 시도했지만 본 지침은 제 Lion 설치에 작동하지 않습니다.
나는 Xcode 3.2.6 installer located on Apple's dev site을 사용하고 있습니다.
심볼릭 링크에서 10.6 설치에는 해당 지시 사항이 사용되지만 10.7에는 적용되지 않는다고 생각됩니다.
Xcode 3.2.6 설치의 소스 파일과 디렉토리 중 일부는 심볼릭 링크를 만들 수 없거나 Xcode 3 설치의 다른 위치에 있습니다. 예를 들어, as
바이너리를 연결할 /Xcode3/usr/bin
디렉토리가 없습니다.
Lion 시스템에서 PPC 및 PPC64 바이너리를 컴파일하는 사람이 있습니까?
현상금을 수령하려면 합리적으로 자세한 답변을 작성하십시오. 나는 자신을 위해서뿐만 아니라 후손을 위해서도. :)
편집 -
2011 8월 31일 그래서 나는 로랑가 지적하고 더 함께있어 수정을 시도했지만이 작업 PPC 지원을받을 충분하지 않았다.
$ gcc -arch ppc helloWorld.c -o helloWorld
powerpc-apple-darwin11-llvm-gcc-4.2: 2: No such file or directory
In file included from /usr/include/stdio.h:64,
from helloWorld.c:1:
/usr/include/sys/cdefs.h:540:4: error: #error Unknown architecture
In file included from /usr/include/sys/_types.h:33,
from /usr/include/_types.h:27,
from /usr/include/stdio.h:67,
from helloWorld.c:1:
/usr/include/machine/_types.h:36:2: error: #error architecture not supported
In file included from /usr/include/_types.h:27,
from /usr/include/stdio.h:67,
from helloWorld.c:1:
/usr/include/sys/_types.h:94: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__darwin_blkcnt_t’
/usr/include/sys/_types.h:95: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__darwin_blksize_t’
/usr/include/sys/_types.h:96: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__darwin_dev_t’
/usr/include/sys/_types.h:99: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__darwin_gid_t’
/usr/include/sys/_types.h:100: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__darwin_id_t’
/usr/include/sys/_types.h:101: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__darwin_ino64_t’
/usr/include/sys/_types.h:103: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__darwin_ino_t’
/usr/include/sys/_types.h:107: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__darwin_mach_port_name_t’
/usr/include/sys/_types.h:108: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__darwin_mach_port_t’
/usr/include/sys/_types.h:109: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__darwin_mode_t’
/usr/include/sys/_types.h:110: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__darwin_off_t’
/usr/include/sys/_types.h:111: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__darwin_pid_t’
/usr/include/sys/_types.h:131: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__darwin_sigset_t’
/usr/include/sys/_types.h:132: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__darwin_suseconds_t’
/usr/include/sys/_types.h:133: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__darwin_uid_t’
/usr/include/sys/_types.h:134: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__darwin_useconds_t’
...
/usr/include/secure/_stdio.h:62: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__DARWIN_LDBL_COMPAT’
/usr/include/secure/_stdio.h:67: error: expected declaration specifiers or ‘...’ before ‘size_t’
/usr/include/secure/_stdio.h:67: error: expected declaration specifiers or ‘...’ before ‘size_t’
/usr/include/secure/_stdio.h:68: error: expected declaration specifiers or ‘...’ before ‘va_list’
/usr/include/secure/_stdio.h:69: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__DARWIN_LDBL_COMPAT’
helloWorld.c:3: error: expected declaration specifiers before ‘main’
helloWorld.c:5: error: old-style parameter declarations in prototyped function definition
/usr/include/stdio.h:252: error: parameter name omitted
/usr/include/stdio.h:252: error: parameter name omitted
helloWorld.c:5: error: expected ‘{’ at end of input
: 내 테스트 응용 프로그램을 컴파일하려고
$ sudo ln -s /Xcode3/usr/llvm-gcc-4.2/bin/powerpc-apple-darwin10-llvm-gcc-4.2 /usr/llvm-gcc-4.2/bin/powerpc-apple-darwin10-llvm-gcc-4.2
$ sudo ln -s /Xcode3/usr/llvm-gcc-4.2/bin/powerpc-apple-darwin10-llvm-g++-4.2 /usr/llvm-gcc-4.2/bin/powerpc-apple-darwin10-llvm-g++-4.2
$ sudo ln -s /Xcode3/usr/llvm-gcc-4.2/bin/powerpc-apple-darwin10-llvm-gcc-4.2 /usr/llvm-gcc-4.2/bin/powerpc-apple-darwin11-llvm-gcc-4.2
$ sudo ln -s /Xcode3/usr/llvm-gcc-4.2/bin/powerpc-apple-darwin10-llvm-g++-4.2 /usr/llvm-gcc-4.2/bin/powerpc-apple-darwin11-llvm-g++-4.2
, 나는 많은 오류를 얻을 :
나는 그것을 필요로하는 자원을 찾는 함께gcc
을 도우려고하는 심볼릭 링크를 추가
아마도 Xcode3 헤더를 가리 키도록 컴파일 옵션을 추가해야하지만, /Xcode3/usr/include
을보고 있는데 거기에는별로 없습니다.
명령 줄에서 기본 SDK 및/또는 GCC 버전 ("-sdk /Developer/SDKs/MacOSX10.5.sdk", "GCC_VERSION = 4.2")을 지정하려고 할 수 있습니까? 이렇게하면 LLVM/GCC 브릿지 대신 GCC를 사용하게됩니다. –
명령 줄을 사용하고 있습니다. 'export GCC_VERSION = 4.2;를 지정합니다. gcc -arch ppc -sdk /Developer/SDKs/MacOSX10.5.sdk helloWorld.c -o helloWorld' 같은 오류가 발생합니다. –
실수로 GCC_VERSION = 4.2는 xcodebuild를 사용할 때만 작동합니다. 컴파일러 CC = gcc-4.2 또는 CC =/usr/bin/gcc-4.2를 명시 적으로 지정할 수 있습니까? –