Coder Social home page Coder Social logo

Comments (6)

TrueBrain avatar TrueBrain commented on May 18, 2024

Relevant part of the crash:

        "/usr/local/games/openttd(_Z13InitRailTypesv+0x258) [0x55746ab6ac]",
        "/usr/local/games/openttd(_Z10LoadNewGRFjj+0x1724) [0x55745ffd64]",
        "/usr/local/games/openttd(_Z14GfxLoadSpritesv+0x228) [0x55745512a8]",
        "/usr/local/games/openttd(_Z13GenerateWorld12GenWorldModejjb+0xcc) [0x557453bf5c]",

from openttd.

arb103 avatar arb103 commented on May 18, 2024

I paid attention when running make this time and I saw these warnings:

Long lines inside
In file included from /home/user/OpenTTD/src/script/api/script_admin.cpp:16:
/home/user/OpenTTD/src/script/api/../../3rdparty/nlohmann/json.hpp: In member function ‘void nlohmann::json_abi_v3_11_3::detail::serializer<BasicJsonType>::dump_integer(NumberType) [with NumberType = unsigned char; typename std::enable_if<(((std::is_integral<NumberType>::value || std::is_same<NumberType, typename BasicJsonType::number_unsigned_t>::value) || std::is_same<NumberType, typename BasicJsonType::number_integer_t>::value) || std::is_same<NumberType, typename BasicJsonType::binary_t::value_type>::value), int>::type <anonymous> = 0; BasicJsonType = nlohmann::json_abi_v3_11_3::basic_json<>]’:
/home/user/OpenTTD/src/script/api/../../3rdparty/nlohmann/json.hpp:18781:29: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
18781 |             *(--buffer_ptr) = digits_to_99[digits_index][1];
In file included from /usr/include/c++/10/tuple:39,
               from /usr/include/c++/10/ranges:46,
               from /usr/include/c++/10/bits/ranges_algobase.h:38,
               from /usr/include/c++/10/bits/ranges_algo.h:35,
               from /usr/include/c++/10/algorithm:64,
               from /home/user/OpenTTD/src/stdafx.h:49,
               from /home/user/OpenTTD/build/CMakeFiles/openttd_lib.dir/cmake_pch.hxx:5,
               from <command-line>:
/usr/include/c++/10/array:110:56: note: at offset -1 to object ‘std::array<char, 64>::_M_elems’ with size 64 declared here
110 |       typename _AT_Type::_Type                         _M_elems;
    |                                                        ^~~~~~~~
In file included from /home/user/OpenTTD/src/script/api/script_admin.cpp:16:
/home/user/OpenTTD/src/script/api/../../3rdparty/nlohmann/json.hpp:18782:29: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
18782 |             *(--buffer_ptr) = digits_to_99[digits_index][0];
In file included from /usr/include/c++/10/tuple:39,
               from /usr/include/c++/10/ranges:46,
               from /usr/include/c++/10/bits/ranges_algobase.h:38,
               from /usr/include/c++/10/bits/ranges_algo.h:35,
               from /usr/include/c++/10/algorithm:64,
               from /home/user/OpenTTD/src/stdafx.h:49,
               from /home/user/OpenTTD/build/CMakeFiles/openttd_lib.dir/cmake_pch.hxx:5,
               from <command-line>:
/usr/include/c++/10/array:110:56: note: at offset -2 to object ‘std::array<char, 64>::_M_elems’ with size 64 declared here
110 |       typename _AT_Type::_Type                         _M_elems;
    |                                                        ^~~~~~~~
In file included from /home/user/OpenTTD/src/script/api/script_admin.cpp:16:
/home/user/OpenTTD/src/script/api/../../3rdparty/nlohmann/json.hpp:18788:29: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
18788 |             *(--buffer_ptr) = digits_to_99[digits_index][1];
In file included from /usr/include/c++/10/tuple:39,
               from /usr/include/c++/10/ranges:46,
               from /usr/include/c++/10/bits/ranges_algobase.h:38,
               from /usr/include/c++/10/bits/ranges_algo.h:35,
               from /usr/include/c++/10/algorithm:64,
               from /home/user/OpenTTD/src/stdafx.h:49,
               from /home/user/OpenTTD/build/CMakeFiles/openttd_lib.dir/cmake_pch.hxx:5,
               from <command-line>:
/usr/include/c++/10/array:110:56: note: at offset -1 to object ‘std::array<char, 64>::_M_elems’ with size 64 declared here
110 |       typename _AT_Type::_Type                         _M_elems;
    |                                                        ^~~~~~~~
In file included from /home/user/OpenTTD/src/script/api/script_admin.cpp:16:
/home/user/OpenTTD/src/script/api/../../3rdparty/nlohmann/json.hpp:18789:29: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
18789 |             *(--buffer_ptr) = digits_to_99[digits_index][0];
In file included from /usr/include/c++/10/tuple:39,
               from /usr/include/c++/10/ranges:46,
               from /usr/include/c++/10/bits/ranges_algobase.h:38,
               from /usr/include/c++/10/bits/ranges_algo.h:35,
               from /usr/include/c++/10/algorithm:64,
               from /home/user/OpenTTD/src/stdafx.h:49,
               from /home/user/OpenTTD/build/CMakeFiles/openttd_lib.dir/cmake_pch.hxx:5,
               from <command-line>:
/usr/include/c++/10/array:110:56: note: at offset -2 to object ‘std::array<char, 64>::_M_elems’ with size 64 declared here
110 |       typename _AT_Type::_Type                         _M_elems;
    |                                                        ^~~~~~~~
In file included from /home/user/OpenTTD/src/network/../survey.h:13,
                 from /home/user/OpenTTD/src/network/network_survey.cpp:16:
/home/user/OpenTTD/src/network/../3rdparty/nlohmann/json.hpp: In member function ‘void nlohmann::json_abi_v3_11_3::detail::serializer<BasicJsonType>::dump_integer(NumberType) [with NumberType = unsigned char; typename std::enable_if<(((std::is_integral<NumberType>::value || std::is_same<NumberType, typename BasicJsonType::number_unsigned_t>::value) || std::is_same<NumberType, typename BasicJsonType::number_integer_t>::value) || std::is_same<NumberType, typename BasicJsonType::binary_t::value_type>::value), int>::type <anonymous> = 0; BasicJsonType = nlohmann::json_abi_v3_11_3::basic_json<>]’:
/home/user/OpenTTD/src/network/../3rdparty/nlohmann/json.hpp:18781:29: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
18781 |             *(--buffer_ptr) = digits_to_99[digits_index][1];
In file included from /usr/include/c++/10/tuple:39,
                 from /usr/include/c++/10/ranges:46,
                 from /usr/include/c++/10/bits/ranges_algobase.h:38,
                 from /usr/include/c++/10/bits/ranges_algo.h:35,
                 from /usr/include/c++/10/algorithm:64,
                 from /home/user/OpenTTD/src/stdafx.h:49,
                 from /home/user/OpenTTD/build/CMakeFiles/openttd_lib.dir/cmake_pch.hxx:5,
                 from <command-line>:
/usr/include/c++/10/array:110:56: note: at offset -1 to object ‘std::array<char, 64>::_M_elems’ with size 64 declared here
  110 | AT_Type::_Type                         _M_elems;
      |                                        ^~~~~~~~

In file included from /home/user/OpenTTD/src/network/../survey.h:13,
                 from /home/user/OpenTTD/src/network/network_survey.cpp:16:
/home/user/OpenTTD/src/network/../3rdparty/nlohmann/json.hpp:18782:29: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
18782 |             *(--buffer_ptr) = digits_to_99[digits_index][0];
In file included from /usr/include/c++/10/tuple:39,
                 from /usr/include/c++/10/ranges:46,
                 from /usr/include/c++/10/bits/ranges_algobase.h:38,
                 from /usr/include/c++/10/bits/ranges_algo.h:35,
                 from /usr/include/c++/10/algorithm:64,
                 from /home/user/OpenTTD/src/stdafx.h:49,
                 from /home/user/OpenTTD/build/CMakeFiles/openttd_lib.dir/cmake_pch.hxx:5,
                 from <command-line>:
/usr/include/c++/10/array:110:56: note: at offset -2 to object ‘std::array<char, 64>::_M_elems’ with size 64 declared here
  110 | AT_Type::_Type                         _M_elems;
      |                                        ^~~~~~~~

In file included from /home/user/OpenTTD/src/network/../survey.h:13,
                 from /home/user/OpenTTD/src/network/network_survey.cpp:16:
/home/user/OpenTTD/src/network/../3rdparty/nlohmann/json.hpp:18788:29: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
18788 |             *(--buffer_ptr) = digits_to_99[digits_index][1];
In file included from /usr/include/c++/10/tuple:39,
                 from /usr/include/c++/10/ranges:46,
                 from /usr/include/c++/10/bits/ranges_algobase.h:38,
                 from /usr/include/c++/10/bits/ranges_algo.h:35,
                 from /usr/include/c++/10/algorithm:64,
                 from /home/user/OpenTTD/src/stdafx.h:49,
                 from /home/user/OpenTTD/build/CMakeFiles/openttd_lib.dir/cmake_pch.hxx:5,
                 from <command-line>:
/usr/include/c++/10/array:110:56: note: at offset -1 to object ‘std::array<char, 64>::_M_elems’ with size 64 declared here
  110 | AT_Type::_Type                         _M_elems;
      |                                        ^~~~~~~~

In file included from /home/user/OpenTTD/src/network/../survey.h:13,
                 from /home/user/OpenTTD/src/network/network_survey.cpp:16:
/home/user/OpenTTD/src/network/../3rdparty/nlohmann/json.hpp:18789:29: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
18789 |             *(--buffer_ptr) = digits_to_99[digits_index][0];
In file included from /usr/include/c++/10/tuple:39,
                 from /usr/include/c++/10/ranges:46,
                 from /usr/include/c++/10/bits/ranges_algobase.h:38,
                 from /usr/include/c++/10/bits/ranges_algo.h:35,
                 from /usr/include/c++/10/algorithm:64,
                 from /home/user/OpenTTD/src/stdafx.h:49,
                 from /home/user/OpenTTD/build/CMakeFiles/openttd_lib.dir/cmake_pch.hxx:5,
                 from <command-line>:
/usr/include/c++/10/array:110:56: note: at offset -2 to object ‘std::array<char, 64>::_M_elems’ with size 64 declared here
  110 | AT_Type::_Type                         _M_elems;
      |                                        ^~~~~~~~

In file included from /home/user/OpenTTD/src/crashlog.h:13,
                 from /home/user/OpenTTD/src/crashlog.cpp:11:
/home/user/OpenTTD/src/3rdparty/nlohmann/json.hpp: In member function ‘void nlohmann::json_abi_v3_11_3::detail::serializer<BasicJsonType>::dump_integer(NumberType) [with NumberType = unsigned char; typename std::enable_if<(((std::is_integral<NumberType>::value || std::is_same<NumberType, typename BasicJsonType::number_unsigned_t>::value) || std::is_same<NumberType, typename BasicJsonType::number_integer_t>::value) || std::is_same<NumberType, typename BasicJsonType::binary_t::value_type>::value), int>::type <anonymous> = 0; BasicJsonType = nlohmann::json_abi_v3_11_3::basic_json<>]’:
/home/user/OpenTTD/src/3rdparty/nlohmann/json.hpp:18781:29: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
18781 |             *(--buffer_ptr) = digits_to_99[digits_index][1];
In file included from /usr/include/c++/10/tuple:39,
                 from /usr/include/c++/10/ranges:46,
                 from /usr/include/c++/10/bits/ranges_algobase.h:38,
                 from /usr/include/c++/10/bits/ranges_algo.h:35,
                 from /usr/include/c++/10/algorithm:64,
                 from /home/user/OpenTTD/src/stdafx.h:49,
                 from /home/user/OpenTTD/build/CMakeFiles/openttd_lib.dir/cmake_pch.hxx:5,
                 from <command-line>:
/usr/include/c++/10/array:110:56: note: at offset -1 to object ‘std::array<char, 64>::_M_elems’ with size 64 declared here
  110 |       typename _AT_Type::_Type                         _M_elems;
      |                                                        ^~~~~~~~
In file included from /home/user/OpenTTD/src/crashlog.h:13,
                 from /home/user/OpenTTD/src/crashlog.cpp:11:
/home/user/OpenTTD/src/3rdparty/nlohmann/json.hpp:18782:29: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
18782 |             *(--buffer_ptr) = digits_to_99[digits_index][0];
In file included from /usr/include/c++/10/tuple:39,
                 from /usr/include/c++/10/ranges:46,
                 from /usr/include/c++/10/bits/ranges_algobase.h:38,
                 from /usr/include/c++/10/bits/ranges_algo.h:35,
                 from /usr/include/c++/10/algorithm:64,
                 from /home/user/OpenTTD/src/stdafx.h:49,
                 from /home/user/OpenTTD/build/CMakeFiles/openttd_lib.dir/cmake_pch.hxx:5,
                 from <command-line>:
/usr/include/c++/10/array:110:56: note: at offset -2 to object ‘std::array<char, 64>::_M_elems’ with size 64 declared here
  110 |       typename _AT_Type::_Type                         _M_elems;
      |                                                        ^~~~~~~~
In file included from /home/user/OpenTTD/src/crashlog.h:13,
                 from /home/user/OpenTTD/src/crashlog.cpp:11:
/home/user/OpenTTD/src/3rdparty/nlohmann/json.hpp:18788:29: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
18788 |             *(--buffer_ptr) = digits_to_99[digits_index][1];
In file included from /usr/include/c++/10/tuple:39,
                 from /usr/include/c++/10/ranges:46,
                 from /usr/include/c++/10/bits/ranges_algobase.h:38,
                 from /usr/include/c++/10/bits/ranges_algo.h:35,
                 from /usr/include/c++/10/algorithm:64,
                 from /home/user/OpenTTD/src/stdafx.h:49,
                 from /home/user/OpenTTD/build/CMakeFiles/openttd_lib.dir/cmake_pch.hxx:5,
                 from <command-line>:
/usr/include/c++/10/array:110:56: note: at offset -1 to object ‘std::array<char, 64>::_M_elems’ with size 64 declared here
  110 |       typename _AT_Type::_Type                         _M_elems;
      |                                                        ^~~~~~~~
In file included from /home/user/OpenTTD/src/crashlog.h:13,
                 from /home/user/OpenTTD/src/crashlog.cpp:11:
/home/user/OpenTTD/src/3rdparty/nlohmann/json.hpp:18789:29: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
18789 |             *(--buffer_ptr) = digits_to_99[digits_index][0];
In file included from /usr/include/c++/10/tuple:39,
                 from /usr/include/c++/10/ranges:46,
                 from /usr/include/c++/10/bits/ranges_algobase.h:38,
                 from /usr/include/c++/10/bits/ranges_algo.h:35,
                 from /usr/include/c++/10/algorithm:64,
                 from /home/user/OpenTTD/src/stdafx.h:49,
                 from /home/user/OpenTTD/build/CMakeFiles/openttd_lib.dir/cmake_pch.hxx:5,
                 from <command-line>:
/usr/include/c++/10/array:110:56: note: at offset -2 to object ‘std::array<char, 64>::_M_elems’ with size 64 declared here
  110 |       typename _AT_Type::_Type                         _M_elems;
      |                                                        ^~~~~~~~

Hope it's relevant to finding the solution to this

from openttd.

PeterN avatar PeterN commented on May 18, 2024

I've compiled a 64-bit ARM build and I'm not seeing this issue.

It is however the latest Pi OS, based on Debian 12.5 instead of 11. We switched to C++20 for OpenTTD 14, so maybe the c++ library or the compilers on Debian 11 is a bit old?

ii  gcc-12                               12.2.0-14                           arm64        GNU C compiler
ii  libstdc++-12-dev:arm64               12.2.0-14                           arm64        GNU Standard C++ Library v3 (development files)

from openttd.

arb103 avatar arb103 commented on May 18, 2024

This can probably be closed with a mention of minimum compiler version in the COMPILING.md if that's the case
I'll hate moving all my other stuff but I can't kick the can down the road any longer, I'll be updating to debian 12 and trying again in a few days

from openttd.

arb103 avatar arb103 commented on May 18, 2024

Upgrade to debian 12 is complete, I ran cmake and got the same warnings again, then the following warning during make

Long lines inside
In file included from /home/user/OpenTTD/src/music/midifile.cpp:10:                                                                                                             [771/1309]
In constructor ‘constexpr MidiFile::DataBlock::DataBlock(MidiFile::DataBlock&&)’,                                                                                                              
    inlined from ‘constexpr decltype (::new(void*(0)) _Tp) std::construct_at(_Tp*, _Args&& ...) [with _Tp = MidiFile::DataBlock; _Args = {MidiFile::DataBlock}]’ at /usr/include/c++/12/bits/st
l_construct.h:97:14,                                                                                                                                                                           
    inlined from ‘static constexpr void std::allocator_traits<std::allocator<_Up> >::construct(allocator_type&, _Up*, _Args&& ...) [with _Up = MidiFile::DataBlock; _Args = {MidiFile::DataBloc
k}; _Tp = MidiFile::DataBlock]’ at /usr/include/c++/12/bits/alloc_traits.h:518:21,                                                                                                             
    inlined from ‘constexpr std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::emplace_back(_Args&& ...) [with _Args = {MidiFile::DataBlock}; _Tp = MidiFile::DataBlock; _Alloc = st
d::allocator<MidiFile::DataBlock>]’ at /usr/include/c++/12/bits/vector.tcc:117:30,                                                                                                             
    inlined from ‘constexpr void std::vector<_Tp, _Alloc>::push_back(value_type&&) [with _Tp = MidiFile::DataBlock; _Alloc = std::allocator<MidiFile::DataBlock>]’ at /usr/include/c++/12/bits/
stl_vector.h:1294:21,                                                                                                                                                                          
    inlined from ‘bool MpsMachine::PlayInto()’ at /home/user/OpenTTD/src/music/midifile.cpp:794:32:                                                                                       
/home/user/OpenTTD/src/music/midifile.hpp:19:16: warning: ‘<unnamed>.MidiFile::DataBlock::realtime’ may be used uninitialized [-Wmaybe-uninitialized]                                     
   19 |         struct DataBlock {                                                                                                                                                             
      |                ^~~~~~~~~                                                                                                                                                               
/home/user/OpenTTD/src/music/midifile.cpp: In member function ‘bool MpsMachine::PlayInto()’:                                                                                              
/home/user/OpenTTD/src/music/midifile.cpp:794:67: note: ‘<anonymous>’ declared here                                                                                                       
  794 |                 this->target.blocks.push_back(MidiFile::DataBlock());                                                                                                                  
      |                                                                   ^                                                                                                                    
In constructor ‘constexpr MidiFile::DataBlock::DataBlock(MidiFile::DataBlock&&)’,                                                                                                              
    inlined from ‘constexpr decltype (::new(void*(0)) _Tp) std::construct_at(_Tp*, _Args&& ...) [with _Tp = MidiFile::DataBlock; _Args = {MidiFile::DataBlock}]’ at /usr/include/c++/12/bits/st
l_construct.h:97:14,                                                                                                                                                                           
    inlined from ‘static constexpr void std::allocator_traits<std::allocator<_Up> >::construct(allocator_type&, _Up*, _Args&& ...) [with _Up = MidiFile::DataBlock; _Args = {MidiFile::DataBloc
k}; _Tp = MidiFile::DataBlock]’ at /usr/include/c++/12/bits/alloc_traits.h:518:21,                                                                                                             
    inlined from ‘constexpr std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::emplace_back(_Args&& ...) [with _Args = {MidiFile::DataBlock}; _Tp = MidiFile::DataBlock; _Alloc = st
d::allocator<MidiFile::DataBlock>]’ at /usr/include/c++/12/bits/vector.tcc:117:30,                                                                                                             
    inlined from ‘constexpr void std::vector<_Tp, _Alloc>::push_back(value_type&&) [with _Tp = MidiFile::DataBlock; _Alloc = std::allocator<MidiFile::DataBlock>]’ at /usr/include/c++/12/bits/
stl_vector.h:1294:21,                                                                                                                                                                          
    inlined from ‘bool MpsMachine::PlayInto()’ at /home/user/OpenTTD/src/music/midifile.cpp:801:33:                                                                                       
/home/user/OpenTTD/src/music/midifile.hpp:19:16: warning: ‘<unnamed>.MidiFile::DataBlock::realtime’ may be used uninitialized [-Wmaybe-uninitialized]                                     
   19 |         struct DataBlock {                                                                                                                                                             
      |                ^~~~~~~~~                                                                                                                                                               
/home/user/OpenTTD/src/music/midifile.cpp: In member function ‘bool MpsMachine::PlayInto()’:                                                                                              
/home/user/OpenTTD/src/music/midifile.cpp:801:75: note: ‘<anonymous>’ declared here                                                                                                       
  801 |                         this->target.blocks.push_back(MidiFile::DataBlock());                                                                                                          
      |                                                                           ^                                                                                                            
In constructor ‘constexpr MidiFile::DataBlock::DataBlock(MidiFile::DataBlock&&)’,                                                                                                              
    inlined from ‘constexpr decltype (::new(void*(0)) _Tp) std::construct_at(_Tp*, _Args&& ...) [with _Tp = MidiFile::DataBlock; _Args = {MidiFile::DataBlock}]’ at /usr/include/c++/12/bits/st
l_construct.h:97:14,                                                                                                                                                                           
    inlined from ‘static constexpr void std::allocator_traits<std::allocator<_Up> >::construct(allocator_type&, _Up*, _Args&& ...) [with _Up = MidiFile::DataBlock; _Args = {MidiFile::DataBloc
k}; _Tp = MidiFile::DataBlock]’ at /usr/include/c++/12/bits/alloc_traits.h:518:21,                                                                                                             
    inlined from ‘constexpr std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::emplace_back(_Args&& ...) [with _Args = {MidiFile::DataBlock}; _Tp = MidiFile::DataBlock; _Alloc = st
d::allocator<MidiFile::DataBlock>]’ at /usr/include/c++/12/bits/vector.tcc:117:30,                                                                                                             
    inlined from ‘constexpr void std::vector<_Tp, _Alloc>::push_back(value_type&&) [with _Tp = MidiFile::DataBlock; _Alloc = std::allocator<MidiFile::DataBlock>]’ at /usr/include/c++/12/bits/
stl_vector.h:1294:21,                                                                                                                                                                          
    inlined from ‘bool ReadTrackChunk(FILE*, MidiFile&)’ at /home/user/OpenTTD/src/music/midifile.cpp:213:25,
    inlined from ‘bool MidiFile::LoadFile(const std::string&)’ at /home/user/OpenTTD/src/music/midifile.cpp:471:22:
/home/user/OpenTTD/src/music/midifile.hpp:19:16: warning: ‘<unnamed>.MidiFile::DataBlock::realtime’ may be used uninitialized [-Wmaybe-uninitialized]
   19 |         struct DataBlock {
      |                ^~~~~~~~~
/home/user/OpenTTD/src/music/midifile.cpp: In member function ‘bool MidiFile::LoadFile(const std::string&)’:
/home/user/OpenTTD/src/music/midifile.cpp:213:53: note: ‘<anonymous>’ declared here
  213 |         target.blocks.push_back(MidiFile::DataBlock());
      |                                                     ^
In constructor ‘constexpr MidiFile::DataBlock::DataBlock(MidiFile::DataBlock&&)’,
    inlined from ‘constexpr decltype (::new(void*(0)) _Tp) std::construct_at(_Tp*, _Args&& ...) [with _Tp = MidiFile::DataBlock; _Args = {MidiFile::DataBlock}]’ at /usr/include/c++/12/bits/st
l_construct.h:97:14,
    inlined from ‘static constexpr void std::allocator_traits<std::allocator<_Up> >::construct(allocator_type&, _Up*, _Args&& ...) [with _Up = MidiFile::DataBlock; _Args = {MidiFile::DataBloc
k}; _Tp = MidiFile::DataBlock]’ at /usr/include/c++/12/bits/alloc_traits.h:518:21,
    inlined from ‘constexpr std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::emplace_back(_Args&& ...) [with _Args = {MidiFile::DataBlock}; _Tp = MidiFile::DataBlock; _Alloc = st
d::allocator<MidiFile::DataBlock>]’ at /usr/include/c++/12/bits/vector.tcc:117:30,
    inlined from ‘constexpr void std::vector<_Tp, _Alloc>::push_back(value_type&&) [with _Tp = MidiFile::DataBlock; _Alloc = std::allocator<MidiFile::DataBlock>]’ at /usr/include/c++/12/bits/
stl_vector.h:1294:21,
    inlined from ‘bool ReadTrackChunk(FILE*, MidiFile&)’ at /home/user/OpenTTD/src/music/midifile.cpp:225:27,
    inlined from ‘bool MidiFile::LoadFile(const std::string&)’ at /home/user/OpenTTD/src/music/midifile.cpp:471:22:
/home/user/OpenTTD/src/music/midifile.hpp:19:16: warning: ‘<unnamed>.MidiFile::DataBlock::realtime’ may be used uninitialized [-Wmaybe-uninitialized]
   19 |         struct DataBlock {
      |                ^~~~~~~~~
/home/user/OpenTTD/src/music/midifile.cpp: In member function ‘bool MidiFile::LoadFile(const std::string&)’:
/home/user/OpenTTD/src/music/midifile.cpp:225:96: note: ‘<anonymous>’ declared here
  225 |                         target.blocks.push_back(MidiFile::DataBlock(block->ticktime + deltatime));
      |

Despite this, the game succesfully compiled and runs with no apparent issues.
I'll close this as solved, although mentioning gcc 12 and C++20 as minimum requirements for version 14.0 onwards would be great.

from openttd.

PeterN avatar PeterN commented on May 18, 2024

Well it is in COMPILING.md

## Supported compilers

Every compiler that is supported by CMake and supports C++20, should be
able to compile OpenTTD. As the exact list of compilers changes constantly,
we refer to the compiler manual to see if it supports C++20, and to CMake
to see if it supports your compiler.

from openttd.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.