travelping / ergw

erGW - Erlang implementations of GGSN or P-GW

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tetrapak build fails

killdashnine opened this issue · comments

From a fresh git checkout when trying to build ergw I get the following error:

== build:erlang ================== Compiling src/ergw_sup.erl src/ergw_sup.erl: Error: undefined parse transform 'lager_transform' Compiling src/gtp_socket_sup.erl src/gtp_socket_sup.erl: Error: undefined parse transform 'lager_transform' Compiling src/gtp_c_lib.erl src/gtp_c_lib.erl: Error: undefined parse transform 'lager_transform' Compiling src/itu_e212.erl src/itu_e212.erl: Error: undefined parse transform 'lager_transform' Compiling src/gtp_proxy_ds.erl src/gtp_proxy_ds.erl: Error: undefined parse transform 'lager_transform' Compiling src/vrf.erl src/vrf.erl: Error: undefined parse transform 'lager_transform' Compiling src/vrf_reg.erl src/vrf_reg.erl: Error: undefined parse transform 'lager_transform' Compiling src/gtp_path.erl src/gtp_path.erl: Error: undefined parse transform 'lager_transform' Compiling src/gtp_api.erl src/gtp_api.erl: Error: undefined parse transform 'lager_transform' Compiling src/pgw_s5s8.erl src/pgw_s5s8.erl: Error: undefined parse transform 'lager_transform' Compiling src/gtp_context_sup.erl src/gtp_context_sup.erl: Error: undefined parse transform 'lager_transform' Compiling src/exometer_report_netdata.erl src/exometer_report_netdata.erl: Error: undefined parse transform 'lager_transform' Compiling src/gtp_config.erl src/gtp_config.erl: Error: undefined parse transform 'lager_transform' Compiling src/gtp_path_reg.erl src/gtp_path_reg.erl: Error: undefined parse transform 'lager_transform' Compiling src/gtp_path_sup.erl src/gtp_path_sup.erl: Error: undefined parse transform 'lager_transform' Compiling src/gtp_context.erl src/gtp_context.erl: Error: undefined parse transform 'lager_transform' Compiling src/gtp_socket.erl src/gtp_socket.erl: Error: undefined parse transform 'lager_transform' Compiling src/ergw_config.erl src/ergw_config.erl: Error: undefined parse transform 'lager_transform' Compiling src/gtp_context_reg.erl src/gtp_context_reg.erl: Error: undefined parse transform 'lager_transform' Compiling src/ergw.erl src/ergw.erl: Error: undefined parse transform 'lager_transform' Compiling src/ergw_api.erl src/ergw_api.erl: Error: undefined parse transform 'lager_transform' Compiling src/gtp_protocol.erl src/gtp_protocol.erl: Error: undefined parse transform 'lager_transform' Compiling src/gtp_v1_u.erl src/gtp_v1_u.erl: Error: undefined parse transform 'lager_transform' Compiling src/vrf_sup.erl src/vrf_sup.erl: Error: undefined parse transform 'lager_transform' Compiling src/gtp_dp.erl src/gtp_dp.erl: Error: undefined parse transform 'lager_transform' Compiling src/ergw_app.erl src/ergw_app.erl: Error: undefined parse transform 'lager_transform' Compiling src/pgw_s2a.erl src/pgw_s2a.erl: Error: undefined parse transform 'lager_transform' Compiling src/gtp_v1_c.erl src/gtp_v1_c.erl: Error: undefined parse transform 'lager_transform' Compiling src/gtp_v2_c.erl src/gtp_v2_c.erl: Error: undefined parse transform 'lager_transform' Compiling src/3gpp_qos.erl src/3gpp_qos.erl: Error: undefined parse transform 'lager_transform' Compiling src/gtp_socket_reg.erl src/gtp_socket_reg.erl: Error: undefined parse transform 'lager_transform' Compiling src/ggsn_gn_proxy.erl src/ggsn_gn_proxy.erl: Error: undefined parse transform 'lager_transform' Compiling src/pgw_s5s8_proxy.erl src/pgw_s5s8_proxy.erl: Error: undefined parse transform 'lager_transform' Compiling src/ergw_control.erl src/ergw_control.erl: Error: undefined parse transform 'lager_transform' Compiling src/gtp_ip_pool.erl src/gtp_ip_pool.erl: Error: undefined parse transform 'lager_transform' Compiling src/ggsn_gn.erl src/ggsn_gn.erl: Error: undefined parse transform 'lager_transform' Error: compilation failed
When I put lager_transform first in tetrapak/config.ini:
erlc_options = [{lager_transform, parse_transform}]
I get the following:

== build:erlang ================== Compiling src/ergw_sup.erl Compiling src/gtp_socket_sup.erl Compiling src/gtp_c_lib.erl src/gtp_c_lib.erl: Error: undefined parse transform 'cut' Compiling src/itu_e212.erl Compiling src/gtp_proxy_ds.erl Compiling src/vrf.erl src/vrf.erl: Error: undefined parse transform 'cut' Compiling src/vrf_reg.erl src/vrf_reg.erl:10: Warning: behaviour regine_server undefined Compiling src/gtp_path.erl src/gtp_path.erl: Error: undefined parse transform 'cut' Compiling src/gtp_api.erl src/gtp_api.erl:3: Error: can't find include lib "gtplib/include/gtp_packet.hrl" src/gtp_api.erl:32: Error: record gtp undefined src/gtp_api.erl:41: Error: record gtp undefined src/gtp_api.erl:42: Error: record gtp undefined Compiling src/pgw_s5s8.erl src/pgw_s5s8.erl: Error: undefined parse transform 'do' Compiling src/gtp_context_sup.erl Compiling src/exometer_report_netdata.erl src/exometer_report_netdata.erl:17: Error: can't find include lib "exometer_core/include/exometer.hrl" src/exometer_report_netdata.erl:71: Error: record exometer_entry undefined src/exometer_report_netdata.erl:72: Error: variable 'PortName' is unbound src/exometer_report_netdata.erl:77: Error: variable 'Name' is unbound src/exometer_report_netdata.erl:77: Error: variable 'Value' is unbound src/exometer_report_netdata.erl:3: Warning: behaviour exometer_report undefined Compiling src/gtp_config.erl Compiling src/gtp_path_reg.erl src/gtp_path_reg.erl:10: Warning: behaviour regine_server undefined Compiling src/gtp_path_sup.erl Compiling src/gtp_context.erl src/gtp_context.erl: Error: undefined parse transform 'cut' Compiling src/gtp_socket.erl src/gtp_socket.erl: Error: undefined parse transform 'cut' Compiling src/ergw_config.erl src/ergw_config.erl: Error: undefined parse transform 'cut' Compiling src/gtp_context_reg.erl src/gtp_context_reg.erl:10: Warning: behaviour regine_server undefined Compiling src/ergw.erl Compiling src/ergw_api.erl Compiling src/gtp_protocol.erl src/gtp_protocol.erl:3: Error: can't find include lib "gtplib/include/gtp_packet.hrl" src/gtp_protocol.erl:7: Error: record gtp undefined src/gtp_protocol.erl:12: Error: record gtp undefined Compiling src/gtp_v1_u.erl src/gtp_v1_u.erl:10: Warning: behaviour gtp_protocol undefined Compiling src/vrf_sup.erl Compiling src/gtp_dp.erl src/gtp_dp.erl:22: Error: can't find include lib "gen_socket/include/gen_socket.hrl" src/gtp_dp.erl:23: Error: can't find include lib "gtplib/include/gtp_packet.hrl" Compiling src/ergw_app.erl src/ergw_app.erl: Error: undefined parse transform 'cut' Compiling src/pgw_s2a.erl src/pgw_s2a.erl: Error: undefined parse transform 'do' Compiling src/gtp_v1_c.erl src/gtp_v1_c.erl:23: Error: can't find include lib "gtplib/include/gtp_packet.hrl" src/gtp_v1_c.erl:33: Error: record recovery undefined src/gtp_v1_c.erl:34: Error: variable 'RestartCounter' is unbound src/gtp_v1_c.erl:53: Error: record gtp undefined src/gtp_v1_c.erl:56: Error: record gtp undefined src/gtp_v1_c.erl:58: Error: record gtp undefined src/gtp_v1_c.erl:230: Error: record recovery undefined src/gtp_v1_c.erl:232: Error: record recovery undefined src/gtp_v1_c.erl:242: Error: record cause undefined src/gtp_v1_c.erl:244: Error: record cause undefined src/gtp_v1_c.erl:246: Error: record cause undefined src/gtp_v1_c.erl:10: Warning: behaviour gtp_protocol undefined src/gtp_v1_c.erl:55: Warning: variable 'IEs' is unused src/gtp_v1_c.erl:55: Warning: variable 'TEI' is unused src/gtp_v1_c.erl:55: Warning: variable 'Type' is unused src/gtp_v1_c.erl:57: Warning: variable 'IEs' is unused src/gtp_v1_c.erl:57: Warning: variable 'Type' is unused src/gtp_v1_c.erl:166: Warning: function gtp_msg_response/1 is unused src/gtp_v1_c.erl:229: Warning: variable 'RCnt' is unused src/gtp_v1_c.erl:231: Warning: variable 'RCnt' is unused src/gtp_v1_c.erl:234: Warning: function map_reply_ies/1 is unused src/gtp_v1_c.erl:241: Warning: function map_reply_ie/1 is unused Compiling src/gtp_v2_c.erl src/gtp_v2_c.erl:23: Error: can't find include lib "gtplib/include/gtp_packet.hrl" src/gtp_v2_c.erl:33: Error: record v2_recovery undefined src/gtp_v2_c.erl:34: Error: variable 'RestartCounter' is unbound src/gtp_v2_c.erl:54: Error: record gtp undefined src/gtp_v2_c.erl:57: Error: record gtp undefined src/gtp_v2_c.erl:59: Error: record gtp undefined src/gtp_v2_c.erl:210: Error: record gtp undefined src/gtp_v2_c.erl:212: Error: variable 'IfType' is unbound src/gtp_v2_c.erl:247: Error: record v2_recovery undefined src/gtp_v2_c.erl:249: Error: record v2_recovery undefined src/gtp_v2_c.erl:259: Error: record v2_cause undefined src/gtp_v2_c.erl:261: Error: record v2_cause undefined src/gtp_v2_c.erl:263: Error: record v2_cause undefined src/gtp_v2_c.erl:10: Warning: behaviour gtp_protocol undefined src/gtp_v2_c.erl:53: Warning: variable 'IEs' is unused src/gtp_v2_c.erl:56: Warning: variable 'IEs' is unused src/gtp_v2_c.erl:56: Warning: variable 'TEI' is unused src/gtp_v2_c.erl:56: Warning: variable 'Type' is unused src/gtp_v2_c.erl:58: Warning: variable 'IEs' is unused src/gtp_v2_c.erl:58: Warning: variable 'Type' is unused src/gtp_v2_c.erl:186: Warning: function gtp_msg_response/1 is unused src/gtp_v2_c.erl:246: Warning: variable 'RCnt' is unused src/gtp_v2_c.erl:248: Warning: variable 'RCnt' is unused src/gtp_v2_c.erl:251: Warning: function map_reply_ies/1 is unused src/gtp_v2_c.erl:258: Warning: function map_reply_ie/1 is unused Compiling src/3gpp_qos.erl Compiling src/gtp_socket_reg.erl src/gtp_socket_reg.erl:10: Warning: behaviour regine_server undefined Compiling src/ggsn_gn_proxy.erl src/ggsn_gn_proxy.erl: Error: undefined parse transform 'cut' Compiling src/pgw_s5s8_proxy.erl src/pgw_s5s8_proxy.erl: Error: undefined parse transform 'cut' Compiling src/ergw_control.erl Compiling src/gtp_ip_pool.erl Compiling src/ggsn_gn.erl src/ggsn_gn.erl: Error: undefined parse transform 'cut' Error: compilation failed
Looks like it doesn't resolve the dependencies

Unlike rebar tetrapak is not handling dependencies. You have to make sure manually that all required Erlang applications are in the default lib directory or in ERL_LIBS.

Would be great if the documentation could be a bit improved for non-erlang users like me. Getting to know the erlang user-space utilities is very time consuming and I am still unable to get the ergw running to check it out. Rebar/rebar3/reltool/pkgx.... Would be great to just be able to build a .deb or .rpm to deploy the application.

Indeed, I agree that some more general and overview documentation would be helpful. We will try to improve that. Meanwhile, please take a look at:

These are erGW-based control and user plane nodes and can be build with rabar3. In addition to that deb packages for Ubuntu 16.04 are available as well to get started quickly.