[QGIS-Developer] Understanding errors while building QGIS master
Hernán De Angelis
variablestarlight at gmail.com
Tue Apr 29 04:13:19 PDT 2025
I can now confirm that 3.42.1 and 3.42.2 compile well and trouble-free
in openSUSE Tumbleweed using GCC 14.2, Qt 6.9.0 and internal nlohmann
json. I have not tried GCC 15 nor clang yet.
My current belief is that something may not be completely right with the
current integration of nlohmann in QGIS master. I will report an issue
after more tests.
Thanks Jorge and Stefanos for help.
Hernán
Den 2025-04-29 kl. 10:34, skrev Hernán De Angelis:
> Hi Stefanos,
>
> Thanks for the suggestion, I will definitely try that. In any case it
> is baffling that build fails using both internal and external (3.12).
>
> I currently suspect deeper issues in gcc and how libstdc++ is linked
> in my system or the may be the OS. Up to two weeks ago I could compile
> QGIS painlessly.
>
> Hernán
>
> Den 2025-04-29 kl. 10:18, skrev Stefanos Natsis:
>>
>> Hi Hernan,
>>
>> Nlohmann json got updated to 3.11.3 in
>> https://github.com/qgis/QGIS/pull/61597 a few days ago, maybe you
>> could try building master before that?
>>
>> Best
>>
>> Stefanos
>>
>>
>> On Tue, Apr 29, 2025, 10:04 AM Hernán De Angelis via QGIS-Developer
>> <qgis-developer at lists.osgeo.org> wrote:
>>
>> Hi
>>
>> I seek help in understanding errors (see excerpt below) I am
>> currently experiencing while building QGIS master in a fresh
>> openSUSE Tumbleweed install. These errors seem to originate in
>> nlohmann json. I am used to compile QGIS from source but never
>> seen these errors before and have trouble figuring out where they
>> originate and what a possible solution could be.
>>
>> I am using Qt 6.9.0, and tried compiling using both GCC 14 and
>> 15. Passing the CXX flag "-std=c++17" does not seem to help. I
>> tried using NLOHMANN both internal and also using the latest
>> version compiled locally (3.12, as in error log below) but both
>> fail in a similar way.
>>
>> I compiled QGIS master as late as 6 april without problems in a
>> previous openSUSE install. There is a very real the possibility
>> that recent changes in GCC14 and 15 regarding required standards
>> are playing a part here, as well as packaging changes in openSUSE
>> Tumbleweed. However, as I am unsure what the cause may be I would
>> like to ask the developers if these errors look familiar to you
>> and if they suggest something.
>>
>> Thanks in advance
>>
>> Hernán
>>
>>
>>
>>
>>
>>
>>
>>
>> [ 12%] Built target staged-plugins-on-build
>> In file included from
>> /usr/local/src/QGIS/external/nlohmann/detail/value_t.hpp:16,
>> from
>> /usr/local/src/QGIS/external/nlohmann/detail/exceptions.hpp:20,
>> from
>> /usr/local/src/QGIS/external/nlohmann/detail/conversions/from_json.hpp:23,
>> from
>> /usr/local/src/QGIS/external/nlohmann/adl_serializer.hpp:14,
>> from
>> /usr/local/src/QGIS/external/nlohmann/json.hpp:34,
>> from
>> /usr/local/src/QGIS/external/pdal_wrench/vpc.cpp:26:
>> /usr/local/src/QGIS/external/nlohmann/detail/macro_scope.hpp:257:63:
>> error: wrong number of template arguments (11, should be at least 0)
>> 257 | AllocatorType, JSONSerializer, BinaryType,
>> CustomBaseClass>
>> | ^
>> /usr/local/src/QGIS/external/nlohmann/detail/meta/type_traits.hpp:53:22:
>> note: in expansion of macro ‘NLOHMANN_BASIC_JSON_TPL’
>> 53 | struct is_basic_json<NLOHMANN_BASIC_JSON_TPL> :
>> std::true_type {};
>> | ^~~~~~~~~~~~~~~~~~~~~~~
>> In file included from /usr/local/include/pdal/PDALUtils.hpp:39,
>> from /usr/local/include/pdal/PointRef.hpp:37,
>> from /usr/local/include/pdal/Geometry.hpp:37,
>> from
>> /usr/local/src/QGIS/external/pdal_wrench/vpc.hpp:18,
>> from
>> /usr/local/src/QGIS/external/pdal_wrench/vpc.cpp:19:
>> /usr/local/include/pdal/JsonFwd.hpp:40:7: note: provided for
>> ‘template<template<class U, class V, class ... Args> class
>> ObjectType, template<class U, class ... Args> class ArrayType,
>> class StringType, class BooleanType, class NumberIntegerType,
>> class NumberUnsignedType, class NumberFloatType, template<class
>> U> class AllocatorType, template<class T, class SFINAE> class
>> JSONSerializer, class BinaryType> class nlohmann::basic_json’
>> 40 | class basic_json;
>> | ^~~~~~~~~~
>> In file included from
>> /usr/local/src/QGIS/external/nlohmann/detail/exceptions.hpp:25:
>> /usr/local/src/QGIS/external/nlohmann/detail/meta/type_traits.hpp:53:45:
>> error: template argument 1 is invalid
>> 53 | struct is_basic_json<NLOHMANN_BASIC_JSON_TPL> :
>> std::true_type {};
>> | ^
>> /usr/local/src/QGIS/external/nlohmann/detail/macro_scope.hpp:257:63:
>> error: wrong number of template arguments (11, should be at least 0)
>> 257 | AllocatorType, JSONSerializer, BinaryType,
>> CustomBaseClass>
>> | ^
>> /usr/local/src/QGIS/external/nlohmann/detail/json_pointer.hpp:51:28:
>> note: in expansion of macro ‘NLOHMANN_BASIC_JSON_TPL’
>> 51 | struct string_t_helper<NLOHMANN_BASIC_JSON_TPL>
>> | ^~~~~~~~~~~~~~~~~~~~~~~
>> /usr/local/include/pdal/JsonFwd.hpp:40:7: note: provided for
>> ‘template<template<class U, class V, class ... Args> class
>> ObjectType, template<class U, class ... Args> class ArrayType,
>> class StringType, class BooleanType, class NumberIntegerType,
>> class NumberUnsignedType, class NumberFloatType, template<class
>> U> class AllocatorType, template<class T, class SFINAE> class
>> JSONSerializer, class BinaryType> class nlohmann::basic_json’
>> 40 | class basic_json;
>> | ^~~~~~~~~~
>> In file included from
>> /usr/local/src/QGIS/external/nlohmann/json.hpp:50:
>> /usr/local/src/QGIS/external/nlohmann/detail/json_pointer.hpp:51:51:
>> error: template argument 1 is invalid
>> 51 | struct string_t_helper<NLOHMANN_BASIC_JSON_TPL>
>> | ^
>> /usr/local/src/QGIS/external/nlohmann/json.hpp:104:30: error:
>> reference to ‘json_pointer’ is ambiguous
>> 104 | friend class ::nlohmann::json_pointer;
>> | ^~~~~~~~~~~~
>> /usr/local/src/QGIS/external/nlohmann/detail/json_pointer.hpp:35:7:
>> note: candidates are: ‘template<class RefStringType> class
>> nlohmann::json_abi_v3_11_3::json_pointer’
>> 35 | class json_pointer
>> | ^~~~~~~~~~~~
>> /usr/local/include/pdal/JsonFwd.hpp:45:7: note:
>> ‘template<class BasicJsonType> class nlohmann::json_pointer’
>> 45 | class json_pointer;
>> | ^~~~~~~~~~~~
>> /usr/local/src/QGIS/external/nlohmann/json.hpp:166:26: error:
>> reference to ‘json_pointer’ is ambiguous
>> 166 | using json_pointer =
>> ::nlohmann::json_pointer<StringType>;
>> | ^~
>> /usr/local/src/QGIS/external/nlohmann/detail/json_pointer.hpp:35:7:
>> note: candidates are: ‘template<class RefStringType> class
>> nlohmann::json_abi_v3_11_3::json_pointer’
>> 35 | class json_pointer
>> | ^~~~~~~~~~~~
>> /usr/local/include/pdal/JsonFwd.hpp:45:7: note:
>> ‘template<class BasicJsonType> class nlohmann::json_pointer’
>> 45 | class json_pointer;
>> | ^~~~~~~~~~~~
>> /usr/local/src/QGIS/external/nlohmann/json.hpp:2327:21: error:
>> missing template argument list after
>> ‘nlohmann::json_abi_v3_11_3::json_pointer’; template placeholder
>> not permitted in parameter
>> 2327 | ValueType value(const json_pointer& ptr, const
>> ValueType& default_value) const
>> | ^~~~~
>> | <>
>> /usr/local/src/QGIS/external/nlohmann/detail/json_pointer.hpp:35:7:
>> note: ‘template<class RefStringType> class
>> nlohmann::json_abi_v3_11_3::json_pointer’ declared here
>> 35 | class json_pointer
>> | ^~~~~~~~~~~~
>> /usr/local/src/QGIS/external/nlohmann/json.hpp:2352:22: error:
>> missing template argument list after
>> ‘nlohmann::json_abi_v3_11_3::json_pointer’; template placeholder
>> not permitted in parameter
>> 2352 | ReturnType value(const json_pointer& ptr, ValueType
>> && default_value) const
>> | ^~~~~
>> | <>
>> /usr/local/src/QGIS/external/nlohmann/detail/json_pointer.hpp:35:7:
>> note: ‘template<class RefStringType> class
>> nlohmann::json_abi_v3_11_3::json_pointer’ declared here
>> 35 | class json_pointer
>> | ^~~~~~~~~~~~
>> /usr/local/src/QGIS/external/nlohmann/json.hpp:2376:27: error:
>> reference to ‘json_pointer’ is ambiguous
>> 2376 | ValueType value(const
>> ::nlohmann::json_pointer<BasicJsonType>& ptr, const ValueType&
>> default_value) const
>> | ^~
>> /usr/local/src/QGIS/external/nlohmann/detail/json_pointer.hpp:35:7:
>> note: candidates are: ‘template<class RefStringType> class
>> nlohmann::json_abi_v3_11_3::json_pointer’
>> 35 | class json_pointer
>> | ^~~~~~~~~~~~
>> /usr/local/include/pdal/JsonFwd.hpp:45:7: note:
>> ‘template<class BasicJsonType> class nlohmann::json_pointer’
>> 45 | class json_pointer;
>> | ^~~~~~~~~~~~
>> /usr/local/src/QGIS/external/nlohmann/json.hpp:2376:51: error:
>> expected ‘,’ or ‘...’ before ‘<’ token
>> 2376 | ValueType value(const
>> ::nlohmann::json_pointer<BasicJsonType>& ptr, const ValueType&
>> default_value) const
>> | ^
>> /usr/local/src/QGIS/external/nlohmann/json.hpp:2387:28: error:
>> reference to ‘json_pointer’ is ambiguous
>> 2387 | ReturnType value(const
>> ::nlohmann::json_pointer<BasicJsonType>& ptr, ValueType &&
>> default_value) const
>> | ^~
>> /usr/local/src/QGIS/external/nlohmann/detail/json_pointer.hpp:35:7:
>> note: candidates are: ‘template<class RefStringType> class
>> nlohmann::json_abi_v3_11_3::json_pointer’
>> 35 | class json_pointer
>> | ^~~~~~~~~~~~
>> /usr/local/include/pdal/JsonFwd.hpp:45:7: note:
>> ‘template<class BasicJsonType> class nlohmann::json_pointer’
>> 45 | class json_pointer;
>> | ^~~~~~~~~~~~
>> /usr/local/src/QGIS/external/nlohmann/json.hpp:2387:52: error:
>> expected ‘,’ or ‘...’ before ‘<’ token
>> 2387 | ReturnType value(const
>> ::nlohmann::json_pointer<BasicJsonType>& ptr, ValueType &&
>> default_value) const
>> | ^
>> /usr/local/src/QGIS/external/nlohmann/json.hpp:2745:19: error:
>> missing template argument list after
>> ‘nlohmann::json_abi_v3_11_3::json_pointer’; template placeholder
>> not permitted in parameter
>> 2745 | bool contains(const json_pointer& ptr) const
>> | ^~~~~
>> | <>
>> /usr/local/src/QGIS/external/nlohmann/detail/json_pointer.hpp:35:7:
>> note: ‘template<class RefStringType> class
>> nlohmann::json_abi_v3_11_3::json_pointer’ declared here
>> 35 | class json_pointer
>> | ^~~~~~~~~~~~
>> /usr/local/src/QGIS/external/nlohmann/json.hpp:2752:46: error:
>> reference to ‘json_pointer’ is ambiguous
>> 2752 | bool contains(const typename
>> ::nlohmann::json_pointer<BasicJsonType>& ptr) const
>> | ^~~~~~~~~~~~
>> /usr/local/src/QGIS/external/nlohmann/detail/json_pointer.hpp:35:7:
>> note: candidates are: ‘template<class RefStringType> class
>> nlohmann::json_abi_v3_11_3::json_pointer’
>> 35 | class json_pointer
>> | ^~~~~~~~~~~~
>> /usr/local/include/pdal/JsonFwd.hpp:45:7: note:
>> ‘template<class BasicJsonType> class nlohmann::json_pointer’
>> 45 | class json_pointer;
>> | ^~~~~~~~~~~~
>> /usr/local/src/QGIS/external/nlohmann/json.hpp:2752:58: error:
>> expected ‘,’ or ‘...’ before ‘<’ token
>> 2752 | bool contains(const typename
>> ::nlohmann::json_pointer<BasicJsonType>& ptr) const
>> | ^
>> /usr/local/src/QGIS/external/nlohmann/json.hpp:4618:26: error:
>> missing template argument list after
>> ‘nlohmann::json_abi_v3_11_3::json_pointer’; template placeholder
>> not permitted in parameter
>> 4618 | reference operator[](const json_pointer& ptr)
>> | ^~~~~
>> | <>
>> /usr/local/src/QGIS/external/nlohmann/detail/json_pointer.hpp:35:7:
>> note: ‘template<class RefStringType> class
>> nlohmann::json_abi_v3_11_3::json_pointer’ declared here
>> 35 | class json_pointer
>> | ^~~~~~~~~~~~
>> /usr/local/src/QGIS/external/nlohmann/json.hpp:4618:15: error:
>> ‘nlohmann::json_abi_v3_11_3::basic_json<ObjectType, ArrayType,
>> StringType, BooleanType, NumberIntegerType, NumberUnsignedType,
>> NumberFloatType, AllocatorType, JSONSerializer, BinaryType,
>> CustomBaseClass>::value_type&
>> nlohmann::json_abi_v3_11_3::basic_json<ObjectType, ArrayType,
>> StringType, BooleanType, NumberIntegerType, NumberUnsignedType,
>> NumberFloatType, AllocatorType, JSONSerializer, BinaryType,
>> CustomBaseClass>::operator[](...)’ must not have variable number
>> of arguments
>> 4618 | reference operator[](const json_pointer& ptr)
>> | ^~~~~~~~
>> /usr/local/src/QGIS/external/nlohmann/json.hpp:4625:32: error:
>> reference to ‘json_pointer’ is ambiguous
>> 4625 | reference operator[](const
>> ::nlohmann::json_pointer<BasicJsonType>& ptr)
>> | ^~
>> /usr/local/src/QGIS/external/nlohmann/detail/json_pointer.hpp:35:7:
>> note: candidates are: ‘template<class RefStringType> class
>> nlohmann::json_abi_v3_11_3::json_pointer’
>> 35 | class json_pointer
>> | ^~~~~~~~~~~~
>> /usr/local/include/pdal/JsonFwd.hpp:45:7: note:
>> ‘template<class BasicJsonType> class nlohmann::json_pointer’
>> 45 | class json_pointer;
>> | ^~~~~~~~~~~~
>> /usr/local/src/QGIS/external/nlohmann/json.hpp:4625:56: error:
>> expected ‘,’ or ‘...’ before ‘<’ token
>> 4625 | reference operator[](const
>> ::nlohmann::json_pointer<BasicJsonType>& ptr)
>> | ^
>> /usr/local/src/QGIS/external/nlohmann/json.hpp:4632:32: error:
>> missing template argument list after
>> ‘nlohmann::json_abi_v3_11_3::json_pointer’; template placeholder
>> not permitted in parameter
>> 4632 | const_reference operator[](const json_pointer& ptr) const
>> | ^~~~~
>> | <>
>> /usr/local/src/QGIS/external/nlohmann/detail/json_pointer.hpp:35:7:
>> note: ‘template<class RefStringType> class
>> nlohmann::json_abi_v3_11_3::json_pointer’ declared here
>> 35 | class json_pointer
>> | ^~~~~~~~~~~~
>> /usr/local/src/QGIS/external/nlohmann/json.hpp:4632:21: error:
>> ‘const nlohmann::json_abi_v3_11_3::basic_json<ObjectType,
>> ArrayType, StringType, BooleanType, NumberIntegerType,
>> NumberUnsignedType, NumberFloatType, AllocatorType,
>> JSONSerializer, BinaryType, CustomBaseClass>::value_type&
>> nlohmann::json_abi_v3_11_3::basic_json<ObjectType, ArrayType,
>> StringType, BooleanType, NumberIntegerType, NumberUnsignedType,
>> NumberFloatType, AllocatorType, JSONSerializer, BinaryType,
>> CustomBaseClass>::operator[](...) const’ must not have variable
>> number of arguments
>> 4632 | const_reference operator[](const json_pointer& ptr) const
>> | ^~~~~~~~
>> /usr/local/src/QGIS/external/nlohmann/json.hpp:4639:38: error:
>> reference to ‘json_pointer’ is ambiguous
>> 4639 | const_reference operator[](const
>> ::nlohmann::json_pointer<BasicJsonType>& ptr) const
>> | ^~
>> /usr/local/src/QGIS/external/nlohmann/detail/json_pointer.hpp:35:7:
>> note: candidates are: ‘template<class RefStringType> class
>> nlohmann::json_abi_v3_11_3::json_pointer’
>> 35 | class json_pointer
>> | ^~~~~~~~~~~~
>> /usr/local/include/pdal/JsonFwd.hpp:45:7: note:
>> ‘template<class BasicJsonType> class nlohmann::json_pointer’
>> 45 | class json_pointer;
>> | ^~~~~~~~~~~~
>> /usr/local/src/QGIS/external/nlohmann/json.hpp:4639:62: error:
>> expected ‘,’ or ‘...’ before ‘<’ token
>> 4639 | const_reference operator[](const
>> ::nlohmann::json_pointer<BasicJsonType>& ptr) const
>> | ^
>> /usr/local/src/QGIS/external/nlohmann/json.hpp:4646:18: error:
>> missing template argument list after
>> ‘nlohmann::json_abi_v3_11_3::json_pointer’; template placeholder
>> not permitted in parameter
>> 4646 | reference at(const json_pointer& ptr)
>> | ^~~~~
>> | <>
>> /usr/local/src/QGIS/external/nlohmann/detail/json_pointer.hpp:35:7:
>> note: ‘template<class RefStringType> class
>> nlohmann::json_abi_v3_11_3::json_pointer’ declared here
>> 35 | class json_pointer
>> | ^~~~~~~~~~~~
>> /usr/local/src/QGIS/external/nlohmann/json.hpp:4653:24: error:
>> reference to ‘json_pointer’ is ambiguous
>> 4653 | reference at(const
>> ::nlohmann::json_pointer<BasicJsonType>& ptr)
>> | ^~
>> /usr/local/src/QGIS/external/nlohmann/detail/json_pointer.hpp:35:7:
>> note: candidates are: ‘template<class RefStringType> class
>> nlohmann::json_abi_v3_11_3::json_pointer’
>> 35 | class json_pointer
>> | ^~~~~~~~~~~~
>> /usr/local/include/pdal/JsonFwd.hpp:45:7: note:
>> ‘template<class BasicJsonType> class nlohmann::json_pointer’
>> 45 | class json_pointer;
>> | ^~~~~~~~~~~~
>> /usr/local/src/QGIS/external/nlohmann/json.hpp:4653:48: error:
>> expected ‘,’ or ‘...’ before ‘<’ token
>> 4653 | reference at(const
>> ::nlohmann::json_pointer<BasicJsonType>& ptr)
>> | ^
>> /usr/local/src/QGIS/external/nlohmann/json.hpp:4660:24: error:
>> missing template argument list after
>> ‘nlohmann::json_abi_v3_11_3::json_pointer’; template placeholder
>> not permitted in parameter
>> 4660 | const_reference at(const json_pointer& ptr) const
>> | ^~~~~
>> | <>
>> /usr/local/src/QGIS/external/nlohmann/detail/json_pointer.hpp:35:7:
>> note: ‘template<class RefStringType> class
>> nlohmann::json_abi_v3_11_3::json_pointer’ declared here
>> 35 | class json_pointer
>> | ^~~~~~~~~~~~
>> /usr/local/src/QGIS/external/nlohmann/json.hpp:4667:30: error:
>> reference to ‘json_pointer’ is ambiguous
>> 4667 | const_reference at(const
>> ::nlohmann::json_pointer<BasicJsonType>& ptr) const
>> | ^~
>> /usr/local/src/QGIS/external/nlohmann/detail/json_pointer.hpp:35:7:
>> note: candidates are: ‘template<class RefStringType> class
>> nlohmann::json_abi_v3_11_3::json_pointer’
>> 35 | class json_pointer
>> | ^~~~~~~~~~~~
>> /usr/local/include/pdal/JsonFwd.hpp:45:7: note:
>> ‘template<class BasicJsonType> class nlohmann::json_pointer’
>> 45 | class json_pointer;
>> | ^~~~~~~~~~~~
>> /usr/local/src/QGIS/external/nlohmann/json.hpp:4667:54: error:
>> expected ‘,’ or ‘...’ before ‘<’ token
>> 4667 | const_reference at(const
>> ::nlohmann::json_pointer<BasicJsonType>& ptr) const
>> | ^
>>
>> _______________________________________________
>> QGIS-Developer mailing list
>> QGIS-Developer at lists.osgeo.org
>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20250429/27cedd02/attachment-0001.htm>
More information about the QGIS-Developer
mailing list