Skip to content
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

vislcg3 fails on korp.cg3 #2

Closed
snomos opened this issue Oct 9, 2020 · 6 comments
Closed

vislcg3 fails on korp.cg3 #2

snomos opened this issue Oct 9, 2020 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@snomos
Copy link
Member

snomos commented Oct 9, 2020

"/usr/bin/cg-comp" korp.cg3 korp.bin
korp.cg3: Error: Cannot stat functions.cg3 due to error -1 - bailing out!
Makefile:851: recipe for target 'korp.bin' failed

This breaks the build.

@snomos snomos added the bug Something isn't working label Oct 9, 2020
@snomos
Copy link
Member Author

snomos commented Oct 9, 2020

@albbas
Copy link
Contributor

albbas commented Oct 20, 2020

This works on my machine, at least with the minimal ./autogen.sh && ./configure && make

…
16 rules cannot be skipped by index.
  CP       korp.cg3
  CG3COMP  korp.bin
…

@albbas albbas closed this as completed Oct 20, 2020
@bbqsrc
Copy link
Member

bbqsrc commented Oct 20, 2020

That doesn't mean the bug is fixed, as it doesn't work in this environment as early as 8 hours ago.

@bbqsrc bbqsrc reopened this Oct 20, 2020
@snomos
Copy link
Member Author

snomos commented Oct 22, 2020

Ok, found the bug. The issue is that korp.cg3 contains the following:

INCLUDE functions.cg3 ;

Now, as long as functions.cg3 is also copied from giella-shared, this works fine - the file functions.cg3 is found in the build directory, and gets included as it should.

But when functions.cg3 is found locally AND you build out of source (VPATH builds), THEN functions.cg3 is NOT found - only the compiled functions.bin. VPATH / out-of-source builds are what is used by most CI systems, including both Tino's and ours, thus you get fails.

The easiest solution is to change the include statement to the following:

INCLUDE functions.bin ;

But that would then require a rebuild every time korp.cg3 or functions.cg3 are changed. This does not go well with the cg3 developers, who are used to be able to run their grammars without make-ing things, as vislcg3 parses the source files on the fly.

I would still opt for this solution - these files are rarely changed, so the annoynce level should not be very high.

Comments, @Trondtr ?

@Trondtr
Copy link
Contributor

Trondtr commented Jan 9, 2021

There are two issues here:

  1. the double setup korp.cg3 vs. functions.cg3. For some languages there is a difference, for others there is not. The have your cake and eat it here is with the INCLUDE command, and having korp.cg3 as an otherwise empty file. This work for other languages today. The argument in favour of it is that the same pipeline may always be used for analysis to Korp, for all languages.
  2. Whether the language should use its own functions.cg3 or import functions.cg3 from giella-shared. The core Saami languages share their functions file, but as soon as different languages start getting serious work on functions and dependencies, they want more of their rules and above all less of the Saami rules. At the moment functions.cg3 is listed in the common .gitignore file, what we should do is remove it there and rather have a local .gitignore solution for the languages that ise giella-shared (or eventually make a smi-functions.cg3).

@snomos
Copy link
Member Author

snomos commented Nov 17, 2023

Fixed in eb37e2d by adding korp.cg3 to the source tree in git, instead of copying from shared-smi at build time.

@snomos snomos closed this as completed Nov 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants