comp.lang.ada
 help / color / mirror / Atom feed
* Cygwin grpbuild problems
@ 2016-10-17  6:18 Maciej Sobczak
  2016-10-17  7:25 ` Dmitry A. Kazakov
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Maciej Sobczak @ 2016-10-17  6:18 UTC (permalink / raw)


Hi,

I tried to compile an older project of mine on Cygwin with GNAT 5.4.0.
I got the folliwing two messages:

    no languages defined for this project
    warning: libraries are not supported on this platform

(note: no shared libraries are involved, only static ones)
I was able to find these two messages mentioned in discussion forums in relation to other projects and to other platforms, but no obvious solutions was proposed there.
Did anybody found the same problem on Cygwin?

-- 
Maciej Sobczak * http://www.inspirel.com


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

* Re: Cygwin grpbuild problems
  2016-10-17  6:18 Cygwin grpbuild problems Maciej Sobczak
@ 2016-10-17  7:25 ` Dmitry A. Kazakov
  2016-10-17  9:22 ` Mark Lorenzen
  2016-10-17 17:25 ` Simon Wright
  2 siblings, 0 replies; 12+ messages in thread
From: Dmitry A. Kazakov @ 2016-10-17  7:25 UTC (permalink / raw)


On 17/10/2016 08:18, Maciej Sobczak wrote:

> I tried to compile an older project of mine on Cygwin with GNAT 5.4.0.
> I got the folliwing two messages:
>
>     no languages defined for this project
>     warning: libraries are not supported on this platform
>
> (note: no shared libraries are involved, only static ones)
> I was able to find these two messages mentioned in discussion forums
> in relation to other projects and to other platforms, but no obvious
> solutions was proposed there.
> Did anybody found the same problem on Cygwin?

Not with Cygwin but pretty frequently gprbuild cannot find Ada compiler 
which leads to such confusing messages.

Sometimes it can be healed using gprconfig. In some cases by passing a 
configuration file to gprbuild.

I was a big fan of

    ln -s /usr/bin/gnatmake /usr/bin/gprbuild

(:-)) Unfortunately this method does not always work.

BTW, gprbuild (rather GNAT hash tables it uses) has a bug which causes 
Constraint_Error in namet.adb while parsing project file. If you run 
into this, then only gnatmake helps.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de

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

* Re: Cygwin grpbuild problems
  2016-10-17  6:18 Cygwin grpbuild problems Maciej Sobczak
  2016-10-17  7:25 ` Dmitry A. Kazakov
@ 2016-10-17  9:22 ` Mark Lorenzen
  2016-10-17 13:11   ` Maciej Sobczak
  2016-10-17 17:25 ` Simon Wright
  2 siblings, 1 reply; 12+ messages in thread
From: Mark Lorenzen @ 2016-10-17  9:22 UTC (permalink / raw)


On Monday, October 17, 2016 at 8:19:08 AM UTC+2, Maciej Sobczak wrote:
> Hi,
> 
> I tried to compile an older project of mine on Cygwin with GNAT 5.4.0.
> I got the folliwing two messages:
> 
>     no languages defined for this project
>     warning: libraries are not supported on this platform
> 
> (note: no shared libraries are involved, only static ones)
> I was able to find these two messages mentioned in discussion forums in relation to other projects and to other platforms, but no obvious solutions was proposed there.

Did you declare the used languages in the project file?

Regards,

Mark L


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

* Re: Cygwin grpbuild problems
  2016-10-17  9:22 ` Mark Lorenzen
@ 2016-10-17 13:11   ` Maciej Sobczak
  2016-10-17 13:30     ` Mark Lorenzen
  0 siblings, 1 reply; 12+ messages in thread
From: Maciej Sobczak @ 2016-10-17 13:11 UTC (permalink / raw)



> Did you declare the used languages in the project file?

I am using Ada and I expect the dedicated Ada tool to somehow figure this out. Especially in a project where the source directory contains *only* Ada files.

Most importantly, this project compiled without problems on another platform. I remember not long ago (actually, this is a recurring subject) we have been discussing the advantages of Ada in the area of long-term maintenance and portability. Ada, the language, might have some nice features here, but gnatmake/gprbuild spoil this in a big way.

https://www.google.com/search?q=gprbuild+no+languages+defined+for+this+project

https://www.google.com/search?q=gprbuild+libraries+are+not+supported+on+this+platform

The above queries show that lots of people were having similar issues, for a long time, which means that gprbuild is not reliable and cannot be trusted in multiplatform or long-term projects.
Time to move back to Makefiles, perhaps?

-- 
Maciej Sobczak * http://www.inspirel.com


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

* Re: Cygwin grpbuild problems
  2016-10-17 13:11   ` Maciej Sobczak
@ 2016-10-17 13:30     ` Mark Lorenzen
  0 siblings, 0 replies; 12+ messages in thread
From: Mark Lorenzen @ 2016-10-17 13:30 UTC (permalink / raw)


On Monday, October 17, 2016 at 3:11:51 PM UTC+2, Maciej Sobczak wrote:
> > Did you declare the used languages in the project file?
> 
> I am using Ada and I expect the dedicated Ada tool to somehow figure this out. Especially in a project where the source directory contains *only* Ada files.

As I understand it, gnatmake was an Ada-only builder and it was not possible (or necessary) to declare the list of used languages. Gprbuild is a multi-language builder.

The only times I have seen the error message you posted, was when I had forgotten to declare the languages used. When adding the following line it worked fine:

for Languages use ("Ada");

However the gprbuild manual (http://docs.adacore.com/gprbuild-docs/html/gprbuild_ug.html) hints that it shouldn't be necessary when it is an ada-only project (see section 2.2.1).

As Dmitry mentionen you should have an Ada compiler in your PATH in order for gprbuild to find it.

> Most importantly, this project compiled without problems on another platform. I remember not long ago (actually, this is a recurring subject) we have been discussing the advantages of Ada in the area of long-term maintenance and portability. Ada, the language, might have some nice features here, but gnatmake/gprbuild spoil this in a big way.

I don't know what problems you have encountered using gprbuild, but we are happy with it. We haven't tried to port an existing project to a new platform though.

Regards,

Mark L


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

* Re: Cygwin grpbuild problems
  2016-10-17  6:18 Cygwin grpbuild problems Maciej Sobczak
  2016-10-17  7:25 ` Dmitry A. Kazakov
  2016-10-17  9:22 ` Mark Lorenzen
@ 2016-10-17 17:25 ` Simon Wright
  2016-10-18  6:18   ` Maciej Sobczak
  2 siblings, 1 reply; 12+ messages in thread
From: Simon Wright @ 2016-10-17 17:25 UTC (permalink / raw)


Maciej Sobczak <see.my.homepage@gmail.com> writes:

> I tried to compile an older project of mine on Cygwin with GNAT 5.4.0.
> I got the folliwing two messages:
>
>     no languages defined for this project
>     warning: libraries are not supported on this platform
>
> (note: no shared libraries are involved, only static ones)

The first message is the important one; after all, if no compiler,
libraries certainly won't be supported (by this toolset).

> Did anybody found the same problem on Cygwin?

No, but you've probably got a mismatch between the complicated rules
that gprbuild (really, gprconfig) uses to determine what compiler to use
and the compiler you want to use. Rules in
$prefix/share/gprconfig/compilers.xml.

Are you using a gprbuild corresponding to (GCC?) 4.5.0? I'd guess not.

If you say 'gcc -dumpmachine' to your 4.5.0 compiler, what does it say?

If you say 'gprconfig -v', what does it say it's looking for?

Here, I see

[...]
Parsing file /opt/gcc-4.8.1/share/gprconfig/targetset.xml
Parsing file /opt/gcc-4.8.1/share/gprconfig/windres.xml
Only compilers matching target x86_64-apple-darwin12 will be preserved
Will examine P /opt/gcc-4.8.1/bin
Will examine P /opt/gnat-gpl-2016/bin
Will examine P /usr/local/bin
[...]

You may be able to persuade gprconfig to use your compiler by using
--target={something matching what your compiler reports}. I'm not sure
what the actual matching command is; complex stuff in compilers.xml.

gprbuild passes the target setting to gprconfig. You can supply it on
the command line (tedious, easy to forget), in a makefile, or in the
project file

   for Target use "whatever-machine";


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

* Re: Cygwin grpbuild problems
  2016-10-17 17:25 ` Simon Wright
@ 2016-10-18  6:18   ` Maciej Sobczak
  2016-10-18  7:27     ` Dmitry A. Kazakov
  2016-10-18 11:05     ` Simon Wright
  0 siblings, 2 replies; 12+ messages in thread
From: Maciej Sobczak @ 2016-10-18  6:18 UTC (permalink / raw)


> > Did anybody found the same problem on Cygwin?
> 
> No, but you've probably got a mismatch between the complicated rules
> that gprbuild (really, gprconfig)

Yes. After investigating the output from gprconfig I have realized that gprbuild and gprconfig do not exist at all. They were not installed as part of GNAT and I cannot find them in the list of packages available for installation.
Anybody knows where I can find it?

The fact that I got the error messages at all is that I was able to invoke gprbuild from my other Windows GNAT installation, which is further down the list of search paths, and this is how the tools got confused.

Interestingly, gnatmake works fine, except for:

warning: gnatmake -P is obsolete and will not be available in the next release;
use gprbuild instead

Sure. :-)

-- 
Maciej Sobczak * http://www.inspirel.com

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

* Re: Cygwin grpbuild problems
  2016-10-18  6:18   ` Maciej Sobczak
@ 2016-10-18  7:27     ` Dmitry A. Kazakov
  2016-10-18  7:33       ` G.B.
  2016-10-18 11:05     ` Simon Wright
  1 sibling, 1 reply; 12+ messages in thread
From: Dmitry A. Kazakov @ 2016-10-18  7:27 UTC (permalink / raw)


On 18/10/2016 08:18, Maciej Sobczak wrote:

> Yes. After investigating the output from gprconfig I have realized
> that gprbuild and gprconfig do not exist at all. They were not installed
> as part of GNAT and I cannot find them in the list of packages available
> for installation.

> Anybody knows where I can find it? >
> The fact that I got the error messages at all is that I was able to
> invoke gprbuild from my other Windows GNAT installation, which is
> further down the list of search paths, and this is how the tools got
> confused.

Windows gprbuild should work if you configure it for your compiler.

> warning: gnatmake -P is obsolete and will not be available in the next release;
> use gprbuild instead

ln -s then (:-))

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de

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

* Re: Cygwin grpbuild problems
  2016-10-18  7:27     ` Dmitry A. Kazakov
@ 2016-10-18  7:33       ` G.B.
  2016-10-18 10:58         ` Simon Wright
  0 siblings, 1 reply; 12+ messages in thread
From: G.B. @ 2016-10-18  7:33 UTC (permalink / raw)


On 18.10.16 09:27, Dmitry A. Kazakov wrote:
>> warning: gnatmake -P is obsolete and will not be available in the next release;
>> use gprbuild instead
>
> ln -s then (:-))

Wasn't it considered a good idea, e.g. for teaching and
learning, to known how to compile a simple Ada source with
a simple command, such as gnatmake?

Now we get to learn source code project management first,
or use some vendor's IDE. Newcomers won't know what
a simple compilation process looks like, or what
its inputs and outputs will be.

What do GAP members say?

-- 
"HOTDOGS ARE NOT BOOKMARKS"
Springfield Elementary teaching staff


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

* Re: Cygwin grpbuild problems
  2016-10-18  7:33       ` G.B.
@ 2016-10-18 10:58         ` Simon Wright
  0 siblings, 0 replies; 12+ messages in thread
From: Simon Wright @ 2016-10-18 10:58 UTC (permalink / raw)


"G.B." <bauhaus@futureapps.invalid> writes:

> On 18.10.16 09:27, Dmitry A. Kazakov wrote:
>>> warning: gnatmake -P is obsolete and will not be available in the
>>> next release;
>>> use gprbuild instead
>>
>> ln -s then (:-))
>
> Wasn't it considered a good idea, e.g. for teaching and learning, to
> known how to compile a simple Ada source with a simple command, such
> as gnatmake?

But you still can. It's GPRs that won't be supported. (Not that I think
this is a great idea :-)


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

* Re: Cygwin grpbuild problems
  2016-10-18  6:18   ` Maciej Sobczak
  2016-10-18  7:27     ` Dmitry A. Kazakov
@ 2016-10-18 11:05     ` Simon Wright
  2016-10-18 11:24       ` Mark Lorenzen
  1 sibling, 1 reply; 12+ messages in thread
From: Simon Wright @ 2016-10-18 11:05 UTC (permalink / raw)


Maciej Sobczak <see.my.homepage@gmail.com> writes:

> Yes. After investigating the output from gprconfig I have realized
> that gprbuild and gprconfig do not exist at all. They were not
> installed as part of GNAT and I cannot find them in the list of
> packages available for installation.
> Anybody knows where I can find it?

https://github.com/AdaCore/gprbuild

But now you need xmlada to build it, and you need gprbuild to build
xmlada. Older xmlada used to build with gnatmake, so you could bootstrap
if you felt masochistic.

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

* Re: Cygwin grpbuild problems
  2016-10-18 11:05     ` Simon Wright
@ 2016-10-18 11:24       ` Mark Lorenzen
  0 siblings, 0 replies; 12+ messages in thread
From: Mark Lorenzen @ 2016-10-18 11:24 UTC (permalink / raw)


On Tuesday, October 18, 2016 at 1:05:31 PM UTC+2, Simon Wright wrote:
> 
> But now you need xmlada to build it, and you need gprbuild to build
> xmlada. Older xmlada used to build with gnatmake, so you could bootstrap
> if you felt masochistic.

Gprbuild can be downloaded from the AdaCore Libre site. There is no Cygwin build though. Will a Windows build work?

Regards,

Mark L


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

end of thread, other threads:[~2016-10-18 11:24 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-17  6:18 Cygwin grpbuild problems Maciej Sobczak
2016-10-17  7:25 ` Dmitry A. Kazakov
2016-10-17  9:22 ` Mark Lorenzen
2016-10-17 13:11   ` Maciej Sobczak
2016-10-17 13:30     ` Mark Lorenzen
2016-10-17 17:25 ` Simon Wright
2016-10-18  6:18   ` Maciej Sobczak
2016-10-18  7:27     ` Dmitry A. Kazakov
2016-10-18  7:33       ` G.B.
2016-10-18 10:58         ` Simon Wright
2016-10-18 11:05     ` Simon Wright
2016-10-18 11:24       ` Mark Lorenzen

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