comp.lang.ada
 help / color / mirror / Atom feed
From: Dennis Lee Bieber <wlfraed@ix.netcom.com>
Subject: Re: Starting learning ADA
Date: Sat, 08 Jun 2019 21:42:09 -0400
Date: 2019-06-08T21:42:09-04:00	[thread overview]
Message-ID: <prjofelo5b7bcbpf70k2bt86luidu5as87@4ax.com> (raw)
In-Reply-To: adf5d31e-0827-4377-9bf3-44d8cdd6db31@googlegroups.com

On Sat, 8 Jun 2019 10:07:13 -0700 (PDT), Ricardo Brandão
<rbrandao.br@gmail.com> declaimed the following:


>Even if I change unix for x86_64-pc-mingw32 the problem continue.
>

	No surprise -- mingw32 is an environment on Windows to support
UNIX/Linux run-time calls (and maybe even some command line tools).

Debian Stretch running in VirtualBox:

wulfraed@stretch:~$ sudo find / -iname "gnat*"
/usr/share/lintian/overrides/gnat-gps-common
/usr/share/doc/gnat-gps
/usr/share/doc/gnat-6
/usr/share/doc/gnat
	<SNIP>
/usr/share/applications/gnat-programming-studio.desktop
/usr/lib/gcc/x86_64-linux-gnu/6/gnat1
/usr/lib/gcc/x86_64-linux-gnu/6/adainclude/gnat.ads
/usr/lib/gcc/x86_64-linux-gnu/6/adalib/gnat.ali
/usr/bin/gnatcoll_db2ada

wulfraed@stretch:~$ sudo find / -iname "*gnat*coll*"
	<SNIP>
/usr/lib/x86_64-linux-gnu/libgnatcoll_iconv.so.1.7
/usr/lib/x86_64-linux-gnu/libgnatcoll.so.1.7
/usr/lib/x86_64-linux-gnu/libgnatcoll_sqlite.so.1.7
/usr/lib/x86_64-linux-gnu/libgnatcoll_readline.so.1.7
/usr/lib/x86_64-linux-gnu/libgnatcoll_python.so.1.7
/usr/lib/x86_64-linux-gnu/libgnatcoll_gtk.so.1.7
/usr/bin/gnatcoll_db2ada
	<SNIP>


>I imagine it's some PATH, or installation problem. The last line says that could not find gnatcool.gpr file, so I copied it from \GNAT\2019\share\gpr and tried to run again, and I got a lot of errors saying that don't find toolchains, project file, etc.

	I don't find a gnatcoll.gpr (presume you typo'd above) on this install
-- appears Debian only makes pre-built libraries available; I can't even
find source options in the package manager...

wulfraed@stretch:~$ gprconfig
--------------------------------------------------
gprconfig has found the following compilers on your PATH.
Only those matching the target and the selected compilers are displayed.
   1. GNAT for Ada in /usr/bin/ version 6 (default runtime)
   2. GCC-ASM for Asm in /usr/bin/ version 6.3.0
   3. GCC-ASM for Asm2 in /usr/bin/ version 6.3.0
   4. GCC-ASM for Asm_Cpp in /usr/bin/ version 6.3.0
   5. LLVM for C in /usr/bin/ version 3.8.1
   6. GNATGCC for C in /usr/bin/ version 6.3.0
   7. GCC for C in /usr/bin/ version 6.3.0
   8. G++ for C++ in /usr/bin/ version 6.3.0
   9. GFORTRAN for Fortran in /usr/bin/ version 6.3.0
Select or unselect the following compiler (or "s" to save): 


>
>Actually I'm using Ubuntu Subsystem for Windows 10. It's a command line system. So, to compile Ada programs, I installed gnat using:
>
>sudo apt-get install gnat
>
>And when it doesn't find gprconfig, I installed gprbuild as I mentioned in the first message of this thread.
>
>So, my question is: to run Ada from a command line Linux OS, install gnat from apt-get is the best way? And if yes, how to download and install libraries?

	Usually -- using apt-get for pre-built binaries.

	Note that the Ubuntu on Windows is rather ancient ("Trusty", so source
packages may be asking for things that weren't in that release). FYI: the
M$ "app store" has a download for Debian on the Windows Linux subsystem
(and as I recall, a few other distributions too; you might find one you
prefer over Ubuntu... And they can exist in parallel -- each gets its own
start-up shortcut).

	gprconfig appears to be unusable in the Ubuntu on Windows config. I
just did the apt-get install for gnat and gprbuild...

root@ElusiveUnicorn:~# gprconfig

Execution terminated by unhandled exception
Exception name: STORAGE_ERROR
Message: stack overflow (or erroneous memory access)
Call stack traceback locations:
0x7f5caf0c6cae 0x7fffd3d257cf
root@ElusiveUnicorn:~# sudo gprconfig

Execution terminated by unhandled exception
Exception name: STORAGE_ERROR
Message: stack overflow (or erroneous memory access)
Call stack traceback locations:
0x7f9bebac6cae 0x7fffe5988daf
root@ElusiveUnicorn:~#


	gprconfig is also unusable on the Debian on Windows system.

wulfraed@ElusiveUnicorn:~$ gprconfig

raised STORAGE_ERROR : stack overflow or erroneous memory access
wulfraed@ElusiveUnicorn:~$ sudo gprconfig
[sudo] password for wulfraed:

raised STORAGE_ERROR : stack overflow or erroneous memory access
wulfraed@ElusiveUnicorn:~$

	gprbuild is also problematic in the Debian system (on Ubuntu it gave me
the "usage" help.

wulfraed@ElusiveUnicorn:~$ gprbuild
using project file /usr/share/gpr/_default.gpr

raised STORAGE_ERROR : stack overflow or erroneous memory access
gprbuild: could not create /home/wulfraed/auto.cgpr
wulfraed@ElusiveUnicorn:~$


	gnatmake does give the usage help, so projects usable with gnatmake
might be viable -- but the Linux subsystem may not be the best choice for
program development (I believe the intent had been to allow administrators
to use BASH and related tools for performing tasks on Windows). Next
experiment will take a while -- I'm bogging down my poor overworked R-Pi3B
web server installing gnat/gprbuild... (Hmmm, that ran faster than I
expected)

md_admin@microdiversity:~$ gprconfig
--------------------------------------------------
gprconfig has found the following compilers on your PATH.
Only those matching the target and the selected compilers are displayed.
   1. GNAT for Ada in /usr/bin/ version 6 (default runtime)
   2. GNAT for Ada in /usr/bin/ version 6 (default runtime)
   3. GCC-ASM for Asm in /usr/bin/ version 6.3.0
   4. GCC-ASM for Asm in /usr/bin/ version 6.3.0
   5. GCC-ASM for Asm2 in /usr/bin/ version 6.3.0
   6. GCC-ASM for Asm2 in /usr/bin/ version 6.3.0
   7. GCC-ASM for Asm_Cpp in /usr/bin/ version 6.3.0
   8. GCC-ASM for Asm_Cpp in /usr/bin/ version 6.3.0
   9. GCC for C in /usr/bin/ version 6.3.0
  10. GCC for C in /usr/bin/ version 6.3.0
  11. GNATGCC for C in /usr/bin/ version 6.3.0
  12. G++ for C++ in /usr/bin/ version 6.3.0
Select or unselect the following compiler (or "s" to save): ^C
md_admin@microdiversity:~$ gprbuild
using project file /usr/share/gpr/_default.gpr
_default.gpr:1:18: warning: there are no Ada sources in this project
gprbuild: no sources to compile
md_admin@microdiversity:~$

	Interesting -- seems to find everything twice (maybe my PATH has a
duplication)... And "find" shows the gnatcoll libraries seem to have been
installed with gnat.



-- 
	Wulfraed                 Dennis Lee Bieber         AF6VN
	wlfraed@ix.netcom.com    http://wlfraed.microdiversity.freeddns.org/


  reply	other threads:[~2019-06-09  1:42 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-08 15:26 Starting learning ADA Ricardo Brandão
2019-06-08 15:53 ` Simon Wright
2019-06-08 17:07   ` Ricardo Brandão
2019-06-09  1:42     ` Dennis Lee Bieber [this message]
2019-06-09  7:25       ` Niklas Holsti
2019-06-08 15:55 ` joakimds
2019-06-08 17:10   ` Ricardo Brandão
2019-06-08 17:46     ` joakimds
2019-06-08 20:10       ` Simon Wright
2019-06-09 14:39         ` Ricardo Brandão
2019-06-09 17:44           ` Simon Wright
2019-06-09 18:12             ` Ricardo Brandão
2019-06-09 19:29               ` Dmitry A. Kazakov
2019-06-10 17:40               ` Dennis Lee Bieber
2019-06-09 18:23             ` Dennis Lee Bieber
2019-06-09 14:31       ` Ricardo Brandão
2019-06-09 19:35         ` Dmitry A. Kazakov
2019-06-10 12:28           ` Ricardo Brandão
replies disabled

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