Bug 259967

Summary: graphics/qgis: broken on CURRENT since intro of llvm13 in base
Product: Ports & Packages Reporter: Rainer Hurling <rhurlin>
Component: Individual Port(s)Assignee: Rainer Hurling <rhurlin>
Status: Closed FIXED    
Severity: Affects Only Me CC: dim, lbartoletti, rhurlin
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
Correct parameter type for QgsOgrDataset deleter
none
Correct parameter type for QgsOgrDataset deleter (v2) none

Description Rainer Hurling freebsd_committer freebsd_triage 2021-11-21 16:01:07 UTC
Since about two weeks there are problems building graphics/qgis under 14.0-CURRENT. The build aborts both in Poudriere and outside in non-clean build environments with the following error message:


--------------------------------------
[..snip..]
[  1%] Building CXX object src/core/CMakeFiles/qgis_core.dir/providers/ogr/qgsogrproviderutils.cpp.o
cd /usr/ports/graphics/qgis/work/.build/src/core && /usr/bin/c++ -DPROJ_VERSION_MAJOR=7 -DQT_CONCURRENT_LIB -DQT_CORE_LIB -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050800 -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_NO_CAST_TO_ASCII -DQT_NO_DEBUG -DQT_NO_FOREACH -DQT_POSITIONING_LIB -DQT_PRINTSUPPORT_LIB -DQT_SERIALPORT_LIB -DQT_SQL_LIB -DQT_SVG_LIB -DQT_USE_QSTRINGBUILDER -DQT_WEBKITWIDGETS_LIB -DQT_WEBKIT_LIB -DQT_WIDGETS_LIB -DQT_XML_LIB -DSIP_VERSION=0x050500 -DTEST_DATA_DIR=\"/usr/ports/graphics/qgis/work/QGIS-final-3_22_1/tests/testdata\" -DWITH_EPT -DWITH_QTWEBKIT -D_HAVE_PTHREAD_ -D_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR -Dqgis_core_EXPORTS -I/usr/ports/graphics/qgis/work/.build/src/core/qgis_core_autogen/include -I/usr/ports/graphics/qgis/work/.build -I/usr/ports/graphics/qgis/work/QGIS-final-3_22_1/external/poly2tri -I/usr/ports/graphics/qgis/work/QGIS-final-3_22_1/src/core/providers/ept -I/usr/ports/graphics/qgis/work/.build/src/core -I/usr/ports/graphics/qgis/work/QGIS-final-3_22_1/src/core -I/usr/ports/graphics/qgis/work/QGIS-final-3_22_1/src/core/3d -I/usr/ports/graphics/qgis/work/QGIS-final-3_22_1/src/core/annotations -I/usr/ports/graphics/qgis/work/QGIS-final-3_22_1/src/core/auth -I/usr/ports/graphics/qgis/work/QGIS-final-3_22_1/src/core/browser -I/usr/ports/graphics/qgis/work/QGIS-final-3_22_1/src/core/callouts -I/usr/ports/graphics/qgis/work/QGIS-final-3_22_1/src/core/classification -I/usr/ports/graphics/qgis/work/QGIS-final-3_22_1/src/core/diagram -I/usr/ports/graphics/qgis/work/QGIS-final-3_22_1/src/core/dxf -I/usr/ports/graphics/qgis/work/QGIS-final-3_22_1/src/core/editform -I/usr/ports/graphics/qgis/work/QGIS-final-3_22_1/src/core/effects -I/usr/ports/graphics/qgis/work/QGIS-final-3_22_1/src/core/expression -I/usr/ports/graphics/qgis/work/QGIS-final-3_22_1/src/core/externalstorage -I/usr/ports/graphics/qgis/work/QGIS-final-3_22_1/src/core/fieldformatter -I/usr/ports/graphics/qgis/work/QGIS-final-3_22_1/src/core/geometry -I/usr/ports/graphics/qgis/work/QGIS-final-3_22_1/src/core/geocms -I/usr/ports/graphics/qgis/work/QGIS-final-3_22_1/src/core/geocms/geonode -I/usr/ports/graphics/qgis/work/QGIS-final-3_22_1/src/core/geocoding -I/usr/ports/graphics/qgis/work/QGIS-final-3_22_1/src/core/gps -I/usr/ports/graphics/qgis/work/QGIS-final-3_22_1/src/core/labeling -I/usr/ports/graphics/qgis/work/QGIS-final-3_22_1/src/core/layertree -I/usr/ports/graphics/qgis/work/QGIS-final-3_22_1/src/core/layout -I/usr/ports/graphics/qgis/work/QGIS-final-3_22_1/src/core/locator -I/usr/ports/graphics/qgis/work/QGIS-final-3_22_1/src/core/maprenderer -I/usr/ports/graphics/qgis/work/QGIS-final-3_22_1/src/core/mesh -I/usr/ports/graphics/qgis/work/QGIS-final-3_22_1/src/core/metadata -I/usr/ports/graphics/qgis/work/QGIS-final-3_22_1/src/core/network -I/usr/ports/graphics/qgis/work/QGIS-final-3_22_1/src/core/numericformats -I/usr/ports/graphics/qgis/work/QGIS-final-3_22_1/src/core/pal -I/usr/ports/graphics/qgis/work/QGIS-final-3_22_1/src/core/pointcloud -I/usr/ports/graphics/qgis/work/QGIS-final-3_22_1/src/core/processing -I/usr/ports/graphics/qgis/work/QGIS-final-3_22_1/src/core/processing/models -I/usr/ports/graphics/qgis/work/QGIS-final-3_22_1/src/core/proj -I/usr/ports/graphics/qgis/work/QGIS-final-3_22_1/src/core/project -I/usr/ports/graphics/qgis/work/QGIS-final-3_22_1/src/core/providers -I/usr/ports/graphics/qgis/work/QGIS-final-3_22_1/src/core/providers/arcgis -I/usr/ports/graphics/qgis/work/QGIS-final-3_22_1/src/core/providers/memory -I/usr/ports/graphics/qgis/work/QGIS-final-3_22_1/src/core/providers/gdal -I/usr/ports/graphics/qgis/work/QGIS-final-3_22_1/src/core/providers/ogr -I/usr/ports/graphics/qgis/work/QGIS-final-3_22_1/src/core/providers/meshmemory -I/usr/ports/graphics/qgis/work/QGIS-final-3_22_1/src/core/raster -I/usr/ports/graphics/qgis/work/QGIS-final-3_22_1/src/core/renderer -I/usr/ports/graphics/qgis/work/QGIS-final-3_22_1/src/core/scalebar -I/usr/ports/graphics/qgis/work/QGIS-final-3_22_1/src/core/settings -I/usr/ports/graphics/qgis/work/QGIS-final-3_22_1/src/core/symbology -I/usr/ports/graphics/qgis/work/QGIS-final-3_22_1/src/core/textrenderer -I/usr/ports/graphics/qgis/work/QGIS-final-3_22_1/src/core/validity -I/usr/ports/graphics/qgis/work/QGIS-final-3_22_1/src/core/vector -I/usr/ports/graphics/qgis/work/QGIS-final-3_22_1/src/core/vectortile -I/usr/ports/graphics/qgis/work/QGIS-final-3_22_1/external -I/usr/ports/graphics/qgis/work/QGIS-final-3_22_1/external/nlohmann -I/usr/ports/graphics/qgis/work/QGIS-final-3_22_1/external/kdbush/include -I/usr/ports/graphics/qgis/work/QGIS-final-3_22_1/external/nmea -I/usr/ports/graphics/qgis/work/QGIS-final-3_22_1/external/rtree/include -I/usr/ports/graphics/qgis/work/QGIS-final-3_22_1/external/meshOptimizer -isystem /usr/local/include -isystem /usr/local/include/lazperf -isystem /usr/local/include/qt5 -isystem /usr/local/include/qt5/QtCore -isystem /usr/local/lib/qt5/mkspecs/freebsd-clang -isystem /usr/local/include/qt5/QtGui -isystem /usr/local/include/qt5/QtXml -isystem /usr/local/include/qt5/QtWidgets -isystem /usr/local/include/qt5/QtSvg -isystem /usr/local/include/qt5/QtPrintSupport -isystem /usr/local/include/qt5/QtNetwork -isystem /usr/local/include/qt5/QtSql -isystem /usr/local/include/qt5/QtConcurrent -isystem /usr/local/include/Qca-qt5/QtCrypto -isystem /usr/local/include/qt5keychain -isystem /usr/local/include/qt5/QtSerialPort -isystem /usr/local/include/qt5/QtWebKitWidgets -isystem /usr/local/include/qt5/QtWebKit -isystem /usr/local/include/qt5/QtPositioning -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -Wall -Wextra -Wno-long-long -Wformat-security -Wno-strict-aliasing -Wnon-virtual-dtor -Wno-redundant-move -Wreturn-type-c-linkage -Woverloaded-virtual -Wimplicit-fallthrough -Qunused-arguments -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -fPIC -fvisibility=hidden -fPIC -std=gnu++17 -MD -MT src/core/CMakeFiles/qgis_core.dir/providers/ogr/qgsogrproviderutils.cpp.o -MF CMakeFiles/qgis_core.dir/providers/ogr/qgsogrproviderutils.cpp.o.d -o CMakeFiles/qgis_core.dir/providers/ogr/qgsogrproviderutils.cpp.o -c /usr/ports/graphics/qgis/work/QGIS-final-3_22_1/src/core/providers/ogr/qgsogrproviderutils.cpp
/usr/ports/graphics/qgis/work/QGIS-final-3_22_1/src/core/providers/ogr/qgsogrproviderutils.cpp:2595:34: error: no matching constructor for initialization of 'QgsOgrDatasetSharedPtr' (aka 'shared_ptr<QgsOgrDataset>')
  QgsOgrDatasetSharedPtr dsRet = QgsOgrDatasetSharedPtr( new QgsOgrDataset(), QgsOgrProviderUtils::releaseDataset );
                                 ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/v1/__memory/shared_ptr.h:469:26: note: candidate constructor template not viable: no known conversion from 'QgsOgrDataset *' to 'std::nullptr_t' (aka 'nullptr_t') for 1st argument
    template <class _Dp> shared_ptr(nullptr_t __p, _Dp __d);
                         ^
/usr/include/c++/v1/__memory/shared_ptr.h:464:9: note: candidate template ignored: requirement '__shared_ptr_deleter_ctor_reqs<void (*)(QgsOgrDataset *&), QgsOgrDataset, QgsOgrDataset>::value' was not satisfied [with _Yp = QgsOgrDataset, _Dp = void (*)(QgsOgrDataset *&)]
        shared_ptr(_Yp* __p, _Dp __d,
        ^
/usr/include/c++/v1/__memory/shared_ptr.h:471:51: note: candidate template ignored: could not match 'shared_ptr<type-parameter-0-0>' against 'QgsOgrDataset *'
    template<class _Yp> _LIBCPP_INLINE_VISIBILITY shared_ptr(const shared_ptr<_Yp>& __r, element_type* __p) _NOEXCEPT;
                                                  ^
/usr/include/c++/v1/__memory/shared_ptr.h:476:9: note: candidate template ignored: could not match 'shared_ptr<type-parameter-0-0>' against 'QgsOgrDataset *'
        shared_ptr(const shared_ptr<_Yp>& __r,
        ^
/usr/include/c++/v1/__memory/shared_ptr.h:481:52: note: candidate template ignored: could not match 'shared_ptr<type-parameter-0-0>' against 'QgsOgrDataset *'
    template<class _Yp> _LIBCPP_INLINE_VISIBILITY shared_ptr(shared_ptr<_Yp>&& __r,
                                                   ^
/usr/include/c++/v1/__memory/shared_ptr.h:484:34: note: candidate template ignored: could not match 'weak_ptr<type-parameter-0-0>' against 'QgsOgrDataset *'
    template<class _Yp> explicit shared_ptr(const weak_ptr<_Yp>& __r,
                                 ^
/usr/include/c++/v1/__memory/shared_ptr.h:488:9: note: candidate template ignored: could not match 'auto_ptr<type-parameter-0-0>' against 'QgsOgrDataset *'
        shared_ptr(auto_ptr<_Yp>&& __r,
        ^
/usr/include/c++/v1/__memory/shared_ptr.h:492:9: note: candidate template ignored: could not match 'unique_ptr<type-parameter-0-0, type-parameter-0-1>' against 'QgsOgrDataset *'
        shared_ptr(unique_ptr<_Yp, _Dp>&&,
        ^
/usr/include/c++/v1/__memory/shared_ptr.h:500:9: note: candidate template ignored: could not match 'unique_ptr<type-parameter-0-0, type-parameter-0-1>' against 'QgsOgrDataset *'
        shared_ptr(unique_ptr<_Yp, _Dp>&&,
        ^
/usr/include/c++/v1/__memory/shared_ptr.h:441:23: note: candidate constructor not viable: requires 1 argument, but 2 were provided
    _LIBCPP_CONSTEXPR shared_ptr(nullptr_t) _NOEXCEPT;
                      ^
/usr/include/c++/v1/__memory/shared_ptr.h:454:14: note: candidate constructor template not viable: requires single argument '__p', but 2 arguments were provided
    explicit shared_ptr(_Yp* __p) : __ptr_(__p) {
             ^
/usr/include/c++/v1/__memory/shared_ptr.h:473:5: note: candidate constructor not viable: requires single argument '__r', but 2 arguments were provided
    shared_ptr(const shared_ptr& __r) _NOEXCEPT;
    ^
/usr/include/c++/v1/__memory/shared_ptr.h:480:5: note: candidate constructor not viable: requires single argument '__r', but 2 arguments were provided
    shared_ptr(shared_ptr&& __r) _NOEXCEPT;
    ^
/usr/include/c++/v1/__memory/shared_ptr.h:470:40: note: candidate constructor template not viable: requires 3 arguments, but 2 were provided
    template <class _Dp, class _Alloc> shared_ptr(nullptr_t __p, _Dp __d, _Alloc __a);
                                       ^
/usr/include/c++/v1/__memory/shared_ptr.h:439:23: note: candidate constructor not viable: requires 0 arguments, but 2 were provided
    _LIBCPP_CONSTEXPR shared_ptr() _NOEXCEPT;
                      ^
/usr/include/c++/v1/__memory/shared_ptr.h:467:9: note: candidate constructor template not viable: requires at least 3 arguments, but 2 were provided
        shared_ptr(_Yp* __p, _Dp __d, _Alloc __a,
        ^
1 error generated.
gmake[4]: *** [src/core/CMakeFiles/qgis_core.dir/build.make:4635: src/core/CMakeFiles/qgis_core.dir/providers/ogr/qgsogrproviderutils.cpp.o] Error 1
gmake[4]: Leaving directory '/usr/ports/graphics/qgis/work/.build'
--------------------------------------


Trial and error showed that graphics/qgis builds correctly under CURRENT until commit b61bce17f346d79cecfd8f195a64b10f77be43b1 [1]. The above error message occurs immediately after replacing llvm12 with llvm13 in commit 397a8ba05313cc3815d219c9d1b2de1372fcb561 [2].

[1] https://freshbsd.org/freebsd/src/commit/b61bce17f346d79cecfd8f195a64b10f77be43b1
[2] https://freshbsd.org/freebsd/src/commit/397a8ba05313cc3815d219c9d1b2de1372fcb561


As far as I can say it does not help to use ports llvm instead. I tried already for llvm versions 9 to 13 via

    BUILD_DEPENDS+=  clang${LLVM_VER}:devel/llvm${LLVM_VER}
    LLVM_VER=        13
    CPP=             clang-cpp${LLVM_VER}
    CC=              clang${LLVM_VER}
    CXX=             clang++${LLVM_VER}


I had already asked on developers@ about this problem and dim@ expressed the assumption that it "is likely some problem with the constructor it's trying to invoke here, i.e. some missing or incompatible argument" (thanks, Dimitry).
Comment 1 Rainer Hurling freebsd_committer freebsd_triage 2021-11-21 16:09:38 UTC
If possible, should this problem also be solved before LLVM_DEFAULT=13 becomes the default compiler for ports?

bug #258209 (the llvm-13 exp-run PR) had already found solutions for other ports.
Comment 2 Rainer Hurling freebsd_committer freebsd_triage 2021-11-21 16:17:45 UTC
In private mail, lbartoletti@ gave me an info about the QGIS file, which fails. It is present since months, the file was splited in june 2021 [1].

[1] https://github.com/qgis/QGIS/pull/43799/files#
Comment 3 Dimitry Andric freebsd_committer freebsd_triage 2021-11-21 19:37:06 UTC
Created attachment 229644 [details]
Correct parameter type for QgsOgrDataset deleter

Here's a patch that should hopefully fix it. I've blindly typed it since my dependencies are still building (it's now chugging through qtwebengine which takes a few hours still).

FWIW this changed with https://reviews.llvm.org/D81414 (aka https://github.com/llvm/llvm-project/commit/dbc89028d737), where the constraints on std::shared_ptr were tightened. (See also https://wg21.link/LWG2875)

E.g. if you pass an explicit deleter to a std::shared_ptr<T> constructor, and the deleter is a plain function, the function must now have the prototype "void deleter(T*)".

But with this particular issue in qgis, they have "void QgsOgrProviderUtils::releaseDataset( QgsOgrDataset *&ds )", and they attempt to 'clear' the passed pointer to null after deletion, which is why they want to use a reference to a QgsOgrDataset pointer instead.
Comment 4 Rainer Hurling freebsd_committer freebsd_triage 2021-11-22 10:25:31 UTC
(In reply to Dimitry Andric from comment #3)

Hi Dimitry,

Thank you very much for the patch! It can be applied cleanly. However, I get exactly the same error message when building under 14.0-CURRENT (as in comment #0).

I hope I didn't miss anything when patching.

Did you manage to build your portstree in the meantime so that you can test QGIS in Poudriere?
Comment 5 Dimitry Andric freebsd_committer freebsd_triage 2021-11-22 13:52:40 UTC
Created attachment 229657 [details]
Correct parameter type for QgsOgrDataset deleter (v2)

(In reply to Rainer Hurling from comment #4)

I ran into another unrelated error with the science/py-scipy port, which is a runtime dependency of qgis:

In file included from scipy/interpolate/_rbfinterp_pythran.cpp:1:
In file included from /usr/local/lib/python3.9/site-packages/pythran/pythonic/core.hpp:36:
In file included from /usr/local/lib/python3.9/site-packages/pythran/pythonic/types/slice.hpp:5:
In file included from /usr/local/lib/python3.9/site-packages/pythran/pythonic/types/NoneType.hpp:8:
In file included from /usr/local/lib/python3.9/site-packages/pythran/pythonic/builtins/bool_.hpp:7:
In file included from /usr/local/lib/python3.9/site-packages/pythran/pythonic/types/tuple.hpp:13:
In file included from /usr/local/lib/python3.9/site-packages/pythran/pythonic/types/ndarray.hpp:10:
In file included from /usr/local/lib/python3.9/site-packages/pythran/pythonic/builtins/ValueError.hpp:6:
In file included from /usr/local/lib/python3.9/site-packages/pythran/pythonic/types/exceptions.hpp:6:
/usr/local/lib/python3.9/site-packages/pythran/pythonic/types/str.hpp:407:12: error: no matching constructor for initialization of 'typename str::reverse_iterator' (aka 'reverse_iterator<(anonymous namespace)::pythonic::types::string_
iterator>')
    return {data->rbegin()};
           ^~~~~~~~~~~~~~~~

However, it did manage to compile the source of qgis itself. One thing that I had forgotten was that the QgsOgrProviderUtils::releaseDataset() function also has a prototype in src/core/providers/ogr/qgsogrproviderutils.h.

E.g. the parameter type also needs to fixed in the header. Here is an updated patch.
Comment 6 Rainer Hurling freebsd_committer freebsd_triage 2021-11-22 21:18:10 UTC
(In reply to Dimitry Andric from comment #5)

Your 2nd patch builds fine on CURRENT :D

Now I am testing with 13.0, 12.3, both i386 and amd64. Later I will give gcc a try. After that, I will report back.


BTW: If the patch builds fine under gcc as well, I would like to provide it upstream via pull request (authorship dim@, of course). Or do you want to offer the patch upstream yourself?
Comment 7 Dimitry Andric freebsd_committer freebsd_triage 2021-11-22 21:45:30 UTC
(In reply to Rainer Hurling from comment #6)
Feel free to report it upstream, they may know you better than me. :)
Comment 8 commit-hook freebsd_committer freebsd_triage 2021-11-23 17:12:23 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=eacf34a1cf4b6b81e54d4fe74ad931ee93d1d8ef

commit eacf34a1cf4b6b81e54d4fe74ad931ee93d1d8ef
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2021-11-23 17:08:01 +0000
Commit:     Rainer Hurling <rhurlin@FreeBSD.org>
CommitDate: 2021-11-23 17:08:01 +0000

    graphics/qgis: Fix on CURRENT after llvm13 intro

    Right after replacing llvm12 with llvm13 in base (commits b61bce17f346d79cecfd8f195a64b10f77be43b1 to 397a8ba05313cc3815d219c9d1b2de1372fcb561) graphics/qgis was broken on 14.0-CURRENT with

    /usr/ports/graphics/qgis/work/QGIS-final-3_22_1/src/core/providers/ogr/qgsogrproviderutils.cpp:2595:34: error: no matching constructor for initialization of 'QgsOgrDatasetSharedPtr' (aka 'shared_ptr<QgsOgrDataset>')
      QgsOgrDatasetSharedPtr dsRet = QgsOgrDatasetSharedPtr( new QgsOgrDataset(), QgsOgrProviderUtils::releaseDataset );

    Thanks to dim@ for the analysis and solution. Much appreciated!

    PR:             259967

 ...c_core_providers_ogr_qgsogrproviderutils.cpp (new) | 19 +++++++++++++++++++
 ...src_core_providers_ogr_qgsogrproviderutils.h (new) | 11 +++++++++++
 2 files changed, 30 insertions(+)
Comment 9 commit-hook freebsd_committer freebsd_triage 2021-11-23 17:16:24 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=af60a61a9333df126249d5659c350c4a7b969a9a

commit af60a61a9333df126249d5659c350c4a7b969a9a
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2021-11-23 17:13:29 +0000
Commit:     Rainer Hurling <rhurlin@FreeBSD.org>
CommitDate: 2021-11-23 17:16:16 +0000

    graphics/qgis-ltr: Fix on CURRENT after llvm13 intro

    Right after replacing llvm12 with llvm13 in base (commits b61bce17f346d79cecfd8f195a64b10f77be43b1 to 397a8ba05313cc3815d219c9d1b2de1372fcb561) graphics/qgis-ltr was broken on 14.0-CURRENT with

    /usr/ports/graphics/qgis/work/QGIS-final-3_16_14/src/core/providers/ogr/qgsogrproviderutils.cpp:5971:34: error: no matching constructor for initialization of 'QgsOgrDatasetSharedPtr' (aka 'shared_ptr<QgsOgrDataset>')
      QgsOgrDatasetSharedPtr dsRet = QgsOgrDatasetSharedPtr( new QgsOgrDataset(), QgsOgrProviderUtils::releaseDataset );

    Thanks to dim@ for the analysis and solution. Much appreciated!

    PR:             259967

 ...c_core_providers_ogr_qgsogrproviderutils.cpp (new) | 19 +++++++++++++++++++
 ...src_core_providers_ogr_qgsogrproviderutils.h (new) | 11 +++++++++++
 2 files changed, 30 insertions(+)
Comment 10 Rainer Hurling freebsd_committer freebsd_triage 2021-11-23 17:25:44 UTC
Committed. Many thanks again for the patch(es), Dimitry. Very helpful :)
Comment 11 commit-hook freebsd_committer freebsd_triage 2021-11-23 19:34:52 UTC
A commit in branch 2021Q4 references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=75007752abec044026edbb53aa0742cc47b49a89

commit 75007752abec044026edbb53aa0742cc47b49a89
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2021-11-23 17:08:01 +0000
Commit:     Rainer Hurling <rhurlin@FreeBSD.org>
CommitDate: 2021-11-23 19:32:31 +0000

    graphics/qgis: Fix on CURRENT after llvm13 intro

    Right after replacing llvm12 with llvm13 in base (commits b61bce17f346d79cecfd8f195a64b10f77be43b1 to 397a8ba05313cc3815d219c9d1b2de1372fcb561) graphics/qgis was broken on 14.0-CURRENT with

    /usr/ports/graphics/qgis/work/QGIS-final-3_22_1/src/core/providers/ogr/qgsogrproviderutils.cpp:2595:34: error: no matching constructor for initialization of 'QgsOgrDatasetSharedPtr' (aka 'shared_ptr<QgsOgrDataset>')
      QgsOgrDatasetSharedPtr dsRet = QgsOgrDatasetSharedPtr( new QgsOgrDataset(), QgsOgrProviderUtils::releaseDataset );

    Thanks to dim@ for the analysis and solution. Much appreciated!

    PR:             259967

 ...c_core_providers_ogr_qgsogrproviderutils.cpp (new) | 19 +++++++++++++++++++
 ...src_core_providers_ogr_qgsogrproviderutils.h (new) | 11 +++++++++++
 2 files changed, 30 insertions(+)
Comment 12 commit-hook freebsd_committer freebsd_triage 2021-11-23 19:35:53 UTC
A commit in branch 2021Q4 references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=0469465aeaf5729ed8b50b412721508edb136fbb

commit 0469465aeaf5729ed8b50b412721508edb136fbb
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2021-11-23 17:13:29 +0000
Commit:     Rainer Hurling <rhurlin@FreeBSD.org>
CommitDate: 2021-11-23 19:35:05 +0000

    graphics/qgis-ltr: Fix on CURRENT after llvm13 intro

    Right after replacing llvm12 with llvm13 in base (commits b61bce17f346d79cecfd8f195a64b10f77be43b1 to 397a8ba05313cc3815d219c9d1b2de1372fcb561) graphics/qgis-ltr was broken on 14.0-CURRENT with

    /usr/ports/graphics/qgis/work/QGIS-final-3_16_14/src/core/providers/ogr/qgsogrproviderutils.cpp:5971:34: error: no matching constructor for initialization of 'QgsOgrDatasetSharedPtr' (aka 'shared_ptr<QgsOgrDataset>')
      QgsOgrDatasetSharedPtr dsRet = QgsOgrDatasetSharedPtr( new QgsOgrDataset(), QgsOgrProviderUtils::releaseDataset );

    Thanks to dim@ for the analysis and solution. Much appreciated!

    PR:             259967
    (cherry picked from commit af60a61a9333df126249d5659c350c4a7b969a9a)

 ...c_core_providers_ogr_qgsogrproviderutils.cpp (new) | 19 +++++++++++++++++++
 ...src_core_providers_ogr_qgsogrproviderutils.h (new) | 11 +++++++++++
 2 files changed, 30 insertions(+)