Hi Even, After resolving error on “GDALRasterAttributeTable” by adding “gdal_rat.h” to gdal_priv.h, the compilation failed again.
The compiler on my machine was working fine with GDAL on the master branch this early May. Could there be anything changed in the GDAL master that caused the compilation failure? [ 3%] Building CXX object frmts/gtiff/CMakeFiles/gdal_GTIFF.dir/gt_jpeg_copy. cpp.o In file included from /usr/include/c++/8/memory:80, from /scratch/gdal/gdal/port/cpl_error.h:372, from /scratch/gdal/gdal/frmts/gtiff/gt_jpeg_copy.h:16, from /scratch/gdal/gdal/frmts/gtiff/gt_jpeg_copy.cpp:15: /usr/include/c++/8/bits/unique_ptr.h: In instantiation of ?~@~Xvoid std:: default_delete<_Tp>::operator()(_Tp*) const [with _Tp = GDALPansharpenOperation]?~@~Y: /usr/include/c++/8/bits/unique_ptr.h:277:17: required from ?~@~Xstd:: unique_ptr<_Tp, _Dp>::~unique_ptr() [with _Tp = GDALPansharpenOperation; _Dp = std::default_delete<GDALPansharpenOperation>]?~@~Y /scratch/gdal/gdal/frmts/vrt/vrtdataset.h:549:63: required from here /usr/include/c++/8/bits/unique_ptr.h:79:16: error: invalid application of ?~@~Xsizeof?~@~Y to incomplete type ?~@~XGDALPansharpenOperation?~@~Y static_assert(sizeof(_Tp)>0, ^~~~~~~~~~~ gmake[2]: *** [frmts/gtiff/CMakeFiles/gdal_GTIFF.dir/build.make:272: frmts/ gtiff/CMakeFiles/gdal_GTIFF.dir/gt_jpeg_copy.cpp.o] Error 1 -Fengting From: Even Rouault <even.roua...@spatialys.com> Date: Tuesday, July 22, 2025 at 3:33 PM To: Fengting Chen <fengting.c...@oracle.com>, gdal dev <gdal-dev@lists.osgeo.org> Subject: [External] : Re: [gdal-dev] Error on building from master branch on linux Fengting, I guess you can workaround the issue by adding a #include "gdal_rat.h" at top of gdal_priv.h (shouldn't be required as GDALExtendedDataType declares a destructor, so I guess your compiler is more demanding than strictly needed) Even Le 22/07/2025 à 20:15, Fengting Chen via gdal-dev a écrit : Hi, I got the following error while trying to build gdal using “gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-26.0.1)”: [ 0%] Building CXX object frmts/pdf/CMakeFiles/gdal_PDF_core.dir/ pdfdrivercore.cpp.o In file included from /usr/include/c++/8/memory:80, from /scratch/gdal/gdal/port/cpl_error.h:372, from /scratch/gdal/gdal/gcore/gdal.h:30, from /scratch/gdal/gdal/gcore/gdal_priv.h:45, from /scratch/gdal/gdal/frmts/pdf/pdfdrivercore.h:16, from /scratch/gdal/gdal/frmts/pdf/pdfdrivercore.cpp:13: /usr/include/c++/8/bits/unique_ptr.h: In instantiation of ?~@~Xvoid std:: default_delete<_Tp>::operator()(_Tp*) const [with _Tp = GDALRasterAttributeTable]?~@~Y: /usr/include/c++/8/bits/unique_ptr.h:277:17: required from ?~@~Xstd:: unique_ptr<_Tp, _Dp>::~unique_ptr() [with _Tp = GDALRasterAttributeTable; _Dp = std::default_delete<GDALRasterAttributeTable>]?~@~Y /scratch/gdal/gdal/gcore/gdal_priv.h:3664:55: required from here /usr/include/c++/8/bits/unique_ptr.h:79:16: error: invalid application of ?~@~Xsizeof?~@~Y to incomplete type ?~@~XGDALRasterAttributeTable?~@~Y static_assert(sizeof(_Tp)>0, ^~~~~~~~~~~ gmake[2]: *** [frmts/pdf/CMakeFiles/gdal_PDF_core.dir/build.make:76: frmts/pdf/ CMakeFiles/gdal_PDF_core.dir/pdfdrivercore.cpp.o] Error 1 gmake[1]: *** [CMakeFiles/Makefile2:6099: frmts/pdf/CMakeFiles/gdal_PDF_core. dir/all] Error 2 gmake: *** [Makefile:146: all] Error 2 Any idea how to fix this? Thanks, -Fengting _______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org<mailto:gdal-dev@lists.osgeo.org> https://lists.osgeo.org/mailman/listinfo/gdal-dev<https://urldefense.com/v3/__https:/lists.osgeo.org/mailman/listinfo/gdal-dev__;!!ACWV5N9M2RV99hQ!JGfpKPUg6eOXwOKEAFWSuQs31iI5ndeQvAfKRvXm2e_wb77Lm3oMBqWdlfsZNQMRfTQWdNVVdo8sfD6qXQVa22yZjcRH$> -- http://www.spatialys.com<https://urldefense.com/v3/__http:/www.spatialys.com__;!!ACWV5N9M2RV99hQ!JGfpKPUg6eOXwOKEAFWSuQs31iI5ndeQvAfKRvXm2e_wb77Lm3oMBqWdlfsZNQMRfTQWdNVVdo8sfD6qXQVa28qPEEP7$> My software is free, but my time generally not.
_______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/gdal-dev