私のMacのコードをLinuxホストにコンパイルするためにdistccを使いたいのですが、すべてを "ラインアップ"にする。私は正常にMacからMacへのdistccを使用したので、私はものを設定する方法の一般的な考えがあります。clangとdistccを使って別のアーキテクチャのスレーブでコンパイルする方法(例:mac/linux)
私はclang 4.0を使用しており、MacとLinuxの両方にインストールされ、動作しています。次のコマンドは、先頭にdistcc
せずに罰金コンパイルが、distccのを追加した後、私は次の問題を得る:
distcc /Users/xaxxon/Downloads/clang+llvm-4.0.0-x86_64-apple-darwin/bin/clang++ -I/usr/local/include -I/Users/xaxxon/v8toolkit/./include -I/Users/xaxxon/v8/include -stdlib=libc++ -g -Werror=return-type -g -std=gnu++1z -o CMakeFiles/v8toolkit_static.dir/src/v8toolkit.cpp.o -c /Users/xaxxon/v8toolkit/src/v8toolkit.cpp
私は何のコンパイラは、Linux上でピックアップされ、またどのように私が知っているかわかりません調べる。それはclangの代わりにgccを取得する可能性があります。
私の最初の懸念はこれです:
clang: warning: argument unused during compilation: '-stdlib=libc++'
私の最初のエラーは、次のとおりです。
In file included from /Users/xaxxon/v8toolkit/src/v8toolkit.cpp:5:
In file included from /usr/include/assert.h:44:
In file included from /Users/xaxxon/Downloads/clang+llvm-4.0.0-x86_64-apple-darwin/bin/../include/c++/v1/stdlib.h:94:
/usr/include/stdlib.h:250:20: error: blocks support disabled - compile with -fblocks or pick a deployment target that supports them
int atexit_b(void (^)(void)) __attribute__((availability(macosx,introduced=10.6)));
私は手動でコンパイルコマンドに-fblocksを追加した場合、最初のエラーになり、私は(取得、次のエラー(ネイティブのMacビルドに必要とされていない)である:私はSをやっている場合
/Users/xaxxon/Downloads/clang+llvm-4.0.0-x86_64-apple-darwin/bin/../include/c++/v1/__tuple:289:13: error: unknown type name '__type_pack_element'
typedef __type_pack_element<_Ip, _Types...> type;
^
/Users/xaxxon/Downloads/clang+llvm-4.0.0-x86_64-apple-darwin/bin/../include/c++/v1/__tuple:289:32: error: expected member name or ';' after declaration specifiers
typedef __type_pack_element<_Ip, _Types...> type;
~~~~~~~~~~~~~~~~~~~~~~~~~~~^
/Users/xaxxon/Downloads/clang+llvm-4.0.0-x86_64-apple-darwin/bin/../include/c++/v1/__tuple:356:43: error: use of undeclared identifier '__type_pack_element'
typename _ApplyFn::template __apply<__type_pack_element<_Idx, _Types...>>...
^
/Users/xaxxon/Downloads/clang+llvm-4.0.0-x86_64-apple-darwin/bin/../include/c++/v1/__tuple:357:6: error: expected a type
>;
私は理解していません何か根本的に間違っているか、Linuxコンパイラの動作が異なっている、私が見逃している小さなものがあるかどうか。
ありがとうございました。
編集:Linux上で同じ名前のディレクトリにclangを持っていることを確認しましたが、現在は-fblocks
とunused during compilation -stdlib=libc++
という問題が発生しています。
EDIT2:私はすべてが(警告とはいえ)をコンパイルするために取得することができ、それがリンクしたときに、私が取得:
ld: warning: ignoring file CMakeFiles/v8toolkit_shared.dir/src/debugger.cpp.o, file was built for
unsupported file format (0x7F 0x45 0x4C 0x46 0x02 0x01 0x01 0x00 0x00 0x00
0x00 0x00 0x00 0x00 0x00 0x00) which is not the architecture being linked
(x86_64): CMakeFiles/v8toolkit_shared.dir/src/debugger.cpp.o