comp.lang.ada
 help / color / mirror / Atom feed
* Setting up GPRBUILD for Ada in mingw64
@ 2017-07-12  0:26 Jere
  2017-07-12  6:50 ` Simon Wright
  2017-07-12  6:54 ` Simon Wright
  0 siblings, 2 replies; 6+ messages in thread
From: Jere @ 2017-07-12  0:26 UTC (permalink / raw)


So I recently installed minggw64 on my windows 10 box, got Gnat installed, 
but found that gprbuild wasn't available via the pacman command.  I got a 
copy of it from the Gnoga sourceforge site and copied all of the files to the 
appropriate places, but when I tried to run a simple:

gprbuild -P test_gnoga.gpr

or any gpr file for that matter, I get the following error

"Error: no native compiler found for language 'ada', default runtime
test_gnoga.gpr:1:06: unknown project file: "Gnoga"
gprbuild: "test_gnoga.gpr" processing failed"

I haven't gotten to building gnoga yet because gprbuild isn't working,
but I did make sure to point to my /bin dir in the path and I can see
gcc, gnat, etc.

Is there some sort of configuration I need to setup for gprbuild to find
ada/gnat besides setting the PATH variable?  


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

* Re: Setting up GPRBUILD for Ada in mingw64
  2017-07-12  0:26 Setting up GPRBUILD for Ada in mingw64 Jere
@ 2017-07-12  6:50 ` Simon Wright
  2017-07-12 13:05   ` Jere
  2017-07-12 13:09   ` Jere
  2017-07-12  6:54 ` Simon Wright
  1 sibling, 2 replies; 6+ messages in thread
From: Simon Wright @ 2017-07-12  6:50 UTC (permalink / raw)


Jere <jhb.chat@gmail.com> writes:

> but when I tried to run a simple:
>
> gprbuild -P test_gnoga.gpr
>
> or any gpr file for that matter, I get the following error
>
> "Error: no native compiler found for language 'ada', default runtime
> test_gnoga.gpr:1:06: unknown project file: "Gnoga"
> gprbuild: "test_gnoga.gpr" processing failed"

gprbuild uses gprconfig to work out what compilers are
available. gprconfig probes the environment in various ways, for example
by examining the output of "gcc -dumpmachine".

Try running "gprconfig -v foo.gpr" and see whether (a) the compiler
you've installed is found at all, (b) [if you can! the output can be a
bit terse] why it was rejected.

A while back you had to say "gprbuild --target=<target>" (where <target>
is the output of "gcc -dumpmachine", e.g. x86_64-apple-darwin14.5.0) if
gprbuild was built with a different compiler than the one you have on
your PATH, but the pattern matching has got a lot better since then.

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

* Re: Setting up GPRBUILD for Ada in mingw64
  2017-07-12  0:26 Setting up GPRBUILD for Ada in mingw64 Jere
  2017-07-12  6:50 ` Simon Wright
@ 2017-07-12  6:54 ` Simon Wright
  1 sibling, 0 replies; 6+ messages in thread
From: Simon Wright @ 2017-07-12  6:54 UTC (permalink / raw)


Jere <jhb.chat@gmail.com> writes:

> Is there some sort of configuration I need to setup for gprbuild to
> find ada/gnat besides setting the PATH variable?

The configuration is in $prefix/share/gprconfig/; probably
compilers.xml. Not for the faint-hearted.


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

* Re: Setting up GPRBUILD for Ada in mingw64
  2017-07-12  6:50 ` Simon Wright
@ 2017-07-12 13:05   ` Jere
  2017-07-12 13:09   ` Jere
  1 sibling, 0 replies; 6+ messages in thread
From: Jere @ 2017-07-12 13:05 UTC (permalink / raw)


On Wednesday, July 12, 2017 at 2:50:10 AM UTC-4, Simon Wright wrote:
> Jere writes:
> 
> > but when I tried to run a simple:
> >
> > gprbuild -P test_gnoga.gpr
> >
> > or any gpr file for that matter, I get the following error
> >
> > "Error: no native compiler found for language 'ada', default runtime
> > test_gnoga.gpr:1:06: unknown project file: "Gnoga"
> > gprbuild: "test_gnoga.gpr" processing failed"
> 
> gprbuild uses gprconfig to work out what compilers are
> available. gprconfig probes the environment in various ways, for example
> by examining the output of "gcc -dumpmachine".
> 
> Try running "gprconfig -v foo.gpr" and see whether (a) the compiler
> you've installed is found at all, (b) [if you can! the output can be a
> bit terse] why it was rejected.

Here was my output:
$ gprbuild -v test_gnoga.gpr
GPRBUILD GPL 2015 (20150428) (i686-pc-mingw32)
Copyright (C) 2004-2015, Free Software Foundation, Inc.
 24 lines: No errors
gprconfig --batch -o D:\Program_Files\msys64\home\Jere\Test_Gnoga\obj\auto.cgpr                                                                  --target=x86-windows --config=ada,,
Error: no native compiler found for language 'ada', default runtime
Creating configuration file: D:\Program_Files\msys64\home\Jere\Test_Gnoga\obj\au                                                                 to.cgpr
Checking configuration D:\Program_Files\msys64\home\Jere\Test_Gnoga\obj\auto.cgp                                                                 r
Setting the default project search directories

==============Error messages for project file: D:\Program_Files\msys64\home\Jere                                                                 \Test_Gnoga\test_gnoga.gpr
     1. with "Gnoga";
             |
        >>> unknown project file: "Gnoga"

 24 lines: 1 error
gprbuild: "test_gnoga.gpr" processing failed


Note that the version of GCC/GNAT that I am using is 7.1.  
I did try building gprbuild from the adacore git repo, but 
with little success, which is why I grabbed the gnoga one.

Normally my taget has x86_64 in it but that one just says x86 in it.  
I am guessing that is the culprit?

> 
> A while back you had to say "gprbuild --target=<target>" (where <target>
> is the output of "gcc -dumpmachine", e.g. x86_64-apple-darwin14.5.0) if
> gprbuild was built with a different compiler than the one you have on
> your PATH, but the pattern matching has got a lot better since then.

Yeah, I started looking through that at one point, but I 
really couldn't make heads or tails out of what I was 
supposed to change.  I'll try and keep looking through that.

gcc outputs:  x86_64-w64-mingw32

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

* Re: Setting up GPRBUILD for Ada in mingw64
  2017-07-12  6:50 ` Simon Wright
  2017-07-12 13:05   ` Jere
@ 2017-07-12 13:09   ` Jere
  2017-08-29 14:16     ` Jere
  1 sibling, 1 reply; 6+ messages in thread
From: Jere @ 2017-07-12 13:09 UTC (permalink / raw)


On Wednesday, July 12, 2017 at 2:50:10 AM UTC-4, Simon Wright wrote:
> Jere writes:
> 
> > but when I tried to run a simple:
> >
> > gprbuild -P test_gnoga.gpr
> >
> > or any gpr file for that matter, I get the following error
> >
> > "Error: no native compiler found for language 'ada', default runtime
> > test_gnoga.gpr:1:06: unknown project file: "Gnoga"
> > gprbuild: "test_gnoga.gpr" processing failed"
> 
> gprbuild uses gprconfig to work out what compilers are
> available. gprconfig probes the environment in various ways, for example
> by examining the output of "gcc -dumpmachine".
> 
> Try running "gprconfig -v foo.gpr" and see whether (a) the compiler
> you've installed is found at all, (b) [if you can! the output can be a
> bit terse] why it was rejected.
> 


Sorry, the earlier attempt had bad formatting.  Hopefully this looks better:
$ gprbuild -v test_gnoga.gpr
GPRBUILD GPL 2015 (20150428) (i686-pc-mingw32)
Copyright (C) 2004-2015, Free Software Foundation, Inc.
 24 lines: No errors
gprconfig --batch -o D:\Program_Files\msys64\home\Jere\Test_Gnoga\obj\auto.cgpr                                                                  
--target=x86-windows --config=ada,,
Error: no native compiler found for language 'ada', default runtime
Creating configuration file: D:\Program_Files\msys64\home\Jere\Test_Gnoga\obj\
auto.cgpr
Checking configuration D:\Program_Files\msys64\home\Jere\Test_Gnoga\obj\
auto.cgpr
Setting the default project search directories

==============Error messages for project file: D:\Program_Files\msys64\home\
Jere\test_gnoga.gpr
     1. with "Gnoga";
             |
        >>> unknown project file: "Gnoga"

 24 lines: 1 error
gprbuild: "test_gnoga.gpr" processing failed


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

* Re: Setting up GPRBUILD for Ada in mingw64
  2017-07-12 13:09   ` Jere
@ 2017-08-29 14:16     ` Jere
  0 siblings, 0 replies; 6+ messages in thread
From: Jere @ 2017-08-29 14:16 UTC (permalink / raw)


On Wednesday, July 12, 2017 at 9:09:56 AM UTC-4, Jere wrote:
> On Wednesday, July 12, 2017 at 2:50:10 AM UTC-4, Simon Wright wrote:
> > Jere writes:
> > 
> > > but when I tried to run a simple:
> > >
> > > gprbuild -P test_gnoga.gpr
> > >
> > > or any gpr file for that matter, I get the following error
> > >
> > > "Error: no native compiler found for language 'ada', default runtime
> > > test_gnoga.gpr:1:06: unknown project file: "Gnoga"
> > > gprbuild: "test_gnoga.gpr" processing failed"
> > 
> > gprbuild uses gprconfig to work out what compilers are
> > available. gprconfig probes the environment in various ways, for example
> > by examining the output of "gcc -dumpmachine".
> > 
> > Try running "gprconfig -v foo.gpr" and see whether (a) the compiler
> > you've installed is found at all, (b) [if you can! the output can be a
> > bit terse] why it was rejected.
> > 
> 
> 
> Sorry, the earlier attempt had bad formatting.  Hopefully this looks better:
> $ gprbuild -v test_gnoga.gpr
> GPRBUILD GPL 2015 (20150428) (i686-pc-mingw32)
> Copyright (C) 2004-2015, Free Software Foundation, Inc.
>  24 lines: No errors
> gprconfig --batch -o D:\Program_Files\msys64\home\Jere\Test_Gnoga\obj\auto.cgpr                                                                  
> --target=x86-windows --config=ada,,
> Error: no native compiler found for language 'ada', default runtime
> Creating configuration file: D:\Program_Files\msys64\home\Jere\Test_Gnoga\obj\
> auto.cgpr
> Checking configuration D:\Program_Files\msys64\home\Jere\Test_Gnoga\obj\
> auto.cgpr
> Setting the default project search directories
> 
> ==============Error messages for project file: D:\Program_Files\msys64\home\
> Jere\test_gnoga.gpr
>      1. with "Gnoga";
>              |
>         >>> unknown project file: "Gnoga"
> 
>  24 lines: 1 error
> gprbuild: "test_gnoga.gpr" processing failed

So after a month or so playing with this, I finally at 
least got a workaround going.  I was never able to get 
gprbuild to compile correctly, so I went back to trying 
to get this version of gprbuild to work with my target.

My target ended up being x86_64-w64-mingw32 instead of 
the x86-windows specified in the -v output.  I looked 
up gprconfig in the manual and ended up using:

$ gprconfig --target=x86_64-w64-mingw32 --config=Ada batch

to generate a .cgpr file (I selected all the options before 
saving), which I renamed to default.cgpr and placed it
in my /msys64/mingw64/share/gpr folder.  This causes gprbuild 
and related executables to use my target when running.  
Now I am able to use gprbuild with mingw64 and GCC 7.2 
on Windows 10.  Yay!

I still wish I could have gotten it to build correctly, but 
I'll take what I can get for now.

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

end of thread, other threads:[~2017-08-29 14:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-12  0:26 Setting up GPRBUILD for Ada in mingw64 Jere
2017-07-12  6:50 ` Simon Wright
2017-07-12 13:05   ` Jere
2017-07-12 13:09   ` Jere
2017-08-29 14:16     ` Jere
2017-07-12  6:54 ` Simon Wright

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