Skip to content

Ubuntu-18.04 20210510 broke Clang 3.9 and 9 #3376

@sfan5

Description

@sfan5

Description
Since image version 20210510 both clang-3.9 and clang-9 are broken, specifically compilation errors in the C++ stdlib and binaries that segfault.
With no changes to code or CI 20210504.1 does not exhibit this issue, hence this must be a bug in this repo.

Area for Triage:
C/C++

Question, Bug, or Feature?:
Bug

Virtual environments affected

  • Ubuntu 18.04

Image version
Version: 20210510.0

Expected behavior
Clang 3.9 and 9 compile C++ code without erroring and/or the resulting binaries segfaulting.
This is the case on 20210504.1 (https://github.com/minetest/minetest/runs/2535472812).

Actual behavior

[...]
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/cstdint:38:
/usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/x86_64-linux-gnu/c++/11/bits/c++config.h:558:2: warning: "__STRICT_ANSI__ seems to have been undefined; this is not supported" [-W#warnings]
#warning "__STRICT_ANSI__ seems to have been undefined; this is not supported"
 ^
1 warning generated.

...also leading to errors in some cases:

In file included from /home/runner/work/minetest/minetest/src/serverenvironment.cpp:20:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/algorithm:61:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/stl_algobase.h:63:
/usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/ext/numeric_traits.h:64:7: error: static_assert failed "invalid specialization"
      static_assert(__is_integer_nonstrict<_Value>::__value,
      ^             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/uniform_int_dist.h:251:19: note: in instantiation of template class '__gnu_cxx::__numeric_traits_integer' requested here
          static_assert(!_Wp_traits::__is_signed, "W must be unsigned");
                         ^admittedly 
/usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/uniform_int_dist.h:307:11: note: in instantiation of function template specialization 'std::uniform_int_distribution::_S_nd, unsigned long>' requested here
                __ret = _S_nd(__urng, __u64erange);
                        ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/stl_algo.h:3791:32: note: in instantiation of function template specialization 'std::uniform_int_distribution::operator() >' requested here
        std::iter_swap(__i, __first + __d(__g, __p_type(0, __i - __first)));
                                      ^
/home/runner/work/minetest/minetest/src/serverenvironment.cpp:1438:8: note: in instantiation of function template specialization 'std::shuffle<__gnu_cxx::__normal_iterator *, std::vector, std::allocator > > >, std::mersenne_twister_engine &>' requested here
                std::shuffle(output.begin(), output.end(), m_rgen);
                     ^

Repro steps
Here's the relevant parts of our CI:
https://github.com/minetest/minetest/blob/master/.github/workflows/build.yml#L75-L120
https://github.com/minetest/minetest/blob/master/util/ci/common.sh
https://github.com/minetest/minetest/blob/master/util/ci/build.sh

(see third post)

Metadata

Metadata

Assignees

Labels

OS: UbuntuinvestigateCollect additional information, like space on disk, other tool incompatibilities etc.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions