-
Notifications
You must be signed in to change notification settings - Fork 35
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
Struggles building Langkit with Alire #653
Comments
Hi Clement, thanks for opening this issue! Glad to hear from you aswell 🙂 We're going to get to each issue in due time, first
I'm surprised, I'm not finding this reference, could you point me to it ? We in any case need to update the build instructions. We're going to do a first pass trying to use Langkit on a recent Ubuntu. However, for the moment, nobody in the team has access to a macOS machine. I propose that we already do a pass on our side and ping you when that is done so you can see if things are already better. Thanks! |
Happy to help incrementally ! This first reference is this link that lands on Adacore download page for GNAT community 2021 : |
Hello @cbourgeois! We discussed this internally, but realized that the “full Alire way” is probably a dead end: as you noticed, using a mix of Alire releases and In the future, we could envision creating a binary distribution for Langkit similar to what you described during our live discussions, shipping GNAT, pre-built dependencies and possibly Python+Java distributions to use the full ecosystem that we are currently building. But we’re not there yet.
13.2.0 should be completely fine. :-) It seems that all the problems you reported in your opening message are related to the use of incompatible versions for dependency libraries: please let us know if you need help building one of them, or if you still have compilation errors with
That’s unexpected. What are the symptoms exactly? Note that |
Not sure if it's related, but for some time there have been problems with macOS vs GPRBuild trying to create 'static Stand Alone Libraries (SAL)'; I found a reasonable patch for langkit v25.0.0:
My current script for building langkit is here. I suspect you wouldn't want to say |
Bonsoir, hope that you're all doing well.
I am trying to evaluate langkit, aiming to simplify
the development of an LSP and a set of linters/formaters for a DSL. I struggled
getting it to build, here is a lengthy summary of what I encountered and where I stopped.
The documentation recommends GNAT Community 2021.
As I was surprised that this was the latest release of GNAT, I found the blogs
mentioning alire being the recommended way to get gnat, so I gave it a try that way, on macOS.
I did a manual setup of alire for langkit and added a dependency to
langkit_support
, trying to avoid having to build it.I would have a hard time bringing the entire Ada toolchain to our devenvs,
and aimed to build as little as possible, hopefully requesting a small set to
be released (in pip using a bdist ? <3) if the eval was successful.
In the created
alire.toml
:I realized that default compilation with manage.py was still trying to compile
langkit_support
, I found the--no-langkit-support
option to bypass it.Suggestion : Separating
langkit_support
out of thedependency
list might be justified giventhat it's expected to be built.
Moving forward I was stumbling upon an error caused by
xmlada_shared.gpr
notfound from the xmlada lib. I was using the one brought in by
langkit_support
.That most likely is a problem to report to xmlada, and the way xmlada_24.0.0 is
packaged for alire.
I fixed it by running ./configure in the xmlada
GPR_PROJECT_PATH
location to generate theXmlada_Shared.gpr
file. Not langkit fault I know :)Next I ran into this :
I figured out that this was caused by a conflict in the supported
GPR_BUILD
values in
gpr.gpr
, I forced that to be "production" in the gpr file, not sure whichpart of the coupling should be the source of truth, but I wanted to move
forward.
After the above, the
prettier_ada
dependency reported being missing, that was not mentionned in theintro, so worth updating, I assume that it's pretty recent.
I cloned the repository, setup an alire project there as well with vss and got that solved.
Finally I blocked on :
I assume that it was foolish to expect
langkit_support
to work on master, so Iwent to 24.0 but it failed similarly.
Got this error on the release branch that did not stop the build from progressing
but still sharing it for visiblity :
Retried without trying to use the
langkit_support
from alire, building it directly, but got a similarerror :
Should I use an older gnat ? I was using 13.2.0.
Final note,
manage.py
seems to run twice, always retrying after a failure, not a big deal but that was surprising.Let me know some of my notes are unclear or if you need more context.
The text was updated successfully, but these errors were encountered: