giellalt / lang-sme

Finite state and Constraint Grammar based analysers and proofing tools, and language resources for the Northern Sami language
https://giellalt.uit.no
GNU General Public License v3.0
6 stars 1 forks source link

Nothing produces grammarchecker-release.bin #77

Closed TinoDidriksen closed 7 months ago

TinoDidriksen commented 7 months ago

./configure --without-forrest --with-hfst --enable-tokenisers --without-xfst --enable-reversed-intersect --enable-spellers --enable-hfst-mobile-speller --enable-alignment --disable-minimised-spellers --enable-syntax --enable-analysers --enable-generators --enable-apertium --enable-grammarchecker --with-backend-format=foma --enable-dicts --enable-oahpa --enable-morpher --disable-hfst-desktop-spellers

yields:

make[4]: Entering directory '/build/giella-sme-0.2.0+g32799~cca6637a-1~sid1/tools/grammarcheckers'
...
"/usr/bin/cg-comp" grammarchecker.cg3 grammarchecker.bin
Sections: 3, Rules: 1306, Sets: 3231, Tags: 14333
136 rules cannot be skipped by index.
Grammar has dependency rules.
...
/build/giella-sme-0.2.0+g32799~cca6637a-1~sid1/./../giella-core/scripts/make_grammarchecker_zip.py pipespec.xml se.zcheck
[Errno 2] No such file or directory: 'grammarchecker-release.bin'

https://github.com/giellalt/lang-sme/blob/main/tools/grammarcheckers/pipespec.xml.in#L33 needs same treatment as https://github.com/giellalt/lang-sme/commit/b9309a3d4e44a9702b6251ebc746166497d90faf @unhammer ?

flammie commented 7 months ago

grammarchecker release in sme should be built by:

if HAVE_VISLCG_FILTER
grammarchecker-release.bin: grammarchecker.cg3
    $(AM_V_CGCOMP)"$(VISLCG3)" --grammar $< --grammar-bin $@ --grammar-only --nrules-v "^x"
else
grammarchecker-release.cg3: $(srcdir)/grammarchecker.cg3 \
                            $(GIELLA_CORE)/scripts/gc-release.awk
    $(AM_V_GEN)$(GAWK) -f $(GIELLA_CORE)/scripts/gc-release.awk $< > $@

CLEANFILES=grammarchecker-release.cg3
endif

where

PKG_CHECK_MODULES([CG3], [cg3 > 1.4.0], [vislcg_filters=true],
                  [vislcg_filters=false])
AM_CONDITIONAL([HAVE_VISLCG_FILTER], [test "x$vislcg_filters" = xtrue])

could it be that pkg-config check fails and I guess the awk script might not be installed for this failing build?

TinoDidriksen commented 7 months ago

checking for cg3 > 1.4.0... yes plus giella-core and the shared-* deps are in ../ and are found there by other parts of the build: https://apertium.projectjj.com/apt/logs/giella-sme/build.log

TinoDidriksen commented 7 months ago

Happens in a pristine build, even at -j1 so it's not a race condition. I reproduced it on my Mac with:

git clean -f -d -x
autoreconf -fvi
./configure --without-forrest --with-hfst --enable-tokenisers --without-xfst --enable-reversed-intersect --enable-spellers --enable-hfst-mobile-speller --enable-alignment --disable-minimised-spellers --enable-syntax --enable-analysers --enable-generators --enable-apertium --enable-grammarchecker --with-backend-format=foma --enable-dicts --enable-oahpa --enable-morpher --disable-hfst-desktop-spellers
make -j1

yields [Errno 2] No such file or directory: 'grammarchecker-release.bin'

A subsequent make -j1 succeeds, but I don't think it should. find . -name 'grammarchecker-release.bin' doesn't find the file even after the build completes. There is only ever ./tools/grammarcheckers/grammarchecker.bin

flammie commented 7 months ago

I see now, it was more of a missing or wrong dependency there, maybe release bin should be in shared scripts but it's there now for sme at least.