Skip to content

macOS compile fix: locked `fast_sanitize` to 0.1.0 and fast_html to ~> 0.9.0

Locked fast_sanitize to 0.1.0 and fast_html to ~> 0.9.0 to prevent macOS compile issues with fast_sanitize 1.0.1 & fast_html 0.99.0:

$ mix deps.compile fast_html
Application version "1.1.50" does not match git tag "1.0.0"
cc -o priv/myhtml_worker c_src/myhtml_worker.c c_src/myhtml/lib/libmyhtml_static.a -g -O2 -std=c99 -pedantic -Wcomment -Wextra -Wno-old-style-declaration -Wall -Wno-unused-parameter -I/usr/local/Cellar/erlang/22.1.4/lib/erlang/erts-10.5.3/include -Ic_src/myhtml/include -lpthread -L/usr/local/Cellar/erlang/22.1.4/lib/erlang/erts-10.5.3/../lib/erl_interface-3.13/lib -I/usr/local/Cellar/erlang/22.1.4/lib/erlang/erts-10.5.3/../lib/erl_interface-3.13/include -DOTP_22_OR_NEWER  -lei -pthread
warning: unknown warning option '-Wno-old-style-declaration'; did you mean '-Wno-out-of-line-declaration'? [-Wunknown-warning-option]
1 warning generated.
ld: warning: ignoring file c_src/myhtml/lib/libmyhtml_static.a, building for macOS-x86_64 but attempting to link with file built for unknown-unsupported file format ( 0x21 0x3C 0x61 0x72 0x63 0x68 0x3E 0x0A 0x2F 0x20 0x20 0x20 0x20 0x20 0x20 0x20 )
Undefined symbols for architecture x86_64:
  "_myhtml_attribute_key", referenced from:
      _build_tree in myhtml_worker-9d21e9.o
  "_myhtml_attribute_next", referenced from:
      _build_tree in myhtml_worker-9d21e9.o
  "_myhtml_attribute_value", referenced from:
      _build_tree in myhtml_worker-9d21e9.o
  "_myhtml_create", referenced from:
      _main in myhtml_worker-9d21e9.o
  "_myhtml_destroy", referenced from:
      _main in myhtml_worker-9d21e9.o
  "_myhtml_init", referenced from:
      _main in myhtml_worker-9d21e9.o
  "_myhtml_namespace_name_by_id", referenced from:
      _build_tree in myhtml_worker-9d21e9.o
  "_myhtml_node_attribute_first", referenced from:
      _build_tree in myhtml_worker-9d21e9.o
  "_myhtml_node_is_close_self", referenced from:
      _build_tree in myhtml_worker-9d21e9.o
  "_myhtml_node_is_void_element", referenced from:
      _build_tree in myhtml_worker-9d21e9.o
  "_myhtml_node_namespace", referenced from:
      _build_tree in myhtml_worker-9d21e9.o
  "_myhtml_node_tag_id", referenced from:
      _build_tree in myhtml_worker-9d21e9.o
  "_myhtml_node_text", referenced from:
      _build_tree in myhtml_worker-9d21e9.o
  "_myhtml_parse", referenced from:
      _main in myhtml_worker-9d21e9.o
  "_myhtml_tag_name_by_id", referenced from:
      _build_tree in myhtml_worker-9d21e9.o
  "_myhtml_tree_create", referenced from:
      _main in myhtml_worker-9d21e9.o
  "_myhtml_tree_destroy", referenced from:
      _main in myhtml_worker-9d21e9.o
  "_myhtml_tree_get_document", referenced from:
      _main in myhtml_worker-9d21e9.o
  "_myhtml_tree_init", referenced from:
      _main in myhtml_worker-9d21e9.o
  "_myhtml_tree_parse_flags_set", referenced from:
      _main in myhtml_worker-9d21e9.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: *** [priv/myhtml_worker] Error 1
==> fast_html
could not compile dependency :fast_html, "mix compile" failed. You can recompile this dependency with "mix deps.compile fast_html", update it with "mix deps.update fast_html" or clean it with "mix deps.clean fast_html"
Edited by Ivan Tashkinov

Merge request reports