gadomski / cpd

C++ implementation of the Coherent Point Drift point set registration algorithm.
http://www.gadom.ski/cpd
GNU General Public License v2.0
401 stars 124 forks source link

Armadillo 6.100.0 -Werror issu #44

Closed hobu closed 8 years ago

hobu commented 9 years ago

Trying to compile with brew's El Capitan

[ 45%] Built target gtest_main
Scanning dependencies of target Test
[ 48%] Building CXX object test/CMakeFiles/Test.dir/affinity_eigenvectors_test.cpp.o
In file included from /Users/hobu/dev/git/cpd/test/affinity_eigenvectors_test.cpp:21:
In file included from /Users/hobu/dev/git/cpd/src/affinity_eigenvectors.hpp:22:
In file included from /usr/local/Cellar/armadillo/6.100.0/include/armadillo:517:
/usr/local/Cellar/armadillo/6.100.0/include/armadillo_bits/Mat_meat.hpp:7785:102: error: base class 'arma::Mat<double>' is uninitialized when used here
      to access 'arma::Mat<double>::mem_local' [-Werror,-Wuninitialized]
  : Mat<eT>( arma_fixed_indicator(), fixed_n_rows, fixed_n_cols, 0, ((use_extra) ? mem_local_extra : mem_local) )
                                                                                                     ^
/Users/hobu/dev/git/cpd/test/fixtures.hpp:31:7: note: in instantiation of member function 'arma::Mat<double>::fixed<36, 3>::fixed' requested here
class RegistrationTest : public ::testing::Test {
      ^
In file included from /Users/hobu/dev/git/cpd/test/affinity_eigenvectors_test.cpp:21:
In file included from /Users/hobu/dev/git/cpd/src/affinity_eigenvectors.hpp:22:
In file included from /usr/local/Cellar/armadillo/6.100.0/include/armadillo:517:
/usr/local/Cellar/armadillo/6.100.0/include/armadillo_bits/Mat_meat.hpp:7785:102: error: base class 'arma::Mat<double>' is uninitialized when used here
      to access 'arma::Mat<double>::mem_local' [-Werror,-Wuninitialized]
  : Mat<eT>( arma_fixed_indicator(), fixed_n_rows, fixed_n_cols, 0, ((use_extra) ? mem_local_extra : mem_local) )
                                                                                                     ^
/Users/hobu/dev/git/cpd/test/fixtures.hpp:31:7: note: in instantiation of member function 'arma::Mat<double>::fixed<3, 3>::fixed' requested here
class RegistrationTest : public ::testing::Test {
      ^
2 errors generated.
gadomski commented 9 years ago

Are you working with latest? I blacklisted Armadillo6 in fcbfa3b0712693049da10879c41ab6dd2abdd61e until I figure out how to work around (or decide to get let less persnickety about warnings).

hobu commented 9 years ago

Yes, Armadillo6 is what the latest brew has. The simple solution is to probably #pragma up your -Werror around your armadillo declarations. It will beautify your code :smile:

gadomski commented 9 years ago

For shizzy. I'm kinda deep in it right now so I'm going to keep this one open, since you can always workaround by manually hitting arma5. Hopefully will be able to squash this (among other arma nits) after AGU.

gadomski commented 8 years ago

Closing as invalid since the rewrite. As of v0.3 we're into Eigen-land, not armadillo, hopefully removing some of this pain. I still need to update PDAL to use The New Way™.