Open simonjwright opened 1 year ago
Thank you @simonjwright to trying ALS on Mac OS X (apple silicon?). This sed
invocation is a quick fix to drop dependency on libgpr2
, not used in ALS 23.0.0. I execute
sed -i "-e/gpr2/s/^/-- /" gnat/lsp_server.gpr
The -i
switch in GNU sed
means in-place:
-i[SUFFIX], --in-place[=SUFFIX]
edit files in place (makes backup if SUFFIX supplied)
If sed
in Mac OS doesn't support -i
then -E
nor -r
won't help, unfortunately. You can comment out that line in gnat/lsp_server.gpr
in any editor then continue. Just find with "gpr2.gpr";
and comment it out.
This trick won't be needed in next version of ALS, but libgpr2
needed as a dependency. So I'm closing this issue, unless you can propose other simple way to comment this line.
Found this discussion. Could you try
[[actions]]
command = [
"sed",
"-i.bak",
"-e/gpr2/s/^/-- /",
"gnat/lsp_server.gpr",
]
directory = "."
type = "post-fetch"
Or
[[actions]]
command = [
"sed",
"-i",
"",
"-e/gpr2/s/^/-- /",
"gnat/lsp_server.gpr",
]
directory = "."
type = "post-fetch"
Both of those suggestions worked. My previous tries worked because I’d accidentally set the backup prefix to -r
!
And yes, this is Apple silicon.
One problem I came up against was
[Ada] tagada_marshalling_lib.adb
[Ada] tgen-types.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]
which is because, on aarch64 (at any rate, gcc 13.1.0’s system.ads
), Long_Long_Float
is a mere 64 bits long. This is in libadalang, but seems to have been dropped from the current commits.
Also the objcopy issue, here & in libadalang_tools.
May be you can suppress -gnatwe
with
alr build -- -gnatwn
After
alr get ada_language_server
, this happens:I’ve found a working fix: it seems that this action needs the
-E
or-r
switch.The man page for
-E
saysThe man page for
-r
saysThere’s a note: "The -E option[ is a] non-standard FreeBSD extension[s] and may not be available on other operating systems."