待っているだけではしょうがないので、だめもとでソースコードに手を入れてみる。先ほどのエラーメッセージを見ると、
source/server/SC_ComPort.cpp:44: error: conflicting declaration 'typedef int socklen_t'
/usr/include/sys/socket.h:99: error: 'socklen_t' has a previous declaration as 'typedef __darwin_socklen_t socklen_t'
source/server/SC_ComPort.cpp:44: error: declaration of 'typedef int socklen_t'
/usr/include/sys/socket.h:99: error: conflicts with previous declaration 'typedef __darwin_socklen_t socklen_t'
source/server/SC_ComPort.cpp:44: error: declaration of 'typedef int socklen_t'
/usr/include/sys/socket.h:99: error: conflicts with previous declaration 'typedef __darwin_socklen_t socklen_t'
...failed CompileCplusplus /usr/src/SuperCollider3/build/xSC3synth.build/libscsynth.build/Objects-normal/ppc/SC_ComPort.o ...
** BUILD FAILED **
という感じで、typedefが間違っているっぽいので、 SuperCollider3/source/server/SC_ComPort.cppの44行目の
typedef int socklen_t;
の部分を
/* typedef int socklen_t; */
typedef __darwin_socklen_t socklen_t;
を書き直して、再度
./compile-xcode.sh
を実行してみる。おお、ちゃんと通るじゃない。あってるかどうかわからないけど(^^;)。でも、今度は別なことでこける。synth部分をまとめる際にlibstdc++.aがないといっている。
StaticLibrary.LinkUsingFileList /usr/src/SuperCollider3/build/libscsynth.a
( /usr/bin/libtool -o /usr/src/SuperCollider3/build/libscsynth.a "-L/usr/src/SuperCollider3/build" -filelist /usr/src/SuperCollider3/build/xSC3synth.build/libscsynth.build/Objects-normal/LinkFileList "/usr/lib/libstdc++.a" "-static" "/usr/local/lib/libsndfile.a" && /usr/bin/ranlib /usr/src/SuperCollider3/build/libscsynth.a )
/usr/bin/libtool: can't open file: /usr/lib/libstdc++.a (No such file or directory)
...failed StaticLibrary.LinkUsingFileList /usr/src/SuperCollider3/build/libscsynth.a ...
** BUILD FAILED **
libstdc++.aって基本ファイルじゃないの?!と思いつつgoogleで検索してみると、このことに関してのAppleの記述が。
http://developer.apple.com/qa/qa2005/qa1428.html
ということらしい。なので、xSC3synth.pbprojをXcodeで開いてlibstdc++.aのエントリを選んでdeleteキーで削除後、再度
./compile-xcode.sh
を実行してみる。synth部分に関してはクリア:)。
一安心、と思ったら今度はpluginのMacUGensコンパイルでこけている…。
=== BUILDING LIBRARY TARGET MacUGens USING BUILD STYLE Deployment ===
/Developer/Private/jam -d2 -j1 JAMBASE=/Developer/Makefiles/pbx_jamfiles/ProjectBuilderJambase JAMFILE=- build ACTION=build _DEFAULT_GCC_VERSION=4.0 BUILD_STYLE=Deployment CPP_HEADERMAP_FILE=/usr/src/SuperCollider3/build/xSC3plugins.build/MacUGens.build/MacUGens.scx.hmap SRCROOT=/usr/src/SuperCollider3 OBJROOT=/usr/src/SuperCollider3/build SYMROOT=/usr/src/SuperCollider3/build DSTROOT=/tmp/xSC3plugins.dst
Mkdir /usr/src/SuperCollider3/build/xSC3plugins.build/MacUGens.build/Objects-normal/ppc
/bin/mkdir -p /usr/src/SuperCollider3/build/xSC3plugins.build/MacUGens.build/Objects-normal/ppc
CompileCplusplus /usr/src/SuperCollider3/build/xSC3plugins.build/MacUGens.build/Objects-normal/ppc/MacUGens.o
/usr/bin/g++-4.0 -c -I/usr/src/SuperCollider3/build/xSC3plugins.build/MacUGens.build/MacUGens.scx.hmap -F/usr/src/SuperCollider3/build -I/usr/src/SuperCollider3/build/include -Isource/plugins -arch ppc -fno-common -fpascal-strings -O3 -faltivec -Wmost -Wno-four-char-constants -Wno-unknown-pragmas -pipe "-fmessage-length=0" -g "-DSC_DARWIN" source/plugins/MacUGens.cpp -o /usr/src/SuperCollider3/build/xSC3plugins.build/MacUGens.build/Objects-normal/ppc/MacUGens.o
source/plugins/MacUGens.cpp: In function `void* gstate_update_func(void*)':
source/plugins/MacUGens.cpp:86: error: 'usleep' was not declared in this scope
...failed CompileCplusplus /usr/src/SuperCollider3/build/xSC3plugins.build/MacUGens.build/Objects-normal/ppc/MacUGens.o ...
** BUILD FAILED **
SuperCollider3/source/plugins/MacUGens.cppの86行目に使われているusleep関数が宣言されていない、という。うううん。
grep usleep /usr/include/*.h
を実行すると、unistd.hにusleepが宣言されていることがわかる。で、MacUGens.cppをみると、unistd.hが含まれていないので、23行目の
#include <Carbon/Carbon.h>
の後に
#include <unistd.h>
を追加して、再度
./compile-xcode.sh
を実行したら通りました:)。で、続いてlang部分になるわけだけど、やはり同じように
building sclang
=== BUILDING APPLICATION TARGET SuperCollider USING BUILD STYLE Deployment ===
/Developer/Private/jam -d2 -j1 JAMBASE=/Developer/Makefiles/pbx_jamfiles/ProjectBuilderJambase JAMFILE=- build ACTION=build _DEFAULT_GCC_VERSION=4.0 BUILD_STYLE=Deployment CPP_HEADERMAP_FILE=/usr/src/SuperCollider3/build/xSC3lang.build/SuperCollider.build/SuperCollider.hmap SRCROOT=/usr/src/SuperCollider3 OBJROOT=/usr/src/SuperCollider3/build SYMROOT=/usr/src/SuperCollider3/build DSTROOT=/tmp/xSC3lang.dst
Missing file or directory: /usr/lib/libstdc++.a
=== BUILDING TOOL TARGET sclang USING BUILD STYLE Deployment ===
/Developer/Private/jam -d2 -j1 JAMBASE=/Developer/Makefiles/pbx_jamfiles/ProjectBuilderJambase JAMFILE=- build ACTION=build _DEFAULT_GCC_VERSION=4.0 BUILD_STYLE=Deployment CPP_HEADERMAP_FILE=/usr/src/SuperCollider3/build/xSC3lang.build/sclang.build/sclang.hmap SRCROOT=/usr/src/SuperCollider3 OBJROOT=/usr/src/SuperCollider3/build SYMROOT=/usr/src/SuperCollider3/build DSTROOT=/tmp/xSC3lang.dst
Missing file or directory: /usr/lib/libstdc++.a
** BUILD FAILED **
と、libstdc++.aがないといわれるので、xSC3lang.pbprojをXcodeで開いてlibstdc++.aの部分を先ほどと同じように削除して、再びコンパイル開始。
しばらくさくさく通っていたんだけど、またこけてしまう…。
CompileCplusplus /usr/src/SuperCollider3/build/xSC3lang.build/SuperCollider.build/Objects-normal/ppc/PyrArchiver.o
/usr/bin/g++-4.0 -c -I/usr/src/SuperCollider3/build/xSC3lang.build/SuperCollider.build/SuperCollider.hmap -F/usr/src/SuperCollider3/build -F/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks -I/usr/src/SuperCollider3/build/include -Isource/lang/LangPrimSource -arch ppc -fno-common -fpascal-strings -O3 -Wmost -Wno-four-char-constants -Wno-unknown-pragmas -pipe "-fmessage-length=0" -mdynamic-no-pic -g "-DSC_DARWIN" "-Wstrict-aliasing" source/lang/LangPrimSource/PyrArchiver.cpp -o /usr/src/SuperCollider3/build/xSC3lang.build/SuperCollider.build/Objects-normal/ppc/PyrArchiver.o
/usr/src/SuperCollider3/headers/lang/ReadWriteMacros.h:292: error: explicit specialization of 'void SC_IOStream<FILE*>::readData(char*, int)' must be introduced by `template <>'
/usr/src/SuperCollider3/headers/lang/ReadWriteMacros.h:292: error: template-id 'readData<>' for 'void SC_IOStream<FILE*>::readData(char*, int)' does not match any template declaration
/usr/src/SuperCollider3/headers/lang/ReadWriteMacros.h:292: error: invalid function declaration
/usr/src/SuperCollider3/headers/lang/ReadWriteMacros.h:297: error: explicit specialization of 'uint8 SC_IOStream<FILE*>::readUInt8()' must be introduced by `template <>'
/usr/src/SuperCollider3/headers/lang/ReadWriteMacros.h:297: error: template-id 'readUInt8<>' for 'uint8 SC_IOStream<FILE*>::readUInt8()' does not match any template declaration
/usr/src/SuperCollider3/headers/lang/ReadWriteMacros.h:297: error: invalid function declaration
/usr/src/SuperCollider3/headers/lang/ReadWriteMacros.h:302: error: explicit specialization of 'void SC_IOStream<FILE*>::writeData(char*, int)' must be introduced by `template <>'
/usr/src/SuperCollider3/headers/lang/ReadWriteMacros.h:302: error: template-id 'writeData<>' for 'void SC_IOStream<FILE*>::writeData(char*, int)' does not match any template declaration
/usr/src/SuperCollider3/headers/lang/ReadWriteMacros.h:302: error: invalid function declaration
/usr/src/SuperCollider3/headers/lang/ReadWriteMacros.h:307: error: explicit specialization of 'void SC_IOStream<FILE*>::writeUInt8(uint8)' must be introduced by `template <>'
/usr/src/SuperCollider3/headers/lang/ReadWriteMacros.h:307: error: template-id 'writeUInt8<>' for 'void SC_IOStream<FILE*>::writeUInt8(uint8)' does not match any template declaration
/usr/src/SuperCollider3/headers/lang/ReadWriteMacros.h:307: error: invalid function declaration
/usr/src/SuperCollider3/headers/lang/ReadWriteMacros.h:313: error: explicit specialization of 'void SC_IOStream<char*>::readData(char*, int)' must be introduced by `template <>'
/usr/src/SuperCollider3/headers/lang/ReadWriteMacros.h:313: error: template-id 'readData<>' for 'void SC_IOStream<char*>::readData(char*, int)' does not match any template declaration
/usr/src/SuperCollider3/headers/lang/ReadWriteMacros.h:313: error: invalid function declaration
/usr/src/SuperCollider3/headers/lang/ReadWriteMacros.h:318: error: explicit specialization of 'uint8 SC_IOStream<char*>::readUInt8()' must be introduced by `template <>'
/usr/src/SuperCollider3/headers/lang/ReadWriteMacros.h:318: error: template-id 'readUInt8<>' for 'uint8 SC_IOStream<char*>::readUInt8()' does not match any template declaration
/usr/src/SuperCollider3/headers/lang/ReadWriteMacros.h:318: error: invalid function declaration
/usr/src/SuperCollider3/headers/lang/ReadWriteMacros.h:323: error: explicit specialization of 'void SC_IOStream<char*>::writeData(char*, int)' must be introduced by `template <>'
/usr/src/SuperCollider3/headers/lang/ReadWriteMacros.h:323: error: template-id 'writeData<>' for 'void SC_IOStream<char*>::writeData(char*, int)' does not match any template declaration
/usr/src/SuperCollider3/headers/lang/ReadWriteMacros.h:323: error: invalid function declaration
/usr/src/SuperCollider3/headers/lang/ReadWriteMacros.h:329: error: explicit specialization of 'void SC_IOStream<char*>::writeUInt8(uint8)' must be introduced by `template <>'
/usr/src/SuperCollider3/headers/lang/ReadWriteMacros.h:329: error: template-id 'writeUInt8<>' for 'void SC_IOStrea<char*>::writeUInt8(uint8)' does not match any template declaration
/usr/src/SuperCollider3/headers/lang/ReadWriteMacros.h:329: error: invalid function declaration
...failed CompileCplusplus /usr/src/SuperCollider3/build/xSC3lang.build/SuperCollider.build/Objects-normal/ppc/PyrArchiver.o ...
** BUILD FAILED **
うううむ。いったん休憩…。