Setting `cc` as the default compiler causes issue with system not having `cc` symlinked to `gcc`
I am trying to package c3c on Guix, and I was able to successfully write an expression. However, the tests keep failing on CMake (most probably, because CTest wasn't used), and for now, I can see two possible solutions: disable testing, or over-ride the check phase. The latter isn't going well, unfortunately, and it would be much appreciated to know what would be the actual way to deal with testing newly compiled binaries.
Here's how the over-ridden check phase looks like:
(define-public c3c-bootstrap
(package
...
(arguments
'(#:tests? #t
#:phases (modify-phases %standard-phases
(replace 'check
(lambda* (#:key tests? #:allow-other-keys)
(when tests?
(setenv "CC" "gcc")
(chdir "../source/resources/testproject")
(system "../../../build/c3c build")
(chdir "../../test")
(system
"python3 src/tester.py ../../build/c3c test_suite")
(chdir "../../build")
))))))
...))
Here are the logs when I try to build them locally:
starting phase `check'
sh: line 1: cc: command not found
Failed to compile c sources using command 'cc -fPIE -fPIC -c ./csource/test.c -o build/tmp/tmp_c_compile/test.o'.
- 1/0 test_suite/concurrency/atomic_load_store.c3t: Passed.
- 2/0 test_suite/concurrency/atomic_load_store_debug.c3t: Passed.
- 3/0 test_suite/builtins/rounding_builtins.c3t: Passed.
- 4/0 test_suite/builtins/overflows.c3t: Passed.
- 5/0 test_suite/builtins/prefetch.c3t: Passed.
- 6/0 test_suite/builtins/mem.c3t: Passed.
- 7/0 test_suite/builtins/reduce_arithmetics.c3t: Passed.
- 8/0 test_suite/builtins/trap.c3t: Passed.
- 9/0 test_suite/builtins/shufflevector.c3t: Passed.
- 10/0 test_suite/builtins/builtin_with_optional.c3: Passed.
- 11/0 test_suite/builtins/builtin_vector_min_max.c3t: Passed.
- 12/0 test_suite/builtins/unaligned_load_store.c3t: Passed.
- 13/0 test_suite/builtins/exacts.c3t: Passed.
- 14/0 test_suite/builtins/simple_builtins.c3t: Passed.
- 15/0 test_suite/builtins/builtin_vector_abs.c3t: Passed.
- 16/0 test_suite/builtins/reverse_builtin.c3t: Passed.
- 17/0 test_suite/builtins/sat_builtins.c3t: Passed.
- 18/0 test_suite/asm/asm_ops_x64_1.c3t: Passed.
- 19/0 test_suite/asm/asm_regression.c3t: Passed.
- 20/0 test_suite/asm/sideeffect.c3t: Passed.
- 21/0 test_suite/asm/syscall.c3t: Passed.
- 22/0 test_suite/asm/naked.c3t: Passed.
- 23/0 test_suite/asm/asm_ops_x64_2.c3t: Passed.
- 24/0 test_suite/module/unknown_modules.c3: Passed.
- 25/0 test_suite/module/module_start_bad_ident.c3: Passed.
- 26/0 test_suite/module/module_section_export.c3t: Passed.
- 27/0 test_suite/module/module_start_invalid.c3: Passed.
- 28/0 test_suite/module/module_bad_path_keyword.c3: Passed.
- 29/0 test_suite/module/private_module.c3: Passed.
- 30/0 test_suite/module/module_start_keyword.c3: Passed.
- 31/0 test_suite/module/module_error_string.c3: Passed.
- 32/0 test_suite/module/missing_semi.c3: Passed.
- 33/0 test_suite/module/module_bad_path_invalid.c3: Passed.
- 34/0 test_suite/module/module_bad_path_ident.c3: Passed.
- 35/0 test_suite/contracts/constant_out.c3: Passed.
- 36/0 test_suite/contracts/macro_ensure_static.c3: Passed.
- 37/0 test_suite/contracts/in_array.c3: Passed.
- 38/0 test_suite/contracts/pure.c3: Passed.
- 39/0 test_suite/contracts/require_contract_loc.c3: Passed.
- 40/0 test_suite/contracts/ct_eval_of_ensure.c3: Passed.
- 41/0 test_suite/contracts/pure_calls.c3: Passed.
- 42/0 test_suite/contracts/simple_test.c3t: Passed.
- 43/0 test_suite/contracts/in_out.c3: Passed.
- 44/0 test_suite/contracts/out_subscript.c3: Passed.
- 45/0 test_suite/contracts/ensure_unsigned.c3: Passed.
- 46/0 test_suite/precedence/required_parens.c3: Passed.
- 47/0 test_suite/variables/static_in_macro.c3t: Passed.
- 48/0 test_suite/variables/consts.c3: Passed.
- 49/0 test_suite/variables/var_init.c3t: Passed.
- 50/0 test_suite/variables/var_init_multi.c3t: Passed.
- 51/0 test_suite/embed/embed_basic.c3t: Passed.
- 52/0 test_suite/import/import_error_string.c3: Passed.
- 53/0 test_suite/import/import_same.c3: Passed.
- 54/0 test_suite/import/autoimport.c3: Passed.
- 55/0 test_suite/import/access_other_module.c3t: Passed.
- 56/0 test_suite/import/import_error.c3: Passed.
- 57/0 test_suite/import/import_implicit.c3: Passed.
- 58/0 test_suite/import/import_works.c3t: Passed.
- 59/0 test_suite/import/import_error_multi.c3: Passed.
- 60/0 test_suite/import/import_twice.c3: Passed.
- 61/0 test_suite/clang/2002-07.c3t: Passed.
- 62/0 test_suite/clang/2002-03.c3t: Passed.
- 63/0 test_suite/clang/2002-01_02.c3t: Passed.
- 64/0 test_suite/clang/2002-04.c3t: Passed.
- 65/0 test_suite/unicode/commenting-out.c3: Passed.
- 66/0 test_suite/constants/float_type.c3t: Passed.
- 67/0 test_suite/constants/byte_literal_fail_hex.c3: Passed.
- 68/0 test_suite/constants/constants.c3t: Passed.
- 69/0 test_suite/constants/constant_struct.c3: Passed.
- 70/0 test_suite/constants/assign_to_const.c3: Passed.
- 71/0 test_suite/constants/byte_literals.c3t: Passed.
- 72/0 test_suite/constants/byte_literal_fail_base64.c3: Passed.
- 73/0 test_suite/constants/init_order.c3t: Passed.
- 74/0 test_suite/constants/char_literals.c3t: Passed.
- 75/0 test_suite/constants/byte_literal_fail_base64_2.c3: Passed.
- 76/0 test_suite/constants/const_var_copy.c3t: Passed.
- 77/0 test_suite/constants/byte_literal_fail_base64_4.c3: Passed.
- 78/0 test_suite/expression_block/expression_block_break.c3: Passed.
- 79/0 test_suite/expression_block/expression_block_no_end_return.c3: Passed.
- 80/0 test_suite/expression_block/expr_block_labelled_break.c3: Passed.
- 81/0 test_suite/expression_block/expr_block_no_assign.c3: Passed.
- 82/0 test_suite/distinct/distinct_struct.c3: Passed.
- 83/0 test_suite/distinct/distinct_shift.c3t: Passed.
- 84/0 test_suite/distinct/test_ops_on_struct.c3: Passed.
- 85/0 test_suite/distinct/distinct_inline_access.c3: Passed.
- 86/0 test_suite/distinct/distinct_invalid.c3: Passed.
- 87/0 test_suite/distinct/distinct_union.c3: Passed.
- 88/0 test_suite/distinct/distinct_struct_array.c3: Passed.
- 89/0 test_suite/distinct/test_errors.c3: Passed.
- 90/0 test_suite/distinct/test_ops_on_int.c3: Passed.
- 91/0 test_suite/distinct/distinct_slicing.c3: Passed.
- 92/0 test_suite/stdlib/priorityqueue.c3t: Passed.
- 93/0 test_suite/stdlib/print_env_defines.c3: Passed.
- 94/0 test_suite/stdlib/map_macos.c3t: Passed.
- 95/0 test_suite/stdlib/ascii.c3: Passed.
- 96/0 test_suite/stdlib/memcomp.c3t: Passed.
- 97/0 test_suite/stdlib/minmax.c3: Passed.
- 98/0 test_suite/stdlib/map_linux.c3t: Passed.
- 99/0 test_suite/subarrays/slice_negative_len.c3: Passed.
- 100/0 test_suite/subarrays/slice_comparison.c3t: Passed.
- 101/0 test_suite/subarrays/slice_syntax.c3: Passed.
- 102/0 test_suite/subarrays/slice_offset_neg_start.c3t: Passed.
- 103/0 test_suite/subarrays/slice_checks.c3t: Passed.
- 104/0 test_suite/subarrays/sub_array_init.c3: Passed.
- 105/0 test_suite/subarrays/slice_offset_neg_end.c3t: Passed.
- 106/0 test_suite/subarrays/slice_start.c3t: Passed.
- 107/0 test_suite/subarrays/slice_offset.c3t: Passed.
- 108/0 test_suite/functions/after_vararg.c3: Passed.
- 109/0 test_suite/functions/varargs_followed_by_named.c3t: Passed.
- 110/0 test_suite/functions/static_vars.c3t: Passed.
- 111/0 test_suite/functions/assorted_tests.c3t: Passed.
- 112/0 test_suite/functions/defered_default_arguments.c3t: Passed.
- 113/0 test_suite/functions/func_ptr_conversion_alias.c3t: Passed.
- 114/0 test_suite/functions/too_many_params.c3: Passed.
- 115/0 test_suite/functions/test_regression.c3t: Passed.
- 116/0 test_suite/functions/void_params.c3: Passed.
- 117/0 test_suite/functions/c_vararg_expansion.c3t: Passed.
- 118/0 test_suite/functions/default_param_fail.c3: Passed.
- 119/0 test_suite/functions/splat.c3t: Passed.
- 120/0 test_suite/functions/pointer_escape.c3: Passed.
- 121/0 test_suite/functions/param_with_comma_at_end.c3: Passed.
- 122/0 test_suite/functions/missing_first_paren.c3: Passed.
- 123/0 test_suite/functions/invalid_param.c3: Passed.
- 124/0 test_suite/functions/body_argument_fail.c3: Passed.
- 125/0 test_suite/functions/recursive_fn.c3: Passed.
- 126/0 test_suite/functions/missing_fn.c3: Passed.
- 127/0 test_suite/functions/missing_return.c3: Passed.
- 128/0 test_suite/functions/test_regression_mingw.c3t: Passed.
- 129/0 test_suite/functions/macro_arguments.c3: Passed.
- 130/0 test_suite/functions/ct_named_params.c3t: Passed.
- 131/0 test_suite/functions/failable_param.c3: Passed.
- 132/0 test_suite/functions/simple_test.c3t: Passed.
- 133/0 test_suite/functions/splat_raw.c3: Passed.
- 134/0 test_suite/functions/vararg_and_named_tests.c3: Passed.
- 135/0 test_suite/functions/distinct_fn_ptr_and_lambda.c3t: Passed.
- 136/0 test_suite/functions/unsplat_named.c3: Passed.
- 137/0 test_suite/functions/splat_mingw.c3t: Passed.
- 138/0 test_suite/functions/double_return.c3: Passed.
- 139/0 test_suite/functions/func_ptr_conversions_and_names.c3t: Passed.
- 140/0 test_suite/functions/naked_function.c3t: Passed.
- 141/0 test_suite/functions/returning_void.c3t: Passed.
- 142/0 test_suite/functions/vararg_argument_fails.c3: Passed.
- 143/0 test_suite/functions/splat_aarch64.c3t: Passed.
- 144/0 test_suite/functions/varargs.c3t: Passed.
- 145/0 test_suite/functions/recursive_through_generic.c3: Passed.
- 146/0 test_suite/functions/typeless_varargs.c3t: Passed.
- 147/0 test_suite/struct/const_access_error.c3: Passed.
- 148/0 test_suite/struct/struct_const_construct_simple.c3t: Passed.
- 149/0 test_suite/struct/duplicate_member.c3: Passed.
- 150/0 test_suite/struct/struct_nopadding_compact.c3t: Passed.
- 151/0 test_suite/struct/struct_pack_and_align.c3t: Passed.
- 152/0 test_suite/struct/flex_array_comparison.c3: Passed.
- 153/0 test_suite/struct/recursive_structs.c3: Passed.
- 154/0 test_suite/struct/struct_codegen_empty.c3t: Passed.
- 155/0 test_suite/struct/zero_member.c3: Passed.
- 156/0 test_suite/struct/struct_codegen_fam.c3t: Passed.
- 157/0 test_suite/struct/simple_struct.c3t: Passed.
- 158/0 test_suite/struct/struct_as_value.c3t: Passed.
- 159/0 test_suite/struct/nested_struct_union_init.c3t: Passed.
- 160/0 test_suite/struct/nested_struct_init.c3t: Passed.
- 161/0 test_suite/struct/struct_params.c3: Passed.
- 162/0 test_suite/struct/struct_codegen.c3t: Passed.
- 163/0 test_suite/struct/func_return_struct.c3: Passed.
- 164/0 test_suite/struct/member_access.c3: Passed.
- 165/0 test_suite/struct/flex_array_struct_err.c3: Passed.
- 166/0 test_suite/struct/struct_as_value_aarch64.c3t: Passed.
- 167/0 test_suite/struct/flexible_array_resolve.c3: Passed.
- 168/0 test_suite/struct/struct_union_inner_align.c3t: Passed.
- 169/0 test_suite/struct/sret.c3t: Passed.
- 170/0 test_suite/struct/member_expr.c3: Passed.
- 171/0 test_suite/struct/struct_bad_member.c3: Passed.
- 172/0 test_suite/lexing/expected_directive.c3: Passed.
- 173/0 test_suite/lexing/no_builtin.c3: Passed.
- 174/0 test_suite/lexing/invalid_hex_in_hexarray2.c3: Passed.
- 175/0 test_suite/lexing/invalid_hex_in_hexarray.c3: Passed.
- 176/0 test_suite/comments/simple_comments.c3: Passed.
- 177/0 test_suite/examples/gameoflife.c3: Passed.
- 178/0 test_suite/union/union_in_struct.c3t: Passed.
- 179/0 test_suite/union/union_zero.c3: Passed.
- 180/0 test_suite/union/union_codegen_const.c3t: Passed.
- 181/0 test_suite/union/flexible_array_union.c3: Passed.
- 182/0 test_suite/union/union_codegen_overwrite_call.c3t: Passed.
- 183/0 test_suite/union/designated_union_zeroing.c3t: Passed.
- 184/0 test_suite/union/inferred_size_vector.c3: Passed.
- 185/0 test_suite/union/union_member_voidcast.c3: Passed.
- 186/0 test_suite/union/test_unions.c3: Passed.
- 187/0 test_suite/union/union_codegen_empty.c3t: Passed.
- 188/0 test_suite/initialize/init_non_resolved_type.c3: Passed.
- 189/0 test_suite/initialize/initialize_parse_error.c3: Passed.
- 190/0 test_suite/initialize/initialize_bad_prio.c3: Passed.
- 191/0 test_suite/initialize/initializer_var.c3t: Passed.
- 192/0 test_suite/initialize/initialize_finalize.c3t: Passed.
- 193/0 test_suite/initialize/initialize_jump.c3: Passed.
- 194/0 test_suite/initialize/initialize_prio.c3: Passed.
- 195/0 test_suite/lambda/lambda_in_macro.c3t: Passed.
- 196/0 test_suite/lambda/simple_lambda.c3t: Passed.
- 197/0 test_suite/lambda/nested_lambda_def.c3t: Passed.
- 198/0 test_suite/lambda/ct_lambda.c3t: Passed.
- 199/0 test_suite/lambda/ct_lambda2.c3t: Passed.
- 200/0 test_suite/lambda/lambda_checks.c3: Passed.
- 201/0 test_suite/assert/local_static_assert_not_constant.c3: Passed.
- 202/0 test_suite/assert/unreachable.c3t: Passed.
- 203/0 test_suite/assert/global_static_assert_not_constant.c3: Passed.
- 204/0 test_suite/assert/assert_variants.c3t: Passed.
- 205/0 test_suite/assert/static_assert.c3: Passed.
- 206/0 test_suite/assert/assertf.c3t: Passed.
- 207/0 test_suite/assert/assert_with_void.c3: Passed.
- 208/0 test_suite/cast/cast_untyped_list_error.c3: Passed.
- 209/0 test_suite/cast/cast_struct_fails.c3: Passed.
- 210/0 test_suite/cast/cast_parse_fails2.c3: Passed.
- 211/0 test_suite/cast/cast_from_ptr.c3t: Passed.
- 212/0 test_suite/cast/cast_narrow_alias.c3t: Passed.
- 213/0 test_suite/cast/cast_slice_implicit.c3: Passed.
- 214/0 test_suite/cast/implicit_void_ptr_deep.c3: Passed.
- 215/0 test_suite/cast/cast_ok.c3: Passed.
- 216/0 test_suite/cast/cast_parse_fails.c3: Passed.
- 217/0 test_suite/cast/top_down_cast_fails.c3: Passed.
- 218/0 test_suite/cast/top_down_casts.c3t: Passed.
- 219/0 test_suite/cast/cast_struct.c3: Passed.
- 220/0 test_suite/cast/implicit_infer_len_cast.c3t: Passed.
- 221/0 test_suite/cast/cast_to_failable.c3: Passed.
- 222/0 test_suite/cast/cast_subarray.c3t: Passed.
- 223/0 test_suite/cast/cast_bitstruct_etc.c3t: Passed.
- 224/0 test_suite/compile_time_introspection/qnameof.c3t: Passed.
- 225/0 test_suite/compile_time_introspection/defined.c3t: Passed.
- 226/0 test_suite/compile_time_introspection/nameof_err.c3: Passed.
- 227/0 test_suite/compile_time_introspection/defined_err.c3: Passed.
- 228/0 test_suite/compile_time_introspection/alignof.c3t: Passed.
- 229/0 test_suite/compile_time_introspection/defined_subscript.c3: Passed.
- 230/0 test_suite/compile_time_introspection/sizeof_errors.c3: Passed.
- 231/0 test_suite/compile_time_introspection/offsetof.c3t: Passed.
- 232/0 test_suite/compile_time_introspection/nameof.c3t: Passed.
- 233/0 test_suite/compile_time_introspection/defined_index.c3t: Passed.
- 234/0 test_suite/compile_time_introspection/parentof.c3t: Passed.
- 235/0 test_suite/compile_time_introspection/sizeof.c3t: Passed.
- 236/0 test_suite/compile_time_introspection/defined2.c3: Passed.
- 237/0 test_suite/compile_time_introspection/defined_builtin.c3t: Passed.
- 238/0 test_suite/compile_time_introspection/defined_2.c3t: Passed.
- 239/0 test_suite/symbols/allow_local_shadowing.c3: Passed.
- 240/0 test_suite/symbols/various.c3: Passed.
- 241/0 test_suite/symbols/shadow_struct.c3: Passed.
- 242/0 test_suite/expressions/2002-02-13-ConditionalInCall.c3t: Passed.
- 243/0 test_suite/expressions/pointer_to_bool.c3: Passed.
- 244/0 test_suite/expressions/check_implict_conversion_signed_unsigned.c3t: Passed.
- 245/0 test_suite/expressions/parsed_numbers.c3t: Passed.
- 246/0 test_suite/expressions/plus_int.c3: Passed.
- 247/0 test_suite/expressions/negated_macro.c3t: Passed.
- 248/0 test_suite/expressions/call_arg_types.c3: Passed.
- 249/0 test_suite/expressions/incdec.c3t: Passed.
- 250/0 test_suite/expressions/negate_int.c3: Passed.
- 251/0 test_suite/expressions/bit_op_on_bool.c3t: Passed.
- 252/0 test_suite/expressions/underscore_errors.c3: Passed.
- 253/0 test_suite/expressions/take_address.c3t: Passed.
- 254/0 test_suite/expressions/pointer_arith.c3: Passed.
- 255/0 test_suite/expressions/casts/cast_enum_const_to_distinct.c3: Passed.
- 256/0 test_suite/expressions/casts/cast_failable.c3: Passed.
- 257/0 test_suite/expressions/casts/cast_unknown.c3: Passed.
- 258/0 test_suite/expressions/casts/void_casting.c3: Passed.
- 259/0 test_suite/expressions/casts/explicit_cast.c3: Passed.
- 260/0 test_suite/expressions/casts/struct_cast_and_distinct.c3: Passed.
- 261/0 test_suite/expressions/casts/failed_distinct_float_conversions.c3: Passed.
- 262/0 test_suite/expressions/casts/cast_const.c3: Passed.
- 263/0 test_suite/expressions/casts/cast_expr.c3t: Passed.
- 264/0 test_suite/expressions/casts/cast_func_to_various.c3: Passed.
- 265/0 test_suite/expressions/casts/narrowing.c3: Passed.
- 266/0 test_suite/expressions/casts/cast_to_nonscalar.c3: Passed.
- 267/0 test_suite/expressions/casts/cast_enum_to_various.c3: Passed.
- 268/0 test_suite/expressions/casts/narrowing_through_casts.c3: Passed.
- 269/0 test_suite/expressions/casts/cast_implicit_inline_distinct.c3: Passed.
- 270/0 test_suite/expressions/casts/cast_vector_fail.c3: Passed.
- 271/0 test_suite/expressions/bool_conversions.c3t: Passed.
- 272/0 test_suite/expressions/assign_deref_opt.c3: Passed.
- 273/0 test_suite/expressions/call_inline.c3t: Passed.
- 274/0 test_suite/expressions/arithmetics_sema_fail.c3: Passed.
- 275/0 test_suite/expressions/chained_ternary.c3t: Passed.
- 276/0 test_suite/expressions/fmuladd_err.c3t: Passed.
- 277/0 test_suite/expressions/arithmetics.c3: Passed.
- 278/0 test_suite/expressions/type_support.c3t: Passed.
- 279/0 test_suite/expressions/ternary_bool.c3t: Passed.
- 280/0 test_suite/expressions/optional_ternary.c3t: Passed.
- 281/0 test_suite/expressions/assign.c3: Passed.
- 282/0 test_suite/expressions/no_valid_conversion_minus.c3: Passed.
- 283/0 test_suite/expressions/assign_optional.c3t: Passed.
- 284/0 test_suite/expressions/ternary_no_ident.c3: Passed.
- 285/0 test_suite/expressions/simple_float_sub_neg.c3t: Passed.
- 286/0 test_suite/expressions/addr_compiles.c3t: Passed.
- 287/0 test_suite/expressions/assignment_precedence.c3t: Passed.
- 288/0 test_suite/expressions/fail_index_usize.c3: Passed.
- 289/0 test_suite/expressions/fmuladd.c3t: Passed.
- 290/0 test_suite/expressions/pointer_access.c3t: Passed.
- 291/0 test_suite/expressions/pointer_conv_error.c3: Passed.
- 292/0 test_suite/expressions/void_arg.c3: Passed.
- 293/0 test_suite/expressions/not_in_wrong_position.c3: Passed.
- 294/0 test_suite/expressions/rvalues.c3: Passed.
- 295/0 test_suite/expressions/unsafe_comparisons.c3: Passed.
- 296/0 test_suite/expressions/strings.c3t: Passed.
- 297/0 test_suite/expressions/assignability.c3: Passed.
- 298/0 test_suite/expressions/addr_of_fails.c3: Passed.
- 299/0 test_suite/expressions/folding_ptr.c3t: Passed.
- 300/0 test_suite/expressions/elvis.c3t: Passed.
- 301/0 test_suite/expressions/chained_conditional.c3t: Passed.
- 302/0 test_suite/expressions/optional_and_error.c3: Passed.
- 303/0 test_suite/expressions/enum_ct_sub.c3t: Passed.
- 304/0 test_suite/from_docs/examples_macro_function.c3t: Passed.
- 305/0 test_suite/from_docs/examples_functionpointer.c3t: Passed.
- 306/0 test_suite/from_docs/examples_defer.c3t: Passed.
- 307/0 test_suite/from_docs/examples_if_catch.c3t: Passed.
- 308/0 test_suite/from_docs/examples_struct.c3: Passed.
- 309/0 test_suite/from_docs/examples_forswitch.c3t: Passed.
- 310/0 test_suite/any/variant_switch.c3t: Passed.
- 311/0 test_suite/any/variant_test.c3t: Passed.
- 312/0 test_suite/any/any_in_any.c3t: Passed.
- 313/0 test_suite/any/variant_assign.c3t: Passed.
- 314/0 test_suite/types/enum_inference.c3: Passed.
- 315/0 test_suite/types/illegal_array_size_constant.c3: Passed.
- 316/0 test_suite/types/enum_param.c3: Passed.
- 317/0 test_suite/types/recursive_fn.c3: Passed.
- 318/0 test_suite/types/enum_implicit_overflow.c3: Passed.
- 319/0 test_suite/types/various.c3: Passed.
- 320/0 test_suite/types/recursive_typedef.c3: Passed.
- 321/0 test_suite/types/enum_parse_errors.c3: Passed.
- 322/0 test_suite/types/redefinition.c3: Passed.
- 323/0 test_suite/types/typedefs.c3: Passed.
- 324/0 test_suite/types/non_rec_fn.c3: Passed.
- 325/0 test_suite/types/enum_ok.c3: Passed.
- 326/0 test_suite/types/recursive_array.c3: Passed.
- 327/0 test_suite/types/enum_illegal_type.c3: Passed.
- 328/0 test_suite/floats/float_exceeding_size.c3: Passed.
- 329/0 test_suite/floats/convert_float.c3t: Passed.
- 330/0 test_suite/floats/mod.c3t: Passed.
- 331/0 test_suite/floats/inf_nan.c3t: Passed.
- 332/0 test_suite/floats/explicit_float_truncation_needed.c3: Passed.
- 333/0 test_suite/enumerations/enum_conversions.c3t: Passed.
- 334/0 test_suite/enumerations/simple_inference.c3t: Passed.
- 335/0 test_suite/enumerations/enum_cast.c3t: Passed.
- 336/0 test_suite/enumerations/missing_type.c3: Passed.
- 337/0 test_suite/enumerations/enum_add_sub.c3t: Passed.
- 338/0 test_suite/enumerations/enum_invalid_param.c3: Passed.
- 339/0 test_suite/enumerations/enum_values.c3t: Passed.
- 340/0 test_suite/enumerations/enum_same_param.c3: Passed.
- 341/0 test_suite/enumerations/enum_reflect_associated.c3t: Passed.
- 342/0 test_suite/enumerations/enum_associated_value.c3t: Passed.
- 343/0 test_suite/enumerations/enum_signed_cast_swap.c3t: Passed.
- 344/0 test_suite/enumerations/enum_associated_values_other.c3t: Passed.
- 345/0 test_suite/enumerations/compile_time.c3t: Passed.
- 346/0 test_suite/enumerations/enum_cast_error.c3: Passed.
- 347/0 test_suite/define/forbidden_defines.c3: Passed.
- 348/0 test_suite/define/test_at_alias.c3: Passed.
- 349/0 test_suite/define/common.c3: Passed.
- 350/0 test_suite/define/define_name_errors.c3: Passed.
- 351/0 test_suite/define/aliased_consts.c3t: Passed.
- 352/0 test_suite/define/test_at.c3: Passed.
- 353/0 test_suite/debug_symbols/defer_macro.c3t: Passed.
- 354/0 test_suite/debug_symbols/constants.c3t: Passed.
- 355/0 test_suite/debug_symbols/constants_mingw.c3t: Passed.
- 356/0 test_suite/debug_symbols/foreach.c3t: Passed.
- 357/0 test_suite/debug_symbols/ct_foreach.c3t: Passed.
- 358/0 test_suite/statements/if_tests.c3t: Passed.
- 359/0 test_suite/statements/for_with_extra_declarations.c3: Passed.
- 360/0 test_suite/statements/while_switch.c3t: Passed.
- 361/0 test_suite/statements/if_single.c3: Passed.
- 362/0 test_suite/statements/defer_in_defer.c3t: Passed.
- 363/0 test_suite/statements/nextcase_no_switch.c3: Passed.
- 364/0 test_suite/statements/foreach_r_custom_errors.c3: Passed.
- 365/0 test_suite/statements/exhaustive_switch.c3t: Passed.
- 366/0 test_suite/statements/labelled_continue_for.c3t: Passed.
- 367/0 test_suite/statements/for_errors.c3: Passed.
- 368/0 test_suite/statements/defer_return.c3t: Passed.
- 369/0 test_suite/statements/foreach_custom_macro.c3t: Passed.
- 370/0 test_suite/statements/do_without_compound.c3: Passed.
- 371/0 test_suite/statements/label_errors.c3: Passed.
- 372/0 test_suite/statements/foreach_r_custom_macro.c3t: Passed.
- 373/0 test_suite/statements/return_with_other_at_end.c3: Passed.
- 374/0 test_suite/statements/binary_fail.c3: Passed.
- 375/0 test_suite/statements/call_missing_paren.c3: Passed.
- 376/0 test_suite/statements/custom_foreach_with_ref.c3t: Passed.
- 377/0 test_suite/statements/infinite_do_while.c3t: Passed.
- 378/0 test_suite/statements/const_statements.c3t: Passed.
- 379/0 test_suite/statements/foreach_parse_error.c3: Passed.
- 380/0 test_suite/statements/foreach_r_parse_error.c3: Passed.
- 381/0 test_suite/statements/defer_next_switch.c3t: Passed.
- 382/0 test_suite/statements/switch_errors.c3: Passed.
- 383/0 test_suite/statements/defer_with_loop.c3t: Passed.
- 384/0 test_suite/statements/conditional_return.c3: Passed.
- 385/0 test_suite/statements/nextcase_const.c3t: Passed.
- 386/0 test_suite/statements/foreach_more_implementations.c3t: Passed.
- 387/0 test_suite/statements/defer_test.c3: Passed.
- 388/0 test_suite/statements/foreach_break.c3t: Passed.
- 389/0 test_suite/statements/defer_in_block.c3t: Passed.
- 390/0 test_suite/statements/defer_break_simple.c3t: Passed.
- 391/0 test_suite/statements/foreach_r_errors.c3: Passed.
- 392/0 test_suite/statements/if_while_do_error.c3: Passed.
- 393/0 test_suite/statements/foreach_custom_errors.c3: Passed.
- 394/0 test_suite/statements/foreach_wrong_index.c3: Passed.
- 395/0 test_suite/statements/foreach_errors.c3: Passed.
- 396/0 test_suite/statements/various_switching.c3t: Passed.
- 397/0 test_suite/statements/defer_in_defer2.c3t: Passed.
- 398/0 test_suite/statements/foreach_r_custom.c3t: Passed.
- 399/0 test_suite/statements/for.c3: Passed.
- 400/0 test_suite/statements/default_args.c3: Passed.
- 401/0 test_suite/statements/foreach_common.c3t: Passed.
- 402/0 test_suite/statements/nextcase_missing_case.c3: Passed.
- 403/0 test_suite/statements/if_decl.c3: Passed.
- 404/0 test_suite/statements/foreach_r_common.c3t: Passed.
- 405/0 test_suite/statements/ranged_switch.c3t: Passed.
- 406/0 test_suite/statements/defer_do_while.c3t: Passed.
- 407/0 test_suite/statements/foreach_r_with_error.c3: Passed.
- 408/0 test_suite/statements/switch_error_range.c3: Passed.
- 409/0 test_suite/statements/nextcase_default.c3t: Passed.
- 410/0 test_suite/statements/fallthough_do.c3t: Passed.
- 411/0 test_suite/statements/return_stmt.c3: Passed.
- 412/0 test_suite/statements/defer_break.c3t: Passed.
- 413/0 test_suite/statements/comparison_widening.c3t: Passed.
- 414/0 test_suite/statements/foreach_r_break.c3t: Passed.
- 415/0 test_suite/statements/for_empty.c3: Passed.
- 416/0 test_suite/statements/defer_break_switch.c3t: Passed.
- 417/0 test_suite/statements/return_switch.c3t: Passed.
- 418/0 test_suite/statements/foreach_custom.c3t: Passed.
- 419/0 test_suite/statements/while_statement_placement.c3: Passed.
- 420/0 test_suite/statements/foreach_with_error.c3: Passed.
- 421/0 test_suite/statements/simple_do.c3t: Passed.
- 422/0 test_suite/overloading/set_overload.c3t: Passed.
- 423/0 test_suite/globals/misplaced_const.c3: Passed.
- 424/0 test_suite/globals/external_global.c3t: Passed.
- 425/0 test_suite/globals/global_no_init.c3t: Passed.
- 426/0 test_suite/globals/self_referencing_local.c3: Passed.
- 427/0 test_suite/globals/global_extname.c3t: Passed.
- 428/0 test_suite/globals/static_global.c3: Passed.
- 429/0 test_suite/globals/global_align.c3t: Passed.
- 430/0 test_suite/globals/recursive_globals.c3: Passed.
- 431/0 test_suite/globals/extern_const.c3t: Passed.
- 432/0 test_suite/globals/init_with_err.c3t: Passed.
- 433/0 test_suite/globals/recursive_locals.c3: Passed.
- 434/0 test_suite/globals/ext_global_init.c3: Passed.
- 435/0 test_suite/globals/global_init.c3: Passed.
- 436/0 test_suite/macros/macro_defer_exit.c3t: Passed.
- 437/0 test_suite/macros/macro_defer_scope.c3t: Passed.
- 438/0 test_suite/macros/macro_import_res_private.c3t: Passed.
- 439/0 test_suite/macros/macro_typed_varargs.c3t: Passed.
- 440/0 test_suite/macros/no_body.c3: Passed.
- 441/0 test_suite/macros/macro_resolution.c3: Passed.
- 442/0 test_suite/macros/macro_import_resolution.c3: Passed.
- 443/0 test_suite/macros/macro_with_body.c3t: Passed.
- 444/0 test_suite/macros/macro_failable_return_rethrow.c3t: Passed.
- 445/0 test_suite/macros/macro_ref_errors.c3: Passed.
- 446/0 test_suite/macros/macro_ref_body_err1.c3: Passed.
- 447/0 test_suite/macros/unifying_implicit_void.c3t: Passed.
- 448/0 test_suite/macros/macro_body_defer.c3t: Passed.
- 449/0 test_suite/macros/macro_common.c3t: Passed.
- 450/0 test_suite/macros/macro_untyped_varargs_2.c3t: Passed.
- 451/0 test_suite/macros/macro_untyped_varargs.c3: Passed.
- 452/0 test_suite/macros/macro_body_ref_hash_constant_type.c3t: Passed.
- 453/0 test_suite/macros/macro_body_as_value.c3: Passed.
- 454/0 test_suite/macros/macro_with_body_err.c3: Passed.
- 455/0 test_suite/macros/macro_body_errors.c3: Passed.
- 456/0 test_suite/macros/macro_vasplat.c3t: Passed.
- 457/0 test_suite/macros/implicit_return_opt.c3: Passed.
- 458/0 test_suite/macros/hash_ident_nested.c3t: Passed.
- 459/0 test_suite/macros/macro_convert_literal.c3: Passed.
- 460/0 test_suite/macros/macro_nested_labels.c3t: Passed.
- 461/0 test_suite/macros/modify_ct_param.c3: Passed.
- 462/0 test_suite/macros/macro_calls_prefix.c3: Passed.
- 463/0 test_suite/macros/hash_ident.c3: Passed.
- 464/0 test_suite/macros/hash_initializer.c3t: Passed.
- 465/0 test_suite/macros/type_params.c3t: Passed.
- 466/0 test_suite/macros/macro_defer_with_body.c3t: Passed.
- 467/0 test_suite/macros/macro_ref_body_err2.c3: Passed.
- 468/0 test_suite/macros/deref_macro_pointer.c3: Passed.
- 469/0 test_suite/macros/macro_chained_return_void_optional.c3t: Passed.
- 470/0 test_suite/macros/ref_vector.c3t: Passed.
- 471/0 test_suite/macros/macro_rtype.c3: Passed.
- 472/0 test_suite/macros/userland_bitcast.c3t: Passed.
- 473/0 test_suite/literals/bin_literal2.c3t: Passed.
- 474/0 test_suite/literals/too_small.c3: Passed.
- 475/0 test_suite/literals/literal_general.c3t: Passed.
- 476/0 test_suite/literals/radix_numbers_errors.c3: Passed.
- 477/0 test_suite/literals/multi_unicode.c3: Passed.
- 478/0 test_suite/literals/bin_literal.c3t: Passed.
- 479/0 test_suite/literals/bad_bitwidth.c3: Passed.
- 480/0 test_suite/switch/bad_ranges.c3: Passed.
- 481/0 test_suite/switch/simple_jump.c3t: Passed.
- 482/0 test_suite/switch/switch_in_defer_macro.c3t: Passed.
- 483/0 test_suite/switch/failable_switch.c3: Passed.
- 484/0 test_suite/switch/jump_with_inc.c3t: Passed.
- 485/0 test_suite/attributes/attr_link_err.c3: Passed.
- 486/0 test_suite/attributes/attr_not_imported.c3: Passed.
- 487/0 test_suite/attributes/call_attribute_error_eos.c3: Passed.
- 488/0 test_suite/attributes/attribute_params.c3: Passed.
- 489/0 test_suite/attributes/attribute_path.c3: Passed.
- 490/0 test_suite/attributes/recursive_attributes.c3: Passed.
- 491/0 test_suite/attributes/user_defined_attributes.c3t: Passed.
- 492/0 test_suite/attributes/attribute_visibility.c3t: Passed.
- 493/0 test_suite/generic/generic_with_enum.c3t: Passed.
- 494/0 test_suite/generic/generic_without_param.c3: Passed.
- 495/0 test_suite/generic/generic_idents.c3t: Passed.
- 496/0 test_suite/generic/implicit_import_of_generic.c3: Passed.
- 497/0 test_suite/generic/generic_over_fn.c3t: Passed.
- 498/0 test_suite/generic/generic_num.c3t: Passed.
- 499/0 test_suite/generic/generic_cyclic.c3: Passed.
- 500/0 test_suite/generic/enum_set_test.c3t: Passed.
- 501/0 test_suite/generic/generic_local.c3: Passed.
- 502/0 test_suite/generic/generic_lambda_complex.c3t: Passed.
- 503/0 test_suite/generic/incorrect_argument_type.c3: Passed.
- 504/0 test_suite/generic/generic_recursion.c3t: Passed.
- 505/0 test_suite/generic/enum_in_other_module.c3t: Passed.
- 506/0 test_suite/generic/generic_copy.c3t: Passed.
- 507/0 test_suite/dynamic/dynamic_mismatch.c3: Passed.
- 508/0 test_suite/dynamic/overlapping_function_linux.c3t: Passed.
- 509/0 test_suite/dynamic/duplicate_definition.c3: Passed.
- 510/0 test_suite/dynamic/inherit_macos.c3t: Passed.
- 511/0 test_suite/dynamic/any_cast.c3: Passed.
- 512/0 test_suite/dynamic/overlapping_function_macos.c3t: Passed.
- 513/0 test_suite/dynamic/same_method_twice.c3: Passed.
- 514/0 test_suite/dynamic/null_and_protocol.c3t: Passed.
- 515/0 test_suite/dynamic/inherit_linux.c3t: Passed.
- 516/0 test_suite/vector/vector_incdec.c3t: Passed.
- 517/0 test_suite/vector/vector_bit.c3t: Passed.
- 518/0 test_suite/vector/vector_pointer_errors.c3: Passed.
- 519/0 test_suite/vector/vector_lowering_regression1.c3t: Passed.
- 520/0 test_suite/vector/vector_init_regression.c3t: Passed.
- 521/0 test_suite/vector/vector_to_array_fail.c3: Passed.
- 522/0 test_suite/vector/vector_ops2.c3t: Passed.
- 523/0 test_suite/vector/swizzling.c3: Passed.
- 524/0 test_suite/vector/gather_scatter.c3t: Passed.
- 525/0 test_suite/vector/vector_to_array_cast.c3t: Passed.
- 526/0 test_suite/vector/vector_init.c3t: Passed.
- 527/0 test_suite/vector/vector_consts.c3t: Passed.
- 528/0 test_suite/vector/vector_param.c3t: Passed.
- 529/0 test_suite/assignment/var_variable.c3: Passed.
- 530/0 test_suite/assignment/int_assign.c3t: Passed.
- 531/0 test_suite/assignment/alignment_index.c3t: Passed.
- 532/0 test_suite/macro_methods/macro_methods_defined_twice.c3: Passed.
- 533/0 test_suite/macro_methods/access.c3: Passed.
- 534/0 test_suite/macro_methods/macro_method_first_param.c3: Passed.
- 535/0 test_suite/macro_methods/macro_method_fails.c3: Passed.
- 536/0 test_suite/macro_methods/macro_method_different_args.c3t: Passed.
- 537/0 test_suite/compile_time/ct_eval.c3t: Passed.
- 538/0 test_suite/compile_time/not_yet_initialized.c3: Passed.
- 539/0 test_suite/compile_time/ct_assert_bug.c3: Passed.
- 540/0 test_suite/compile_time/ct_if.c3t: Passed.
- 541/0 test_suite/compile_time/compile_time_bitops.c3t: Passed.
- 542/0 test_suite/compile_time/typeof_from_literal.c3: Passed.
- 543/0 test_suite/compile_time/compile_time_pointers.c3t: Passed.
- 544/0 test_suite/compile_time/ct_switch_type_errors.c3: Passed.
- 545/0 test_suite/compile_time/ct_enum_values.c3t: Passed.
- 546/0 test_suite/compile_time/stringify2.c3t: Passed.
- 547/0 test_suite/compile_time/mod_ct.c3t: Passed.
- 548/0 test_suite/compile_time/typefrom_errors.c3t: Passed.
- 549/0 test_suite/compile_time/compile_time_access_subscript.c3t: Passed.
- 550/0 test_suite/compile_time/untyped_with_inferred.c3: Passed.
- 551/0 test_suite/compile_time/ct_switch_errors.c3: Passed.
- 552/0 test_suite/compile_time/ternary_folding.c3t: Passed.
- 553/0 test_suite/compile_time/compile_time_array_ref.c3t: Passed.
- 554/0 test_suite/compile_time/ct_funcptr.c3t: Passed.
- 555/0 test_suite/compile_time/typed_ct_vars.c3t: Passed.
- 556/0 test_suite/compile_time/ct_func.c3t: Passed.
- 557/0 test_suite/compile_time/stringify.c3t: Passed.
- 558/0 test_suite/compile_time/ct_value_from_access.c3t: Passed.
- 559/0 test_suite/compile_time/ct_for.c3t: Passed.
- 560/0 test_suite/compile_time/concat_append.c3t: Passed.
- 561/0 test_suite/compile_time/ct_through_constant.c3t: Passed.
- 562/0 test_suite/compile_time/ct_builtin_time_date.c3t: Passed.
- 563/0 test_suite/compile_time/ct_memberof.c3t: Passed.
- 564/0 test_suite/compile_time/ct_string_functions.c3t: Passed.
- 565/0 test_suite/compile_time/ct_foreach.c3t: Passed.
- 566/0 test_suite/compile_time/typeof_example.c3t: Passed.
- 567/0 test_suite/compile_time/typefrom.c3t: Passed.
- 568/0 test_suite/compile_time/ct_switch.c3t: Passed.
- 569/0 test_suite/compile_time/untyped_conversions.c3t: Passed.
- 570/0 test_suite/compile_time/ct_eval_sym.c3: Passed.
- 571/0 test_suite/compile_time/ct_and_or.c3: Passed.
- 572/0 test_suite/compile_time/cttype_reassign.c3t: Passed.
- 573/0 test_suite/compile_time/compile_time_array.c3t: Passed.
- 574/0 test_suite/compile_time/ct_switch_type_check.c3t: Passed.
- 575/0 test_suite/compile_time/ct_switch_more_checks.c3: Passed.
- 576/0 test_suite/compile_time/compile_time_ptr_ref.c3t: Passed.
- 577/0 test_suite/compile_time/ct_ordered_error.c3t: Passed.
- 578/0 test_suite/compile_time/ct_switch_top_level.c3t: Passed.
- 579/0 test_suite/slices/slice_assign2.c3t: Passed.
- 580/0 test_suite/slices/slice_to_slice_vector_assign.c3t: Passed.
- 581/0 test_suite/slices/slice_to_slice_assign.c3t: Passed.
- 582/0 test_suite/slices/slice_init.c3t: Passed.
- 583/0 test_suite/slices/slice_assign.c3t: Passed.
- 584/0 test_suite/slices/slice_len_error.c3: Passed.
- 585/0 test_suite/abi/riscv32-ilp32-abi.c3t: Passed.
- 586/0 test_suite/abi/darwin64_sse.c3t: Passed.
- 587/0 test_suite/abi/aarch64_hfa_args.c3t: Passed.
- 588/0 test_suite/abi/riscv64-lp64-lp64f-lp64d-abi-3.c3t: Passed.
- 589/0 test_suite/abi/riscv64-lp64-lp64f-abi-2.c3t: Passed.
- 590/0 test_suite/abi/riscv32-ilp32-ilp32f-ilp32d-abi-2.c3t: Passed.
- 591/0 test_suite/abi/darwin64_avx.c3t: Passed.
- 592/0 test_suite/abi/sysv_abi_avx.c3t: Passed.
- 593/0 test_suite/abi/riscv32-ilp32d-abi.c3t: Passed.
- 594/0 test_suite/abi/macho_section.c3t: Passed.
- 595/0 test_suite/abi/riscv64-lp64f-lp64d-abi-2.c3t: Passed.
- 596/0 test_suite/abi/x64alignarray.c3t: Passed.
- 597/0 test_suite/abi/sysv_abi_noavx.c3t: Passed.
- 598/0 test_suite/abi/riscv64-lp64d-abi.c3t: Passed.
- 599/0 test_suite/abi/riscv64-lp64-lp64f-lp64d-abi-1.c3t: Passed.
- 600/0 test_suite/abi/test_sret.c3t: Passed.
- 601/0 test_suite/abi/vec2_x64.c3t: Passed.
- 602/0 test_suite/abi/riscv32-ilp32f-abi.c3t: Passed.
- 603/0 test_suite/abi/macho_section_attributes.c3: Passed.
- 604/0 test_suite/abi/riscv32-ilp32-ilp32f-abi-1.c3t: Passed.
- 605/0 test_suite/abi/darwin_return_boolarray.c3t: Passed.
- 606/0 test_suite/abi/vec2_aarch64.c3t: Passed.
- 607/0 test_suite/abi/pass_large_aarch.c3t: Passed.
- 608/0 test_suite/abi/riscv64-lp64-lp64f-abi-1.c3t: Passed.
- 609/0 test_suite/abi/darwin64_avx512.c3t: Passed.
- 610/0 test_suite/abi/vec2_wasm.c3t: Passed.
- 611/0 test_suite/abi/aarch64_args.c3t: Passed.
- 612/0 test_suite/abi/darwin_arg.c3t: Passed.
- 613/0 test_suite/abi/literal_load_aarch64.c3t: Passed.
- 614/0 test_suite/abi/small_struct_x64.c3t: Passed.
- 615/0 test_suite/abi/darwinx64_1.c3t: Passed.
- 616/0 test_suite/abi/riscv32-ilp32-ilp32f-ilp32d-abi-3.c3t: Passed.
- 617/0 test_suite/abi/riscv32-ilp32-ilp32f-ilp32d-abi-1.c3t: Passed.
- 618/0 test_suite/abi/riscv32-ilp32-ilp32f-abi-2.c3t: Passed.
- 619/0 test_suite/abi/riscv64-lp64-lp64f-lp64d-abi-2.c3t: Passed.
- 620/0 test_suite/abi/literal_load_mingw.c3t: Passed.
- 621/0 test_suite/abi/riscv64-lp64f-lp64d-abi-1.c3t: Passed.
- 622/0 test_suite/abi/riscv32-ilp32f-ilp32d-abi-2.c3t: Passed.
- 623/0 test_suite/abi/darwin64_sret.c3t: Passed.
- 624/0 test_suite/abi/darwinx64_2.c3t: Passed.
- 625/0 test_suite/abi/riscv32-ilp32f-ilp32d-abi-1.c3t: Passed.
- 626/0 test_suite/abi/riscv64-lp64-abi.c3t: Passed.
- 627/0 test_suite/abi/union_x64.c3t: Passed.
- 628/0 test_suite/abi/avx512fp16-abi.c3t: Passed.
- 629/0 test_suite/abi/wasm_extern.c3t: Passed.
- 630/0 test_suite/abi/sysv_direct_coerce.c3t: Passed.
- 631/0 test_suite/abi/literal_load.c3t: Passed.
- 632/0 test_suite/methods/extending_with_visibility_fail.c3: Passed.
- 633/0 test_suite/methods/extension_method.c3t: Passed.
- 634/0 test_suite/methods/dynamic_method_fails.c3: Passed.
- 635/0 test_suite/methods/method_from_var.c3: Passed.
- 636/0 test_suite/methods/extending_with_visibility_fail_private.c3: Passed.
- 637/0 test_suite/methods/access_private_method.c3: Passed.
- 638/0 test_suite/methods/operator_defined_twice.c3: Passed.
- 639/0 test_suite/methods/extension_method_in_other_modules.c3t: Passed.
- 640/0 test_suite/methods/access.c3: Passed.
- 641/0 test_suite/methods/extending_with_visibility.c3: Passed.
- 642/0 test_suite/methods/enum_distinct_err_methods.c3t: Passed.
- 643/0 test_suite/methods/methods_with_inferred_type.c3t: Passed.
- 644/0 test_suite/methods/operator_mismatch.c3: Passed.
- 645/0 test_suite/methods/extension_method_already_exist.c3: Passed.
- 646/0 test_suite/methods/extension_method_generic.c3: Passed.
- 647/0 test_suite/methods/methods_defined_twice.c3: Passed.
- 648/0 test_suite/methods/unsupported_operator.c3: Passed.
- 649/0 test_suite/strings/literal_errors.c3: Passed.
- 650/0 test_suite/strings/multiline_strings.c3t: Passed.
- 651/0 test_suite/strings/literal_to_subarray.c3t: Passed.
- 652/0 test_suite/strings/literal_hex_ok.c3: Passed.
- 653/0 test_suite/strings/string_escape.c3t: Passed.
- 654/0 test_suite/strings/string_len.c3t: Passed.
- 655/0 test_suite/strings/string_to_array.c3t: Passed.
- 656/0 test_suite/defer/defer_with_rethrow.c3: Passed.
- 657/0 test_suite/defer/defer_with_return.c3: Passed.
- 658/0 test_suite/defer/defer_and_expr_block.c3t: Passed.
- 659/0 test_suite/defer/defer_static_var.c3t: Passed.
- 660/0 test_suite/defer/defer_single_stmt.c3: Passed.
- 661/0 test_suite/defer/defer_nextcase.c3t: Passed.
- 662/0 test_suite/defer/defer_catch_try.c3t: Passed.
- 663/0 test_suite/defer/defer_catch_err.c3t: Passed.
- 664/0 test_suite/safe/deref.c3t: Passed.
- 665/0 test_suite/safe/detect_invalid_deref_return.c3: Passed.
- 666/0 test_suite/arrays/array_bounds_check.c3t: Passed.
- 667/0 test_suite/arrays/array_invalid_casts.c3: Passed.
- 668/0 test_suite/arrays/slice.c3: Passed.
- 669/0 test_suite/arrays/array_struct.c3t: Passed.
- 670/0 test_suite/arrays/array_comparison_2.c3t: Passed.
- 671/0 test_suite/arrays/index_into_global.c3t: Passed.
- 672/0 test_suite/arrays/inferred_array_err2.c3: Passed.
- 673/0 test_suite/arrays/complex_array_const.c3t: Passed.
- 674/0 test_suite/arrays/array_casts.c3t: Passed.
- 675/0 test_suite/arrays/inferred_array_err.c3: Passed.
- 676/0 test_suite/arrays/global_array_non_const.c3: Passed.
- 677/0 test_suite/arrays/negative_array.c3: Passed.
- 678/0 test_suite/arrays/array_literal.c3t: Passed.
- 679/0 test_suite/arrays/inferred_array_optional.c3t: Passed.
- 680/0 test_suite/arrays/global_init_array_out_of_range.c3: Passed.
- 681/0 test_suite/arrays/global_init.c3t: Passed.
- 682/0 test_suite/arrays/complex_inferred_array.c3t: Passed.
- 683/0 test_suite/arrays/index_from_back.c3t: Passed.
- 684/0 test_suite/arrays/array_comparison.c3t: Passed.
- 685/0 test_suite/arrays/inferred_subarray.c3: Passed.
- 686/0 test_suite/arrays/array_indexing.c3: Passed.
- 687/0 test_suite/bitstruct/bitstruct_arrays_be.c3t: Passed.
- 688/0 test_suite/bitstruct/address_of_bitstruct.c3: Passed.
- 689/0 test_suite/bitstruct/bitstruct_anon_in_struct_ok.c3t: Passed.
- 690/0 test_suite/bitstruct/bitstruct_initializer.c3t: Passed.
- 691/0 test_suite/bitstruct/bitstruct_cast_and_back.c3: Passed.
- 692/0 test_suite/bitstruct/bitstruct_direct_in_struct.c3t: Passed.
- 693/0 test_suite/bitstruct/bitstruct_general.c3: Passed.
- 694/0 test_suite/bitstruct/bitstruct_ops.c3t: Passed.
- 695/0 test_suite/bitstruct/bistruct_cast_wrong_size.c3: Passed.
- 696/0 test_suite/bitstruct/invalid_bitstruct_type.c3: Passed.
- 697/0 test_suite/bitstruct/bitstruct_access_signed.c3t: Passed.
- 698/0 test_suite/bitstruct/bitstruct_arrays.c3t: Passed.
- 699/0 test_suite/bitstruct/embedded_bitstruct.c3t: Passed.
- 700/0 test_suite/bitstruct/bitstruct_be.c3t: Passed.
- 701/0 test_suite/bitstruct/bitstruct_simple.c3: Passed.
- 702/0 test_suite/bitstruct/bitstruct_single_error.c3: Passed.
- 703/0 test_suite/bitstruct/bitstruct_in_subarray.c3t: Passed.
- 704/0 test_suite/bitstruct/missing_bitstruct_type.c3: Passed.
- 705/0 test_suite/bitstruct/designated_initializer_with_bitstruct.c3t: Passed.
- 706/0 test_suite/bitstruct/bitstruct_to_int.c3t: Passed.
- 707/0 test_suite/bitstruct/param_bitstruct.c3t: Passed.
- 708/0 test_suite/bitstruct/bitstruct_init_bool.c3t: Passed.
- 709/0 test_suite/bitstruct/bitstruct_simple_err_decl.c3: Passed.
- 710/0 test_suite/bitstruct/anon_bitstruct_name_overlap.c3: Passed.
- 711/0 test_suite/bitstruct/bitstruct_init.c3: Passed.
- 712/0 test_suite/bitstruct/bitstruct_overlap.c3: Passed.
- 713/0 test_suite/bitstruct/array_with_boolean.c3t: Passed.
- 714/0 test_suite/bitstruct/invalid_bitstruct_name_other_ident.c3: Passed.
- 715/0 test_suite/bitstruct/bitfield_access.c3t: Passed.
- 716/0 test_suite/bitstruct/bitstruct_cast_const_init.c3t: Passed.
- 717/0 test_suite/bitstruct/invalid_empty_struct_union.c3: Passed.
- 718/0 test_suite/bitstruct/bitstruct_intcontainer.c3t: Passed.
- 719/0 test_suite/bitstruct/invalid_bitstruct_member_types.c3: Passed.
- 720/0 test_suite/pointers/array_pointer_decay.c3t: Passed.
- 721/0 test_suite/pointers/pointer_index.c3t: Passed.
- 722/0 test_suite/pointers/const_pointer.c3t: Passed.
- 723/0 test_suite/pointers/subarray_variant_to_ptr.c3t: Passed.
- 724/0 test_suite/regression/crash_on_right_paren_macro.c3: Passed.
- 725/0 test_suite/visibility/ambiguous_var.c3t: Passed.
- 726/0 test_suite/visibility/not_visible.c3t: Passed.
- 727/0 test_suite/visibility/private_import.c3: Passed.
- 728/0 test_suite/visibility/private_to_extern.c3t: Passed.
- 729/0 test_suite/visibility/shared_module.c3t: Passed.
- 730/0 test_suite/visibility/no_shared_imports.c3t: Passed.
- 731/0 test_suite/visibility/simple_visibility.c3t: Passed.
- 732/0 test_suite/visibility/export_property.c3t: Passed.
- 733/0 test_suite/visibility/ambiguous_recursive.c3: Passed.
- 734/0 test_suite/visibility/private_import2.c3: Passed.
- 735/0 test_suite/errors/try_catch_if.c3t: Passed.
- 736/0 test_suite/errors/printing_errors.c3t: Passed.
- 737/0 test_suite/errors/error_decl_ok.c3: Passed.
- 738/0 test_suite/errors/more_optional_discard.c3: Passed.
- 739/0 test_suite/errors/no_common.c3: Passed.
- 740/0 test_suite/errors/bitshift_failable.c3: Passed.
- 741/0 test_suite/errors/error_introspect.c3t: Passed.
- 742/0 test_suite/errors/try_assign.c3t: Passed.
- 743/0 test_suite/errors/try_with_unwrap.c3t: Passed.
- 744/0 test_suite/errors/try_unwrap_using_assert.c3: Passed.
- 745/0 test_suite/errors/macro_err2.c3t: Passed.
- 746/0 test_suite/errors/error_semantic_fails.c3: Passed.
- 747/0 test_suite/errors/missing_bang.c3: Passed.
- 748/0 test_suite/errors/macro_err3.c3t: Passed.
- 749/0 test_suite/errors/error_union.c3: Passed.
- 750/0 test_suite/errors/optional_sizeof.c3: Passed.
- 751/0 test_suite/errors/error_else.c3t: Passed.
- 752/0 test_suite/errors/multiple_catch.c3t: Passed.
- 753/0 test_suite/errors/optional_untyped_list.c3: Passed.
- 754/0 test_suite/errors/empty_fault.c3: Passed.
- 755/0 test_suite/errors/general_error_regression.c3t: Passed.
- 756/0 test_suite/errors/or_and_rethrow.c3t: Passed.
- 757/0 test_suite/errors/optional_with_optional.c3t: Passed.
- 758/0 test_suite/errors/optional_discarded_macro.c3: Passed.
- 759/0 test_suite/errors/try_with_chained_unwrap.c3t: Passed.
- 760/0 test_suite/errors/optional_inits.c3t: Passed.
- 761/0 test_suite/errors/optional_taddr_and_access.c3t: Passed.
- 762/0 test_suite/errors/try_with_weird_stuff.c3: Passed.
- 763/0 test_suite/errors/mixed_decl.c3: Passed.
- 764/0 test_suite/errors/macro_err.c3t: Passed.
- 765/0 test_suite/errors/illegal_use_of_optional.c3: Passed.
- 766/0 test_suite/errors/optional_chained_init.c3t: Passed.
- 767/0 test_suite/errors/optional_discarded_func.c3: Passed.
- 768/0 test_suite/errors/macro_recurse_twice.c3: Passed.
- 769/0 test_suite/errors/try_catch_unwrapping_while_if.c3: Passed.
- 770/0 test_suite/errors/try_with_unwrapper.c3t: Passed.
- 771/0 test_suite/errors/rethrow_macro.c3: Passed.
- 772/0 test_suite/errors/optional_contracts.c3: Passed.
- 773/0 test_suite/errors/try_expr.c3t: Passed.
- 774/0 test_suite/errors/simple_static_failable.c3t: Passed.
- 775/0 test_suite/errors/error_regression_2.c3t: Passed.
- 776/0 test_suite/errors/lone_try.c3: Passed.
- 777/0 test_suite/errors/rethrow.c3t: Passed.
- 778/0 test_suite/errors/optional_designated.c3: Passed.
- 779/0 test_suite/errors/more_optional_tests.c3: Passed.
- 780/0 test_suite/errors/rethrow_mingw.c3t: Passed.
- 781/0 test_suite/errors/try_with_assign_to_failable.c3: Passed.
- 782/0 test_suite/errors/precedence_err.c3: Passed.
- 783/0 test_suite/errors/else_checks.c3t: Passed.
- 784/0 test_suite/errors/rethrow_no_err.c3: Passed.
- 785/0 test_suite/errors/or_err_bool.c3t: Passed.
- 786/0 test_suite/errors/failable_catch.c3t: Passed.
- 787/0 test_suite/errors/anyfault_void.c3t: Passed.
- 788/0 test_suite/errors/try_with_chained_unwrap_errors.c3: Passed.
- 789/0 test_suite/errors/error_throw.c3: Passed.
- 790/0 test_suite/initializer_lists/zero_init.c3t: Passed.
- 791/0 test_suite/initializer_lists/indexing_into_complist.c3: Passed.
- 792/0 test_suite/initializer_lists/general_tests.c3t: Passed.
- 793/0 test_suite/initializer_lists/disallowed_lists.c3: Passed.
- 794/0 test_suite/initializer_lists/zero_inferred_array.c3: Passed.
- 795/0 test_suite/initializer_lists/subarrays.c3t: Passed.
- 796/0 test_suite/initializer_lists/initializers_to_macros.c3: Passed.
- 797/0 test_suite/initializer_lists/fasta.c3t: Passed.
- 798/0 test_suite/initializer_lists/statics.c3t: Passed.
- 799/0 test_suite/initializer_lists/ranges_to_dynamic.c3t: Passed.
Found 799 tests: 100.0% (799 / 799) passed (0 skipped).
phase `check' succeeded after 175.7 seconds
I think you can disable testing. This is mostly for development and checking compiler behaviour and should not really differ on platforms. In other words, the actual CI that is currently present is sufficient, and running the codegen tests are not necessary on other packages.
@lerno since Guix uses package store instead of FHS, and targets multiple platforms, compilers may have to be tested. In my case above, I am having issues with this line: (system "../../../build/c3c build"), which spits out this:
sh: line 1: cc: command not found
Failed to compile c sources using command 'cc -fPIE -fPIC -c ./csource/test.c -o build/tmp/tmp_c_compile/test.o'.
How should I go about to resolve this? I've tried setting CC=gcc, but it hasn't resolved this.
You can override the settings using --cc gcc at the command line.
Do you need any more assistance with this?
@lerno Hello, I am trying to figure out tests using the YAML file, particularly in the case of Linux. I'll let you know about my progress. So far, I was having issues with building testproject, so I will have to ask a Guix mentor to help me out on that,
As it turns out, the compiler also seems to not be working. I should have tested it manually, but looks like tests will have to be included. Here's what happens when I initialize a project named 'test', and try to compile it using c3c run:
$ c3c run
sh: line 1: cc: command not found
Failed to link executable 'build/test' using command 'cc -fno-pic -fno-pie -fno-PIC -fno-PIE -o build/test -rdynamic -pthread build/tmp/test.o build/tmp/std.atomic.o build/tmp/std.os.posix.o build/tmp/std.os.process.o build/tmp/std.os.backtrace.o build/tmp/std.os.linux.o build/tmp/libc.o build/tmp/std.math.o build/tmp/std.ascii.o build/tmp/std.core.builtin.o build/tmp/std.core.mem.allocator.o build/tmp/std.core.string.conv.o build/tmp/std.core.types.o build/tmp/std.core.dstring.o build/tmp/std.core.string.o build/tmp/std.core.mem.o build/tmp/std.io.o build/tmp/std.io.file.o build/tmp/std.io.os.o build/tmp/std_collections_list.std.os.backtrace.Backtrace.o -ldl -lm'.
I was wondering if there's a way to avoid having to use --cc?
Well, the compiler works, it's just that for linking it tries to use the native compiler in order to get the correct linking with libc. The usual situation is to have cc alias to the base C compiler. That is why the compiler fails when it's attempting to use this compiler (I see you're setting CC to alias gcc for some reason. cc would have been expected.
You can use --linker=builtin to bypass the use of cc entirely, in which case the compiler will make a best-effort attempt at finding the relevant libraries. If it fails, the path to the crt can be given explicitly with --linux-crt --linux-crtbegin.
However, to me it seems like making cc alias gcc would solve all your problems.
I am thinking of substituting every instances of "cc" with "gcc" right now - haven't tried it out yet, but honestly, I think having the choice to set this as a CMake option would be nice.
@lerno I was able to resolve the issue by substituting cc with gcc:
(substitute* '("src/compiler/target.c"
"src/compiler/linker.c")
(("\"cc\"")
"\"gcc\""))
(substitute* '("src/build/libraries.c"
"src/build/project.c")
((", \"cc\"")
", \"gcc\""))
(substitute* '("resources/testproject/project.json"
"resources/examples/project_all_settings.json")
(("\"cc\": \"cc\"")
"\"cc\": \"gcc\""))
I am not sure if I am doing it right, but it seems to not be complaining now, when I try to run, build or compile with c3c.
However, I've run into a new problem - the build fails, because of the two failing tests: ../build/c3c compile-run --linker=builtin linux_stack.c3 and ../build/c3c compile-run linux_stack.c3. The logs for both of them are the same:
ERROR: 'hello'
in std.core.builtin.print_backtrace (/tmp/guix-build-c3c-0.6.1.drv-0/build/lib/std/core/builtin.c3:75) [./test]
in test.test2 (/tmp/guix-build-c3c-0.6.1.drv-0/source/resources/linux_stack.c3:8) [./test]
in test.test1 (/tmp/guix-build-c3c-0.6.1.drv-0/source/resources/linux_stack.c3:13) [./test]
in test.main (/tmp/guix-build-c3c-0.6.1.drv-0/source/resources/linux_stack.c3:35) [./test]
in @main_to_void_main (/tmp/guix-build-c3c-0.6.1.drv-0/build/lib/std/core/private/main_stub.c3:18) [./test] [inline]
in main (/tmp/guix-build-c3c-0.6.1.drv-0/source/resources/linux_stack.c3:33) [./test]
in __libc_start_call_main (source unavailable) [/gnu/store/gsjczqir1wbz8p770zndrpw4rnppmxi3-glibc-2.35/lib/libc.so.6]
in __libc_start_main_alias_2 (source unavailable) [/gnu/store/gsjczqir1wbz8p770zndrpw4rnppmxi3-glibc-2.35/lib/libc.so.6]
in _start (source unavailable) [./test]
ERROR: 'bar'
in std.core.builtin.print_backtrace (/tmp/guix-build-c3c-0.6.1.drv-0/build/lib/std/core/builtin.c3:75) [./test]
in bar (/tmp/guix-build-c3c-0.6.1.drv-0/source/resources/linux_stack.c3:24) [./test] [inline]
in baz (/tmp/guix-build-c3c-0.6.1.drv-0/source/resources/linux_stack.c3:29) [./test] [inline]
in test.foo (/tmp/guix-build-c3c-0.6.1.drv-0/source/resources/linux_stack.c3:19) [./test]
in test.main (/tmp/guix-build-c3c-0.6.1.drv-0/source/resources/linux_stack.c3:36) [./test]
in @main_to_void_main (/tmp/guix-build-c3c-0.6.1.drv-0/build/lib/std/core/private/main_stub.c3:18) [./test] [inline]
in main (/tmp/guix-build-c3c-0.6.1.drv-0/source/resources/linux_stack.c3:33) [./test]
in __libc_start_call_main (source unavailable) [/gnu/store/gsjczqir1wbz8p770zndrpw4rnppmxi3-glibc-2.35/lib/libc.so.6]
in __libc_start_main_alias_2 (source unavailable) [/gnu/store/gsjczqir1wbz8p770zndrpw4rnppmxi3-glibc-2.35/lib/libc.so.6]
in _start (source unavailable) [./test]
Program linked to executable 'test'.
Launching ./test...
Program completed with exit code 0.
Ok, replacing cc with gcc seems like a horribly bad. So please try to find some other solution.
In regards to this failing test I am somewhat confused. What do you feel is in error here? From what I'm seeing it's testing how to emit backtraces with resolved symbols and source lines by calling the standard library backtrace function and it successfully does that.
Are you maybe reading this as if those are actual errors? Unless you get some exit code other than 0, everything is fine.
@lerno All the tests seem to be passing, and I think I can may be able to send the new patches. However, the only blocker is the substitution. Can you share why replacing cc with gcc is a bad idea?
I assume you already tested changing
(setenv "CC" "gcc")
to
(setenv "cc" "gcc")
@lerno yes, I've tried them both. c3c does not honor the environmental variable CC.
Eh, c3c calls something like system("cc foo.c"); which uses the sh shell. So whatever is broken here it's on the OS side. You could try this yourself, create a simple C program doing:
include <stdlib.h>
include <stdio.h>
int main()
{
int result = system("cc -v");
printf("Result from calling cc: %d\n", result);
return result;
}
See if you see the same problem.
@lerno but cc is a Unix-specific utility, and some Linux distros choose to symlink it to gcc for legacy reasons, while some don't.
The use of implicit variables (in this case, CC) seems to be the neutral way to dealing with different compilers, without having to hard-code them internally. But as I've said earlier, CC does not work for c3c.
Wait. You're just setting an environmental variable CC to "gcc", that's never going to work. c3c is assuming the environment has at least aliased gcc to cc. Surely that isn't impossible to do?
And can you explain why adding --cc gcc at the command line wasn't a good idea? I never understood that part.
Or alias cc=gcc
What Linux distros are violating the convention to have 'cc' available?
Wait. You're just setting an environmental variable CC to "gcc", that's never going to work. c3c is assuming the environment has at least aliased gcc to cc. Surely that isn't impossible to do?
I've tried both the environmental variables and aliases method.
Environment variables was a last-ditch effort after the alias method wasn't working, because I had assumed that much like most of the C and C++ based build system, this might be recognized.
The command alias cc=gcc does not work, because they're not supported by the legacy Bourne shell (sh), which is what gets activated while building a package expression for Guix locally.
And can you explain why adding --cc gcc at the command line wasn't a good idea? I never understood that part.
I have no issue with using flags - to be honest. It isn't bad per se - but having environmental variables for certain variables can do the same job that flags can. For example, let's assume that inside .bashrc, export CC=gcc was a variable. This can be overridden for a particular life-cycle of a shell by just having something like export CC=clang; export LD=mold; c3c compile .... Or if it's just a one-line thing, it could be CC=clang LD=mold c3c compile....
Having this option would be really nice, and I think that there could be some sort of priority system over which to choose first, with flags having the highest priority, followed by the project.json configuration and finally the environmental variables as a fall-back. And if none of them exist, then there should be appropriate logs for the same.
For my particular case, it also benefits me, because now I can just wrap the binary, and that would've been a piece of cake to package. Hard-coding (as in, embedding the command inside the binary), not the use of flags, in my opinion is problematic.
What Linux distros are violating the convention to have 'cc' available?
So far, I've come across NixOS, Guix and ArchLinux (also assuming that all of it's downstream follow ArchLinux) not having the symlink cc to gcc. Debian, Fedora and Gentoo and their respective downstreams do have them.
Right now, here's the issue I am facing, when I am using flags in a pure, ephemeral shell:
$ c3c run --cc clang (or gcc) --linker=custom mold
Failed to find the C runtime at link time.
If you are using a custom linker you MUST provide --linux-crt and --linux-crtbegin flags, or the compiler will not be able to determine where the runtime is. It will try to make some guesses. If the c compiler is used then it will be built with those paths available, so there is no need to actually know them.
But to be constructive in terms of solving this, it IS possible to let the compiler pick up environmental settings, such as something like CC, but it is probably good to namespace it to prevent name collisions. The linux-crt and linux-crtbegin paths can be handled in the same way. For example, C3_CC may define the --cc option, C3_LINKER defines the linker C3_CRT for the linux-crt and C3_CRTBEGIN for the linux-crtbegin.
If this sounds like a good idea, file an issue and I'll work on it.
After adding the appropriate flags, here's what I get when I try to run the compiler:
$ c3c run --cc gcc --linker=custom mold --linux-crt /gnu/store/gj22ja4fcahjq4am7vxfns2vhsrslscs-gcc-toolchain-14.1.0/lib/ --linux-crtbegin /gnu/store/gj22ja4fcahjq4am7vxfns2vhsrslscs-gcc-toolchain-14.1.0/lib/gcc/x86_64-unknown-linux-gnu/14.1.0/
Program linked to executable 'build/test'.
Launching ./build/test...
sh: line 1: ./build/test: No such file or directory
Program completed with exit code 127.
Here's the value for ldd with linker set to custom:
$ ldd ./build/test
linux-vdso.so.1 (0x00007f5421a2f000)
libm.so.6 => /gnu/store/ln6hxqjvz6m9gdd9s97pivlqck7hzs99-glibc-2.35/lib/libm.so.6 (0x00007f542194c000)
libc.so.6 => /gnu/store/ln6hxqjvz6m9gdd9s97pivlqck7hzs99-glibc-2.35/lib/libc.so.6 (0x00007f5421750000)
/lib64/ld-linux-x86-64.so.2 => /gnu/store/ln6hxqjvz6m9gdd9s97pivlqck7hzs99-glibc-2.35/lib/ld-linux-x86-64.so.2 (0x00007f5421a31000)
versus setting a linker to builtin/cc:
$ ldd ./build/test
linux-vdso.so.1 (0x00007f4159557000)
libm.so.6 => /gnu/store/ln6hxqjvz6m9gdd9s97pivlqck7hzs99-glibc-2.35/lib/libm.so.6 (0x00007f4159474000)
libgcc_s.so.1 => /gnu/store/h7xww5y53cvia40mdbbhllfiwk33radm-gcc-14.2.0-lib/lib/libgcc_s.so.1 (0x00007f4159446000)
libc.so.6 => /gnu/store/ln6hxqjvz6m9gdd9s97pivlqck7hzs99-glibc-2.35/lib/libc.so.6 (0x00007f415924a000)
/gnu/store/ln6hxqjvz6m9gdd9s97pivlqck7hzs99-glibc-2.35/lib/ld-linux-x86-64.so.2 (0x00007f4159559000)
Presumably in your environment, running a new shell ends up somewhere else. The solution is to run c3c build and then ./build/test instead. libgcc_s should not be needed.
@lerno I've tried that, and it still wouldn't work:
sh-5.1$ c3c build --cc gcc --linker=custom mold --linux-crt /gnu/store/gj22ja4fcahjq4am7vxfns2vhsrslscs-gcc-toolchain-14.1.0/lib/ --linux-crtbegin /gnu/store/gj22ja4fcahjq4am7vxfns2vhsrslscs-gcc-toolchain-14.1.0/lib/gcc/x86_64-unknown-linux-gnu/14.1.0/
Program linked to executable 'build/test'.
sh-5.1$ ./build/test
sh: ./build/test: No such file or directory
However, when it seems to be working after I run patchelf:
sh-5.1$ patchelf --set-interpreter /gnu/store/ln6hxqjvz6m9gdd9s97pivlqck7hzs99-glibc-2.35/lib/ld-linux-x86-64.so.2 ./build/test
sh-5.1$ ./build/test
Hello, World!
However, the contents of the binary don't seem to match the value of ldd with builtin/cc as the linker:
$ ldd ./build/test
linux-vdso.so.1 (0x00007ffb6610e000)
libm.so.6 => /gnu/store/ln6hxqjvz6m9gdd9s97pivlqck7hzs99-glibc-2.35/lib/libm.so.6 (0x00007ffb6602b000)
libc.so.6 => /gnu/store/ln6hxqjvz6m9gdd9s97pivlqck7hzs99-glibc-2.35/lib/libc.so.6 (0x00007ffb65e2f000)
/gnu/store/ln6hxqjvz6m9gdd9s97pivlqck7hzs99-glibc-2.35/lib/ld-linux-x86-64.so.2 (0x00007ffb66110000)
Wait, WHY would you get that error lacking a dynamic library?
Looks like there's a need of multiple substitutions to make it compliant to non-FHS compliant store packages. In this particular example, it seems to be this one - the dynamic linker was hard-coded to /lib64. All of this has to point to packages in the /gnu/store/<hash>-<relevant-package>-x.y.x/ directories.
So we need:
- A way to override the dynamic linker location
- A way to set an alternative to
/usr/lib/x86_64-linux-gnu/libdl.so
Is that it?
Ping @Ashvith10
@lerno sorry for the late message - I forgot to send the draft post last month. I am not sure on the requirements because I don't know a lot about this topic.
At least from my understanding, as I've mentioned previously, making use of system(), as well as similar commands is a poor choice, as is expressed by answers on StackOverflow: 1 2.
For now, since this is the only option that seems to be working, I could substitute cc to gcc - the benefit of this would be that using package transformation, the propagated input could be transformed so that we can provide other C compiler as well as the required linker wrapper without having to write the entire configuration.
Originally, I wanted to package in a way, such that the C compiler and the linker wrapper would be a sibling dependency of the C3 compiler, and not a parent dependency of C3 itself - but given how the compilers have been hard-coded, I am not sure if there's a way to circumvent this. Since we can update the package expression later, I think that this option is a nice compromise.
I don't know if they're active on GitHub or perhaps even busy, but I could try pinging @civodul and @nckx, as well as share the issue link, so that they could perhaps take a look in their free time.
By the way, I did add C3C_CC and C3C_LIB env variables which changes the cc default and allows specifying the stdlib location respectively. This is on latest though, and it will later be in the 0.6.3 release.