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

Build fails when following the instructions in the User Manual #635

Closed
jeroenk opened this issue Oct 27, 2020 · 2 comments
Closed

Build fails when following the instructions in the User Manual #635

jeroenk opened this issue Oct 27, 2020 · 2 comments

Comments

@jeroenk
Copy link

jeroenk commented Oct 27, 2020

I'm trying to follow the instructions in the User Manual to build libadalang on 64-bit Windows 10. The only difference is that I'm using GNAT Pro 21.0w-20200816, which includes GNATColl, instead of a community edition of GNAT. The 21.0w-20200816 version of libadalang is also installed on my system. Unfortunately, the build fails for me.

Using Python 3.8.5, I perform the following steps:

  • Clone the repository, currently at commit 5831c5c
  • python -mvenv env
  • env\Scripts\activate.bat
  • pip install -r REQUIREMENTS.dev This step pulls AdaCore/langkit@2a1bff4.
  • python ada/manage.py generate
  • python ada/manage.py --library-types=static,static-pic,relocatable build

The last step fails with:

libadalang-sources.ads:26:06: file "langkit_support-symbols-precomputed.ads" not found
libadalang-sources.ads:26:06: "Libadalang.Sources (body)" depends on "Libadalang.Sources (spec)"
libadalang-sources.ads:26:06: "Libadalang.Sources (spec)" depends on "Libadalang.Common (spec)"
...

It seems that the build is picking up the installed 21.0w-20200816, version of langkit_support.gpr instead of the version pulled in via pip install, because if I temporarily rename the installed version, the build fails reporting that langkit_support.gpr cannot be found. Are there any additional steps I should take to build libadalang under my setup that are missing from the documentation?

@pvachon
Copy link

pvachon commented Oct 27, 2020

I've run into a similar issue. I ended up getting around this by explicitly appending the location of langkit_support.gpr in the virtualenv's copy of the langkit package to ADA_LIBRARY_PATH to be used by gprbuild. This works, but I don't think it's ideal to have to do this.

@pmderodat
Copy link
Member

pmderodat commented Oct 28, 2020

Hello,

We are currently revamping the build procedure for Langkit and Libadalang (see AdaCore/langkit#430, I recommend to subscribe to this issue if you want to be updated). We’ll soon update the related documentations, sorry for the inconvenience.

For the time being, the real fix is to install Langkit_Support (system-wide, or in a specific location, $PREFIX + update the environment — GPR_PROJECT_PATH, LD_LIBRARY_PATH, … — to point to that location). In the langkit clone, run:

python manage.py build-langkit-support --library-types=static,static-pic,relocatable
python manage.py install-langkit-support --library-types=static,static-pic,relocatable $PREFIX

The rationale is that Langkit_Support used to be generated by Libadalang’s build procedure, but since it’s a project that is supposed to be common to all Langkit-generated libraries (and that this behavior was initially just for dev convenience), we decided to stop doing that and require an explicit build/install instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants