[ragel] "include" does not check same directory in ragel 7? (trying to build rspamd)
felix.schwarz at oss.schwarz.eu
Sat Aug 19 21:30:55 UTC 2017
I try to get rspamd (https://github.com/vstakhov/rspamd/) to build while using
ragel 7 . As documented in various bug reports this is not possible right
now and I'd like to find out why this is (knowning next to nothing about ragel).
This is the error I'm getting (CentOS 7) with the latest colm/ragel/rspamd git
[ 43%] [RAGEL][ragel_smtp_addr] Compiling state machine with Ragel 22.214.171.124
error: could not open smtp_address.rl
/bin/sh: line 1: 9721 Segmentation fault /usr/local/bin/ragel -T1
make: *** [src/smtp_addr_parser.rl.c] Error 139
"smtp_addr_parser.rl" contains these lines (and some more):
include smtp_date "smtp_date.rl";
main := date_time;
"smtp_date.rl" is located in the same directory as "smtp_date.rl". The script
can be compiled with ragel 6 without any problems.
If I add the full patch in the include statement everything works as expected.
Also when I manually "cd" into the directory everything is fine.
The "ragel guide" (PDF) for 6.10 says:
"Ragel searches for included files from the location of the current file.
Additional directories can be added to the search path using the -I option."
I seems that this behavior did change in 0.7 but I'm not sure if that is a bug
or a conscious decision. Also adding "-I /foo/rspamd/src/ragel/" to the call
did not help.
thank you very much
Somehow the Fedora maintainer for ragel decided to use development releases of
colm/ragel in Fedora (and even EPEL/CentOS). This unfortunate decision was
maybe facilitated by the odd/even version numbering schema of ragel.
More information about the ragel-users