Question

I am trying to compile the newest version of the Armadillo Linear Algebra library (4.300.8) and am running into the following errors when running make after cmake . runs successfully.

Scanning dependencies of target armadillo
[100%] Building CXX object CMakeFiles/armadillo.dir/src/wrapper.cpp.o
/home/user/Desktop/armadillo-4.300.8/src/wrapper.cpp: In function ‘hid_t arma::arma_H5Dopen(hid_t, const char*, hid_t)’:
/home/user/Desktop/armadillo-4.300.8/src/wrapper.cpp:890:43: error: too many arguments to function ‘hid_t H5Dopen1(hid_t, const char*)’
/usr/include/H5Dpublic.h:145:14: note: declared here
/home/user/Desktop/armadillo-4.300.8/src/wrapper.cpp: In function ‘hid_t arma::arma_H5Dcreate(hid_t, const char*, hid_t, hid_t, hid_t, hid_t, hid_t)’:
/home/user/Desktop/armadillo-4.300.8/src/wrapper.cpp:900:83: error: too many arguments to function ‘hid_t H5Dcreate1(hid_t, const char*, hid_t, hid_t, hid_t)’
/usr/include/H5Dpublic.h:143:14: note: declared here
/home/user/Desktop/armadillo-4.300.8/src/wrapper.cpp: In function ‘herr_t arma::arma_H5Eset_auto(hid_t, H5E_auto1_t, void*)’:
/home/user/Desktop/armadillo-4.300.8/src/wrapper.cpp:950:54: error: invalid conversion from ‘hid_t {aka int}’ to ‘H5E_auto1_t {aka int (*)(void*)}’ [-fpermissive]
/home/user/Desktop/armadillo-4.300.8/src/wrapper.cpp:950:54: error: invalid conversion from ‘H5E_auto1_t {aka int (*)(void*)}’ to ‘void*’ [-fpermissive]
/home/user/Desktop/armadillo-4.300.8/src/wrapper.cpp:950:54: error: too many arguments to function ‘herr_t H5Eset_auto1(H5E_auto1_t, void*)’
/usr/include/H5Epublic.h:216:15: note: declared here
/home/user/Desktop/armadillo-4.300.8/src/wrapper.cpp: In function ‘herr_t arma::arma_H5Eget_auto(hid_t, herr_t (**)(void*), void**)’:
/home/user/Desktop/armadillo-4.300.8/src/wrapper.cpp:955:54: error: invalid conversion from ‘hid_t {aka int}’ to ‘herr_t (**)(void*) {aka int (**)(void*)}’ [-fpermissive]
/home/user/Desktop/armadillo-4.300.8/src/wrapper.cpp:955:54: error: invalid conversion from ‘herr_t (**)(void*) {aka int (**)(void*)}’ to ‘void**’ [-fpermissive]
/home/user/Desktop/armadillo-4.300.8/src/wrapper.cpp:955:54: error: too many arguments to function ‘herr_t H5Eget_auto1(herr_t (**)(void*), void**)’
/usr/include/H5Epublic.h:212:15: note: declared here
make[2]: *** [CMakeFiles/armadillo.dir/src/wrapper.cpp.o] Error 1
make[1]: *** [CMakeFiles/armadillo.dir/all] Error 2
make: *** [all] Error 2

I am using gcc version 4.7.3 and running Ubuntu 12.04.

Thanks!

Was it helpful?

Solution

It looks like the HDF5 library is causing problems. Uninstall the HDF5 library, and then reinstall Armadillo.

Another option is to update your system to Ubuntu 14.04. The previous Ubuntu LTS release (12.04) is ancient by open-source standards.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top