moby/hyperkit

Fails to link with latest OCaml dependencies

Saviq opened this issue · 2 comments

Saviq commented

We started seeing this a short while ago:

ld hyperkit.sym
ld: warning: could not create compact unwind for _caml_start_program: dwarf uses DW_CFA_same_value
ld: warning: could not create compact unwind for _caml_raise_exn: stack subq instruction is too different from dwarf stack size
ld: warning: could not create compact unwind for _caml_raise_exception: stack subq instruction is too different from dwarf stack size
undef: _bigstringaf_blit_to_bytes
undef: _bigstringaf_memcmp_bigstring
undef: _bigstringaf_memcmp_string
undef: _bigstringaf_blit_from_bytes
undef: _bigstringaf_blit_to_bigstring
Undefined symbols for architecture x86_64:
  "_bigstringaf_blit_to_bytes", referenced from:
      _camlBigstringaf__fun_1266 in mirage_block_ocaml.o
      _camlBigstringaf__substring_315 in mirage_block_ocaml.o
      _camlBigstringaf__to_string_322 in mirage_block_ocaml.o
      _camlBigstringaf__blit_to_bytes_409 in mirage_block_ocaml.o
      _camlBigstringaf__1 in mirage_block_ocaml.o
  "_bigstringaf_memcmp_bigstring", referenced from:
      _camlBigstringaf__fun_1264 in mirage_block_ocaml.o
      _camlBigstringaf__memcmp_418 in mirage_block_ocaml.o
      _camlBigstringaf__1 in mirage_block_ocaml.o
  "_bigstringaf_memcmp_string", referenced from:
      _camlBigstringaf__fun_1262 in mirage_block_ocaml.o
      _camlBigstringaf__memcmp_string_427 in mirage_block_ocaml.o
      _camlBigstringaf__1 in mirage_block_ocaml.o
  "_bigstringaf_blit_from_bytes", referenced from:
      _camlAngstrom__Buffering__feed_string_182 in mirage_block_ocaml.o
      _camlAngstrom__parse_string_1384 in mirage_block_ocaml.o
      _camlBigstringaf__fun_1268 in mirage_block_ocaml.o
      _camlBigstringaf__fun_1270 in mirage_block_ocaml.o
      _camlBigstringaf__of_string_327 in mirage_block_ocaml.o
      _camlBigstringaf__blit_from_string_391 in mirage_block_ocaml.o
      _camlBigstringaf__blit_from_bytes_400 in mirage_block_ocaml.o
      ...
  "_bigstringaf_blit_to_bigstring", referenced from:
      _camlAngstrom__Buffering__compress_164 in mirage_block_ocaml.o
      _camlAngstrom__Buffering__grow_167 in mirage_block_ocaml.o
      _camlAngstrom__Buffering__feed_bigstring_236 in mirage_block_ocaml.o
      _camlBigstringaf__fun_1272 in mirage_block_ocaml.o
      _camlBigstringaf__copy_308 in mirage_block_ocaml.o
      _camlBigstringaf__blit_382 in mirage_block_ocaml.o
      _camlBigstringaf__1 in mirage_block_ocaml.o
      ...
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [build/hyperkit.sym] Error 1

Tried with both 4.11.1 and 4.10.0 compilers.

Saviq commented

Pinning uri and uri-sexp to 3.1.0 (latest are 4.0.0) avoids the new angstrom/bigstringaf dependencies and let us build hyperkit again.

I wonder if #304 fixes this?