Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 931581 - games-strategy/wesnoth-1.18.0 - .../src/utils/config_filters.hpp:43:125: error: no viable conversion from 'std::nullptr_t' to 'std::optional<double>'
Summary: games-strategy/wesnoth-1.18.0 - .../src/utils/config_filters.hpp:43:125: erro...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Games
URL: https://github.com/wesnoth/wesnoth/pu...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-05-08 12:45 UTC by ernsteiswuerfel
Modified: 2024-05-09 12:06 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (wesnoth-1.18.0:20240507-234005.log,275.74 KB, text/plain)
2024-05-08 12:45 UTC, ernsteiswuerfel
Details
emerge --info (file_931581.txt,8.01 KB, text/plain)
2024-05-08 12:46 UTC, ernsteiswuerfel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ernsteiswuerfel archtester 2024-05-08 12:45:31 UTC
Created attachment 892492 [details]
build.log

Builds fine on a glibc profile but fails on musl profiles.

But I think this is no strictly musl related issue as "/usr/include/c++/v1/optional:667:35: note: candidate constructor not viable: no known conversion from 'std::nullptr_t' to 'const optional<double> &' for 1st argument" points to sys-libs/libcxx-18.1.5:

[...]
[157/632] /usr/lib/llvm/18/bin/clang++ -DFIFODIR=\"/var/run/wesnothd\" -DHAS_RELATIVE_LOCALEDIR=1 -DHAVE_CONFIG_H -DHAVE_HISTORY -DHAVE_LIBDBUS -DLOCALEDIR=\"translations\" -DLUA_USE_POSIX -DWESNOTH_PATH=\"/usr/share/wesnoth\" -D_FORTIFY_SOURCE=2 -D_X11 -I/var/tmp/portage/games-strategy/wesnoth-1.18.0/work/wesnoth-1.18.0/src -I/var/tmp/portage/games-strategy/wesnoth-1.18.0/work/wesnoth-1.18.0_build/src -isystem /usr/include/pango-1.0 -isystem /usr/include/cairo -isystem /usr/include/libpng16 -isystem /usr/include/pixman-1 -isystem /usr/include/libmount -isystem /usr/include/blkid -isystem /usr/include/uuid -isystem /usr/include/json-c -isystem /usr/include/fribidi -isystem /usr/include/harfbuzz -isystem /usr/include/freetype2 -isystem /usr/include/glib-2.0 -isystem /usr/lib/glib-2.0/include -isystem /usr/lib/libffi/include -isystem /usr/include/dbus-1.0 -isystem /usr/lib/dbus-1.0/include -isystem /usr/include/elogind -isystem /usr/include/SDL2 -isystem /usr/include/webp -isystem /usr/include/opus  -Wall -Wextra -Werror=non-virtual-dtor -Wno-unused-local-typedefs -Wno-maybe-uninitialized -Wold-style-cast -Wtrampolines -Qunused-arguments -Wno-unknown-warning-option -Wmismatched-tags -Wno-conditional-uninitialized -Wno-unused-lambda-capture -Os -march=znver2 -pipe -fPIE -fstack-protector-strong -std=c++17 -MD -MT src/CMakeFiles/wesnoth-client.dir/utils/config_filters.cpp.o -MF src/CMakeFiles/wesnoth-client.dir/utils/config_filters.cpp.o.d -o src/CMakeFiles/wesnoth-client.dir/utils/config_filters.cpp.o -c /var/tmp/portage/games-strategy/wesnoth-1.18.0/work/wesnoth-1.18.0/src/utils/config_filters.cpp
ninja: job failed: /usr/lib/llvm/18/bin/clang++ -DFIFODIR=\"/var/run/wesnothd\" -DHAS_RELATIVE_LOCALEDIR=1 -DHAVE_CONFIG_H -DHAVE_HISTORY -DHAVE_LIBDBUS -DLOCALEDIR=\"translations\" -DLUA_USE_POSIX -DWESNOTH_PATH=\"/usr/share/wesnoth\" -D_FORTIFY_SOURCE=2 -D_X11 -I/var/tmp/portage/games-strategy/wesnoth-1.18.0/work/wesnoth-1.18.0/src -I/var/tmp/portage/games-strategy/wesnoth-1.18.0/work/wesnoth-1.18.0_build/src -isystem /usr/include/pango-1.0 -isystem /usr/include/cairo -isystem /usr/include/libpng16 -isystem /usr/include/pixman-1 -isystem /usr/include/libmount -isystem /usr/include/blkid -isystem /usr/include/uuid -isystem /usr/include/json-c -isystem /usr/include/fribidi -isystem /usr/include/harfbuzz -isystem /usr/include/freetype2 -isystem /usr/include/glib-2.0 -isystem /usr/lib/glib-2.0/include -isystem /usr/lib/libffi/include -isystem /usr/include/dbus-1.0 -isystem /usr/lib/dbus-1.0/include -isystem /usr/include/elogind -isystem /usr/include/SDL2 -isystem /usr/include/webp -isystem /usr/include/opus  -Wall -Wextra -Werror=non-virtual-dtor -Wno-unused-local-typedefs -Wno-maybe-uninitialized -Wold-style-cast -Wtrampolines -Qunused-arguments -Wno-unknown-warning-option -Wmismatched-tags -Wno-conditional-uninitialized -Wno-unused-lambda-capture -Os -march=znver2 -pipe -fPIE -fstack-protector-strong -std=c++17 -MD -MT src/CMakeFiles/wesnoth-client.dir/utils/config_filters.cpp.o -MF src/CMakeFiles/wesnoth-client.dir/utils/config_filters.cpp.o.d -o src/CMakeFiles/wesnoth-client.dir/utils/config_filters.cpp.o -c /var/tmp/portage/games-strategy/wesnoth-1.18.0/work/wesnoth-1.18.0/src/utils/config_filters.cpp
In file included from /var/tmp/portage/games-strategy/wesnoth-1.18.0/work/wesnoth-1.18.0/src/utils/config_filters.cpp:18:
/var/tmp/portage/games-strategy/wesnoth-1.18.0/work/wesnoth-1.18.0/src/utils/config_filters.hpp:43:125: error: no viable conversion from 'std::nullptr_t' to 'std::optional<double>'
   43 | bool double_matches_if_present(const config& filter, const config& cfg, const std::string& attribute, std::optional<double> def = NULL);
      |                                                                                                                             ^     ~~~~
/usr/include/c++/v1/optional:667:35: note: candidate constructor not viable: no known conversion from 'std::nullptr_t' to 'const optional<double> &' for 1st argument
  667 |   _LIBCPP_HIDE_FROM_ABI constexpr optional(const optional&) = default;
      |                                   ^        ~~~~~~~~~~~~~~~
/usr/include/c++/v1/optional:668:35: note: candidate constructor not viable: no known conversion from 'std::nullptr_t' to 'optional<double> &&' for 1st argument
  668 |   _LIBCPP_HIDE_FROM_ABI constexpr optional(optional&&)      = default;
      |                                   ^        ~~~~~~~~~~
/usr/include/c++/v1/optional:669:35: note: candidate constructor not viable: no known conversion from 'std::nullptr_t' to 'nullopt_t' for 1st argument
  669 |   _LIBCPP_HIDE_FROM_ABI constexpr optional(nullopt_t) noexcept {}
      |                                   ^        ~~~~~~~~~
/usr/include/c++/v1/optional:686:35: note: candidate template ignored: requirement '_CheckOptionalArgsCtor<std::nullptr_t>::__enable_implicit()' was not satisfied [with _Up = std::nullptr_t]
  686 |   _LIBCPP_HIDE_FROM_ABI constexpr optional(_Up&& __v) : __base(in_place, std::forward<_Up>(__v)) {}
      |                                   ^
/usr/include/c++/v1/optional:694:55: note: candidate template ignored: could not match 'optional<_Up>' against 'std::nullptr_t'
  694 |   _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 optional(const optional<_Up>& __v) {
      |                                                       ^
/usr/include/c++/v1/optional:705:55: note: candidate template ignored: could not match 'optional<_Up>' against 'std::nullptr_t'
  705 |   _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 optional(optional<_Up>&& __v) {
      |                                                       ^
/usr/include/c++/v1/optional:675:44: note: explicit constructor is not a candidate
  675 |   _LIBCPP_HIDE_FROM_ABI constexpr explicit optional(_InPlaceT, _Args&&... __args)
      |                                            ^
/usr/include/c++/v1/optional:689:44: note: explicit constructor is not a candidate
  689 |   _LIBCPP_HIDE_FROM_ABI constexpr explicit optional(_Up&& __v) : __base(in_place, std::forward<_Up>(__v)) {}
      |                                            ^
/usr/include/c++/v1/optional:699:64: note: explicit constructor is not a candidate
  699 |   _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 explicit optional(const optional<_Up>& __v) {
      |                                                                ^
/usr/include/c++/v1/optional:709:64: note: explicit constructor is not a candidate
  709 |   _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 explicit optional(optional<_Up>&& __v) {
      |                                                                ^
/var/tmp/portage/games-strategy/wesnoth-1.18.0/work/wesnoth-1.18.0/src/utils/config_filters.hpp:43:125: note: passing argument to parameter 'def' here
   43 | bool double_matches_if_present(const config& filter, const config& cfg, const std::string& attribute, std::optional<double> def = NULL);
      |                                                                                                                             ^
/var/tmp/portage/games-strategy/wesnoth-1.18.0/work/wesnoth-1.18.0/src/utils/config_filters.hpp:44:119: error: no viable conversion from 'std::nullptr_t' to 'std::optional<int>'
   44 | bool int_matches_if_present(const config& filter, const config& cfg, const std::string& attribute, std::optional<int> def = NULL);
      |                                                                                                                       ^     ~~~~
/usr/include/c++/v1/optional:667:35: note: candidate constructor not viable: no known conversion from 'std::nullptr_t' to 'const optional<int> &' for 1st argument
  667 |   _LIBCPP_HIDE_FROM_ABI constexpr optional(const optional&) = default;
      |                                   ^        ~~~~~~~~~~~~~~~
/usr/include/c++/v1/optional:668:35: note: candidate constructor not viable: no known conversion from 'std::nullptr_t' to 'optional<int> &&' for 1st argument
  668 |   _LIBCPP_HIDE_FROM_ABI constexpr optional(optional&&)      = default;
      |                                   ^        ~~~~~~~~~~
/usr/include/c++/v1/optional:669:35: note: candidate constructor not viable: no known conversion from 'std::nullptr_t' to 'nullopt_t' for 1st argument
  669 |   _LIBCPP_HIDE_FROM_ABI constexpr optional(nullopt_t) noexcept {}
      |                                   ^        ~~~~~~~~~
/usr/include/c++/v1/optional:686:35: note: candidate template ignored: requirement '_CheckOptionalArgsCtor<std::nullptr_t>::__enable_implicit()' was not satisfied [with _Up = std::nullptr_t]
  686 |   _LIBCPP_HIDE_FROM_ABI constexpr optional(_Up&& __v) : __base(in_place, std::forward<_Up>(__v)) {}
      |                                   ^
/usr/include/c++/v1/optional:694:55: note: candidate template ignored: could not match 'optional<_Up>' against 'std::nullptr_t'
  694 |   _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 optional(const optional<_Up>& __v) {
      |                                                       ^
/usr/include/c++/v1/optional:705:55: note: candidate template ignored: could not match 'optional<_Up>' against 'std::nullptr_t'
  705 |   _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 optional(optional<_Up>&& __v) {
      |                                                       ^
/usr/include/c++/v1/optional:675:44: note: explicit constructor is not a candidate
  675 |   _LIBCPP_HIDE_FROM_ABI constexpr explicit optional(_InPlaceT, _Args&&... __args)
      |                                            ^
/usr/include/c++/v1/optional:689:44: note: explicit constructor is not a candidate
  689 |   _LIBCPP_HIDE_FROM_ABI constexpr explicit optional(_Up&& __v) : __base(in_place, std::forward<_Up>(__v)) {}
      |                                            ^
/usr/include/c++/v1/optional:699:64: note: explicit constructor is not a candidate
  699 |   _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 explicit optional(const optional<_Up>& __v) {
      |                                                                ^
/usr/include/c++/v1/optional:709:64: note: explicit constructor is not a candidate
  709 |   _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 explicit optional(optional<_Up>&& __v) {
      |                                                                ^
/var/tmp/portage/games-strategy/wesnoth-1.18.0/work/wesnoth-1.18.0/src/utils/config_filters.hpp:44:119: note: passing argument to parameter 'def' here
   44 | bool int_matches_if_present(const config& filter, const config& cfg, const std::string& attribute, std::optional<int> def = NULL);
      |                                                                                                                       ^
/var/tmp/portage/games-strategy/wesnoth-1.18.0/work/wesnoth-1.18.0/src/utils/config_filters.hpp:65:121: error: no viable conversion from 'std::nullptr_t' to 'std::optional<int>'
   65 |         const config& filter, const config& cfg, const std::string& attribute, const std::string& opposite, std::optional<int> def = NULL);
      |                                                                                                                                ^     ~~~~
/usr/include/c++/v1/optional:667:35: note: candidate constructor not viable: no known conversion from 'std::nullptr_t' to 'const optional<int> &' for 1st argument
  667 |   _LIBCPP_HIDE_FROM_ABI constexpr optional(const optional&) = default;
      |                                   ^        ~~~~~~~~~~~~~~~
/usr/include/c++/v1/optional:668:35: note: candidate constructor not viable: no known conversion from 'std::nullptr_t' to 'optional<int> &&' for 1st argument
  668 |   _LIBCPP_HIDE_FROM_ABI constexpr optional(optional&&)      = default;
      |                                   ^        ~~~~~~~~~~
/usr/include/c++/v1/optional:669:35: note: candidate constructor not viable: no known conversion from 'std::nullptr_t' to 'nullopt_t' for 1st argument
  669 |   _LIBCPP_HIDE_FROM_ABI constexpr optional(nullopt_t) noexcept {}
      |                                   ^        ~~~~~~~~~
/usr/include/c++/v1/optional:686:35: note: candidate template ignored: requirement '_CheckOptionalArgsCtor<std::nullptr_t>::__enable_implicit()' was not satisfied [with _Up = std::nullptr_t]
  686 |   _LIBCPP_HIDE_FROM_ABI constexpr optional(_Up&& __v) : __base(in_place, std::forward<_Up>(__v)) {}
      |                                   ^
/usr/include/c++/v1/optional:694:55: note: candidate template ignored: could not match 'optional<_Up>' against 'std::nullptr_t'
  694 |   _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 optional(const optional<_Up>& __v) {
      |                                                       ^
/usr/include/c++/v1/optional:705:55: note: candidate template ignored: could not match 'optional<_Up>' against 'std::nullptr_t'
  705 |   _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 optional(optional<_Up>&& __v) {
      |                                                       ^
/usr/include/c++/v1/optional:675:44: note: explicit constructor is not a candidate
  675 |   _LIBCPP_HIDE_FROM_ABI constexpr explicit optional(_InPlaceT, _Args&&... __args)
      |                                            ^
/usr/include/c++/v1/optional:689:44: note: explicit constructor is not a candidate
  689 |   _LIBCPP_HIDE_FROM_ABI constexpr explicit optional(_Up&& __v) : __base(in_place, std::forward<_Up>(__v)) {}
      |                                            ^
/usr/include/c++/v1/optional:699:64: note: explicit constructor is not a candidate
  699 |   _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 explicit optional(const optional<_Up>& __v) {
      |                                                                ^
/usr/include/c++/v1/optional:709:64: note: explicit constructor is not a candidate
  709 |   _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 explicit optional(optional<_Up>&& __v) {
      |                                                                ^
/var/tmp/portage/games-strategy/wesnoth-1.18.0/work/wesnoth-1.18.0/src/utils/config_filters.hpp:65:121: note: passing argument to parameter 'def' here
   65 |         const config& filter, const config& cfg, const std::string& attribute, const std::string& opposite, std::optional<int> def = NULL);
      |                                                                                                                                ^
3 errors generated.
ninja: subcommand failed
 * ERROR: games-strategy/wesnoth-1.18.0::gentoo failed (compile phase):
 *   ninja -v -j1 -l0 failed
Comment 1 ernsteiswuerfel archtester 2024-05-08 12:46:59 UTC
Created attachment 892493 [details]
emerge --info
Comment 2 ernsteiswuerfel archtester 2024-05-09 12:06:13 UTC
https://github.com/wesnoth/wesnoth/commit/bc063aba006774753894ec43f12d1de7e0b9a98d fixes the build.

https://github.com/wesnoth/wesnoth/pull/8649 has been merged into master on 30.03.2024 but 1.18.0 was released on 17.03.2024.