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!aioe.org!.POSTED.DqfVRKhZuK7nKGFKV76LpA.user.gioia.aioe.org!not-for-mail From: =?UTF-8?Q?Markus_Sch=c3=b6pflin?= Newsgroups: comp.lang.ada Subject: Re: Installing ada-mode 6.2.1 on Debian Buster Date: Mon, 18 Nov 2019 10:01:51 +0100 Organization: Aioe.org NNTP Server Message-ID: References: NNTP-Posting-Host: DqfVRKhZuK7nKGFKV76LpA.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 Content-Language: en-US X-Notice: Filtered by postfilter v. 0.9.2 Xref: reader01.eternal-september.org comp.lang.ada:57581 Date: 2019-11-18T10:01:51+01:00 List-Id: On 11/17/19 7:45 PM, Stephen Leake wrote: > On Friday, November 15, 2019 at 2:30:05 AM UTC-8, Markus Schöpflin wrote: > >> apt-get install gnat >> apt-get install libgnatcoll-xref18-dev > > I have been testing on Debian with the GNAT Community install, because gprbuild was not in the Debian package. I gather it is now, so I'll switch to that. > >> Now, open a shell and go into the directory where Ada mode has been installed >> (e.g. ~/.emacs.d/elpa/ada-mode-6.2.1). >> >> * Fix the line-ending of the two files wisi-fringe.el and gpr-query.el: >> >> dos2unix gpr-query.el ; dos2unix ../wisi-2.2.1/wisi-fringe.el. > > As mentioned on the ada-mode mailing list (https://lists.nongnu.org/mailman/listinfo/ada-mode-users) this should not matter, but does not hurt, and the files will have Unix line endings in the next Gnu ELPA release. I got compile errors from Emacs during installation otherwise. This is with the regular Emacs (1:26.1+1-3.2+deb10u1) from Debian Buster. [...] >> * Make sure gprbuild will use the correct compilers, run gprconfig to select >> GNAT for Ada and GNATGCC for C. This is especially important if Clang is >> installed as well. > > I'll mention this in ada-mode.info. Can you post a little more detail about what to look for in gprconfig output? That is, by default build.sh just works; how can you tell if gprconfig needs special attention? This is impossible to miss, as you get weird error during compilation: [...] [Ada] gpr_mode_wisi_parse.ads [Ada] run_gpr_parse.ads [C] wisitoken_grammar_re2c.c clang: error: argument unused during compilation: '-specs=/tmp/GNAT-TEMP-000006.TMP' [-Werror,-Wunused-command-line-argument] gprbuild: *** compilation phase failed You then need to run gprconfig, which gives you a list of compilers it finds on the PATH: > 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 8 (default runtime) 2. GCC-ASM for Asm in /usr/bin/ version 8.3.0 3. GCC-ASM for Asm2 in /usr/bin/ version 8.3.0 4. GCC-ASM for Asm_Cpp in /usr/bin/ version 8.3.0 5. LLVM for C in /usr/bin/ version 7.0.1 6. GNATGCC for C in /usr/bin/ version 8 7. GCC for C in /usr/bin/ version 8.3.0 8. G++ for C++ in /usr/bin/ version 8.3.0 9. GFORTRAN for Fortran in /usr/bin/ version 8.3.0 Select or unselect the following compiler (or "s" to save): Just select the correct ones for GNAT, which means (1) and (6) in the example above. >> * Run build.sh. It should compile everything without errors, but it will fail >> on installation. > > By default it installs executables in the same directory as the "gnat" binary. Thus it needs root privs (as any system install does). > >> * Manually install the files gpr_query, all *.exe, and ada_lr1_parse_table.txt >> into /usr/local/bin/ or another directory on PATH. > > Simpler is to edit build.sh to add "--prefix " to the gprinstall line. I gather it would be helpful to add a command line option to build.sh for this. Plus perhaps splitting it in two scripts: build.sh and install.sh. So the build can be run as regular user, and only the install step needs to be run as root. > Thanks for the feedback. Thank *you* for all your hard work on the Ada mode. This is very much appreciated. > After installing, is ada-mode working well for you? Have you noticed error recovery in the parser? I didn't get around yet to really use it, but my first experience with it so far is good. I'm sure I will use it more in the weeks to come, so I will give you some feedback then. -- Markus