Community
cancel
Showing results for 
Search instead for 
Did you mean: 
489 Views

TBB compile error: operands to ?: have different types

I'm currently trying to compile OpenVDB which depends on TBB. I get the following error within the process:

 

/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

 

I had the idea that my GCC version was not compatible for some reasons, since I use gcc 7.2.0 and TBB mentions gcc 4.7. I don't have a version of gcc 4.7 installed and I'm hesitant to install it since I work in a company where I don't have admin rights and I want it to work on any account.

Also, I tried going for a different lower version of GCC, which then does not work with other dependencies. In any case, I'd like to ask if GCC can even be the problem here before using too much energy on that when it is not the actual problem.

 

 

0 Kudos
1 Reply
Alexei_K_Intel
Employee
489 Views

Looks like your version TBB is outdated. Fedora 26 (gcc 7.2.1) is officially supported. Moreover, the code is different near mentioned lines (concurrent_vector.h:667).

Regards,
Alex

Reply