Skip to content

macOS Catalina and C header files #3226

@willcl-ark

Description

@willcl-ark

Message edited 2020-04-28

Issue and Steps to Reproduce

  1. Upgrade your Mac to macOS Catalina 😔
./configure
make

Compiling seems to work after this -- usable binaries are created -- but there are still many lines in the output of make that I don't like the look of, even if they only seem to be for auto-generated tests...

System config:

Apple clang version 11.0.3 (clang-1103.0.32.29)
GNU bash, version 5.0.11(1)-release (x86_64-apple-darwin19.0.0)
automake (GNU automake) 1.16.1
autoconf (GNU Autoconf) 2.69
gettext (GNU gettext-runtime) 0.20.1
GNU Make 3.81
sqlite3 3.28.0 2019-04-15

Output error:

...

checking for ANSI C header files... Undefined symbols for architecture x86_64:
  "_fromwire_amount_msat", referenced from:
      _fromwire_tlv_test_n1_tlv3 in ccj4zKdV.o
  "_fromwire_bool", referenced from:
      _fromwire_test_msg in ccj4zKdV.o
      _fromwire_test_msg_option_short_id in ccj4zKdV.o
      _fromwire_test_msg_option_one in ccj4zKdV.o
      _fromwire_test_msg_option_two in ccj4zKdV.o
  "_fromwire_test_enum", referenced from:
      _fromwire_test_msg in ccj4zKdV.o
      _fromwire_test_msg_option_short_id in ccj4zKdV.o
      _fromwire_test_msg_option_one in ccj4zKdV.o
      _fromwire_test_msg_option_two in ccj4zKdV.o
  "_fromwire_tlvs", referenced from:
      _fromwire_test_tlv1 in ccj4zKdV.o
      _fromwire_test_tlv2 in ccj4zKdV.o
      _fromwire_test_tlv3 in ccj4zKdV.o
  "_fromwire_tu32", referenced from:
      _fromwire_tlv_test_n2_tlv2 in ccj4zKdV.o
  "_fromwire_tu64", referenced from:
      _fromwire_tlv_test_n1_tlv1 in ccj4zKdV.o
      _fromwire_tlv_test_n2_tlv1 in ccj4zKdV.o
  "_fromwire_u16", referenced from:
      _fromwire_test_features in ccj4zKdV.o
      _fromwire_subtype_var_assign in ccj4zKdV.o
      _fromwire_subtype_arrays in ccj4zKdV.o
      _fromwire_tlv_test_n1_tlv4 in ccj4zKdV.o
      _fromwire_tlv_test_n3_tlv3 in ccj4zKdV.o
      _fromwire_test_msg in ccj4zKdV.o
      _fromwire_test_tlv1 in ccj4zKdV.o
      ...
  "_fromwire_u32", referenced from:
      _fromwire_tlv_test_n3_tlv3 in ccj4zKdV.o
      _fromwire_test_msg in ccj4zKdV.o
      _fromwire_test_msg_option_short_id in ccj4zKdV.o
      _fromwire_test_msg_option_one in ccj4zKdV.o
      _fromwire_test_msg_option_two in ccj4zKdV.o
  "_fromwire_u64", referenced from:
      _fromwire_test_short_id in ccj4zKdV.o
      _fromwire_tlv_test_n3_tlv3 in ccj4zKdV.o
  "_fromwire_u8", referenced from:
      _fromwire_subtype_var_assign in ccj4zKdV.o
      _fromwire_subtype_var_len in ccj4zKdV.o
      _fromwire_subtype_varlen_varsize in ccj4zKdV.o
      _fromwire_tlv_test_n3_tlv3 in ccj4zKdV.o
  "_fromwire_u8_array", referenced from:
      _fromwire_test_features in ccj4zKdV.o
      _fromwire_subtype_arrays in ccj4zKdV.o
      _fromwire_tlv_test_n3_tlv3 in ccj4zKdV.o
      _fromwire_test_msg in ccj4zKdV.o
      _fromwire_test_msg_option_short_id in ccj4zKdV.o
      _fromwire_test_msg_option_one in ccj4zKdV.o
      _fromwire_test_msg_option_two in ccj4zKdV.o
      ...
  "_main", referenced from:
     implicit entry/start for main executable
  "_tal_alloc_", referenced from:
      _fromwire_test_features in ccj4zKdV.o
      _fromwire_subtype_var_assign in ccj4zKdV.o
      _fromwire_subtype_var_len in ccj4zKdV.o
      _fromwire_subtype_varlen_varsize in ccj4zKdV.o
      _tlv_test_n1_new in ccj4zKdV.o
      _fromwire_tlv_test_n1_tlv1 in ccj4zKdV.o
      _fromwire_tlv_test_n1_tlv2 in ccj4zKdV.o
      ...
  "_tal_alloc_arr_", referenced from:
      _fromwire_test_features in ccj4zKdV.o
      _fromwire_subtype_var_assign in ccj4zKdV.o
      _fromwire_subtype_var_len in ccj4zKdV.o
      _fromwire_subtype_varlen_varsize in ccj4zKdV.o
      _towire_tlv_test_n1_tlv1 in ccj4zKdV.o
      _towire_tlv_test_n1_tlv2 in ccj4zKdV.o
      _towire_tlv_test_n1_tlv3 in ccj4zKdV.o
      ...
  "_tal_bytelen", referenced from:
      _towire_test_features in ccj4zKdV.o
      _towire_subtype_var_assign in ccj4zKdV.o
      _towire_subtype_var_len in ccj4zKdV.o
      _towire_subtype_varlen_varsize in ccj4zKdV.o
      _towire_tlv_test_n3_tlv3 in ccj4zKdV.o
      _towire_test_msg in ccj4zKdV.o
      _fromwire_test_msg in ccj4zKdV.o
      ...
  "_towire_amount_msat", referenced from:
      _towire_tlv_test_n1_tlv3 in ccj4zKdV.o
  "_towire_bool", referenced from:
      _towire_test_msg in ccj4zKdV.o
      _towire_test_msg_option_short_id in ccj4zKdV.o
      _towire_test_msg_option_one in ccj4zKdV.o
      _towire_test_msg_option_two in ccj4zKdV.o
  "_towire_test_enum", referenced from:
      _towire_test_msg in ccj4zKdV.o
      _towire_test_msg_option_short_id in ccj4zKdV.o
      _towire_test_msg_option_one in ccj4zKdV.o
      _towire_test_msg_option_two in ccj4zKdV.o
  "_towire_tlvs", referenced from:
      _towire_test_tlv1 in ccj4zKdV.o
      _towire_test_tlv2 in ccj4zKdV.o
      _towire_test_tlv3 in ccj4zKdV.o
  "_towire_tu32", referenced from:
      _towire_tlv_test_n2_tlv2 in ccj4zKdV.o
  "_towire_tu64", referenced from:
      _towire_tlv_test_n1_tlv1 in ccj4zKdV.o
      _towire_tlv_test_n2_tlv1 in ccj4zKdV.o
  "_towire_u16", referenced from:
      _towire_test_features in ccj4zKdV.o
      _towire_subtype_var_assign in ccj4zKdV.o
      _towire_subtype_arrays in ccj4zKdV.o
      _towire_tlv_test_n1_tlv4 in ccj4zKdV.o
      _towire_tlv_test_n3_tlv3 in ccj4zKdV.o
      _towire_test_msg in ccj4zKdV.o
      _towire_test_tlv1 in ccj4zKdV.o
      ...
  "_towire_u32", referenced from:
      _towire_tlv_test_n3_tlv3 in ccj4zKdV.o
      _towire_test_msg in ccj4zKdV.o
      _towire_test_msg_option_short_id in ccj4zKdV.o
      _towire_test_msg_option_one in ccj4zKdV.o
      _towire_test_msg_option_two in ccj4zKdV.o
  "_towire_u64", referenced from:
      _towire_test_short_id in ccj4zKdV.o
      _towire_tlv_test_n3_tlv3 in ccj4zKdV.o
  "_towire_u8", referenced from:
      _towire_subtype_var_assign in ccj4zKdV.o
      _towire_subtype_var_len in ccj4zKdV.o
      _towire_subtype_varlen_varsize in ccj4zKdV.o
      _towire_tlv_test_n3_tlv3 in ccj4zKdV.o
  "_towire_u8_array", referenced from:
      _towire_test_features in ccj4zKdV.o
      _towire_subtype_arrays in ccj4zKdV.o
      _towire_tlv_test_n3_tlv3 in ccj4zKdV.o
      _towire_test_msg in ccj4zKdV.o
      _towire_test_msg_option_short_id in ccj4zKdV.o
      _towire_test_msg_option_one in ccj4zKdV.o
      _towire_test_msg_option_two in ccj4zKdV.o
      ...
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status
make[1]: *** [tools/test/gen_test.c.tmp] Error 1
make: *** [tools/test/gen_test.c] Error 1

It seems that these headers are supposed to be generated by tools/generate-wire.py during compilation... Is it trying to put them in /usr/include by any chance? This location does not now exist on Catalina and I don't know if it's writable...

Full compile log:
configure.txt
make.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions