alire icon indicating copy to clipboard operation
alire copied to clipboard

Alr Build on Ubuntu 18.04 with gnat-7.5.0 on ARMv8

Open Jawk1995 opened this issue 2 years ago • 7 comments

Hi,

I keep coming up with these errors when trying to build alire with gprbuild

no selector "=" for type "Vector" defined at aaa-strings.ads:98 body "Split_At_Double_Dash" declared at line 101 freezes the contract of "SPLIT_AT_DOUBLE_DASH"

Is there any way around this? Thanks Julius

Jawk1995 avatar Nov 02 '21 04:11 Jawk1995

It's probably due to gnat-7.5 being too old. Do you have the chance to try Ubuntu 20.04?

mosteo avatar Nov 02 '21 09:11 mosteo

No sadly I can't due to driver and hardware incompatibilities.

Jawk1995 avatar Nov 02 '21 09:11 Jawk1995

I'm afraid then that aaa might not be your only blocker.

I guess that being on ARMv8 is not the problem here but the gnat version. Let's hope at some point time opens to look into increasing backwards portability.

Wild idea: could you try to cross-compile on a PC an ARM version using some of the indexed cross-compilers?

mosteo avatar Nov 02 '21 09:11 mosteo

That's something I'll be trying next I think.

My other thought was trying to force gnat-9 onto 18.04? I'm not sure what other dependencies might be required.

Jawk1995 avatar Nov 02 '21 09:11 Jawk1995

Fair warning: even if you manage to compile alr, due to #849 you will likely have some odd behaviors (you'll have to rely on an external compiler, that's for sure). That is one that is quite high in my priorities to fix though.

I seem to remember there were people on https://gitter.im/ada-lang/Alire that I think were trying also to get it to work on ARM.

mosteo avatar Nov 02 '21 09:11 mosteo

Ok, trying to do the cross-compilation method but i'm coming across this error

gprbuild --target=arm-elf -j0 -P alr_env

gprconfig: can't find a toolchain for the following configuration: gprconfig: language 'ada', target 'arm-elf', default runtime aaa.gpr:1:09: warning: there are no sources of language "C" in this project ajunitgen.gpr:3:09: warning: there are no sources of language "C" in this project xml_ez_out.gpr:1:09: warning: there are no sources of language "C" in this project ansi.gpr:1:09: warning: there are no sources of language "C" in this project clic.gpr:6:09: warning: there are no sources of language "C" in this project simple_logging.gpr:1:09: warning: there are no sources of language "C" in this project minirest.gpr:5:09: warning: there are no sources of language "C" in this project optional.gpr:1:09: warning: there are no sources of language "C" in this project semantic_versioning.gpr:1:09: warning: there are no sources of language "C" in this project spdx.gpr:1:09: warning: there are no sources of language "C" in this project stopwatch.gpr:1:09: warning: there are no sources of language "C" in this project toml_slicer.gpr:3:09: warning: there are no sources of language "C" in this project uri.gpr:1:09: warning: there are no sources of language "C" in this project si_units.gpr:1:17: no compiler for language "Ada", cannot compile "si_units-binary.ads" gprbuild: *** compilation phase failed desktop@Desktop:~/Downloads/alire$

Any thoughts?

Jawk1995 avatar Nov 15 '21 05:11 Jawk1995

If you want to do cross-compilation, isn't it just a matter of selecting gnat_arm_elf via alr toolchain? (don't have ARM[v8] hw here, so I could be talking nonsense).

On x64 I'm currently stuck at an older version of Alire (7654492 probably) with 7.5 on 18.04.

Alternatively, @reznikmm is porting Alire to the aarch64 platform at https://github.com/reznikmm/aarch64-alire-index. Obviously it depends on an external GNAT FSF build, not the one from Debian/Ubuntu.

onox avatar Nov 15 '21 07:11 onox