processone/fast_xml

Compiling fast_xml in Jenkins fails

johnhamelink opened this issue · 6 comments

Excuse my ignorance but I don't even know how to read this stacktrace. My Jenkins server returned this when I attempted to build on it:

==> fast_xml
cc -g -O2 -Wall -I/var/lib/jenkins/.asdf/installs/erlang/18.2.1/lib/erlang/erts-7.2.1/include -fPIC -lexpat -o priv/lib/fxml_stream.so c_src/fxml_stream.c
c_src/fxml_stream.c:94:14: warning: ‘jabber_client_ns’ defined but not used [-Wunused-variable]
 static char *jabber_client_ns = "jabber:client";
              ^
c_src/fxml_stream.c:115:14: warning: ‘dup_str’ defined but not used [-Wunused-function]
 static char *dup_str(const char *str)
              ^
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/crt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
/tmp/ccObG54K.o: In function `free_parser_allocated_structs':
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:729: undefined reference to `enif_release_binary'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:730: undefined reference to `enif_release_binary'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:731: undefined reference to `enif_free'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:740: undefined reference to `enif_free'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:738: undefined reference to `enif_release_binary'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:743: undefined reference to `enif_free'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:745: undefined reference to `enif_free'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:751: undefined reference to `enif_release_binary'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:752: undefined reference to `enif_release_binary'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:753: undefined reference to `enif_free'
/tmp/ccObG54K.o: In function `dup_to_term':
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:134: undefined reference to `enif_make_new_binary'
/tmp/ccObG54K.o: In function `dup_buf':
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:105: undefined reference to `enif_alloc'
/tmp/ccObG54K.o: In function `enif_make_tuple2':
/var/lib/jenkins/.asdf/installs/erlang/18.2.1/lib/erlang/erts-7.2.1/include/erl_nif_api_funcs.h:349: undefined reference to `enif_make_tuple'
/tmp/ccObG54K.o: In function `append_attr':
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:296: undefined reference to `enif_make_list_cell'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:293: undefined reference to `enif_make_map_put'
/tmp/ccObG54K.o: In function `send_event':
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:269: undefined reference to `enif_send'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:264: undefined reference to `enif_make_atom'
/tmp/ccObG54K.o: In function `enif_make_tuple2':
/var/lib/jenkins/.asdf/installs/erlang/18.2.1/lib/erlang/erts-7.2.1/include/erl_nif_api_funcs.h:349: undefined reference to `enif_make_tuple'
/tmp/ccObG54K.o: In function `send_event':
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:264: undefined reference to `enif_send'
/tmp/ccObG54K.o: In function `send_error':
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:917: undefined reference to `enif_make_atom'
/tmp/ccObG54K.o: In function `enif_make_tuple2':
/var/lib/jenkins/.asdf/installs/erlang/18.2.1/lib/erlang/erts-7.2.1/include/erl_nif_api_funcs.h:349: undefined reference to `enif_make_tuple'
/tmp/ccObG54K.o: In function `send_error':
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:909: undefined reference to `enif_make_new_map'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:910: undefined reference to `enif_make_atom'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:910: undefined reference to `enif_make_atom'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:910: undefined reference to `enif_make_map_put'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:912: undefined reference to `enif_make_atom'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:912: undefined reference to `enif_make_map_put'
/tmp/ccObG54K.o: In function `erlXML_CharacterDataHandler':
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:519: undefined reference to `enif_alloc'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:521: undefined reference to `enif_alloc_binary'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:522: undefined reference to `enif_free'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:523: undefined reference to `XML_StopParser'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:516: undefined reference to `enif_realloc_binary'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:503: undefined reference to `enif_alloc_binary'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:505: undefined reference to `enif_make_binary'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:505: undefined reference to `enif_make_atom'
/tmp/ccObG54K.o: In function `enif_make_tuple2':
/var/lib/jenkins/.asdf/installs/erlang/18.2.1/lib/erlang/erts-7.2.1/include/erl_nif_api_funcs.h:349: undefined reference to `enif_make_tuple'
/tmp/ccObG54K.o: In function `send_all_state_event':
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:283: undefined reference to `enif_send'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:285: undefined reference to `enif_clear_env'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:278: undefined reference to `enif_make_atom'
/tmp/ccObG54K.o: In function `enif_make_tuple2':
/var/lib/jenkins/.asdf/installs/erlang/18.2.1/lib/erlang/erts-7.2.1/include/erl_nif_api_funcs.h:349: undefined reference to `enif_make_tuple'
/tmp/ccObG54K.o: In function `send_all_state_event':
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:278: undefined reference to `enif_send'
/tmp/ccObG54K.o: In function `load':
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:810: undefined reference to `enif_open_resource_type'
/tmp/ccObG54K.o: In function `destroy_parser_state':
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:761: undefined reference to `XML_ParserFree'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:762: undefined reference to `enif_free'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:763: undefined reference to `enif_free_env'
/tmp/ccObG54K.o: In function `close_nif':
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:990: undefined reference to `enif_make_badarg'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:989: undefined reference to `enif_get_resource'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:997: undefined reference to `enif_make_atom'
/tmp/ccObG54K.o: In function `change_callback_pid_nif':
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:974: undefined reference to `enif_make_badarg'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:967: undefined reference to `enif_get_resource'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:973: undefined reference to `enif_get_local_pid'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:978: undefined reference to `enif_make_resource'
/tmp/ccObG54K.o: In function `setup_parser':
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:773: undefined reference to `XML_SetUserData'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:774: undefined reference to `XML_SetStartElementHandler'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:776: undefined reference to `XML_SetEndElementHandler'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:778: undefined reference to `XML_SetCharacterDataHandler'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:780: undefined reference to `XML_SetStartNamespaceDeclHandler'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:783: undefined reference to `XML_SetStartDoctypeDeclHandler'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:786: undefined reference to `XML_SetReturnNSTriplet'
/tmp/ccObG54K.o: In function `reset_nif':
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:840: undefined reference to `enif_make_badarg'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:839: undefined reference to `enif_get_resource'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:842: undefined reference to `XML_ParserReset'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:847: undefined reference to `enif_clear_env'
/tmp/ccObG54K.o: In function `init_parser_state':
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:792: undefined reference to `enif_alloc_resource'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:796: undefined reference to `enif_alloc_env'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:798: undefined reference to `enif_alloc'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:802: undefined reference to `XML_ParserCreate_MM'
/tmp/ccObG54K.o: In function `make_parse_error':
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:819: undefined reference to `XML_GetErrorCode'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:825: undefined reference to `XML_ErrorString'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:827: undefined reference to `enif_make_uint'
/tmp/ccObG54K.o: In function `parse_nif':
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:937: undefined reference to `enif_make_badarg'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:933: undefined reference to `enif_get_resource'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:936: undefined reference to `enif_inspect_binary'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:948: undefined reference to `XML_Parse'
/tmp/ccObG54K.o: In function `dup_to_bin':
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:122: undefined reference to `enif_alloc_binary'
/tmp/ccObG54K.o: In function `erlXML_StartNamespaceDeclHandler':
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:662: undefined reference to `enif_alloc'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:668: undefined reference to `enif_alloc_binary'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:683: undefined reference to `enif_alloc_binary'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:684: undefined reference to `enif_release_binary'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:685: undefined reference to `enif_free'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:675: undefined reference to `enif_alloc_binary'
/tmp/ccObG54K.o: In function `parse_element_nif':
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:877: undefined reference to `enif_make_badarg'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:865: undefined reference to `enif_inspect_binary'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:874: undefined reference to `enif_alloc'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:887: undefined reference to `XML_Parse'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:892: undefined reference to `enif_make_atom'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:895: undefined reference to `enif_make_atom'
/tmp/ccObG54K.o: In function `enif_make_tuple2':
/var/lib/jenkins/.asdf/installs/erlang/18.2.1/lib/erlang/erts-7.2.1/include/erl_nif_api_funcs.h:349: undefined reference to `enif_make_tuple'
/tmp/ccObG54K.o: In function `parse_element_nif':
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:900: undefined reference to `enif_release_resource'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:876: undefined reference to `enif_release_resource'
/tmp/ccObG54K.o: In function `new_nif':
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:1025: undefined reference to `enif_get_local_pid'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:1036: undefined reference to `enif_make_resource'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:1037: undefined reference to `enif_release_resource'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:1040: undefined reference to `enif_get_ulong'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:1045: undefined reference to `enif_make_badarg'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:1010: undefined reference to `enif_is_list'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:1013: undefined reference to `enif_get_list_cell'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:1015: undefined reference to `enif_get_atom'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:1042: undefined reference to `enif_make_atom'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:1042: undefined reference to `enif_compare'
/tmp/ccObG54K.o: In function `encode_name':
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:216: undefined reference to `enif_alloc_binary'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:234: undefined reference to `enif_release_binary'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:242: undefined reference to `enif_release_binary'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:244: undefined reference to `enif_free'
/tmp/ccObG54K.o: In function `erlXML_StartElementHandler':
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:310: undefined reference to `enif_make_new_map'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:312: undefined reference to `enif_make_list'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:333: undefined reference to `enif_make_new_binary'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:337: undefined reference to `enif_make_binary'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:459: undefined reference to `XML_StopParser'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:429: undefined reference to `enif_make_binary'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:429: undefined reference to `enif_make_binary'
/tmp/ccObG54K.o: In function `enif_make_tuple2':
/var/lib/jenkins/.asdf/installs/erlang/18.2.1/lib/erlang/erts-7.2.1/include/erl_nif_api_funcs.h:349: undefined reference to `enif_make_tuple'
/tmp/ccObG54K.o: In function `erlXML_StartElementHandler':
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:432: undefined reference to `enif_make_list_cell'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:441: undefined reference to `enif_free'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:423: undefined reference to `enif_make_binary'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:423: undefined reference to `enif_make_binary'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:423: undefined reference to `enif_make_map_update'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:426: undefined reference to `enif_make_map_update'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:412: undefined reference to `enif_release_binary'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:413: undefined reference to `enif_release_binary'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:414: undefined reference to `enif_free'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:398: undefined reference to `enif_release_binary'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:400: undefined reference to `enif_make_binary'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:458: undefined reference to `enif_alloc'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:487: undefined reference to `enif_make_binary'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:403: undefined reference to `enif_make_binary'
/tmp/ccObG54K.o: In function `enif_make_tuple2':
/var/lib/jenkins/.asdf/installs/erlang/18.2.1/lib/erlang/erts-7.2.1/include/erl_nif_api_funcs.h:349: undefined reference to `enif_make_tuple'
/tmp/ccObG54K.o: In function `erlXML_StartElementHandler':
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:471: undefined reference to `enif_make_new_map'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:472: undefined reference to `enif_make_atom'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:472: undefined reference to `enif_make_atom'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:472: undefined reference to `enif_make_map_put'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:474: undefined reference to `enif_make_binary'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:474: undefined reference to `enif_make_atom'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:474: undefined reference to `enif_make_map_put'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:476: undefined reference to `enif_make_atom'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:476: undefined reference to `enif_make_map_put'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:480: undefined reference to `enif_make_binary'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:480: undefined reference to `enif_make_atom'
/tmp/ccObG54K.o: In function `enif_make_tuple3':
/var/lib/jenkins/.asdf/installs/erlang/18.2.1/lib/erlang/erts-7.2.1/include/erl_nif_api_funcs.h:357: undefined reference to `enif_make_tuple'
/tmp/ccObG54K.o: In function `erlXML_StartElementHandler':
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:452: undefined reference to `enif_free'
/tmp/ccObG54K.o: In function `make_xmlel_children_list':
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:537: undefined reference to `enif_make_list'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:543: undefined reference to `enif_make_binary'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:549: undefined reference to `enif_make_list_cell'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:556: undefined reference to `enif_free'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:545: undefined reference to `enif_make_binary'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:545: undefined reference to `enif_make_atom'
/tmp/ccObG54K.o: In function `enif_make_tuple2':
/var/lib/jenkins/.asdf/installs/erlang/18.2.1/lib/erlang/erts-7.2.1/include/erl_nif_api_funcs.h:349: undefined reference to `enif_make_tuple'
/tmp/ccObG54K.o: In function `make_xmlel_children_list':
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:551: undefined reference to `enif_make_list_cell'
/tmp/ccObG54K.o: In function `erlXML_EndElementHandler':
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:595: undefined reference to `enif_make_new_map'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:596: undefined reference to `enif_make_atom'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:596: undefined reference to `enif_make_atom'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:596: undefined reference to `enif_make_map_put'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:598: undefined reference to `enif_make_atom'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:598: undefined reference to `enif_make_map_put'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:599: undefined reference to `enif_make_atom'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:599: undefined reference to `enif_make_map_put'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:600: undefined reference to `enif_make_atom'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:600: undefined reference to `enif_make_map_put'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:613: undefined reference to `enif_alloc'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:622: undefined reference to `enif_free'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:623: undefined reference to `enif_free'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:603: undefined reference to `enif_make_atom'
/tmp/ccObG54K.o: In function `enif_make_tuple4':
/var/lib/jenkins/.asdf/installs/erlang/18.2.1/lib/erlang/erts-7.2.1/include/erl_nif_api_funcs.h:366: undefined reference to `enif_make_tuple'
/tmp/ccObG54K.o: In function `erlXML_EndElementHandler':
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:577: undefined reference to `enif_make_new_map'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:578: undefined reference to `enif_make_atom'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:578: undefined reference to `enif_make_atom'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:578: undefined reference to `enif_make_map_put'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:580: undefined reference to `enif_make_binary'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:580: undefined reference to `enif_make_atom'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:580: undefined reference to `enif_make_map_put'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:613: undefined reference to `XML_StopParser'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:628: undefined reference to `enif_free'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:629: undefined reference to `enif_free'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:635: undefined reference to `enif_make_atom'
/tmp/ccObG54K.o: In function `enif_make_tuple2':
/var/lib/jenkins/.asdf/installs/erlang/18.2.1/lib/erlang/erts-7.2.1/include/erl_nif_api_funcs.h:349: undefined reference to `enif_make_tuple'
/tmp/ccObG54K.o: In function `erlXML_EndElementHandler':
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:584: undefined reference to `enif_make_binary'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:584: undefined reference to `enif_make_atom'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:631: undefined reference to `enif_make_atom'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:631: undefined reference to `enif_make_atom'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:631: undefined reference to `enif_make_map_put'
/tmp/ccObG54K.o: In function `erlXML_StartDoctypeDeclHandler':
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:707: undefined reference to `XML_StopParser'
/tmp/ccObG54K.o: In function `send_event':
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:271: undefined reference to `enif_clear_env'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:271: undefined reference to `enif_clear_env'
/tmp/ccObG54K.o: In function `setup_parser':
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:787: undefined reference to `XML_SetDefaultHandler'
/tmp/ccObG54K.o: In function `enif_make_tuple2':
/var/lib/jenkins/.asdf/installs/erlang/18.2.1/lib/erlang/erts-7.2.1/include/erl_nif_api_funcs.h:349: undefined reference to `enif_make_tuple'
/tmp/ccObG54K.o: In function `erlXML_StartNamespaceDeclHandler':
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml_stream.c:686: undefined reference to `XML_StopParser'
/tmp/ccObG54K.o:(.data.rel+0x0): undefined reference to `enif_alloc'
/tmp/ccObG54K.o:(.data.rel+0x8): undefined reference to `enif_realloc'
/tmp/ccObG54K.o:(.data.rel+0x10): undefined reference to `enif_free'
collect2: error: ld returned 1 exit status
make: *** [priv/lib/fxml_stream.so] Error 1

cc -g -O2 -Wall -I/var/lib/jenkins/.asdf/installs/erlang/18.2.1/lib/erlang/erts-7.2.1/include -fPIC -lexpat -o priv/lib/fxml.so c_src/fxml.c
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/crt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
/tmp/ccwBMLPn.o: In function `load':
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml.c:51: undefined reference to `enif_make_atom'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml.c:52: undefined reference to `enif_make_atom'
/tmp/ccwBMLPn.o: In function `resize_buf':
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml.c:82: undefined reference to `enif_realloc'
/tmp/ccwBMLPn.o: In function `make_element':
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml.c:220: undefined reference to `enif_get_tuple'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml.c:230: undefined reference to `enif_compare'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml.c:231: undefined reference to `enif_inspect_iolist_as_binary'
/tmp/ccwBMLPn.o: In function `make_attrs':
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml.c:186: undefined reference to `enif_get_list_cell'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml.c:187: undefined reference to `enif_get_tuple'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml.c:189: undefined reference to `enif_inspect_iolist_as_binary'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml.c:190: undefined reference to `enif_inspect_iolist_as_binary'
/tmp/ccwBMLPn.o: In function `make_element':
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml.c:222: undefined reference to `enif_compare'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml.c:223: undefined reference to `enif_inspect_iolist_as_binary'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml.c:236: undefined reference to `enif_is_empty_list'
/tmp/ccwBMLPn.o: In function `make_elements':
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml.c:167: undefined reference to `enif_get_list_cell'
/tmp/ccwBMLPn.o: In function `destroy_buf':
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml.c:69: undefined reference to `enif_free'
/tmp/ccwBMLPn.o: In function `element_to':
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml.c:284: undefined reference to `enif_make_badarg'
/tmp/ccwBMLPn.o: In function `init_buf':
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml.c:58: undefined reference to `enif_alloc'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml.c:61: undefined reference to `enif_alloc'
/tmp/ccwBMLPn.o: In function `element_to':
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml.c:273: undefined reference to `enif_alloc_binary'
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml.c:275: undefined reference to `enif_make_binary'
/tmp/ccwBMLPn.o: In function `destroy_buf':
/var/lib/jenkins/jobs/test_api_v2/branches/master/workspace/deps/fast_xml/c_src/fxml.c:71: undefined reference to `enif_free'
collect2: error: ld returned 1 exit status
make: *** [priv/lib/fxml.so] Error 1

Compiled src/fxmlrpc.erl
Compiled src/fxml_sup.erl
Compiled src/fxml_stream.erl
Compiled src/fxml_gen.erl
Compiled src/fxmlrpc_codec.erl
Compiled src/fxml.erl
Compiled src/fast_xml.erl
Generated fast_xml app

I don't know if this is helpful information, but this SO article mentions using g++ instead of gcc? https://stackoverflow.com/questions/4222501/how-to-solve-collect2-ld-returned-1-exit-status

It looks like it's missing erlang nif interface library during linking phase, could you tell me how you compile it?

@prefiks I'm just using mix to compile in an Elixir project - as part of an Ejabberd dependency on my project.

It's failing on my Ubuntu Jenkins box, but on my mac it compiles fine.

More information: When using either ejabberd 16.1.0-beta1 or ejabberd 16.2.0 and specifically requiring fast_xml 1.1.3, I can compile again. The issue seems to have been introduced in 1.1.4 onwards.

Same issue. When using fast_xml 1.1.3, I can also compile again.

I think we solve Linux compliance with version 1.1.10.

Could you please confirm it is working for you ?