I am attempting to build a program called Mitsuba with icc. But when I compile, I get lots of errors saying that a type is incomplete. Here are a few examples:
icc -o build/release/libcore/thread.os -c -O3 -Wall -g -pipe -O3 -ipo -no-prec-div -xSSE3 -fp-model fast=2 -openmp -mfpmath=sse -march=nocona -fno-math-errno -fomit-frame-pointer -DMTS_DEBUG -DSINGLE_PRECISION -DSPECTRUM_SAMPLES=3 -DMTS_SSE -DMTS_HAS_COHERENT_RT -fopenmp -fvisibility=hidden -std=c++0x -wd2928 -Qoption,cpp,--rvalue_ctor_is_not_copy_ctor -fPIC -DMTS_BUILD_MODULE=MTS_MODULE_CORE -DMTS_HAS_LIBPNG=1 -DMTS_HAS_LIBJPEG=1 -I/usr/include/OpenEXR -I/u/i/n/ingrassi/eigen -I/usr/include/OpenEXR -Iinclude src/libcore/thread.cpp
/usr/include/c++/4.4.7/bits/stl_deque.h(450): error: incomplete type is not allowed
_M_impl._Tp_alloc_type::deallocate(__p, __deque_buf_size(sizeof(_Tp)));
^
detected during:
instantiation of "void std::_Deque_base<_Tp, _Alloc>::_M_deallocate_node(_Tp *) [with _Tp=boost::filesystem3::path, _Alloc=std::allocator<boost::filesystem3::path>]" at line 553
instantiation of "void std::_Deque_base<_Tp, _Alloc>::_M_destroy_nodes(_Tp **, _Tp **) [with _Tp=boost::filesystem3::path, _Alloc=std::allocator<boost::filesystem3::path>]" at line 476
instantiation of "std::_Deque_base<_Tp, _Alloc>::~_Deque_base() [with _Tp=boost::filesystem3::path, _Alloc=std::allocator<boost::filesystem3::path>]" at line 790
instantiation of "std::deque<_Tp, _Alloc>::~deque() [with _Tp=boost::filesystem3::path, _Alloc=std::allocator<boost::filesystem3::path>]" at line 97 of "include/mitsuba/core/fresolver.h"
/usr/include/c++/4.4.7/bits/stl_deque.h(1652): error: an incomplete class type is not allowed
if (!__has_trivial_destructor(value_type))
^
detected during:
instantiation of "void std::deque<_Tp, _Alloc>::_M_destroy_data(std::deque<_Tp, _Alloc>::iterator, std::deque<_Tp, _Alloc>::iterator, const std::allocator<_Tp> &) [with _Tp=boost::filesystem3::path, _Alloc=std::allocator<boost::filesystem3::path>]" at line 790
instantiation of "std::deque<_Tp, _Alloc>::~deque() [with _Tp=boost::filesystem3::path, _Alloc=std::allocator<boost::filesystem3::path>]" at line 97 of "include/mitsuba/core/fresolver.h"
/usr/include/c++/4.4.7/bits/stl_deque.h(666): error: incomplete type is not allowed
{ return __deque_buf_size(sizeof(_Tp)); }
^
detected during:
instantiation of "size_t={unsigned long} std::deque<_Tp, _Alloc>::_S_buffer_size() [with _Tp=boost::filesystem3::path, _Alloc=std::allocator<boost::filesystem3::path>]" at line 728 of "/usr/include/c++/4.4.7/bits/deque.tcc"
instantiation of "void std::deque<_Tp, _Alloc>::_M_destroy_data_aux(std::deque<_Tp, _Alloc>::iterator, std::deque<_Tp, _Alloc>::iterator) [with _Tp=boost::filesystem3::path, _Alloc=std::allocator<boost::filesystem3::path>]" at line 1653
instantiation of "void std::deque<_Tp, _Alloc>::_M_destroy_data(std::deque<_Tp, _Alloc>::iterator, std::deque<_Tp, _Alloc>::iterator, const std::allocator<_Tp> &) [with _Tp=boost::filesystem3::path, _Alloc=std::allocator<boost::filesystem3::path>]" at line 790
instantiation of "std::deque<_Tp, _Alloc>::~deque() [with _Tp=boost::filesystem3::path, _Alloc=std::allocator<boost::filesystem3::path>]" at line 97 of "include/mitsuba/core/fresolver.h"
I'm somewhat new to templates, but I think these are saying that the type boost::filesystem3::path is incomplete. Upon inspection of boost/filesystem/path.hpp, this does not appear to be the case.
The file that causes this problem (fresolver.h):
#include <mitsuba/mitsuba.h>
#include <boost/filesystem.hpp>
#include <boost/filesystem/fstream.hpp>
#include <deque>
...
class MTS_EXPORT_CORE FileResolver : public Object {
...
private:
std::deque<fs::path> m_paths;
}
Why does the compile fail, and how can I fix it?