DethRaid / wad2gltf

WAD to glTF converter
Mozilla Public License 2.0
16 stars 6 forks source link

Build error on Linux #1

Closed Calinou closed 9 months ago

Calinou commented 9 months ago

On Fedora 39 and GCC 13.2.1, I get the following error when building:

$ cmake --build build -j1
[0/2] Re-checking globbed directories...
[1/10] Building CXX object wad2gltf/CMakeFiles/wad2gltf.dir/gltf_export.cpp.o
FAILED: wad2gltf/CMakeFiles/wad2gltf.dir/gltf_export.cpp.o 
/usr/lib64/ccache/c++ -DFASTGLTF_DISABLE_CUSTOM_MEMORY_POOL=0 -DFASTGLTF_ENABLE_DEPRECATED_EXT=0 -DFASTGLTF_USE_64BIT_FLOAT=0 -DFASTGLTF_USE_CUSTOM_SMALLVECTOR=0 -I/home/hugo/Documents/Git/DethRaid/wad2gltf/build/_deps/cli11-src/include -I/home/hugo/Documents/Git/DethRaid/wad2gltf/build/_deps/earcut-src/include -I/home/hugo/Documents/Git/DethRaid/wad2gltf/build/_deps/fastgltf-src/include -I/home/hugo/Documents/Git/DethRaid/wad2gltf/build/_deps/glm-src -I/home/hugo/Documents/Git/DethRaid/wad2gltf/build/_deps/stb-src -O3 -DNDEBUG -std=gnu++23 -MD -MT wad2gltf/CMakeFiles/wad2gltf.dir/gltf_export.cpp.o -MF wad2gltf/CMakeFiles/wad2gltf.dir/gltf_export.cpp.o.d -o wad2gltf/CMakeFiles/wad2gltf.dir/gltf_export.cpp.o -c /home/hugo/Documents/Git/DethRaid/wad2gltf/wad2gltf/gltf_export.cpp
In file included from /home/hugo/Documents/Git/DethRaid/wad2gltf/wad2gltf/texture_reader.hpp:5,
                 from /home/hugo/Documents/Git/DethRaid/wad2gltf/wad2gltf/mesh.hpp:9,
                 from /home/hugo/Documents/Git/DethRaid/wad2gltf/wad2gltf/gltf_export.hpp:8,
                 from /home/hugo/Documents/Git/DethRaid/wad2gltf/wad2gltf/gltf_export.cpp:1:
/home/hugo/Documents/Git/DethRaid/wad2gltf/wad2gltf/wad.hpp: In member function ‘bool wad::Name::operator==(std::string_view) const’:
/home/hugo/Documents/Git/DethRaid/wad2gltf/wad2gltf/wad.hpp:25:48: error: no matching function for call to ‘min(std::basic_string_view<char>::size_type, long long unsigned int)’
   25 |         return memcmp(val, str.data(), std::min(str.size(), 8ull)) == 0;
      |                                        ~~~~~~~~^~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/13/array:43,
                 from /usr/include/c++/13/span:41,
                 from /home/hugo/Documents/Git/DethRaid/wad2gltf/wad2gltf/gltf_export.hpp:3:
/usr/include/c++/13/bits/stl_algobase.h:233:5: note: candidate: ‘template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)’
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/13/bits/stl_algobase.h:233:5: note:   template argument deduction/substitution failed:
/home/hugo/Documents/Git/DethRaid/wad2gltf/wad2gltf/wad.hpp:25:48: note:   deduced conflicting types for parameter ‘const _Tp’ (‘long unsigned int’ and ‘long long unsigned int’)
   25 |         return memcmp(val, str.data(), std::min(str.size(), 8ull)) == 0;
      |                                        ~~~~~~~~^~~~~~~~~~~~~~~~~~
/usr/include/c++/13/bits/stl_algobase.h:281:5: note: candidate: ‘template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)’
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/13/bits/stl_algobase.h:281:5: note:   template argument deduction/substitution failed:
/home/hugo/Documents/Git/DethRaid/wad2gltf/wad2gltf/wad.hpp:25:48: note:   deduced conflicting types for parameter ‘const _Tp’ (‘long unsigned int’ and ‘long long unsigned int’)
   25 |         return memcmp(val, str.data(), std::min(str.size(), 8ull)) == 0;
      |                                        ~~~~~~~~^~~~~~~~~~~~~~~~~~
/home/hugo/Documents/Git/DethRaid/wad2gltf/wad2gltf/wad.hpp: In member function ‘std::string wad::Name::to_string() const’:
/home/hugo/Documents/Git/DethRaid/wad2gltf/wad2gltf/wad.hpp:45:29: error: ‘strnlen_s’ was not declared in this scope; did you mean ‘strnlen’?
   45 |         const auto length = strnlen_s(val, 8);
      |                             ^~~~~~~~~
      |                             strnlen
/home/hugo/Documents/Git/DethRaid/wad2gltf/wad2gltf/wad.hpp:46:39: error: no matching function for call to ‘std::__cxx11::basic_string<char>::basic_string(<brace-enclosed initializer list>)’
   46 |         return std::string{val, length};
      |                                       ^
In file included from /usr/include/c++/13/string:54,
                 from /usr/include/c++/13/stdexcept:39,
                 from /usr/include/c++/13/system_error:43,
                 from /usr/include/c++/13/bits/fs_fwd.h:35,
                 from /usr/include/c++/13/filesystem:48,
                 from /home/hugo/Documents/Git/DethRaid/wad2gltf/build/_deps/fastgltf-src/include/fastgltf/types.hpp:33,
                 from /home/hugo/Documents/Git/DethRaid/wad2gltf/wad2gltf/gltf_export.hpp:6:
/usr/include/c++/13/bits/basic_string.h:795:9: note: candidate: ‘template<class _Tp, class> constexpr std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _Tp&, const _Alloc&) [with <template-parameter-2-2> = _Tp; _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’
  795 |         basic_string(const _Tp& __t, const _Alloc& __a = _Alloc())
      |         ^~~~~~~~~~~~
/usr/include/c++/13/bits/basic_string.h:795:9: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/13/concepts:44,
                 from /usr/include/c++/13/compare:37,
                 from /usr/include/c++/13/array:38:
/usr/include/c++/13/type_traits: In substitution of ‘template<bool _Cond, class _Tp> using std::enable_if_t = typename std::enable_if::type [with bool _Cond = false; _Tp = void]’:
/usr/include/c++/13/bits/basic_string.h:144:8:   required by substitution of ‘template<class _CharT, class _Traits, class _Alloc> template<class _Tp, class _Res> using std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::_If_sv = std::enable_if_t<std::__and_<std::is_convertible<const _Tp&, std::basic_string_view<_CharT, _Traits> >, std::__not_<std::is_convertible<const _Tp*, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>*> >, std::__not_<std::is_convertible<const _Tp&, const _CharT*> > >::value, _Res> [with _Tp = char [8]; _Res = void; _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’
/usr/include/c++/13/bits/basic_string.h:792:30:   required from here
/usr/include/c++/13/type_traits:2610:11: error: no type named ‘type’ in ‘struct std::enable_if<false, void>’
 2610 |     using enable_if_t = typename enable_if<_Cond, _Tp>::type;
      |           ^~~~~~~~~~~
/usr/include/c++/13/bits/basic_string.h:783:9: note: candidate: ‘template<class _Tp, class> constexpr std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _Tp&, size_type, size_type, const _Alloc&) [with <template-parameter-2-2> = _Tp; _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’
  783 |         basic_string(const _Tp& __t, size_type __pos, size_type __n,
      |         ^~~~~~~~~~~~
/usr/include/c++/13/bits/basic_string.h:783:9: note:   template argument deduction/substitution failed:
/home/hugo/Documents/Git/DethRaid/wad2gltf/wad2gltf/wad.hpp:46:39: note:   candidate expects 4 arguments, 2 provided
   46 |         return std::string{val, length};
      |                                       ^
/usr/include/c++/13/bits/basic_string.h:760:9: note: candidate: ‘template<class _InputIterator, class> constexpr std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(_InputIterator, _InputIterator, const _Alloc&) [with <template-parameter-2-2> = _InputIterator; _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’
  760 |         basic_string(_InputIterator __beg, _InputIterator __end,
      |         ^~~~~~~~~~~~
/usr/include/c++/13/bits/basic_string.h:760:9: note:   template argument deduction/substitution failed:
/usr/include/c++/13/bits/basic_string.h:664:7: note: candidate: ‘template<class> constexpr std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(size_type, _CharT, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’
  664 |       basic_string(size_type __n, _CharT __c, const _Alloc& __a = _Alloc())
      |       ^~~~~~~~~~~~
/usr/include/c++/13/bits/basic_string.h:664:7: note:   template argument deduction/substitution failed:
/home/hugo/Documents/Git/DethRaid/wad2gltf/wad2gltf/wad.hpp:46:28: note:   cannot convert ‘((const wad::Name*)this)->wad::Name::val’ (type ‘const char [8]’) to type ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’}
   46 |         return std::string{val, length};
      |                            ^~~
/usr/include/c++/13/bits/basic_string.h:641:7: note: candidate: ‘template<class> constexpr std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _CharT*, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’
  641 |       basic_string(const _CharT* __s, const _Alloc& __a = _Alloc())
      |       ^~~~~~~~~~~~
/usr/include/c++/13/bits/basic_string.h:641:7: note:   template argument deduction/substitution failed:
/home/hugo/Documents/Git/DethRaid/wad2gltf/wad2gltf/wad.hpp:46:39: note:   cannot convert ‘length’ (type ‘<type error>’) to type ‘const std::allocator<char>&’
   46 |         return std::string{val, length};
      |                                       ^
/usr/include/c++/13/bits/basic_string.h:716:7: note: candidate: ‘constexpr std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&&, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’
  716 |       basic_string(basic_string&& __str, const _Alloc& __a)
      |       ^~~~~~~~~~~~
/usr/include/c++/13/bits/basic_string.h:716:7: note:   conversion of argument 2 would be ill-formed:
/usr/include/c++/13/bits/basic_string.h:711:7: note: candidate: ‘constexpr std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’
  711 |       basic_string(const basic_string& __str, const _Alloc& __a)
      |       ^~~~~~~~~~~~
/usr/include/c++/13/bits/basic_string.h:711:7: note:   conversion of argument 2 would be ill-formed:
/usr/include/c++/13/bits/basic_string.h:706:7: note: candidate: ‘constexpr std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(std::initializer_list<_Tp>, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’
  706 |       basic_string(initializer_list<_CharT> __l, const _Alloc& __a = _Alloc())
      |       ^~~~~~~~~~~~
/usr/include/c++/13/bits/basic_string.h:706:45: note:   no known conversion for argument 1 from ‘const char [8]’ to ‘std::initializer_list<char>’
  706 |       basic_string(initializer_list<_CharT> __l, const _Alloc& __a = _Alloc())
      |                    ~~~~~~~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/13/bits/basic_string.h:677:7: note: candidate: ‘constexpr std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’
  677 |       basic_string(basic_string&& __str) noexcept
      |       ^~~~~~~~~~~~
/usr/include/c++/13/bits/basic_string.h:677:7: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/13/bits/basic_string.h:619:7: note: candidate: ‘constexpr std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _CharT*, size_type, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]’
  619 |       basic_string(const _CharT* __s, size_type __n,
      |       ^~~~~~~~~~~~
/usr/include/c++/13/bits/basic_string.h:619:7: note:   conversion of argument 2 would be ill-formed:
/usr/include/c++/13/bits/basic_string.h:599:7: note: candidate: ‘constexpr std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, size_type, size_type, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]’
  599 |       basic_string(const basic_string& __str, size_type __pos,
      |       ^~~~~~~~~~~~
/usr/include/c++/13/bits/basic_string.h:599:7: note:   candidate expects 4 arguments, 2 provided
/usr/include/c++/13/bits/basic_string.h:581:7: note: candidate: ‘constexpr std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, size_type, size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]’
  581 |       basic_string(const basic_string& __str, size_type __pos,
      |       ^~~~~~~~~~~~
/usr/include/c++/13/bits/basic_string.h:581:7: note:   candidate expects 3 arguments, 2 provided
/usr/include/c++/13/bits/basic_string.h:564:7: note: candidate: ‘constexpr std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, size_type, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]’
  564 |       basic_string(const basic_string& __str, size_type __pos,
      |       ^~~~~~~~~~~~
/usr/include/c++/13/bits/basic_string.h:564:7: note:   conversion of argument 2 would be ill-formed:
/usr/include/c++/13/bits/basic_string.h:547:7: note: candidate: ‘constexpr std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’
  547 |       basic_string(const basic_string& __str)
      |       ^~~~~~~~~~~~
/usr/include/c++/13/bits/basic_string.h:547:7: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/13/bits/basic_string.h:535:7: note: candidate: ‘constexpr std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’
  535 |       basic_string(const _Alloc& __a) _GLIBCXX_NOEXCEPT
      |       ^~~~~~~~~~~~
/usr/include/c++/13/bits/basic_string.h:535:7: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/13/bits/basic_string.h:522:7: note: candidate: ‘constexpr std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string() [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’
  522 |       basic_string()
      |       ^~~~~~~~~~~~
/usr/include/c++/13/bits/basic_string.h:522:7: note:   candidate expects 0 arguments, 2 provided
/usr/include/c++/13/bits/basic_string.h:176:7: note: candidate: ‘constexpr std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(__sv_wrapper, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’
  176 |       basic_string(__sv_wrapper __svw, const _Alloc& __a)
      |       ^~~~~~~~~~~~
/usr/include/c++/13/bits/basic_string.h:176:33: note:   no known conversion for argument 1 from ‘const char [8]’ to ‘std::__cxx11::basic_string<char>::__sv_wrapper’
  176 |       basic_string(__sv_wrapper __svw, const _Alloc& __a)
      |                    ~~~~~~~~~~~~~^~~~~
/home/hugo/Documents/Git/DethRaid/wad2gltf/wad2gltf/wad.hpp: In member function ‘auto std::formatter<wad::Name>::format(const wad::Name&, std::format_context&) const’:
/home/hugo/Documents/Git/DethRaid/wad2gltf/wad2gltf/wad.hpp:316:29: error: ‘strnlen_s’ was not declared in this scope; did you mean ‘strnlen’?
  316 |         const auto length = strnlen_s(name.val, 8);
      |                             ^~~~~~~~~
      |                             strnlen
/home/hugo/Documents/Git/DethRaid/wad2gltf/wad2gltf/wad.hpp:317:60: error: no matching function for call to ‘std::basic_string_view<char>::basic_string_view(<brace-enclosed initializer list>)’
  317 |         const auto view = std::string_view{name.val, length};
      |                                                            ^
In file included from /home/hugo/Documents/Git/DethRaid/wad2gltf/wad2gltf/gltf_export.hpp:4:
/usr/include/c++/13/string_view:173:9: note: candidate: ‘template<class _Range, class _DRange>  requires !(is_same_v<_DRange, std::basic_string_view>) && (contiguous_range<_Range>) && (sized_range<_Range>) && (is_same_v<typename std::__detail::__iter_traits_impl<typename std::remove_cvref<decltype(std::ranges::__cust_access::__begin((declval<_Range&>)()))>::type, std::indirectly_readable_traits<typename std::remove_cvref<decltype(std::ranges::__cust_access::__begin((declval<_Range&>)()))>::type> >::__iter_traits<typename std::remove_cvref<decltype(std::ranges::__cust_access::__begin((declval<_Range&>)()))>::type, std::indirectly_readable_traits<typename std::remove_cvref<decltype(std::ranges::__cust_access::__begin((declval<_Range&>)()))>::type> >::value_type, _CharT>) && !(is_convertible_v<_Range, const _CharT*>) && !requires(_DRange& __d) {__d->__conv_op ();} && (!requires{typename _DRange::traits_type;} || (is_same_v<typename _DRange::traits_type, _Traits>)) constexpr std::basic_string_view<_CharT, _Traits>::basic_string_view(_Range&&) [with _DRange = _Range; _CharT = char; _Traits = std::char_traits<char>]’
  173 |         basic_string_view(_Range&& __r)
      |         ^~~~~~~~~~~~~~~~~
/usr/include/c++/13/string_view:173:9: note:   template argument deduction/substitution failed:
/home/hugo/Documents/Git/DethRaid/wad2gltf/wad2gltf/wad.hpp:317:60: note:   candidate expects 1 argument, 2 provided
  317 |         const auto view = std::string_view{name.val, length};
      |                                                            ^
/usr/include/c++/13/string_view:155:9: note: candidate: ‘template<class _It, class _End>  requires (contiguous_iterator<_It>) && (sized_sentinel_for<_End, _It>) && ((same_as<typename std::__detail::__iter_traits_impl<typename std::remove_cvref<_It2>::type, std::indirectly_readable_traits<typename std::remove_cvref<_It2>::type> >::type::value_type, _CharT>) && !(convertible_to<_End, long unsigned int>)) constexpr std::basic_string_view<_CharT, _Traits>::basic_string_view(_It, _End) [with _End = _It; _CharT = char; _Traits = std::char_traits<char>]’
  155 |         basic_string_view(_It __first, _End __last)
      |         ^~~~~~~~~~~~~~~~~
/usr/include/c++/13/string_view:155:9: note:   template argument deduction/substitution failed:
/usr/include/c++/13/string_view:146:7: note: candidate: ‘constexpr std::basic_string_view<_CharT, _Traits>::basic_string_view(const _CharT*, size_type) [with _CharT = char; _Traits = std::char_traits<char>; size_type = long unsigned int]’
  146 |       basic_string_view(const _CharT* __str, size_type __len) noexcept
      |       ^~~~~~~~~~~~~~~~~
/usr/include/c++/13/string_view:146:7: note:   conversion of argument 2 would be ill-formed:
/usr/include/c++/13/string_view:140:7: note: candidate: ‘constexpr std::basic_string_view<_CharT, _Traits>::basic_string_view(const _CharT*) [with _CharT = char; _Traits = std::char_traits<char>]’
  140 |       basic_string_view(const _CharT* __str) noexcept
      |       ^~~~~~~~~~~~~~~~~
/usr/include/c++/13/string_view:140:7: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/13/string_view:136:17: note: candidate: ‘constexpr std::basic_string_view<_CharT, _Traits>::basic_string_view(const std::basic_string_view<_CharT, _Traits>&) [with _CharT = char; _Traits = std::char_traits<char>]’
  136 |       constexpr basic_string_view(const basic_string_view&) noexcept = default;
      |                 ^~~~~~~~~~~~~~~~~
/usr/include/c++/13/string_view:136:17: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/13/string_view:132:7: note: candidate: ‘constexpr std::basic_string_view<_CharT, _Traits>::basic_string_view() [with _CharT = char; _Traits = std::char_traits<char>]’
  132 |       basic_string_view() noexcept
      |       ^~~~~~~~~~~~~~~~~
/usr/include/c++/13/string_view:132:7: note:   candid
DethRaid commented 9 months ago

Should be fixed in commit 05dbee9

Calinou commented 9 months ago

Should be fixed in commit 05dbee9

This seems to work, but I get another error further in the build process:

$ cmake --build build -j1
[0/2] Re-checking globbed directories...
[1/3] Building CXX object wad2gltf/CMakeFiles/wad2gltf.dir/map_reader.cpp.o
FAILED: wad2gltf/CMakeFiles/wad2gltf.dir/map_reader.cpp.o 
/usr/lib64/ccache/c++ -DFASTGLTF_DISABLE_CUSTOM_MEMORY_POOL=0 -DFASTGLTF_ENABLE_DEPRECATED_EXT=0 -DFASTGLTF_USE_64BIT_FLOAT=0 -DFASTGLTF_USE_CUSTOM_SMALLVECTOR=0 -I/home/hugo/Documents/Git/DethRaid/wad2gltf/build/_deps/cli11-src/include -I/home/hugo/Documents/Git/DethRaid/wad2gltf/build/_deps/earcut-src/include -I/home/hugo/Documents/Git/DethRaid/wad2gltf/build/_deps/fastgltf-src/include -I/home/hugo/Documents/Git/DethRaid/wad2gltf/build/_deps/glm-src -I/home/hugo/Documents/Git/DethRaid/wad2gltf/build/_deps/stb-src -O3 -DNDEBUG -std=gnu++23 -MD -MT wad2gltf/CMakeFiles/wad2gltf.dir/map_reader.cpp.o -MF wad2gltf/CMakeFiles/wad2gltf.dir/map_reader.cpp.o.d -o wad2gltf/CMakeFiles/wad2gltf.dir/map_reader.cpp.o -c /home/hugo/Documents/Git/DethRaid/wad2gltf/wad2gltf/map_reader.cpp
In file included from /home/hugo/Documents/Git/DethRaid/wad2gltf/wad2gltf/wad.hpp:12,
                 from /home/hugo/Documents/Git/DethRaid/wad2gltf/wad2gltf/texture_reader.hpp:5,
                 from /home/hugo/Documents/Git/DethRaid/wad2gltf/wad2gltf/mesh.hpp:9,
                 from /home/hugo/Documents/Git/DethRaid/wad2gltf/wad2gltf/map_reader.hpp:5,
                 from /home/hugo/Documents/Git/DethRaid/wad2gltf/wad2gltf/map_reader.cpp:1:
/home/hugo/Documents/Git/DethRaid/wad2gltf/wad2gltf/wad_name.hpp:3: warning: "__STDC_WANT_LIB_EXT1__" redefined
    3 | #define __STDC_WANT_LIB_EXT1__ 1
      | 
/home/hugo/Documents/Git/DethRaid/wad2gltf/wad2gltf/wad.hpp:3: note: this is the location of the previous definition
    3 | #define __STDC_WANT_LIB_EXT1__ 1
      | 
/home/hugo/Documents/Git/DethRaid/wad2gltf/wad2gltf/map_reader.cpp: In function ‘Map create_mesh_from_map(const wad::WAD&, const MapExtractionOptions&)’:
/home/hugo/Documents/Git/DethRaid/wad2gltf/wad2gltf/map_reader.cpp:237:10: error: ‘print’ is not a member of ‘std’; did you mean ‘rint’?
  237 |     std::print(std::cout, "Loaded map lump {}\n", itr->name);
      |          ^~~~~
      |          rint
ninja: build stopped: subcommand failed.
DethRaid commented 9 months ago

Hmm... std::print is a C++23 function, maybe your standard library doesn't implement it yet

Calinou commented 9 months ago

Hmm... std::print is a C++23 function, maybe your standard library doesn't implement it yet

Indeed, I can get it to build if I comment out all instances by running:

sed -i "s/std::print/\/\/std::print/g" **/*.cpp

The program works great after that, although you won't see some of the output messages (--help still works).

I suggest updating the README to document that a C++23-compatible compiler is required.

DethRaid commented 9 months ago

Well, the CMake file already says the project requires C++23 - but I don't know how to make CMake differentiate between "full support for C++23" and "experimental support for C++23"

I've gone ahead and removed the C++23 features I was using, now it'll compile with C++20

Calinou commented 9 months ago

It builds great out of the box now, thanks :slightly_smiling_face: