Compilation of nameres.adb fails with "Parse_Enum_Option" is undefined
jeroenk opened this issue · 5 comments
When trying to build the current master on Windows 10 with GNAT 21.0, compilation fails with the following error:
nameres.adb:175:40: "Parse_Enum_Option" is undefined
nameres.adb:199:16: "Lookup_Cache_Mode" not declared in "Args"
compilation of nameres.adb failed
gprbuild: *** compilation phase failed
Build failed: error while running gprbuild -p -j8 -P...\libadalang\build\mains.gpr -XBUILD_MODE=dev -XLIBRARY_TYPE=relocatable -XGPR_BUILD=relocatable -XXMLADA_BUILD=relocatable -XLIBADALANG_WARNINGS=true nameres.adb parse.adb gnat_compare.adb navigate.adb:
Command '['gprbuild', '-p', '-j8', '-P...\\libadalang\\build\\mains.gpr', '-XBUILD_MODE=dev', '-XLIBRARY_TYPE=relocatable', '-XGPR_BUILD=relocatable', '-XXMLADA_BUILD=relocatable', '-XLIBADALANG_WARNINGS=true', 'nameres.adb', 'parse.adb', 'gnat_compare.adb', 'navigate.adb']' returned non-zero exit status 4.
Steps I've taken up to the failure:
set LAL_SCRATCH=C:\path\to\libadalang
set LAL_INSTALL=C:\path\to\libadalang-install
cd %LAL_SCRATCH%
git clone https://github.com/AdaCore/langkit/
git clone https://github.com/AdaCore/libadalang/
set PATH=%LAL_INSTALL%\bin;%PATH%
set GPR_PROJECT_PATH=%LAL_INSTALL%\share\gpr;%GPR_PROJECT_PATH%
python -mvenv env
env\Scripts\activate.bat
pip install -r libadalang\REQUIREMENTS.dev
cd langkit
pip install .
python manage.py build-langkit-support --library-types=static,static-pic,relocatable
python manage.py install-langkit-support --library-types=static,static-pic,relocatable %LAL_INSTALL%
cd ..\libadalang
python manage.py generate
python manage.py build --library-types=static,static-pic,relocatable
Hello @jeroenk,
Libadalang’s master
branch is developped using the master
branch of virtually all its dependencies (GNATCOLL, XML/Ada, …), except for GNAT itself (we want to keep supporting recent GNAT Community/GNAT FSF releases). We introduced recently a dependency in Libadalang on a new feature in GNATCOLL, so you need to build and install the master
branch of https://github.com/AdaCore/gnatcoll-core/ before building Langkit & Libadalang.
Note that this is what we do ourselves in Libadalang’s CI scripts (https://github.com/AdaCore/libadalang/blob/master/.github/workflows/main.yml#L100).
Please let us know if you still have issues after that.
Hi @pmderodat,
Thanks for your answer. With a newer version of GNATCOLL the build indeed succeeds.
I generally follow buidling.rst
, which is much easier to locate than the CI scripts. This probably also holds for other people, so it might be useful to extend building.rst
with something along the lines with what you write above. It's currently not clear to me from that document that I need a very recent version of GNATCOLL.
Good to hear! I’ve tried to amend the User Manual accordingly: #721 Please let us know if you find it useful.
Hi @pmderodat
The addition to the User Manual makes sense to me.
Ok, thank you for the feedback!