Hi Michael,

On 26.06.2015 10:25, Michael Cree wrote:
> On Wed, Jun 24, 2015 at 06:52:39PM +0200, Andreas Cadhalpun wrote:
>> cmake failed to build on alpha with a testsuite failure:
>> CMake Error in CMakeLists.txt:
>>   The compiler feature "c_function_prototypes" is not known to C compiler
> 
> Yeah, I had noticed this too and had tried to debug it but made no
> progress probably due to myself being totally unfamiliar with cmake.
> The cmake code for this test appears to me to test for the feature
> based on gcc version, but why it should fail on Alpha is mystifying
> when we are up to date with gcc version.

The problem is likely not in cmake, which just seems to get mis-compiled.
In particular, the feature strings start with additional 'k0' or 'k1':

# gdb --args ./Build/bin/cmake ./Tests/CompileFeatures/CMakeLists.txt
[...]
(gdb) br ../../Source/cmMakefile.cxx:5133
Breakpoint 1 at 0x12010a00c: file ../../Source/cmMakefile.cxx, line 5133.
(gdb) r
[...]
Breakpoint 1, cmMakefile::AddRequiredTargetFeature (this=0x12056e9d0, 
    target=0x1205f64a0, feature="cxx_static_assert", error=0x11fae0980)
    at ../../Source/cmMakefile.cxx:5133
5133      if (!features)
(gdb) p features
$1 = 0x12058eb98 
"k0cxx_aggregate_default_initializers;cxx_template_template_parameters;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return"...
(gdb) c
Continuing.
[...]
Breakpoint 1, cmMakefile::AddRequiredTargetFeature (this=0x12056e9d0, 
    target=0x1205ba4a0, feature="c_function_prototypes", error=0x0)
    at ../../Source/cmMakefile.cxx:5133
5133      if (!features)
(gdb) p features
$2 = 0x12058a0a8 
"k1c_function_prototypes;c_restrict;c_variadic_macros;c_static_assert"

These obviously don't match cxx_aggregate_default_initializers or 
c_function_prototypes,
but the others are still found.

Strangely, the strings embedded in the cmake binary don't have the bogus k0/k1:

# strings Build/bin/cmake | grep -E "c_function|cxx_aggregate"
cxx_aggregate_default_initializers
c_function_prototypes
;c_function_prototypes;c_restrict;c_static_assert;c_variadic_macros
;cxx_aggregate_default_initializers;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_attribute_deprecated;cxx_auto_type;cxx_binary_literals;cxx_constexpr;cxx_contextual_conversions;cxx_decltype;cxx_decltype_auto;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_digit_separators;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_generic_lambdas;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_lambda_init_captures;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;c
 x
x_static_assert;cxx_strong_enums;cxx_template_template_parameters;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variable_templates;cxx_variadic_macros;cxx_variadic_templates

>> So could you please change the testsuite to not expect these features
>> on alpha?  Due to the tight dependency on the arch:all cmake-data,
>> the outdated cmake binary is uninstallable on alpha, which blocks a
>> bunch of other packages.
> 
> I wonder what is the danger of disabling the test suite and uploading
> a potentially wayward cmake on Alpha?  Would that particular check for
> compiler features failing (when in fact the compiler does support the
> feature) during the configure stage of package builds lead to incorrect
> builds?

I don't know.

> If so, I would rather wait for a real fix and take the hit
> we have at the moment on Alpha of not being able to build a significant
> part of the archive.

I'd make this dependent on when a real fix is found.

> Is the cmake maintainer able to (willing to?) give me some guidance on
> debugging this?  I can run the specific test manually and see it fail,
> and can find the commit that adds the specific feature and test to
> cmake, but am completely befuddled by the cmake code.

I hope you know more about the alpha gcc code, because I think the problem
lies there. ;)

Best regards,
Andreas


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to