ami-iit / matio-cpp

A C++ wrapper of the matio library, with memory ownership handling, to read and write .mat files.
https://ami-iit.github.io/matio-cpp/
BSD 2-Clause "Simplified" License
59 stars 9 forks source link

Compilation failure with matio 1.5.27 #81

Closed traversaro closed 6 months ago

traversaro commented 6 months ago

In conda-forge matio got update to 1.5.17, and this error appeared:

[6/36] Building CXX object CMakeFiles/matioCpp.dir/src/File.cpp.o
FAILED: CMakeFiles/matioCpp.dir/src/File.cpp.o 
/home/conda/feedstock_root/build_artifacts/matio-cpp-split_1716299022551/_build_env/bin/x86_64-conda-linux-gnu-c++ -DmatioCpp_EXPORTS -I/home/conda/feedstock_root/build_artifacts/matio-cpp-split_1716299022551/work/include -I/home/conda/feedstock_root/build_artifacts/matio-cpp-split_1716299022551/work/build/Autogenerated -isystem /home/conda/feedstock_root/build_artifacts/matio-cpp-split_1716299022551/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_place/include/eigen3 -fvisibility-inlines-hidden -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/conda/feedstock_root/build_artifacts/matio-cpp-split_1716299022551/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_place/include -fdebug-prefix-map=/home/conda/feedstock_root/build_artifacts/matio-cpp-split_1716299022551/work=/usr/local/src/conda/libmatio-cpp-0.2.4 -fdebug-prefix-map=/home/conda/feedstock_root/build_artifacts/matio-cpp-split_1716299022551/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_place=/usr/local/src/conda-prefix -O3 -DNDEBUG -fPIC -MD -MT CMakeFiles/matioCpp.dir/src/File.cpp.o -MF CMakeFiles/matioCpp.dir/src/File.cpp.o.d -o CMakeFiles/matioCpp.dir/src/File.cpp.o -c /home/conda/feedstock_root/build_artifacts/matio-cpp-split_1716299022551/work/src/File.cpp
/home/conda/feedstock_root/build_artifacts/matio-cpp-split_1716299022551/work/src/File.cpp: In member function 'std::vector<std::__cxx11::basic_string<char> > matioCpp::File::variableNames() const':
/home/conda/feedstock_root/build_artifacts/matio-cpp-split_1716299022551/work/src/File.cpp:294:33: error: invalid conversion from 'char* const*' to 'char**' [-fpermissive]
  294 |         char** list = Mat_GetDir(m_pimpl->mat_ptr, &list_size);
      |                       ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                 |
      |                                 char* const*
[7/36] Building CXX object CMakeFiles/matioCpp.dir/src/CellArray.cpp.o
[8/36] Building CXX object CMakeFiles/matioCpp.dir/src/Struct.cpp.o
ninja: build stopped: subcommand failed.
traversaro commented 6 months ago

Apparently the signature of Mat_GetDir changed in https://github.com/tbeu/matio/commit/689ba82f28484a7b942d91ffe6c97d7edf5e54ca .

S-Dafarra commented 6 months ago

Thanks a lot @traversaro for noticing!

S-Dafarra commented 6 months ago

Related PR https://github.com/ami-iit/matio-cpp/pull/82