[erlang-bugs] asn1ct: cant build asn files with names which does not agree with module name

yannay livneh yannayl@REDACTED
Sun May 10 08:06:19 CEST 2015


Hello,

asn1ct can't build asn1 file which contain module with name that is not the
basename of the file.

Steps to reproduce:

$ wget
https://raw.githubusercontent.com/wireshark/wireshark/master/asn1/snmp/snmp.asn
$ erlc snmp.asn

result:
snmp.erl:6: can't find include file "RFC1157-SNMP.hrl"

The reason is confusion between 'erlang module' and 'asn1 module'.
asn1ct generates a .erl and .hrl files with basenames same as the .asn
file, but the code try to include the asn1module.hrl (which does not exist).

The code which generates the -include line is in
lib/asn1/src/asn1ct_gen.erl:gen_head

Regards,
yannay
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20150510/e1ab20dc/attachment.htm>


More information about the erlang-bugs mailing list