Bug 1565050 - GDAL: wrong declaration in /usr/include/gdal/gdal_priv.h (with patch)
Summary: GDAL: wrong declaration in /usr/include/gdal/gdal_priv.h (with patch)
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: gdal
Version: 27
Hardware: Unspecified
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Devrim Gündüz
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-04-09 09:02 UTC by markusN
Modified: 2018-04-18 01:23 UTC (History)
10 users (show)

Fixed In Version: gdal-2.1.4-5.1.fc27
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-04-18 01:23:13 UTC
Type: Bug


Attachments (Terms of Use)
COPR builder log with compile error in gdal_priv.h (499.24 KB, text/plain)
2018-04-09 09:02 UTC, markusN
no flags Details
Patch fixing the problem, extracted from GDAL trac (8.56 KB, patch)
2018-04-10 10:33 UTC, markusN
no flags Details | Diff

Description markusN 2018-04-09 09:02:15 UTC
Created attachment 1419154 [details]
COPR builder log with compile error in gdal_priv.h

Description of problem:

I am trying to compile PDAL on COPR. The compilation fails due to the rather old GDAL in F26 and F27 which lacks a later bugfix.

Indeed it commonly compiles but due to Fedora's -Werror=pedantic setting the warning is turned into a compiler error, see attachment (yet available at
https://copr-be.cloud.fedoraproject.org/results/neteler/pdal/fedora-27-x86_64/00738791-PDAL/builder-live.log):

...
/usr/bin/c++  -DUNIX -Dpdal_base_EXPORTS -I/builddir/build/BUILD/PDAL-1.7.0-src/vendor/gtest/include -I/builddir/build/BUILD/PDAL-1.7.0-src/vendor/gtest -I/builddir/build/BUILD/PDAL-1.7.0-src -I/builddir/build/BUILD/PDAL-1.7.0-src/include -I/builddir/build/BUILD/PDAL-1.7.0-src/vendor -I/builddir/build/BUILD/PDAL-1.7.0-src/vendor/eigen -I/builddir/build/BUILD/PDAL-1.7.0-src/vendor/pdalboost -I/usr/include/gdal -I/usr/include/libgeotiff -isystem /usr/local/include -I/usr/include/libxml2  -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -DNDEBUG -fPIC   -std=c++11 -Wno-implicit-fallthrough -Wno-int-in-bool-context -Wno-dangling-else -Wno-noexcept-type -Wextra -Wpedantic -Werror -Wall -Wno-unused-parameter -Wno-unused-variable -Wpointer-arith -Wcast-align -Wcast-qual -Wredundant-decls -Wno-long-long -Wno-unknown-pragmas -Wno-deprecated-declarations -o CMakeFiles/pdal_base.dir/filters/ColorinterpFilter.cpp.o -c /builddir/build/BUILD/PDAL-1.7.0-src/filters/ColorinterpFilter.cpp
In file included from /builddir/build/BUILD/PDAL-1.7.0-src/pdal/GDALUtils.hpp:51:0,
                 from /builddir/build/BUILD/PDAL-1.7.0-src/filters/ColorinterpFilter.hpp:43,
                 from /builddir/build/BUILD/PDAL-1.7.0-src/filters/ColorinterpFilter.cpp:35:
/usr/include/gdal/gdal_priv.h:110:54: error: extra ';' [-Werror=pedantic]
     CPL_DISALLOW_COPY_ASSIGN(GDALMultiDomainMetadata);
                                                      ^
/usr/include/gdal/gdal_priv.h:229:51: error: extra ';' [-Werror=pedantic]
     CPL_DISALLOW_COPY_ASSIGN(GDALDefaultOverviews);
                                                   ^
/usr/include/gdal/gdal_priv.h:269:43: error: extra ';' [-Werror=pedantic]
     CPL_DISALLOW_COPY_ASSIGN(GDALOpenInfo);
                                           ^
/usr/include/gdal/gdal_priv.h:564:42: error: extra ';' [-Werror=pedantic]
     CPL_DISALLOW_COPY_ASSIGN(GDALDataset);
                                          ^
/usr/include/gdal/gdal_priv.h:651:46: error: extra ';' [-Werror=pedantic]
     CPL_DISALLOW_COPY_ASSIGN(GDALRasterBlock);
                                              ^
/usr/include/gdal/gdal_priv.h:925:45: error: extra ';' [-Werror=pedantic]
     CPL_DISALLOW_COPY_ASSIGN(GDALRasterBand);
                                             ^
/usr/include/gdal/gdal_priv.h:1126:41: error: extra ';' [-Werror=pedantic]
     CPL_DISALLOW_COPY_ASSIGN(GDALDriver);
                                         ^

Affected are F26 and F27 since an older GDAL 2.1 is provided.

Solution:
This declaration issue got fixed in 2016 by GDAL Changeset 35751:
"Remove semi-colon at end of use of CPL_DISALLOW_COPY_ASSIGN macro (patch by behrisch, fixes https://trac.osgeo.org/gdal/ticket/6685)"

Please fix GDAL in F26 and F27 accordingly with this "trivial" patch in order to deliver PDAL COPR packages. Thanks!

Comment 1 markusN 2018-04-10 10:33:54 UTC
Created attachment 1419821 [details]
Patch fixing the problem, extracted from GDAL trac

Comment 2 Fedora Update System 2018-04-10 20:10:20 UTC
gdal-2.1.3-2.1.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2018-78b9d2b164

Comment 3 Fedora Update System 2018-04-10 20:10:35 UTC
gdal-2.1.4-5.1.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2018-b996d9f1cd

Comment 4 Fedora Update System 2018-04-11 22:04:14 UTC
gdal-2.1.3-2.1.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-78b9d2b164

Comment 5 Fedora Update System 2018-04-11 22:39:29 UTC
gdal-2.1.4-5.1.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-b996d9f1cd

Comment 6 Fedora Update System 2018-04-18 01:23:13 UTC
gdal-2.1.4-5.1.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.