バックグラウンド
私はiPhoneを含むいくつかの異なる電話を対象としたプログラムを書いています。プログラムは、いくつかのサードパーティライブラリに依存しています。iPhoneとiPhoneシミュレーター用にこれらのサードパーティライブラリをクロスコンパイルするのに問題があります。ライブラリには、Apache Portable RuntimeとGNUTLS、およびそれらの依存関係が含まれています。ビルドされたライブラリのプレフィックスを「/opt/iphone-3.1」、「/ opt / iphone-3.0」、「/ opt / iphone-2.2.1」、「/ opt/iphone-simulator-3.1」にします。 「」、「/ opt/iphone-simulator-3.0」。
クロスコンパイルプロセスを簡単に再現できるようにするために、ターゲットプラットフォームごとに「configure」スクリプトを呼び出すスクリプトを作成しています(「iphone3.1-configure」、「iphone3.0-configure」、「iphone2.2.1」)。 -configure "、" iphonesim3.1-configure "、および" iphonesim3.0-configure ")。これは私が問題を抱えているところです。
公式のXcode3.2+ iPhoneSDK3.1を搭載したMacOSX 10.6SnowLeopardコンピューターを使用しています。
状態
私は現在、次の「iphone3.1-configure」スクリプトを持っています。
#!/ bin / bash # #プログラム:iphone3.1-設定 #著者:マイケル・アーロン・サフィアン #あらすじ: #このプログラムは、によって生成された「構成」スクリプトを実行します #サードパーティのライブラリをクロスコンパイルするためのGNU Autotools #iPhone3.1SDKの場合。ディレクトリ内でこのスクリプトを実行する #autotoolsの「configure」スクリプトが含まれています。実行すると、これ #「make」と「sudomakeinstall」を使用してライブラリをビルドできます。 #「/ opt /iphone-3.1/」のインストールプレフィックスが使用されます。 # CPATHの設定を解除 C_INCLUDE_PATHの設定を解除します CPLUS_INCLUDE_PATHの設定を解除します OBJC_INCLUDE_PATHの設定を解除します 未設定のLIBS DYLD_FALLBACK_LIBRARY_PATHの設定を解除します DYLD_FALLBACK_FRAMEWORK_PATHの設定を解除します エクスポートBUILD_DARWIN_VER=`uname -r` SDKVER="3.1"をエクスポートします export DEVROOT = "/ Developer / Platforms / iPhoneOS.platform / Developer" SDKROOT = "$ DEVROOT / SDKs / iPhoneOS$SDKVER.sdk"をエクスポートします export PKG_CONFIG_PATH = / Developer / Platforms / iPhoneOS.platform / Developer / SDKs / iPhoneOS $ SDKVER.sdk / usr / lib / pkgconfig:/ Developer / Platforms / iPhoneOS.platform / Developer / usr / lib / pkgconfig:/ opt / iphone- $ SDKVER / lib / pkgconfig:/ usr / local / iphone-$ SDKVER / lib / pkgconfig PREFIX = "/ opt / iphone-$SDKVER"をエクスポートします AS = "$ DEVROOT / usr / bin/as"をエクスポートします ASCPP = "$ DEVROOT / usr / bin/as"をエクスポートします エクスポートAR="$ DEVROOT / usr / bin / ar" RANLIB = "$ DEVROOT / usr / bin/ranlib"をエクスポートします export CPPFLAGS = "-std = c99 -arch armv6 -pipe -no-cpp-precomp --sysroot ='$ SDKROOT' -isystem $ SDKROOT / usr / include -isystem $ DEVROOT / usr / include -isystem / opt / iphone- $ SDKVER / include -isystem / usr / local / iphone- $ SDKVER / include " export CFLAGS = "-std = c99 -arch armv6 -pipe -no-cpp-precomp --sysroot ='$ SDKROOT' -isystem $ SDKROOT / usr / include -isystem $ DEVROOT / usr / include -isystem / opt / iphone- $ SDKVER / include -isystem / usr / local / iphone- $ SDKVER / include " export CXXFLAGS = "-std = c99 -arch armv6 -pipe -no-cpp-precomp --sysroot ='$ SDKROOT' -isystem $ SDKROOT / usr / include -isystem $ DEVROOT / usr / include -isystem / opt / iphone- $ SDKVER / include -isystem / usr / local / iphone- $ SDKVER / include " export LDFLAGS = "-arch armv6 --sysroot ='$ SDKROOT' -L $ SDKROOT / usr / lib -L $ DEVROOT / usr / lib -L / opt / iphone- $ SDKVER / lib -L / usr / local / iphone -$ SDKVER / lib " CPP = "$ DEVROOT / usr / bin/cpp-4.2"をエクスポートします エクスポートCC="$ DEVROOT / usr / bin / gcc-4.2" CXX = "$ DEVROOT / usr / bin /g++-4.2"をエクスポートします エクスポートLD="$ DEVROOT / usr / bin / ld" もしも [ !\(-d "$ DEVROOT" \)]; それから echo"iPhoneSDKが見つかりませんでした。フォルダ\"$DEVROOT\"が存在しません。" 出口1 fi もしも [ !\(-d "$ SDKROOT" \)]; それから echo"iPhoneSDKが見つかりませんでした。フォルダ\"$SDKROOT\"は存在しません。" 出口1 fi ./configure --prefix = "$ PREFIX" --build = "i386-apple-darwin $ BUILD_DARWIN_VER" --host = "arm-apple-darwin9" --enable-static --disable-shared $ @
「apr-1.3.8」フォルダで「iphone3.1-configure--disable-dso」を実行していて、次のようになっています。
ビルドシステムタイプを確認しています...i386-apple-darwin10.0.0 ホストシステムタイプをチェックしています...arm-apple-darwin9 ターゲットシステムタイプをチェックしています...arm-apple-darwin9 APRライブラリの構成 プラットフォーム:arm-apple-darwin9 動作していることを確認していますmkdir-p...はい APRバージョン:1.3.8 選択したレイアウトを確認しています...4月 arm-apple-darwin9-gccをチェックしています.../Developer / Platforms / iPhoneOS.platform / Developer / usr / bin / gcc-4.2 Cコンパイラのデフォルトの出力ファイル名をチェックしています...a.out Cコンパイラが機能するかどうかを確認しています...はい クロスコンパイルしているかどうかを確認しています...はい 実行可能ファイルのサフィックスをチェックしています... オブジェクトファイルのサフィックスをチェックしています...o GNUCコンパイラを使用しているかどうかを確認しています...はい /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2が-gを受け入れるかどうかを確認しています...はい /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2オプションをチェックしてISOC89を受け入れます...サポートされていません arm-apple-darwin9のAPRヒントファイルルールを適用する CPPFLAGSに「-DDARWIN」を追加 CPPFLAGSに「-DSIGPROCMASK_SETS_THREAD_MASK」を追加 apr_posixsem_is_globalを「yes」に設定する ac_cv_func_kqueueを「no」に設定する ac_cv_func_pollを「no」に設定する (デフォルトはUNIXになります) makeが$(MAKE)を設定するかどうかを確認しています...はい Cプリプロセッサの実行方法を確認しています.../Developer / Platforms / iPhoneOS.platform / Developer / usr / bin / cpp-4.2 構成:エラー: `/Users/michaelsafyan/Downloads/apr-1.3.8': configure:エラー:Cプリプロセッサ「/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/cpp-4.2」が健全性チェックに失敗する 詳細については、`config.log'を参照してください。
「config.log」の関連部分は次のとおりです。
configure:7710:Cプリプロセッサの実行方法を確認する configure:7828:結果:/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/cpp-4.2 configure:7857:/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/cpp-4.2 -std = c99 -arch armv6 -pipe -no-cpp-precomp --sysroot ='/ Developer / Platforms / iPhoneOS.platform /Developer/SDKs/iPhoneOS3.1.sdk'-isystem /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.1.sdk/usr/include -isystem /Developer/Platforms/iPhoneOS.platform/Developer/usr/ include -isystem /opt/iphone-3.1/include -isystem /usr/local/iphone-3.1/include -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK conftest.c cpp-4.2:'cc1'を実行しようとしてエラーが発生しました:execvp:そのようなファイルまたはディレクトリはありません configure:7864:$?= 1 configure:失敗したプログラムは: | /*confdefs.h。* / | #define PACKAGE_NAME "" | #define PACKAGE_TARNAME "" | #define PACKAGE_VERSION "" | #define PACKAGE_STRING "" | #define PACKAGE_BUGREPORT "" | /*confdefs.hを終了します。* / | #ifdef __STDC__ | # 含む | #そうしないと | # 含む | #endif | 構文エラー configure:7857:/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/cpp-4.2 -std = c99 -arch armv6 -pipe -no-cpp-precomp --sysroot ='/ Developer / Platforms / iPhoneOS.platform /Developer/SDKs/iPhoneOS3.1.sdk'-isystem /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.1.sdk/usr/include -isystem /Developer/Platforms/iPhoneOS.platform/Developer/usr/ include -isystem /opt/iphone-3.1/include -isystem /usr/local/iphone-3.1/include -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK conftest.c cpp-4.2:'cc1'を実行しようとしてエラーが発生しました:execvp:そのようなファイルまたはディレクトリはありません configure:7864:$?= 1 configure:失敗したプログラムは: | /*confdefs.h。* / | #define PACKAGE_NAME "" | #define PACKAGE_TARNAME "" | #define PACKAGE_VERSION "" | #define PACKAGE_STRING "" | #define PACKAGE_BUGREPORT "" | /*confdefs.hを終了します。* / | #ifdef __STDC__ | # 含む | #そうしないと | # 含む | #endif | 構文エラー configure:7926:エラー: `/ Users / michaelsafyan / Downloads / apr-1.3.8'内: configure:7929:エラー:Cプリプロセッサ「/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/cpp-4.2」が健全性チェックに失敗します 詳細については、`config.log'を参照してください。
質問
「iphone3.1-configure」スクリプトを修正するにはどうすればよいですか?ありがとう。