ernw / ss7MAPer

SS7 MAP (pen-)testing toolkit. DISCONTINUED REPO, please use: https://github.com/0xc0decafe/ss7MAPer/
https://c0decafe.de/git/ss7MAPer.git/
BSD 3-Clause "New" or "Revised" License
453 stars 184 forks source link

Compilation Error (rebar co) #9

Closed 0x454447415244 closed 7 years ago

0x454447415244 commented 7 years ago

Hello, I get an error while trying to compile (attached below). Any idea on how to solve it?

Thanks

root@ubuntu:/opt/ss7MAPer# rebar co
==> pkt (compile)
==> epcap (compile)
==> rel (compile)
==> osmo_ss7 (compile)
*** ERROR in parse_transform function:
*** Reason     = function_clause
*** Location: {exprecs,403}
***       type = function
***    context = {context,m3ua_codec,undefined,undefined}
***        acc = {pass1,
                     [m3ua_msg],
                     false,
                     [{mtp3mg_msg,
                          [{record_field,25,{atom,25,h0}},
                           {record_field,26,{atom,26,h1}},
                           {record_field,27,{atom,27,payload}}]},
                      {mtp3_msg,
                          [{record_field,17,{atom,17,network_ind}},
                           {record_field,18,{atom,18,service_ind}},
                           {record_field,19,{atom,19,routing_label}},
                           {record_field,20,{atom,20,m3ua_mp}},
                           {record_field,21,{atom,21,payload}}]},
                      {mtp3_routing_label,
                          [{record_field,11,{atom,11,sig_link_sel}},
                           {record_field,12,{atom,12,origin_pc}},
                           {record_field,13,{atom,13,dest_pc}}]},
                      {m3ua_msg,
                          [{typed_record_field,
                               {record_field,69,{atom,69,version}},
                               {type,69,range,
                                   [{integer,69,0},{integer,69,255}]}},
                           {typed_record_field,
                               {record_field,70,{atom,70,msg_class}},
                               {type,70,range,
                                   [{integer,70,0},{integer,70,255}]}},
                           {typed_record_field,
                               {record_field,71,{atom,71,msg_type}},
                               {type,71,range,
                                   [{integer,71,0},{integer,71,255}]}},
                           {typed_record_field,
                               {record_field,72,{atom,72,msg_length}},
                               {type,72,non_neg_integer,[]}},
                           {record_field,73,{atom,73,payload}}]}]}
***       form = {function,47,get_num_pad_bytes,1,
                  [{clause,47,
                    [{var,47,'BinLenBytes'}],
                    [],
                    [{'case',48,
                      {op,48,'rem',{var,48,'BinLenBytes'},{integer,48,4}},
                      [{clause,49,[{integer,49,0}],[],[{integer,49,0}]},
                       {clause,50,
                        [{var,50,'Val'}],
                        [],
                        [{op,50,'-',{integer,50,4},{var,50,'Val'}}]}]}]}]}
*** ERROR in parse_transform function:
*** Reason     = function_clause
*** Location: {exprecs,403}
***       type = function
***    context = {context,sccp_codec,undefined,undefined}
***        acc = {pass1,
                     [global_title,sccp_addr,sccp_msg],
                     false,
                     [{sccp_addr,
                          [{record_field,182,{atom,182,res_nat_use}},
                           {record_field,183,{atom,183,route_on_ssn}},
                           {record_field,184,{atom,184,point_code}},
                           {record_field,185,{atom,185,ssn}},
                           {record_field,186,{atom,186,global_title}}]},
                      {global_title,
                          [{typed_record_field,
                               {record_field,173,{atom,173,gti}},
                               {type,173,range,
                                   [{integer,173,0},{integer,173,15}]}},
                           {typed_record_field,
                               {record_field,174,
                                   {atom,174,nature_of_addr_ind}},
                               {type,174,range,
                                   [{integer,174,0},{integer,174,127}]}},
                           {record_field,175,{atom,175,trans_type}},
                           {typed_record_field,
                               {record_field,176,{atom,176,encoding}},
                               {type,176,range,
                                   [{integer,176,0},{integer,176,15}]}},
                           {typed_record_field,
                               {record_field,177,{atom,177,numbering_plan}},
                               {type,177,range,
                                   [{integer,177,0},{integer,177,15}]}},
                           {record_field,178,{atom,178,phone_number}}]},
                      {sccp_msg,
                          [{typed_record_field,
                               {record_field,167,{atom,167,msg_type}},
                               {user_type,167,sccp_msg_type,[]}},
                           {record_field,168,{atom,168,parameters}}]}]}
***       form = {function,48,binarify,1,
                     [{clause,48,
                          [{var,48,'In'}],
                          [[{call,48,{atom,48,is_binary},[{var,48,'In'}]}]],
                          [{var,49,'In'}]},
                      {clause,50,
                          [{var,50,'In'}],
                          [[{call,50,{atom,50,is_list},[{var,50,'In'}]}]],
                          [{call,51,
                               {atom,51,list_to_binary},
                               [{var,51,'In'}]}]}]}
/opt/ss7MAPer/deps/osmo_ss7/src/m3ua_codec.erl:47: function_clause
Compiling /opt/ss7MAPer/deps/osmo_ss7/src/m3ua_codec.erl failed:
ERROR: compile failed while processing /opt/ss7MAPer/deps/osmo_ss7: rebar_abort
0x454447415244 commented 7 years ago

Nevermind. For people facing the same problem, downgrade to ERLANG version 18.3.