2017-12-06 10 views
1

現在、スレッドビルディングブロックに依存するOpenVDBをコンパイルしようとしています。第2、第3の引数として、要するにインテルスレッディングビルディングブロックでコンパイルするとエラーオペランド?:

In file included from /usr/include/tbb/enumerable_thread_specific.h:32:0, 
      from ../openvdb/tools/Morphology.h:59, 
      from ../openvdb/tools/MultiResGrid.h:64, 
      from cmd/openvdb_lod/main.cc:32: 
/usr/include/tbb/concurrent_vector.h: In member function ‘tbb::concurrent_vector<T, A>::iterator tbb::concurrent_vector<T, A>::grow_by(tbb::concurrent_vector<T, A>::size_type)’: 
/usr/include/tbb/concurrent_vector.h:667:38: error: operands to ?: have different types ‘tbb::internal::concurrent_vector_base_v3::size_type {aka long unsigned int}’ and ‘tbb::atomic<long unsigned int>’ 
    return iterator(*this, delta ? internal_grow_by(delta, sizeof(T), &initialize_array, NULL) : my_early_size); 
          ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
/usr/include/tbb/concurrent_vector.h:667:38: note: and each type can be converted to the other 
/usr/include/tbb/concurrent_vector.h: In member function ‘tbb::concurrent_vector<T, A>::iterator tbb::concurrent_vector<T, A>::grow_by(tbb::concurrent_vector<T, A>::size_type, tbb::concurrent_vector<T, A>::const_reference)’: 
/usr/include/tbb/concurrent_vector.h:680:38: error: operands to ?: have different types ‘tbb::internal::concurrent_vector_base_v3::size_type {aka long unsigned int}’ and ‘tbb::atomic<long unsigned int>’ 
    return iterator(*this, delta ? internal_grow_by(delta, sizeof(T), &initialize_array_by, static_cast<const void*>(&t)) : my_early_size); 
          ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
/usr/include/tbb/concurrent_vector.h:680:38: note: and each type can be converted to the other 
make: *** [vdb_lod] Error 1 

:私は次のエラーを取得する?演算子は、コンパイラがリターンとして使用するタイプを知らないで、一つのベースタイプとtbb::atomicに包まれた同じベース型を取得します値。

言うまでもなく、私はそのソースコードを変更するつもりはありません。彼らは確立された製品なので、私はコンパイル時に何か間違っていると言っても過言ではありません。

TBBライブラリファイルは、GCCの古いバージョンである4.7でビルドされているようです。私はもともとGCC 7.2.0を使用していたことが問題だと思っていたので、GCC 4.8.5のような別のバージョンを試しましたが、エラーはそのままです。

私は管理者権限を持っていない会社で働いていますので、特に試してみませんでした.GCCのローカルインストールを避けようとしています。特にGCCがここでも問題であるかどうかは分かりません。

誰かがその修正を知っていますか?

編集:https://software.intel.com/en-us/forums/intel-threading-building-blocks/topic/417161はほぼ同じ問題と思われ、Intelの従業員はそこに変更があったと指摘しました。しかし、その投稿は2013年からのもので、人々はTBBを使っていたので、私は一般的に違う何かがなければなりません。

+0

"彼らは確立された製品なので、私はコンパイル時に何か間違っていると言っても過言ではありません。" - ああ、若者の誠実さ。 :-Dこれは、新しいコンパイラバージョンでは、確立されたコードベースで古い問題が起こらないことは初めてではありません... – DevSolar

答えて

関連する問題