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

Building ALS via Alire on aarch64-apple-darwin #1190

Open
simonjwright opened this issue Mar 23, 2024 · 3 comments
Open

Building ALS via Alire on aarch64-apple-darwin #1190

simonjwright opened this issue Mar 23, 2024 · 3 comments

Comments

@simonjwright
Copy link
Contributor

The first problem arises because ALS’s ALire dependency on libadalang_tools is to ^23.0.0, with which this occurs:

   [Ada]          tagada_marshalling_lib.adb
tagada_marshalling_lib.adb:633:19: warning: types for unchecked conversion have different sizes [-gnatwz]
tagada_marshalling_lib.adb:738:19: warning: types for unchecked conversion have different sizes [-gnatwz]

   compilation of tagada_marshalling_lib.adb failed

The failing code is

                  function To_Bits is new Ada.Unchecked_Conversion
                    (Source => Long_Long_Float, Target => Unsigned_128);

(in the second case, From_Bits). On aarch64, Long_Long_Float is only 64 bits.

The "fix" (that at least doesn’t use -gnatwe, & so gets a build) is to alter lal_tools_common.gpr so that the default for Build_Mode is prod.


The second problem (may not be a problem?) is this:

Running post-fetch actions for ada_language_server=23.0.0...
sed: 1: "gnat/lsp_server.gpr": extra characters at the end of g command
error: Command ["sed", "-i", "-e/gpr2/s/^/--  /", "gnat/lsp_server.gpr"] exited with code 1
@simonjwright
Copy link
Contributor Author

error: Command ["sed", "-i", "-e/gpr2/s/^/--  /", "gnat/lsp_server.gpr"] exited with code 1

This stopped the build.

I wondered whether it was the two spaces in "-e/gpr2/s/^/-- /" - this has caused trouble with Alire in the past - but the only solution I could see was to do the edit by hand.

Now I have a build!

@cdouty
Copy link

cdouty commented Apr 5, 2024

The sed command in the alire.toml post-fetch action expects to see GNU sed, while macOS has a BSD version. I have a patch that also makes the sed command idempotent. I will upload it when I figure out how to make a PR. Should it go here or the crate?

@reznikmm
Copy link
Contributor

Replacing "sed", "-i" with "sed", "-i.bak" should fix the issue. I hope we will have 24.0.0 in alire eventually.

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