QGIS
QGIS copied to clipboard
Build fails with exiv2 0.28
What is the bug or the crash?
Build fails with exiv2 0.28:
[ 2238s] /home/abuild/rpmbuild/BUILD/qgis-3.30.3/src/core/raster/qgsexiftools.cpp: In function 'QVariant decodeXmpData(const QString&, Exiv2::XmpData::const_iterator&)':
[ 2238s] /home/abuild/rpmbuild/BUILD/qgis-3.30.3/src/core/raster/qgsexiftools.cpp:69:40: error: 'const class Exiv2::Xmpdatum' has no member named 'toLong'
[ 2238s] 69 | val = QVariant::fromValue( it->toLong() );
[ 2238s] | ^~~~~~
[ 2238s] /home/abuild/rpmbuild/BUILD/qgis-3.30.3/src/core/raster/qgsexiftools.cpp:83:60: error: 'const class Exiv2::Xmpdatum' has no member named 'toLong'
[ 2238s] 83 | val = QVariant::fromValue( static_cast< int >( it->toLong() ) );
[ 2238s] | ^~~~~~
[ 2238s] /home/abuild/rpmbuild/BUILD/qgis-3.30.3/src/core/raster/qgsexiftools.cpp: In function 'QVariant decodeExifData(const QString&, Exiv2::ExifData::const_iterator&)':
[ 2238s] /home/abuild/rpmbuild/BUILD/qgis-3.30.3/src/core/raster/qgsexiftools.cpp:185:40: error: 'const class Exiv2::Exifdatum' has no member named 'toLong'
[ 2238s] 185 | val = QVariant::fromValue( it->toLong() );
[ 2238s] | ^~~~~~
[ 2238s] /home/abuild/rpmbuild/BUILD/qgis-3.30.3/src/core/raster/qgsexiftools.cpp:199:60: error: 'const class Exiv2::Exifdatum' has no member named 'toLong'
[ 2238s] 199 | val = QVariant::fromValue( static_cast< int >( it->toLong() ) );
[ 2238s] | ^~~~~~
Steps to reproduce the issue
Try to build QGIS 3.30.3 against exiv2 0.28
Versions
3.30.3
Supported QGIS version
- [X] I'm running a supported QGIS version according to the roadmap.
New profile
- [ ] I tried with a new QGIS profile
Additional context
No response
Likely because of https://github.com/Exiv2/exiv2/pull/2062
See also full build.log in downstream bug report: https://bugs.gentoo.org/906470
Arch Linux use a non-upstreamed patch for >=3.30.3: https://gitlab.archlinux.org/archlinux/packaging/packages/qgis/-/blob/main/exiv2-0.28.patch
@a17r Thanks for the link to the patch. Would be great if you could open a PR to upstream your patch. :)
@ggardet well it is not my patch, but maybe @antonio-rojas would
Replacing toLong()
with toUInt32()
in qgsexiftools.cpp
(*) solves the problem in Linux (openSUSE Tumbleweed). Unsure if this will work in Windows too.
(*) https://github.com/qgis/QGIS/blob/master/src/core/raster/qgsexiftools.cpp
Done in https://github.com/qgis/QGIS/pull/53762
Closed with https://github.com/qgis/QGIS/pull/53762
Thanks @antonio-rojas