[ragel] "including" the same file multiple times (ragel 6 vs 7 / building rspamd)

Felix Schwarz felix.schwarz at oss.schwarz.eu
Sun Aug 20 20:40:46 UTC 2017


still trying to compile rspamd with ragel 7.x. One important difference seems
to be that rspamd tries to include the same .rl file multiple times.

E.g. smtp_received.rl:
  include smtp_whitespace "smtp_whitespace.rl";
  ...
  include smtp_date "smtp_date.rl";

now "smtp_date.rl" contains:
%%{
  machine smtp_date;

  include smtp_whitespace "smtp_whitespace.rl";

  # SMTP date spec
  # Obtained from: http://tools.ietf.org/html/rfc5322#section_3.3


So there is a "duplicate" declaration of "smtp_whitespace" which leads to
errors in the compilation process:
/foo/rspamd/src/ragel/smtp_whitespace.rl:4:3: fsm "WSP" previously defined
/foo/rspamd/src/ragel/smtp_whitespace.rl:5:3: fsm "CRLF" previously defined
/foo/rspamd/src/ragel/smtp_whitespace.rl:6:3: fsm "DQUOTE" previously defined
/foo/rspamd/src/ragel/smtp_whitespace.rl:9:3: fsm "atext" previously defined
/foo/rspamd/src/ragel/smtp_whitespace.rl:13:3: fsm "dtext" previously defined
/foo/rspamd/src/ragel/smtp_whitespace.rl:15:3: fsm "ctext" previously defined
...

It seems that ragel 6 just includes the file once. Any idea why this changed
and what should upstream projects do about this?

thank you very much,
Felix




More information about the ragel-users mailing list