-
Notifications
You must be signed in to change notification settings - Fork 7
sv_parser: Critical lexer/parser compilation failures #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
On, in case this is helpful, version info:
|
I haven't maintained this repo in quite some time, unfortunately. Can you tell me the use case you're working on? |
Hi Aaron, thanks for the response! I was wondering if that was the case, I was kind of afraid of it. The use case is fairly standard, I'm using this for implementing a Sieve backend in my mail server software[1]. The existing packages work okay, but there are some limitations for what I'd like to do, they are outdated so still contain fixed segfaults and possibly fixed memory leaks, and I'd most of all like to extend it by implementing more Sieve extensions, so that's why I'm trying to compile from source. I'd be happy to do some work on extending this library if you no longer have time or interest in it, but I've never worked with flex or bison before and of course that's the part I haven't been able to get to compile. [1] https://github.com/InterLinked1/lbbs/blob/master/modules/mod_sieve.c |
I'm trying to get this working in the current Alpine Linux and believe I'm seeing the same or similar issues. flex 2.6.4 make[1]: Entering directory '/opt/src/libsieve' |
I manually generated the addr-lex.h, header-lex.h, and sieve-lex.h files by executing:
This should be done as part of dist-hook but it looks like that's executed much later. Also flex has changed and the --header-file parameter needs to be used. Also, for the bison files to update grammer
A note about bison...
which got me here:
|
I'm assuming this should be |
One thing I did before that moves this along further is adding this before line 86 of src/sv_parser/addr.h:
There's probably some other header file that should be included somewhere but this shouldn't do any harm.
If I add a missing definition to this header file:
then I get down to this:
It's possible I might have caused this with some change, though I'm not entirely sure how to work around this yet. @sodabrew Any thoughts on any of this, even if you're not actively maintaining the library? We would really appreciate your thoughts. It will be a lot easier to get this library working again then start writing a whole new library from scratch. |
@sodabrew Just wanted to reach out again to see if you had any thoughts. Once the build issues are resolved, we can make changes in a separate fork, but these issues have been kind of elusive thus far. |
This library no longer compiles with (recent?) versions of flex/bison:
Some missing declarations:
The first issue is easily fixed by adding a forward declaration for
struct sieve2_context
, near the bottom ofaddr.h
:#include "src/sv_interface/context2.h"
I'm not sure why
YY_BUFFER_STATE
isn't defined here, other than I'd think that would need to be in a.l
file, not a.y
file. But nonetheless, this fixes that:Then, for these warnings:
I'm not sure why
context2.h
can't be included fromaddr.y
but when I try that it doesn't work. Only inaddr.h
, but every timeaddr.y
is modified than that gets regenerated so I had to keep readding it.With those changes, I'm able to get as far as:
I'm assuming
header-lex.h
should get generated fromheader-lex.l
, but, well, it's not. Haven't been able to get that generated. I can force buildingheader-lex.lo
first:But that doesn't produce a header file as a byproduct.
In short, compilation of the lexer/parser stuff has really fallen apart and is a total mess right now. This doesn't compile on any system anymore. Any ideas for a fix?
The text was updated successfully, but these errors were encountered: