From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!weretis.net!feeder6.news.weretis.net!feeder.usenetexpress.com!feeder-in1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!buffer2.nntp.dca1.giganews.com!buffer1.nntp.dca1.giganews.com!news.giganews.com.POSTED!not-for-mail NNTP-Posting-Date: Sat, 08 Jun 2019 20:42:08 -0500 From: Dennis Lee Bieber Newsgroups: comp.lang.ada Subject: Re: Starting learning ADA Date: Sat, 08 Jun 2019 21:42:09 -0400 Organization: IISS Elusive Unicorn Message-ID: References: <47f671ea-bd40-4a98-8a34-8e99d94622cb@googlegroups.com> User-Agent: ForteAgent/8.00.32.1272 X-No-Archive: YES MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Usenet-Provider: http://www.giganews.com X-Trace: sv3-ncKdMmf8zmlfEiUsNEFwU0xz6MbKXPDJ68B/ww//iZSGCI6b/mrnyEMHQ4lYS7+v5LeRWbqkgBdwosV!NaX2xrs7UK/3f96V0jdQFgWd7K1bptXnriCpLlgoKtfctjLBELdySIGck29uzK0KfUQ/RCpb X-Complaints-To: abuse@giganews.com X-DMCA-Notifications: http://www.giganews.com/info/dmca.html X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 7607 Xref: reader01.eternal-september.org comp.lang.ada:56571 Date: 2019-06-08T21:42:09-04:00 List-Id: On Sat, 8 Jun 2019 10:07:13 -0700 (PDT), Ricardo Brandão 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 /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*" /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 >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/