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!reader02.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: gprbuild not working on GNAT 2015 GPL for raspberry pi cross compile Date: Thu, 21 Jun 2018 17:27:20 +0100 Organization: A noiseless patient Spider Message-ID: References: <7d1aa1b8-44af-417e-8fe0-4512c2f74bf1@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: reader02.eternal-september.org; posting-host="533ab50faa926fae7e0c3c43e63ea20f"; logging-data="23478"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18PXnta0t2GAZENJxIbeVoJnNfQWyp3Nt8=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (darwin) Cancel-Lock: sha1:ERaWAH0FjFaxrM4Kx/BshcNWUJA= sha1:5shC4uY4V91uFambn0uVYmcTGDE= Xref: reader02.eternal-september.org comp.lang.ada:53229 Date: 2018-06-21T17:27:20+01:00 List-Id: jeanbaptistesmn@gmail.com writes: > I think the ENV_PREFIX variable is correctly set : > > $ echo $ENV_PREFIX > /usr/gnat/arm-linux-gnueabihf/sysroot looks OK > sysroot directory was generated > > and : > > $ gprconfig -show-targets > Lists of targets supported by a compilater: > arm-linux-gnueabihf > x86_64-linux-gnu > arm-linux-gnueabihf I wonder which gprconfig you're running? Can you try $ arm-linux-gnueabihf-gnatls -v If it says something like "file not found", you're running a 64-bit Linux; the arm-linux-gnueabihf cross-compiler is built as a 32-bit executable; and you need the 32-bit system runtime support to be installed. On debian jessie I did this, YMMV: $ sudo dpkg --add-architecture i386 $ sudo apt-get update $ sudo apt-get upgrade and then I got a bit lost with what exactly to install, so used Synaptics to install libstdc++6:i386. > but when i do : > $ gprbuild --target=arm-linux-gnueabihf -P myProject.gpr > "warning: no compiler specified for language "Ada", ignoring all its sources" > "main.adb" is not a source of project "myProject" > > Simon, i'm not sure i understand your answer : > >>Gprconfig looks for a compiler and a runtime. If it finds {target}-gcc >>it runs -dumpmachine to find the version, then looks for runtimes in >>(at least) lib/gcc/{target}/{version}; first in adalib/, then via >>ada_object_path, then via rts-*/. If when gprconfig finds {target}-gcc and tries to run it with -dumpmachine and it fails to run, then gprconfig won't consider it as a candidate compiler.