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
Rainer Hurling
2021-11-21 16:01:07 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. 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# 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. (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? 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. (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? (In reply to Rainer Hurling from comment #6) Feel free to report it upstream, they may know you better than me. :) 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(+) 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(+) Committed. Many thanks again for the patch(es), Dimitry. Very helpful :) 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(+) 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(+) |