I2PC / xmippCore

Core functions for Xmipp and sharing with other packages (like Scipion)
GNU General Public License v3.0
4 stars 2 forks source link

Not compiling with GCC 12 #163

Closed oierlauzi closed 1 year ago

oierlauzi commented 1 year ago

When compiling with GCC 12 I get the following compilation error:

/usr/bin/g++ -o core/xmipp_fftw.os -c -mtune=native -march=native -flto -std=c++17 -O3 -I../ -I/home/oier/Miniconda/envs/scipion3/include -I/usr/include/hdf5/serial -fPIC -I/home/oier/xmipp-bundle2/src -I/home/oier/Miniconda/envs/scipion3/include -I/usr/include/hdf5/serial core/xmipp_fftw.cpp
In file included from core/metadata_static.h:30,
                 from core/rwTIFF.cpp:30:
core/metadata_row_sql.h:38:43: error: field '_objects' has incomplete type 'std::array<MDObject*, 839>'
   38 |     std::array<MDObject*, MDL_LAST_LABEL> _objects; // label to object; nullptr if none
      |                                           ^~~~~~~~
In file included from /usr/include/c++/12/bits/unique_ptr.h:36,
                 from /usr/include/c++/12/memory:76,
                 from core/xmipp_image_base.h:29,
                 from core/rwTIFF.cpp:26:
/usr/include/c++/12/tuple:1595:45: note: declaration of 'struct std::array<MDObject*, 839>'
 1595 |   template<typename _Tp, size_t _Nm> struct array;
      |                                             ^~~~~
core/metadata_row_sql.h:39:41: error: field '_order' has incomplete type 'std::array<MDLabel, 839>'
   39 |     std::array<MDLabel, MDL_LAST_LABEL> _order; // index to label (_order[0] = label for column 0)
      |                                         ^~~~~~
/usr/include/c++/12/tuple:1595:45: note: declaration of 'struct std::array<MDLabel, 839>'
 1595 |   template<typename _Tp, size_t _Nm> struct array;
      |                                             ^~~~~
In file included from core/metadata_static.h:30,
                 from core/xmipp_program_sql.h:33,
                 from core/xmipp_program.cpp:28:
core/metadata_row_sql.h:38:43: error: field '_objects' has incomplete type 'std::array<MDObject*, 839>'
   38 |     std::array<MDObject*, MDL_LAST_LABEL> _objects; // label to object; nullptr if none
      |                                           ^~~~~~~~
In file included from /usr/include/c++/12/bits/stl_map.h:63,
                 from /usr/include/c++/12/map:61,
                 from core/xmipp_program.h:29,
                 from core/xmipp_program.cpp:26:
/usr/include/c++/12/tuple:1595:45: note: declaration of 'struct std::array<MDObject*, 839>'
 1595 |   template<typename _Tp, size_t _Nm> struct array;
      |                                             ^~~~~
core/metadata_row_sql.h:39:41: error: field '_order' has incomplete type 'std::array<MDLabel, 839>'
   39 |     std::array<MDLabel, MDL_LAST_LABEL> _order; // index to label (_order[0] = label for column 0)
      |                                         ^~~~~~
/usr/include/c++/12/tuple:1595:45: note: declaration of 'struct std::array<MDLabel, 839>'
 1595 |   template<typename _Tp, size_t _Nm> struct array;
      |                                             ^~~~~
In file included from core/metadata_static.h:30,
                 from core/metadata_base.h:45,
                 from core/metadata_generator.h:30,
                 from core/metadata_generator.cpp:27:
core/metadata_row_sql.h:38:43: error: field '_objects' has incomplete type 'std::array<MDObject*, 839>'
   38 |     std::array<MDObject*, MDL_LAST_LABEL> _objects; // label to object; nullptr if none
      |                                           ^~~~~~~~
In file included from /usr/include/c++/12/bits/stl_map.h:63,
                 from /usr/include/c++/12/map:61,
                 from core/metadata_base.h:36:
/usr/include/c++/12/tuple:1595:45: note: declaration of 'struct std::array<MDObject*, 839>'
 1595 |   template<typename _Tp, size_t _Nm> struct array;
      |                                             ^~~~~
core/metadata_row_sql.h:39:41: error: field '_order' has incomplete type 'std::array<MDLabel, 839>'
   39 |     std::array<MDLabel, MDL_LAST_LABEL> _order; // index to label (_order[0] = label for column 0)
      |                                         ^~~~~~
/usr/include/c++/12/tuple:1595:45: note: declaration of 'struct std::array<MDLabel, 839>'
 1595 |   template<typename _Tp, size_t _Nm> struct array;
      |                                             ^~~~~
In file included from core/metadata_static.h:30,
                 from core/rwPIF.cpp:29:
core/metadata_row_sql.h:38:43: error: field '_objects' has incomplete type 'std::array<MDObject*, 839>'
   38 |     std::array<MDObject*, MDL_LAST_LABEL> _objects; // label to object; nullptr if none
      |                                           ^~~~~~~~
In file included from /usr/include/c++/12/bits/unique_ptr.h:36,
                 from /usr/include/c++/12/memory:76,
                 from core/xmipp_image_base.h:29,
                 from core/rwPIF.cpp:26:
/usr/include/c++/12/tuple:1595:45: note: declaration of 'struct std::array<MDObject*, 839>'
 1595 |   template<typename _Tp, size_t _Nm> struct array;
      |                                             ^~~~~
core/metadata_row_sql.h:39:41: error: field '_order' has incomplete type 'std::array<MDLabel, 839>'
   39 |     std::array<MDLabel, MDL_LAST_LABEL> _order; // index to label (_order[0] = label for column 0)
      |                                         ^~~~~~
/usr/include/c++/12/tuple:1595:45: note: declaration of 'struct std::array<MDLabel, 839>'
 1595 |   template<typename _Tp, size_t _Nm> struct array;
      |                                             ^~~~~
core/rwTIFF.cpp: In member function 'int ImageBase::readTIFF(size_t, bool)':
core/rwTIFF.cpp:264:12: warning: 'uint32' is deprecated [-Wdeprecated-declarations]
  264 |     uint32 rowsperstrip;
      |            ^~~~~~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/tiffio.h:31,
                 from core/rwTIFF.cpp:28:
/usr/include/x86_64-linux-gnu/tiff.h:86:38: note: declared here
   86 | typedef TIFF_MSC_DEPRECATED uint32_t uint32 TIFF_GCC_DEPRECATED;
      |                                      ^~~~~~
core/rwTIFF.cpp: In member function 'int ImageBase::writeTIFF(size_t, bool, int, String, CastWriteMode)':
core/rwTIFF.cpp:497:52: warning: 'uint32' is deprecated [-Wdeprecated-declarations]
  497 |         TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP,   (uint32) dhMain.imageLength);
      |                                                    ^~~~~~
/usr/include/x86_64-linux-gnu/tiff.h:86:38: note: declared here
   86 | typedef TIFF_MSC_DEPRECATED uint32_t uint32 TIFF_GCC_DEPRECATED;
      |                                      ^~~~~~
core/rwTIFF.cpp:504:52: warning: 'uint16' is deprecated [-Wdeprecated-declarations]
  504 |             TIFFSetField(tif, TIFFTAG_PAGENUMBER, (uint16) 0, (uint16) 0);
      |                                                    ^~~~~~
/usr/include/x86_64-linux-gnu/tiff.h:83:38: note: declared here
   83 | typedef TIFF_MSC_DEPRECATED uint16_t uint16 TIFF_GCC_DEPRECATED;
      |                                      ^~~~~~
core/rwTIFF.cpp:504:64: warning: 'uint16' is deprecated [-Wdeprecated-declarations]
  504 |             TIFFSetField(tif, TIFFTAG_PAGENUMBER, (uint16) 0, (uint16) 0);
      |                                                                ^~~~~~
/usr/include/x86_64-linux-gnu/tiff.h:83:38: note: declared here
   83 | typedef TIFF_MSC_DEPRECATED uint16_t uint16 TIFF_GCC_DEPRECATED;
      |                                      ^~~~~~
core/rwTIFF.cpp:509:52: warning: 'uint16' is deprecated [-Wdeprecated-declarations]
  509 |             TIFFSetField(tif, TIFFTAG_PAGENUMBER, (uint16) i, (uint16) aDim.ndim);
      |                                                    ^~~~~~
/usr/include/x86_64-linux-gnu/tiff.h:83:38: note: declared here
   83 | typedef TIFF_MSC_DEPRECATED uint16_t uint16 TIFF_GCC_DEPRECATED;
      |                                      ^~~~~~
core/rwTIFF.cpp:509:64: warning: 'uint16' is deprecated [-Wdeprecated-declarations]
  509 |             TIFFSetField(tif, TIFFTAG_PAGENUMBER, (uint16) i, (uint16) aDim.ndim);
      |                                                                ^~~~~~
/usr/include/x86_64-linux-gnu/tiff.h:83:38: note: declared here
   83 | typedef TIFF_MSC_DEPRECATED uint16_t uint16 TIFF_GCC_DEPRECATED;
      |                                      ^~~~~~
core/rwTIFF.cpp:520:25: warning: 'uint32' is deprecated [-Wdeprecated-declarations]
  520 |             for (uint32 y = 0; y < aDim.ydim; y++)
      |                         ^
/usr/include/x86_64-linux-gnu/tiff.h:86:38: note: declared here
   86 | typedef TIFF_MSC_DEPRECATED uint32_t uint32 TIFF_GCC_DEPRECATED;
      |                                      ^~~~~~
In file included from core/metadata_static.h:30,
                 from core/rwTIA.cpp:30:
core/metadata_row_sql.h:38:43: error: field '_objects' has incomplete type 'std::array<MDObject*, 839>'
   38 |     std::array<MDObject*, MDL_LAST_LABEL> _objects; // label to object; nullptr if none
      |                                           ^~~~~~~~
In file included from /usr/include/c++/12/bits/unique_ptr.h:36,
                 from /usr/include/c++/12/memory:76,
                 from core/xmipp_image_base.h:29,
                 from core/rwTIA.cpp:26:
/usr/include/c++/12/tuple:1595:45: note: declaration of 'struct std::array<MDObject*, 839>'
 1595 |   template<typename _Tp, size_t _Nm> struct array;
      |                                             ^~~~~
core/metadata_row_sql.h:39:41: error: field '_order' has incomplete type 'std::array<MDLabel, 839>'
   39 |     std::array<MDLabel, MDL_LAST_LABEL> _order; // index to label (_order[0] = label for column 0)
      |                                         ^~~~~~
/usr/include/c++/12/tuple:1595:45: note: declaration of 'struct std::array<MDLabel, 839>'
 1595 |   template<typename _Tp, size_t _Nm> struct array;
      |                                             ^~~~~
In file included from core/metadata_static.h:30,
                 from core/rwSPIDER.cpp:29:
core/metadata_row_sql.h:38:43: error: field '_objects' has incomplete type 'std::array<MDObject*, 839>'
   38 |     std::array<MDObject*, MDL_LAST_LABEL> _objects; // label to object; nullptr if none
      |                                           ^~~~~~~~
In file included from /usr/include/c++/12/bits/unique_ptr.h:36,
                 from /usr/include/c++/12/memory:76,
                 from core/xmipp_image_base.h:29,
                 from core/rwSPIDER.cpp:27:
/usr/include/c++/12/tuple:1595:45: note: declaration of 'struct std::array<MDObject*, 839>'
 1595 |   template<typename _Tp, size_t _Nm> struct array;
      |                                             ^~~~~
core/metadata_row_sql.h:39:41: error: field '_order' has incomplete type 'std::array<MDLabel, 839>'
   39 |     std::array<MDLabel, MDL_LAST_LABEL> _order; // index to label (_order[0] = label for column 0)
      |                                         ^~~~~~
/usr/include/c++/12/tuple:1595:45: note: declaration of 'struct std::array<MDLabel, 839>'
 1595 |   template<typename _Tp, size_t _Nm> struct array;
      |                                             ^~~~~
In file included from core/metadata_static.h:30,
                 from core/metadata_base.h:45,
                 from core/metadata_vec.h:33,
                 from core/rwDM3.cpp:27:
core/metadata_row_sql.h:38:43: error: field '_objects' has incomplete type 'std::array<MDObject*, 839>'
   38 |     std::array<MDObject*, MDL_LAST_LABEL> _objects; // label to object; nullptr if none
      |                                           ^~~~~~~~
In file included from /usr/include/c++/12/bits/unique_ptr.h:36,
                 from /usr/include/c++/12/memory:76,
                 from core/xmipp_image_base.h:29,
                 from core/rwDM3.cpp:26:
/usr/include/c++/12/tuple:1595:45: note: declaration of 'struct std::array<MDObject*, 839>'
 1595 |   template<typename _Tp, size_t _Nm> struct array;
      |                                             ^~~~~
core/metadata_row_sql.h:39:41: error: field '_order' has incomplete type 'std::array<MDLabel, 839>'
   39 |     std::array<MDLabel, MDL_LAST_LABEL> _order; // index to label (_order[0] = label for column 0)
      |                                         ^~~~~~
/usr/include/c++/12/tuple:1595:45: note: declaration of 'struct std::array<MDLabel, 839>'
 1595 |   template<typename _Tp, size_t _Nm> struct array;
      |                                             ^~~~~
scons: *** [core/rwTIFF.os] Error 1
core/metadata_vec.h:49:37: error: field '_label_to_col' has incomplete type 'std::array<int, 839>'
   49 |     std::array<int, MDL_LAST_LABEL> _label_to_col; // -1 = no mapping
      |                                     ^~~~~~~~~~~~~
/usr/include/c++/12/tuple:1595:45: note: declaration of 'struct std::array<int, 839>'
 1595 |   template<typename _Tp, size_t _Nm> struct array;
      |                                             ^~~~~