comp.lang.ada
 help / color / mirror / Atom feed
* GNAT on Raspberry Pi?
@ 2017-10-19 20:13 mockturtle
  2017-10-19 20:28 ` mockturtle
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: mockturtle @ 2017-10-19 20:13 UTC (permalink / raw)


Dear all,
I just got a Raspberry Pi 3.  It works nicely and I wanted to install GNAT tools.  I went to the libreada site, selected the ARM binary, downloaded it and installed it, but in the end I get a

  Bad exec format

Calling "file" on gps_exe it says that gps_exe is for 80386, not for ARM, despite the fact that the name of the archive is

   gnat-gpl-2017-arm-...

so, I guess, it should be for ARM.  I also tried the 2016 Raspberry 2 specific version  (there is not the 2017 release) and also the 2015 one, but still file says that the files are for 80386.  Now I am trying with the 2015 release for ARM-linux, but I have little hope...

Any suggestion?

Thanks,

Riccardo


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: GNAT on Raspberry Pi?
  2017-10-19 20:13 GNAT on Raspberry Pi? mockturtle
@ 2017-10-19 20:28 ` mockturtle
  2017-10-20  0:03   ` Anh Vo
  2017-10-20  1:22 ` Dennis Lee Bieber
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 11+ messages in thread
From: mockturtle @ 2017-10-19 20:28 UTC (permalink / raw)


I am replying to my own post to say that

* even 2015,arm version is recognized as 80386 code

* I looked directly inside the executable and the e_machine is actually 3 which is "80386", other executable on my RPi have 40 which is ARM

In alternative, does someone have experience in cross-compiling with GNAT GPL for RPi?

Riccardo

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: GNAT on Raspberry Pi?
  2017-10-19 20:28 ` mockturtle
@ 2017-10-20  0:03   ` Anh Vo
  0 siblings, 0 replies; 11+ messages in thread
From: Anh Vo @ 2017-10-20  0:03 UTC (permalink / raw)


On Thursday, October 19, 2017 at 1:28:37 PM UTC-7, mockturtle wrote:
> I am replying to my own post to say that
> 
> * even 2015,arm version is recognized as 80386 code
> 
> * I looked directly inside the executable and the e_machine is actually 3 which is "80386", other executable on my RPi have 40 which is ARM
> 
> In alternative, does someone have experience in cross-compiling with GNAT GPL for RPi?

Make sure your GNAT-ARM is selected under your Project Properties -> Build -> Toolchain.

Anh Vo


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: GNAT on Raspberry Pi?
  2017-10-19 20:13 GNAT on Raspberry Pi? mockturtle
  2017-10-19 20:28 ` mockturtle
@ 2017-10-20  1:22 ` Dennis Lee Bieber
  2017-10-20  7:28 ` Dmitry A. Kazakov
  2017-10-20 10:32 ` mockturtle
  3 siblings, 0 replies; 11+ messages in thread
From: Dennis Lee Bieber @ 2017-10-20  1:22 UTC (permalink / raw)


On Thu, 19 Oct 2017 13:13:22 -0700 (PDT), mockturtle
<framefritti@gmail.com> declaimed the following:

>Dear all,
>I just got a Raspberry Pi 3.  It works nicely and I wanted to install GNAT tools.  I went to the libreada site, selected the ARM binary, downloaded it and installed it, but in the end I get a
>
>  Bad exec format
>
>Calling "file" on gps_exe it says that gps_exe is for 80386, not for ARM, despite the fact that the name of the archive is
>
>   gnat-gpl-2017-arm-...
>
>so, I guess, it should be for ARM.  I also tried the 2016 Raspberry 2 specific version  (there is not the 2017 release) and also the 2015 one, but still file says that the files are for 80386.  Now I am trying with the 2015 release for ARM-linux, but I have little hope...
>

	I suspect those builds are /cross-compiler/ toolchains, not native,
since the description says "hosted on ...".

	For the RPi-3, I'd suggest seeing if the GCC build is available in apt
repositories (if you have the graphical environment running, "add/remove
programs", search for GNAT)

-- 
	Wulfraed                 Dennis Lee Bieber         AF6VN
    wlfraed@ix.netcom.com    HTTP://wlfraed.home.netcom.com/


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: GNAT on Raspberry Pi?
  2017-10-19 20:13 GNAT on Raspberry Pi? mockturtle
  2017-10-19 20:28 ` mockturtle
  2017-10-20  1:22 ` Dennis Lee Bieber
@ 2017-10-20  7:28 ` Dmitry A. Kazakov
  2017-10-20 10:31   ` mockturtle
  2017-10-20 10:32 ` mockturtle
  3 siblings, 1 reply; 11+ messages in thread
From: Dmitry A. Kazakov @ 2017-10-20  7:28 UTC (permalink / raw)


On 19/10/2017 22:13, mockturtle wrote:

> I just got a Raspberry Pi 3.

A big disappointment regarding performance, but that's aide.

> It works nicely and I wanted to install GNAT tools. I went to the
> libreada site, selected the ARM binary, downloaded it and installed it,
> but in the end I get a
[...]
> Any suggestion?

Why don't you just install Debian or Fedora there? The FSF GNAT 7 
compiler works right out of the box. Both armhf and arm64 (RPI 3 is 
64-bit) flavors are available. I shortly tested arm64 Ada on Fedora, 
before I switched back to 32-bit, it worked nicely.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: GNAT on Raspberry Pi?
  2017-10-20  7:28 ` Dmitry A. Kazakov
@ 2017-10-20 10:31   ` mockturtle
  2017-10-20 10:57     ` Simon Wright
  0 siblings, 1 reply; 11+ messages in thread
From: mockturtle @ 2017-10-20 10:31 UTC (permalink / raw)


On Friday, October 20, 2017 at 9:28:22 AM UTC+2, Dmitry A. Kazakov wrote:
> On 19/10/2017 22:13, mockturtle wrote:
> 
> > I just got a Raspberry Pi 3.
> 
> A big disappointment regarding performance, but that's aide.
> 

True, pretty slow, especially for file system access (it is my impression).  Anyway, I want to make a demonstrator with it and it is fairly good for that.

> 
> Why don't you just install Debian or Fedora there? The FSF GNAT 7 
> compiler works right out of the box. Both armhf and arm64 (RPI 3 is 
> 64-bit) flavors are available. I shortly tested arm64 Ada on Fedora, 
> before I switched back to 32-bit, it worked nicely.
>

Your suggestion gave me the idea of trying to install it via apt-get (it could seem strange that I did not think about it before, that is because I am used to install the version on the libre.adacore site and I did not consider apt-get).  It works, it seems a pretty old version (2015? 2014?), but it is enough for my needs.

Anyway, I wrote to AdaCore anyway since it is strange  that the package for ARM contains 80386 executables (is maybe something escaping me?). 
 
> -- 
> Regards,
> Dmitry A. Kazakov
> http://www.dmitry-kazakov.de


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: GNAT on Raspberry Pi?
  2017-10-19 20:13 GNAT on Raspberry Pi? mockturtle
                   ` (2 preceding siblings ...)
  2017-10-20  7:28 ` Dmitry A. Kazakov
@ 2017-10-20 10:32 ` mockturtle
  2017-10-20 11:58   ` Dmitry A. Kazakov
  3 siblings, 1 reply; 11+ messages in thread
From: mockturtle @ 2017-10-20 10:32 UTC (permalink / raw)


BTW, I am using the Rpi with its 7" touch screen.  Cute, but using GPS over a 7" is kind of claustrophobic...  Fortunately, I can do ssh and work remotly over a 17" screen... 


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: GNAT on Raspberry Pi?
  2017-10-20 10:31   ` mockturtle
@ 2017-10-20 10:57     ` Simon Wright
  2017-10-20 20:21       ` mockturtle
  0 siblings, 1 reply; 11+ messages in thread
From: Simon Wright @ 2017-10-20 10:57 UTC (permalink / raw)


mockturtle <framefritti@gmail.com> writes:

> Anyway, I wrote to AdaCore anyway since it is strange that the package
> for ARM contains 80386 executables (is maybe something escaping me?).

The clue is in the "Select your platform" list on the download page:
"ARM ELF format (hosted on Linux)" - or "on Windows". This is a
cross-compiler, run on a host x86 computer (Windows or Linux) which
produces executables to run on an ARM ELF target computer.

What I don't know is whether the executables run on a bare metal target
(which might happen to be a Pi board) or whether they run on a Pi which
is running Linux. I strongly suspect the former, especially because the
"Select your platform" entry for "Raspberry Pi 2 Linux (32 bits) (hosted
on Linux)" is greyed out! (it was available in GNAT GPL 2016).

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: GNAT on Raspberry Pi?
  2017-10-20 10:32 ` mockturtle
@ 2017-10-20 11:58   ` Dmitry A. Kazakov
  2017-10-20 14:35     ` Björn Lundin
  0 siblings, 1 reply; 11+ messages in thread
From: Dmitry A. Kazakov @ 2017-10-20 11:58 UTC (permalink / raw)


On 20/10/2017 12:32, mockturtle wrote:
> BTW, I am using the Rpi with its 7" touch screen. Cute, but using GPS
> over a 7" is kind of claustrophobic... Fortunately, I can do ssh and
> work remotly over a 17" screen...

If you have a desktop you can develop just there. Ada is perfectly 
portable. I write everything under Windows. Porting to ARM is a matter 
of recompiling.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: GNAT on Raspberry Pi?
  2017-10-20 11:58   ` Dmitry A. Kazakov
@ 2017-10-20 14:35     ` Björn Lundin
  0 siblings, 0 replies; 11+ messages in thread
From: Björn Lundin @ 2017-10-20 14:35 UTC (permalink / raw)


On 2017-10-20 13:58, Dmitry A. Kazakov wrote:
> On 20/10/2017 12:32, mockturtle wrote:
>> BTW, I am using the Rpi with its 7" touch screen. Cute, but using GPS
>> over a 7" is kind of claustrophobic... Fortunately, I can do ssh and
>> work remotly over a 17" screen...
> 
> If you have a desktop you can develop just there. Ada is perfectly
> portable. I write everything under Windows. Porting to ARM is a matter
> of recompiling.
> 

Yes, just use some kind of version handling (git/svn)
and perhaps some variables in the gpr projectfile.
(different paths for external libs etc)

Depending on personal preference, some of our staff
do coding in windows, others in Linux.

And it is always compiled on those two OSes + AIX.
svn + scenario variables in gpr files handles the differences


-- 
--
Björn


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: GNAT on Raspberry Pi?
  2017-10-20 10:57     ` Simon Wright
@ 2017-10-20 20:21       ` mockturtle
  0 siblings, 0 replies; 11+ messages in thread
From: mockturtle @ 2017-10-20 20:21 UTC (permalink / raw)


On Friday, October 20, 2017 at 12:57:55 PM UTC+2, Simon Wright wrote:
> mockturtle <framefritti@gmail.com> writes:
> 
> > Anyway, I wrote to AdaCore anyway since it is strange that the package
> > for ARM contains 80386 executables (is maybe something escaping me?).
> 
> The clue is in the "Select your platform" list on the download page:
> "ARM ELF format (hosted on Linux)" - or "on Windows". This is a
> cross-compiler, run on a host x86 computer (Windows or Linux) which
> produces executables to run on an ARM ELF target computer.
> 
> What I don't know is whether the executables run on a bare metal target
> (which might happen to be a Pi board) or whether they run on a Pi which
> is running Linux. I strongly suspect the former, especially because the
> "Select your platform" entry for "Raspberry Pi 2 Linux (32 bits) (hosted
> on Linux)" is greyed out! (it was available in GNAT GPL 2016).

Ahhh... I saw the light...

Now it is clear!  Instead I believed that it was a compiler *running* on ARM.  The meaning of "hosted on Linux" it was not entirely clear to me, but I ignored it... 

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2017-10-20 20:21 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-19 20:13 GNAT on Raspberry Pi? mockturtle
2017-10-19 20:28 ` mockturtle
2017-10-20  0:03   ` Anh Vo
2017-10-20  1:22 ` Dennis Lee Bieber
2017-10-20  7:28 ` Dmitry A. Kazakov
2017-10-20 10:31   ` mockturtle
2017-10-20 10:57     ` Simon Wright
2017-10-20 20:21       ` mockturtle
2017-10-20 10:32 ` mockturtle
2017-10-20 11:58   ` Dmitry A. Kazakov
2017-10-20 14:35     ` Björn Lundin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox