Open Saibo-creator opened 1 year ago
After a close look, it seems that this is caused by the mismatch between the installed C runtime and python code.
In the commit a42cec21071de72806bedd2fac985fe2a1356db3 on Jul 16, 2022, the interface of pgf_complete
has been changed.
The pgf_complete
in the current commit is aligned with the line 1740 in pypgf.c
https://github.com/GrammaticalFramework/gf-core/blob/master/src/runtime/c/pgf/pgf.h#L254
, where pgf_complete
takes 7 arguments, including prefix_bind
However, if the c-runtime was installed from assets here https://github.com/GrammaticalFramework/gf-core/releases/tag/3.11 (my case) then the mismatch happens, due to the fact that the assets were compiled from the old code(before commit a42cec21071de72806bedd2fac985fe2a1356db3)
So I guess it may not be a bug, but just a caveat for beginners.
Hello, I got the following error while compiling python runtime from the source. It seems there is a function signature mimatch.
Error Reproduction
Go inside
runtime/python/
Error Message
Fix
Change line 1740 in
pypgf.c
pgf_complete(self->concr, type, sentence, prefix, prefix_bind, parse_err, pyres->pool);
to
pgf_complete(self->concr, type, sentence, prefix, parse_err, pyres->pool);