Re: [Boost-users] boost/numeric/ublas/matrix_sparse.hpp does not play well with RICE
I have partially resolved the issue. I deleted all boost libraries and headers from my machine and clean re-compiled and installed 1.43. I can now compile with unordered_map successfully. I suspect the compiler was using one version of the libraries and a different version of the headers. Unfortunately, I still cannot #include <boost/numeric/ublas/matrix_sparse.hpp> while also including rice/Data_Type and rice/Constructor. The #undefs Steven recommended don't appear to make a difference. I've included the current code below. It compiles perfectly if I comment the first line. If I replace the Data_Type.hpp header with a different rice header, it still doesn't work -- I've tried Class.hpp, String.hpp, Object.hpp, and Constructor.hpp. FYI, here's the address for rice: http://rice.rubyforge.org/main.html Thanks again, John #include <rice/Data_Type.hpp> #include <boost/numeric/ublas/matrix_sparse.hpp> int main() { return 0; } $ make g++ -I. -I. -I/usr/lib/ruby/1.8/i486-linux -I. -D_FILE_OFFSET_BITS=64 -I/usr/lib/ruby/gems/1.8/gems/rice-1.3.2/ruby/lib/include -fPIC -fno-strict-aliasing -g -g -O2 -fPIC -Wall -g -c main.cpp In file included from /usr/local/include/boost/numeric/ublas/storage_sparse.hpp:23, from /usr/local/include/boost/numeric/ublas/vector_sparse.hpp:16, from /usr/local/include/boost/numeric/ublas/matrix_sparse.hpp:16, from main.cpp:2: /usr/local/include/boost/numeric/ublas/storage.hpp:60: error: expected primary-expression before ‘)’ token /usr/local/include/boost/numeric/ublas/storage.hpp:65: error: expected primary-expression before ‘)’ token /usr/local/include/boost/numeric/ublas/storage.hpp:79: error: expected primary-expression before ‘)’ token /usr/local/include/boost/numeric/ublas/storage.hpp: In member function ‘typename ALLOC::size_type boost::numeric::ublas::unbounded_array<T, ALLOC>::max_size() const’: /usr/local/include/boost/numeric/ublas/storage.hpp:174: error: expected primary-expression before ‘)’ token /usr/local/include/boost/numeric/ublas/storage.hpp:174: error: expected ‘;’ before ‘ruby_xmalloc’ /usr/local/include/boost/numeric/ublas/storage.hpp:174: error: expected primary-expression before ‘)’ token /usr/local/include/boost/numeric/ublas/storage.hpp: In member function ‘typename ALLOC::size_type boost::numeric::ublas::bounded_array<T, N, ALLOC>::max_size() const’: /usr/local/include/boost/numeric/ublas/storage.hpp:357: error: expected primary-expression before ‘)’ token /usr/local/include/boost/numeric/ublas/storage.hpp:357: error: expected ‘;’ before ‘ruby_xmalloc’ /usr/local/include/boost/numeric/ublas/storage.hpp:357: error: expected primary-expression before ‘)’ token In file included from /usr/local/include/boost/numeric/ublas/vector_sparse.hpp:16, from /usr/local/include/boost/numeric/ublas/matrix_sparse.hpp:16, from main.cpp:2: /usr/local/include/boost/numeric/ublas/storage_sparse.hpp: At global scope: /usr/local/include/boost/numeric/ublas/storage_sparse.hpp:240: error: expected primary-expression before ‘)’ token make: *** [main.o] Error 1
John O. Woods wrote:
I have partially resolved the issue. I deleted all boost libraries and headers from my machine and clean re-compiled and installed 1.43.
I can now compile with unordered_map successfully. I suspect the compiler was using one version of the libraries and a different version of the headers.
Unfortunately, I still cannot #include <boost/numeric/ublas/matrix_sparse.hpp> while also including rice/Data_Type and rice/Constructor. The #undefs Steven recommended don't appear to make a difference.
Sounds like a loose macro defined somewhere in RICE. -- ___________________________________________ Joel Falcou - Assistant Professor PARALL Team - LRI - Universite Paris Sud XI Tel : (+33)1 69 15 66 35
On Fri, May 21, 2010 at 1:53 PM, joel falcou <joel.falcou@lri.fr> wrote:
John O. Woods wrote:
I have partially resolved the issue. I deleted all boost libraries and headers from my machine and clean re-compiled and installed 1.43.
I can now compile with unordered_map successfully. I suspect the compiler was using one version of the libraries and a different version of the headers.
Unfortunately, I still cannot #include <boost/numeric/ublas/matrix_sparse.hpp> while also including rice/Data_Type and rice/Constructor. The #undefs Steven recommended don't appear to make a difference.
Sounds like a loose macro defined somewhere in RICE.
Exactly as was thought earlier, hence why we asked if you can include the postprocessed file in your next email?
On May 21, 2010, at 3:49 PM, "John O. Woods" <john.woods@marcottelab.org> wrote:
I've included the current code below. It compiles perfectly if I comment the first line.
#include <rice/Data_Type.hpp> #include <boost/numeric/ublas/matrix_sparse.hpp> int main() { return 0; }
What if you reverse the order of the #includes?
participants (4)
-
joel falcou
-
John O. Woods
-
Nat Goodspeed
-
OvermindDL1