* Re: Upgrading GNAT GPS 5.0 -> 5.3
2014-08-14 7:19 ` Egil H H
@ 2014-08-14 7:32 ` Simon Wright
2014-08-14 8:00 ` Dmitry A. Kazakov
` (2 subsequent siblings)
3 siblings, 0 replies; 35+ messages in thread
From: Simon Wright @ 2014-08-14 7:32 UTC (permalink / raw)
Egil H H <ehh.public@gmail.com> writes:
> So, try to use Linker.Switches or Linker.Default_Switches instead of
> Linker.Linker_Options.
I'd have used Linker.Default_Switches ("ada").
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: Upgrading GNAT GPS 5.0 -> 5.3
2014-08-14 7:19 ` Egil H H
2014-08-14 7:32 ` Simon Wright
@ 2014-08-14 8:00 ` Dmitry A. Kazakov
2014-08-14 12:14 ` Victor Porton
2014-08-14 12:18 ` Victor Porton
3 siblings, 0 replies; 35+ messages in thread
From: Dmitry A. Kazakov @ 2014-08-14 8:00 UTC (permalink / raw)
On Thu, 14 Aug 2014 00:19:32 -0700 (PDT), Egil H H wrote:
> On Wednesday, August 13, 2014 10:10:31 PM UTC+2, Victor Porton wrote:
>
>> package Linker is
>>
>> for Linker_Options use ("-lraptor2");
>>
>> end Linker;
>>
> So, try to use Linker.Switches or Linker.Default_Switches instead of Linker.Linker_Options.
No. Libraries should not be specified with Default_Switches unless in small
self-contained projects.
Since it is bindings, its project (the library project to be used by
clients) must have Linker_Options in its package Linker.
A test project, which is a client, must "with" the library project. The
linker switches will be adjusted to link to -lraptor2 as necessary.
--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: Upgrading GNAT GPS 5.0 -> 5.3
2014-08-14 7:19 ` Egil H H
2014-08-14 7:32 ` Simon Wright
2014-08-14 8:00 ` Dmitry A. Kazakov
@ 2014-08-14 12:14 ` Victor Porton
2014-08-14 12:18 ` Victor Porton
3 siblings, 0 replies; 35+ messages in thread
From: Victor Porton @ 2014-08-14 12:14 UTC (permalink / raw)
Egil H H wrote:
> On Wednesday, August 13, 2014 10:10:31 PM UTC+2, Victor Porton wrote:
>
>> package Linker is
>>
>> for Linker_Options use ("-lraptor2");
>>
>> end Linker;
>>
>
> From the GPRbuild User's Guide (emphasis mine):
> Linker.Linker_Options:
> This attribute specifies additional switches to be given to the linker
> when linking an executable.
> *It*is*ignored*when*defined*in*the*main*project* and taken into account in
> all other projects that are imported directly or indirectly. These
> switches complement the Linker.Switches defined in the main project. This
> is useful when a particular subsystem depends on an external library:
> adding this dependency as a Linker_Options in the project of the subsystem
> is more convenient than adding it to all the Linker.Switches of the main
> projects that depend upon this subsystem.
>
> So, try to use Linker.Switches or Linker.Default_Switches instead of
> Linker.Linker_Options.
The solution was to add -lraptor2 to the Librdf subproject (and remove it
for the main project Test).
I don't know why it works this way.
--
Victor Porton - http://portonvictor.org
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: Upgrading GNAT GPS 5.0 -> 5.3
2014-08-14 7:19 ` Egil H H
` (2 preceding siblings ...)
2014-08-14 12:14 ` Victor Porton
@ 2014-08-14 12:18 ` Victor Porton
2014-08-14 15:56 ` Dmitry A. Kazakov
3 siblings, 1 reply; 35+ messages in thread
From: Victor Porton @ 2014-08-14 12:18 UTC (permalink / raw)
Egil H H wrote:
> On Wednesday, August 13, 2014 10:10:31 PM UTC+2, Victor Porton wrote:
>
>> package Linker is
>>
>> for Linker_Options use ("-lraptor2");
>>
>> end Linker;
>>
>
> From the GPRbuild User's Guide (emphasis mine):
> Linker.Linker_Options:
> This attribute specifies additional switches to be given to the linker
> when linking an executable.
> *It*is*ignored*when*defined*in*the*main*project* and taken into account in
> all other projects that are imported directly or indirectly. These
> switches complement the Linker.Switches defined in the main project. This
> is useful when a particular subsystem depends on an external library:
> adding this dependency as a Linker_Options in the project of the subsystem
> is more convenient than adding it to all the Linker.Switches of the main
> projects that depend upon this subsystem.
I don't understand.
Does this mean that it's impossible to link a library to the main project?!
> So, try to use Linker.Switches or Linker.Default_Switches instead of
> Linker.Linker_Options.
--
Victor Porton - http://portonvictor.org
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: Upgrading GNAT GPS 5.0 -> 5.3
2014-08-14 12:18 ` Victor Porton
@ 2014-08-14 15:56 ` Dmitry A. Kazakov
2014-08-14 15:59 ` Victor Porton
0 siblings, 1 reply; 35+ messages in thread
From: Dmitry A. Kazakov @ 2014-08-14 15:56 UTC (permalink / raw)
On Thu, 14 Aug 2014 15:18:49 +0300, Victor Porton wrote:
> Egil H H wrote:
>
>> On Wednesday, August 13, 2014 10:10:31 PM UTC+2, Victor Porton wrote:
>>
>>> package Linker is
>>>
>>> for Linker_Options use ("-lraptor2");
>>>
>>> end Linker;
>>>
>>
>> From the GPRbuild User's Guide (emphasis mine):
>> Linker.Linker_Options:
>> This attribute specifies additional switches to be given to the linker
>> when linking an executable.
>> *It*is*ignored*when*defined*in*the*main*project* and taken into account in
>> all other projects that are imported directly or indirectly. These
>> switches complement the Linker.Switches defined in the main project. This
>> is useful when a particular subsystem depends on an external library:
>> adding this dependency as a Linker_Options in the project of the subsystem
>> is more convenient than adding it to all the Linker.Switches of the main
>> projects that depend upon this subsystem.
>
> I don't understand.
>
> Does this mean that it's impossible to link a library to the main project?!
It means that the option is intended for library projects not for the
client projects.
--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: Upgrading GNAT GPS 5.0 -> 5.3
2014-08-14 15:56 ` Dmitry A. Kazakov
@ 2014-08-14 15:59 ` Victor Porton
2014-08-14 16:09 ` Dmitry A. Kazakov
0 siblings, 1 reply; 35+ messages in thread
From: Victor Porton @ 2014-08-14 15:59 UTC (permalink / raw)
Dmitry A. Kazakov wrote:
> On Thu, 14 Aug 2014 15:18:49 +0300, Victor Porton wrote:
>
>> Egil H H wrote:
>>
>>> On Wednesday, August 13, 2014 10:10:31 PM UTC+2, Victor Porton wrote:
>>>
>>>> package Linker is
>>>>
>>>> for Linker_Options use ("-lraptor2");
>>>>
>>>> end Linker;
>>>>
>>>
>>> From the GPRbuild User's Guide (emphasis mine):
>>> Linker.Linker_Options:
>>> This attribute specifies additional switches to be given to the linker
>>> when linking an executable.
>>> *It*is*ignored*when*defined*in*the*main*project* and taken into account
>>> in all other projects that are imported directly or indirectly. These
>>> switches complement the Linker.Switches defined in the main project.
>>> This is useful when a particular subsystem depends on an external
>>> library: adding this dependency as a Linker_Options in the project of
>>> the subsystem is more convenient than adding it to all the
>>> Linker.Switches of the main projects that depend upon this subsystem.
>>
>> I don't understand.
>>
>> Does this mean that it's impossible to link a library to the main
>> project?!
>
> It means that the option is intended for library projects not for the
> client projects.
But if I wanted to add linker option -lraptor2 to a non-library project,
what I would need to do?
Many non-library projects need to link to libraries.
--
Victor Porton - http://portonvictor.org
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: Upgrading GNAT GPS 5.0 -> 5.3
2014-08-14 15:59 ` Victor Porton
@ 2014-08-14 16:09 ` Dmitry A. Kazakov
2014-08-14 16:15 ` Victor Porton
0 siblings, 1 reply; 35+ messages in thread
From: Dmitry A. Kazakov @ 2014-08-14 16:09 UTC (permalink / raw)
On Thu, 14 Aug 2014 18:59:48 +0300, Victor Porton wrote:
> Dmitry A. Kazakov wrote:
>
>> On Thu, 14 Aug 2014 15:18:49 +0300, Victor Porton wrote:
>>
>>> Egil H H wrote:
>>>
>>>> On Wednesday, August 13, 2014 10:10:31 PM UTC+2, Victor Porton wrote:
>>>>
>>>>> package Linker is
>>>>>
>>>>> for Linker_Options use ("-lraptor2");
>>>>>
>>>>> end Linker;
>>>>>
>>>>
>>>> From the GPRbuild User's Guide (emphasis mine):
>>>> Linker.Linker_Options:
>>>> This attribute specifies additional switches to be given to the linker
>>>> when linking an executable.
>>>> *It*is*ignored*when*defined*in*the*main*project* and taken into account
>>>> in all other projects that are imported directly or indirectly. These
>>>> switches complement the Linker.Switches defined in the main project.
>>>> This is useful when a particular subsystem depends on an external
>>>> library: adding this dependency as a Linker_Options in the project of
>>>> the subsystem is more convenient than adding it to all the
>>>> Linker.Switches of the main projects that depend upon this subsystem.
>>>
>>> I don't understand.
>>>
>>> Does this mean that it's impossible to link a library to the main
>>> project?!
>>
>> It means that the option is intended for library projects not for the
>> client projects.
>
> But if I wanted to add linker option -lraptor2 to a non-library project,
> what I would need to do?
You never need that for a library. However, you were already answered in
this thread how to do this:
project Messy_Client is
...
package Linker is
for Default_Switches ("ada") use ("-L<some-path>", "-lraptor2");
end Linker;
end Messy_Client;
> Many non-library projects need to link to libraries.
They should *always* use library projects instead of linking directly to
external libraries.
--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: Upgrading GNAT GPS 5.0 -> 5.3
2014-08-14 16:09 ` Dmitry A. Kazakov
@ 2014-08-14 16:15 ` Victor Porton
2014-08-14 16:49 ` Simon Wright
2014-08-14 17:22 ` Dmitry A. Kazakov
0 siblings, 2 replies; 35+ messages in thread
From: Victor Porton @ 2014-08-14 16:15 UTC (permalink / raw)
Dmitry A. Kazakov wrote:
> On Thu, 14 Aug 2014 18:59:48 +0300, Victor Porton wrote:
>
>> Dmitry A. Kazakov wrote:
>>
>>> On Thu, 14 Aug 2014 15:18:49 +0300, Victor Porton wrote:
>>>
>>>> Egil H H wrote:
>>>>
>>>>> On Wednesday, August 13, 2014 10:10:31 PM UTC+2, Victor Porton wrote:
>>>>>
>>>>>> package Linker is
>>>>>>
>>>>>> for Linker_Options use ("-lraptor2");
>>>>>>
>>>>>> end Linker;
>>>>>>
>>>>>
>>>>> From the GPRbuild User's Guide (emphasis mine):
>>>>> Linker.Linker_Options:
>>>>> This attribute specifies additional switches to be given to the linker
>>>>> when linking an executable.
>>>>> *It*is*ignored*when*defined*in*the*main*project* and taken into
>>>>> account in all other projects that are imported directly or
>>>>> indirectly. These switches complement the Linker.Switches defined in
>>>>> the main project. This is useful when a particular subsystem depends
>>>>> on an external library: adding this dependency as a Linker_Options in
>>>>> the project of the subsystem is more convenient than adding it to all
>>>>> the Linker.Switches of the main projects that depend upon this
>>>>> subsystem.
>>>>
>>>> I don't understand.
>>>>
>>>> Does this mean that it's impossible to link a library to the main
>>>> project?!
>>>
>>> It means that the option is intended for library projects not for the
>>> client projects.
>>
>> But if I wanted to add linker option -lraptor2 to a non-library project,
>> what I would need to do?
>
> You never need that for a library. However, you were already answered in
> this thread how to do this:
>
> project Messy_Client is
> ...
> package Linker is
> for Default_Switches ("ada") use ("-L<some-path>", "-lraptor2");
> end Linker;
>
> end Messy_Client;
In GNAT GPS 5.3 this works only if Messy_Client is a library project (and
with Linker_Options instead of Default_Switches).
IN GNAT 5.0 it worked for non-library projects also.
It looks like a bug in GNAT GPS 5.3.
>> Many non-library projects need to link to libraries.
>
> They should *always* use library projects instead of linking directly to
> external libraries.
Why?!
It is completely legit for a non-library project to link to a C library
directly to obtain some functionality from a C library.
I don't understand you.
--
Victor Porton - http://portonvictor.org
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: Upgrading GNAT GPS 5.0 -> 5.3
2014-08-14 16:15 ` Victor Porton
@ 2014-08-14 16:49 ` Simon Wright
2014-08-14 17:18 ` Victor Porton
2014-08-14 17:22 ` Dmitry A. Kazakov
1 sibling, 1 reply; 35+ messages in thread
From: Simon Wright @ 2014-08-14 16:49 UTC (permalink / raw)
Victor Porton <porton@narod.ru> writes:
> Dmitry A. Kazakov wrote:
>
>> On Thu, 14 Aug 2014 18:59:48 +0300, Victor Porton wrote:
>>> But if I wanted to add linker option -lraptor2 to a non-library project,
>>> what I would need to do?
>>
>> You never need that for a library. However, you were already answered in
>> this thread how to do this:
>>
>> project Messy_Client is
>> ...
>> package Linker is
>> for Default_Switches ("ada") use ("-L<some-path>", "-lraptor2");
>> end Linker;
>>
>> end Messy_Client;
>
> In GNAT GPS 5.3 this works only if Messy_Client is a library project (and
> with Linker_Options instead of Default_Switches).
>
> IN GNAT 5.0 it worked for non-library projects also.
>
> It looks like a bug in GNAT GPS 5.3.
Could you please run
gprbuild --version
on the command line and tell us the version it reports.
For example, here I get
$ gprbuild --version
GPRBUILD GPL 2014 (20140331) (x86_64-apple-darwin13)
and I added
package Linker is
for Default_Switches ("ada") use ("-lraptor2");
end Linker;
to an existing non-library project. I don't have libraptor2, so this
failed to link, but the switch was copied through correctly:
gcc test-main.o -lraptor2 -L/usr/lib -ltk8.5 -ltcl8.5 -o test-main
ld: library not found for -lraptor2
>>> Many non-library projects need to link to libraries.
>>
>> They should *always* use library projects instead of linking directly to
>> external libraries.
>
> Why?!
>
> It is completely legit for a non-library project to link to a C
> library directly to obtain some functionality from a C library.
I think Dmitry means that you will find things easier if you use library
projects for external libraries.
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: Upgrading GNAT GPS 5.0 -> 5.3
2014-08-14 16:49 ` Simon Wright
@ 2014-08-14 17:18 ` Victor Porton
0 siblings, 0 replies; 35+ messages in thread
From: Victor Porton @ 2014-08-14 17:18 UTC (permalink / raw)
Simon Wright wrote:
> Victor Porton <porton@narod.ru> writes:
>
>> Dmitry A. Kazakov wrote:
>>
>>> On Thu, 14 Aug 2014 18:59:48 +0300, Victor Porton wrote:
>
>>>> But if I wanted to add linker option -lraptor2 to a non-library
>>>> project, what I would need to do?
>>>
>>> You never need that for a library. However, you were already answered in
>>> this thread how to do this:
>>>
>>> project Messy_Client is
>>> ...
>>> package Linker is
>>> for Default_Switches ("ada") use ("-L<some-path>", "-lraptor2");
>>> end Linker;
>>>
>>> end Messy_Client;
>>
>> In GNAT GPS 5.3 this works only if Messy_Client is a library project (and
>> with Linker_Options instead of Default_Switches).
>>
>> IN GNAT 5.0 it worked for non-library projects also.
>>
>> It looks like a bug in GNAT GPS 5.3.
>
> Could you please run
> gprbuild --version
> on the command line and tell us the version it reports.
>
> For example, here I get
>
> $ gprbuild --version
> GPRBUILD GPL 2014 (20140331) (x86_64-apple-darwin13)
$ gprbuild --version
GPRBUILD 2014 (unknown) (i486-pc-linux-gnu)
Copyright (C) 2004-2014, Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
> and I added
>
> package Linker is
> for Default_Switches ("ada") use ("-lraptor2");
> end Linker;
>
> to an existing non-library project. I don't have libraptor2, so this
> failed to link, but the switch was copied through correctly:
>
> gcc test-main.o -lraptor2 -L/usr/lib -ltk8.5 -ltcl8.5 -o test-main
> ld: library not found for -lraptor2
>
>>>> Many non-library projects need to link to libraries.
>>>
>>> They should *always* use library projects instead of linking directly to
>>> external libraries.
>>
>> Why?!
>>
>> It is completely legit for a non-library project to link to a C
>> library directly to obtain some functionality from a C library.
>
> I think Dmitry means that you will find things easier if you use library
> projects for external libraries.
--
Victor Porton - http://portonvictor.org
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: Upgrading GNAT GPS 5.0 -> 5.3
2014-08-14 16:15 ` Victor Porton
2014-08-14 16:49 ` Simon Wright
@ 2014-08-14 17:22 ` Dmitry A. Kazakov
2014-08-14 17:27 ` Victor Porton
1 sibling, 1 reply; 35+ messages in thread
From: Dmitry A. Kazakov @ 2014-08-14 17:22 UTC (permalink / raw)
On Thu, 14 Aug 2014 19:15:51 +0300, Victor Porton wrote:
> In GNAT GPS 5.3 this works only if Messy_Client is a library project (and
> with Linker_Options instead of Default_Switches).
>
> IN GNAT 5.0 it worked for non-library projects also.
>
> It looks like a bug in GNAT GPS 5.3.
If there is any bugs then in gprbuild. Try to build your project manually:
gnatmake -P<project>.gpr
I am using GPS 6.0.1. I don't remember any problems in earlier versions.
Since you are under Debian a wild guess is that there might be version
mismatch between gcc (and Ada tool chain) and GPS. GPS and gprbuild were
always way outdated under Debian.
I did a quick check. The actual Debian version of GNAT is 4.9. gnat-gps
wants GNAT 4.6 and Gtk 2.24! I wouldn't touch it.
--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: Upgrading GNAT GPS 5.0 -> 5.3
2014-08-14 17:22 ` Dmitry A. Kazakov
@ 2014-08-14 17:27 ` Victor Porton
2014-08-14 17:32 ` Simon Wright
0 siblings, 1 reply; 35+ messages in thread
From: Victor Porton @ 2014-08-14 17:27 UTC (permalink / raw)
Dmitry A. Kazakov wrote:
> On Thu, 14 Aug 2014 19:15:51 +0300, Victor Porton wrote:
>
>> In GNAT GPS 5.3 this works only if Messy_Client is a library project (and
>> with Linker_Options instead of Default_Switches).
>>
>> IN GNAT 5.0 it worked for non-library projects also.
>>
>> It looks like a bug in GNAT GPS 5.3.
>
> If there is any bugs then in gprbuild. Try to build your project manually:
>
> gnatmake -P<project>.gpr
$ gnatmake -Ptest.gpr
test.gpr:10:04: no value defined for "runtime"
test.gpr:10:30: warning: undefined external reference
test.gpr:13:04: no value defined for "mode"
test.gpr:13:36: warning: undefined external reference
librdf.gpr:11:25: warning: undefined external reference
librdf.gpr:12:28: warning: undefined external reference
librdf.gpr:15:04: no value defined for "runtime"
librdf.gpr:15:30: warning: undefined external reference
librdf.gpr:16:04: no value defined for "mode"
librdf.gpr:16:36: warning: undefined external reference
gnatmake: "test.gpr" processing failed
> I am using GPS 6.0.1. I don't remember any problems in earlier versions.
>
> Since you are under Debian a wild guess is that there might be version
> mismatch between gcc (and Ada tool chain) and GPS. GPS and gprbuild were
> always way outdated under Debian.
>
> I did a quick check. The actual Debian version of GNAT is 4.9. gnat-gps
> wants GNAT 4.6 and Gtk 2.24! I wouldn't touch it.
Yes, there is a version mismatch. For example auto-generating body for a
package does not work. Also Outline window in GPS does not work.
--
Victor Porton - http://portonvictor.org
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: Upgrading GNAT GPS 5.0 -> 5.3
2014-08-14 17:27 ` Victor Porton
@ 2014-08-14 17:32 ` Simon Wright
2014-08-14 17:43 ` Victor Porton
0 siblings, 1 reply; 35+ messages in thread
From: Simon Wright @ 2014-08-14 17:32 UTC (permalink / raw)
Victor Porton <porton@narod.ru> writes:
> Dmitry A. Kazakov wrote:
>> If there is any bugs then in gprbuild. Try to build your project manually:
>>
>> gnatmake -P<project>.gpr
>
> $ gnatmake -Ptest.gpr
> test.gpr:10:04: no value defined for "runtime"
> test.gpr:10:30: warning: undefined external reference
> test.gpr:13:04: no value defined for "mode"
> test.gpr:13:36: warning: undefined external reference
> librdf.gpr:11:25: warning: undefined external reference
> librdf.gpr:12:28: warning: undefined external reference
> librdf.gpr:15:04: no value defined for "runtime"
> librdf.gpr:15:30: warning: undefined external reference
> librdf.gpr:16:04: no value defined for "mode"
> librdf.gpr:16:36: warning: undefined external reference
> gnatmake: "test.gpr" processing failed
You need to define the scenario variables runtime & mode:
$ gnatmake -Ptest.gpr -Xruntime=... -Xmode=...
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: Upgrading GNAT GPS 5.0 -> 5.3
2014-08-14 17:32 ` Simon Wright
@ 2014-08-14 17:43 ` Victor Porton
2014-08-14 20:03 ` Dmitry A. Kazakov
2014-08-14 20:50 ` Simon Wright
0 siblings, 2 replies; 35+ messages in thread
From: Victor Porton @ 2014-08-14 17:43 UTC (permalink / raw)
Simon Wright wrote:
> Victor Porton <porton@narod.ru> writes:
>
>> Dmitry A. Kazakov wrote:
>
>>> If there is any bugs then in gprbuild. Try to build your project
>>> manually:
>>>
>>> gnatmake -P<project>.gpr
>>
>> $ gnatmake -Ptest.gpr
>> test.gpr:10:04: no value defined for "runtime"
>> test.gpr:10:30: warning: undefined external reference
>> test.gpr:13:04: no value defined for "mode"
>> test.gpr:13:36: warning: undefined external reference
>> librdf.gpr:11:25: warning: undefined external reference
>> librdf.gpr:12:28: warning: undefined external reference
>> librdf.gpr:15:04: no value defined for "runtime"
>> librdf.gpr:15:30: warning: undefined external reference
>> librdf.gpr:16:04: no value defined for "mode"
>> librdf.gpr:16:36: warning: undefined external reference
>> gnatmake: "test.gpr" processing failed
>
> You need to define the scenario variables runtime & mode:
>
> $ gnatmake -Ptest.gpr -Xruntime=... -Xmode=...
$ gnatmake -Ptest.gpr -Xruntime=full -Xmode=checks
test.gpr:10:04: no value defined for "runtime"
test.gpr:10:30: warning: undefined external reference
test.gpr:13:04: no value defined for "mode"
test.gpr:13:36: warning: undefined external reference
librdf.gpr:11:25: warning: undefined external reference
librdf.gpr:12:28: warning: undefined external reference
librdf.gpr:15:04: no value defined for "runtime"
librdf.gpr:15:30: warning: undefined external reference
librdf.gpr:16:04: no value defined for "mode"
librdf.gpr:16:36: warning: undefined external reference
gnatmake: "test.gpr" processing failed
--
Victor Porton - http://portonvictor.org
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: Upgrading GNAT GPS 5.0 -> 5.3
2014-08-14 17:43 ` Victor Porton
@ 2014-08-14 20:03 ` Dmitry A. Kazakov
2014-08-14 20:27 ` Victor Porton
2014-08-15 6:36 ` Simon Wright
2014-08-14 20:50 ` Simon Wright
1 sibling, 2 replies; 35+ messages in thread
From: Dmitry A. Kazakov @ 2014-08-14 20:03 UTC (permalink / raw)
On Thu, 14 Aug 2014 20:43:02 +0300, Victor Porton wrote:
> Simon Wright wrote:
>
>> Victor Porton <porton@narod.ru> writes:
>>
>>> Dmitry A. Kazakov wrote:
>>
>>>> If there is any bugs then in gprbuild. Try to build your project
>>>> manually:
>>>>
>>>> gnatmake -P<project>.gpr
>>>
>>> $ gnatmake -Ptest.gpr
>>> test.gpr:10:04: no value defined for "runtime"
>>> test.gpr:10:30: warning: undefined external reference
>>> test.gpr:13:04: no value defined for "mode"
>>> test.gpr:13:36: warning: undefined external reference
>>> librdf.gpr:11:25: warning: undefined external reference
>>> librdf.gpr:12:28: warning: undefined external reference
>>> librdf.gpr:15:04: no value defined for "runtime"
>>> librdf.gpr:15:30: warning: undefined external reference
>>> librdf.gpr:16:04: no value defined for "mode"
>>> librdf.gpr:16:36: warning: undefined external reference
>>> gnatmake: "test.gpr" processing failed
>>
>> You need to define the scenario variables runtime & mode:
>>
>> $ gnatmake -Ptest.gpr -Xruntime=... -Xmode=...
>
> $ gnatmake -Ptest.gpr -Xruntime=full -Xmode=checks
> test.gpr:10:04: no value defined for "runtime"
I believe it is case-sensitive:
gnatmake -Ptest.gpr -XRUNTIME=full -XMODE=...
BTW, you can set a default value, e.g.:
Runtime : Runtime_Type := external ("RUNTIME", "default");
And since the library project Librdf has:
for Linker_Options use ("-lraptor2");
(why is it Librdf and not LibRaptor?)
You do not need to repeat that in the project Test. Especially because
Linker_Options won't have no effect there, anyway.
The only thing you need in a test project is
for Main use ("run_all_tests.adb");
anything else is just not needed.
P.S. If you are going to package the stuff, you would have to generate
project files for each target individually because Linux distributions have
their own unique policies regarding project files, directories etc. You
won't be able to have one project file for all.
--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: Upgrading GNAT GPS 5.0 -> 5.3
2014-08-14 20:03 ` Dmitry A. Kazakov
@ 2014-08-14 20:27 ` Victor Porton
2014-08-15 7:00 ` Dmitry A. Kazakov
2014-08-15 6:36 ` Simon Wright
1 sibling, 1 reply; 35+ messages in thread
From: Victor Porton @ 2014-08-14 20:27 UTC (permalink / raw)
Dmitry A. Kazakov wrote:
> On Thu, 14 Aug 2014 20:43:02 +0300, Victor Porton wrote:
>
>> Simon Wright wrote:
>>
>>> Victor Porton <porton@narod.ru> writes:
>>>
>>>> Dmitry A. Kazakov wrote:
>>>
>>>>> If there is any bugs then in gprbuild. Try to build your project
>>>>> manually:
>>>>>
>>>>> gnatmake -P<project>.gpr
>>>>
>>>> $ gnatmake -Ptest.gpr
>>>> test.gpr:10:04: no value defined for "runtime"
>>>> test.gpr:10:30: warning: undefined external reference
>>>> test.gpr:13:04: no value defined for "mode"
>>>> test.gpr:13:36: warning: undefined external reference
>>>> librdf.gpr:11:25: warning: undefined external reference
>>>> librdf.gpr:12:28: warning: undefined external reference
>>>> librdf.gpr:15:04: no value defined for "runtime"
>>>> librdf.gpr:15:30: warning: undefined external reference
>>>> librdf.gpr:16:04: no value defined for "mode"
>>>> librdf.gpr:16:36: warning: undefined external reference
>>>> gnatmake: "test.gpr" processing failed
>>>
>>> You need to define the scenario variables runtime & mode:
>>>
>>> $ gnatmake -Ptest.gpr -Xruntime=... -Xmode=...
>>
>> $ gnatmake -Ptest.gpr -Xruntime=full -Xmode=checks
>> test.gpr:10:04: no value defined for "runtime"
>
> I believe it is case-sensitive:
>
> gnatmake -Ptest.gpr -XRUNTIME=full -XMODE=...
gnatmake -Ptest.gpr -XRUNTIME=full -XMODE=Install
works.
> BTW, you can set a default value, e.g.:
>
> Runtime : Runtime_Type := external ("RUNTIME", "default");
>
> And since the library project Librdf has:
>
> for Linker_Options use ("-lraptor2");
>
> (why is it Librdf and not LibRaptor?)
There are three libraries in librdf.org:
Raptor
Rasqal
RDF
> You do not need to repeat that in the project Test. Especially because
> Linker_Options won't have no effect there, anyway.
>
> The only thing you need in a test project is
>
> for Main use ("run_all_tests.adb");
>
> anything else is just not needed.
>
> P.S. If you are going to package the stuff, you would have to generate
> project files for each target individually because Linux distributions
> have their own unique policies regarding project files, directories etc.
> You won't be able to have one project file for all.
Have you notices my Makefile.am?
--
Victor Porton - http://portonvictor.org
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: Upgrading GNAT GPS 5.0 -> 5.3
2014-08-14 20:27 ` Victor Porton
@ 2014-08-15 7:00 ` Dmitry A. Kazakov
2014-08-15 12:06 ` porton.victor
2014-08-16 11:53 ` Stephen Leake
0 siblings, 2 replies; 35+ messages in thread
From: Dmitry A. Kazakov @ 2014-08-15 7:00 UTC (permalink / raw)
On Thu, 14 Aug 2014 23:27:58 +0300, Victor Porton wrote:
> Have you notices my Makefile.am?
Yes. Kill it! No Ada or non-Ada project shall ever use makefiles or
autoconfig tools, IMO.
--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: Upgrading GNAT GPS 5.0 -> 5.3
2014-08-15 7:00 ` Dmitry A. Kazakov
@ 2014-08-15 12:06 ` porton.victor
2014-08-16 11:53 ` Stephen Leake
1 sibling, 0 replies; 35+ messages in thread
From: porton.victor @ 2014-08-15 12:06 UTC (permalink / raw)
On Friday, August 15, 2014 10:00:08 AM UTC+3, Dmitry A. Kazakov wrote:
> On Thu, 14 Aug 2014 23:27:58 +0300, Victor Porton wrote:
>
> > Have you notices my Makefile.am?
>
> Yes. Kill it! No Ada or non-Ada project shall ever use makefiles or
>
> autoconfig tools, IMO.
It is a part of a bigger (multi-language) project which uses automake. It is not in my authority whether to use Automake.
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: Upgrading GNAT GPS 5.0 -> 5.3
2014-08-15 7:00 ` Dmitry A. Kazakov
2014-08-15 12:06 ` porton.victor
@ 2014-08-16 11:53 ` Stephen Leake
1 sibling, 0 replies; 35+ messages in thread
From: Stephen Leake @ 2014-08-16 11:53 UTC (permalink / raw)
"Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> writes:
> On Thu, 14 Aug 2014 23:27:58 +0300, Victor Porton wrote:
>
>> Have you notices my Makefile.am?
>
> Yes. Kill it! No Ada or non-Ada project shall ever use makefiles
I use makefiles all the time. Real projects do more than compile Ada
code; they compile TexInfo, build zip/.tar.gz, push to web sites, tag CM
repositories, run test cases ...
>or
> autoconfig tools, IMO.
This I agree with.
--
-- Stephe
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: Upgrading GNAT GPS 5.0 -> 5.3
2014-08-14 20:03 ` Dmitry A. Kazakov
2014-08-14 20:27 ` Victor Porton
@ 2014-08-15 6:36 ` Simon Wright
1 sibling, 0 replies; 35+ messages in thread
From: Simon Wright @ 2014-08-15 6:36 UTC (permalink / raw)
"Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> writes:
> P.S. If you are going to package the stuff, you would have to generate
> project files for each target individually because Linux distributions
> have their own unique policies regarding project files, directories
> etc. You won't be able to have one project file for all.
I _suspect_ that gprinstall (available since GNAT GPL 2013) has enough
options to do a Debian install; it creates a GPR file adapted to the
actual installed setup.
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: Upgrading GNAT GPS 5.0 -> 5.3
2014-08-14 17:43 ` Victor Porton
2014-08-14 20:03 ` Dmitry A. Kazakov
@ 2014-08-14 20:50 ` Simon Wright
2014-08-15 12:07 ` porton.victor
1 sibling, 1 reply; 35+ messages in thread
From: Simon Wright @ 2014-08-14 20:50 UTC (permalink / raw)
Victor Porton <porton@narod.ru> writes:
> Simon Wright wrote:
>
>> Victor Porton <porton@narod.ru> writes:
>>
>>> Dmitry A. Kazakov wrote:
>>
>>>> If there is any bugs then in gprbuild. Try to build your project
>>>> manually:
>>>>
>>>> gnatmake -P<project>.gpr
>>>
>>> $ gnatmake -Ptest.gpr
>>> test.gpr:10:04: no value defined for "runtime"
>>> test.gpr:10:30: warning: undefined external reference
>>> test.gpr:13:04: no value defined for "mode"
>>> test.gpr:13:36: warning: undefined external reference
>>> librdf.gpr:11:25: warning: undefined external reference
>>> librdf.gpr:12:28: warning: undefined external reference
>>> librdf.gpr:15:04: no value defined for "runtime"
>>> librdf.gpr:15:30: warning: undefined external reference
>>> librdf.gpr:16:04: no value defined for "mode"
>>> librdf.gpr:16:36: warning: undefined external reference
>>> gnatmake: "test.gpr" processing failed
>>
>> You need to define the scenario variables runtime & mode:
>>
>> $ gnatmake -Ptest.gpr -Xruntime=... -Xmode=...
>
> $ gnatmake -Ptest.gpr -Xruntime=full -Xmode=checks
> test.gpr:10:04: no value defined for "runtime"
> test.gpr:10:30: warning: undefined external reference
> test.gpr:13:04: no value defined for "mode"
> test.gpr:13:36: warning: undefined external reference
> librdf.gpr:11:25: warning: undefined external reference
> librdf.gpr:12:28: warning: undefined external reference
> librdf.gpr:15:04: no value defined for "runtime"
> librdf.gpr:15:30: warning: undefined external reference
> librdf.gpr:16:04: no value defined for "mode"
> librdf.gpr:16:36: warning: undefined external reference
> gnatmake: "test.gpr" processing failed
Oh.
Well, I guess the next thing is for you to show us test.gpr and
librdf.gpr.
This could have gone quicker if you'd done that in the first place.
Please, try to put yourself in our shoes. How could you possibly help us
if we asked you that question with just that information?
Actually, I think there *is* an error in gnatmake/gprbuild: maybe that
should have been RUNTIME and MODE.
I wrote this in a GPR
type Var_Type is ("foo", "bar");
Var : Var_Type := external ("VAR");
and then
$ gprbuild -P test2 -Xvar=foo
test2.gpr:19:04: no value defined for "var"
test2.gpr:19:24: warning: undefined external reference
whereas
$ gprbuild -P test2 -XVAR=foo
works fine. So the error message is confusing; the undefined symbol is
shown in lower case, disregarding the actual case required.
I've reported this to AdaCore.
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: Upgrading GNAT GPS 5.0 -> 5.3
2014-08-14 20:50 ` Simon Wright
@ 2014-08-15 12:07 ` porton.victor
2014-08-16 11:55 ` Stephen Leake
2014-08-16 16:11 ` Simon Wright
0 siblings, 2 replies; 35+ messages in thread
From: porton.victor @ 2014-08-15 12:07 UTC (permalink / raw)
On Thursday, August 14, 2014 11:50:01 PM UTC+3, Simon Wright wrote:
> Victor Porton <porton@narod.ru> writes:
>
>
>
> > Simon Wright wrote:
>
> >
>
> >> Victor Porton <porton@narod.ru> writes:
>
> >>
>
> >>> Dmitry A. Kazakov wrote:
>
> >>
>
> >>>> If there is any bugs then in gprbuild. Try to build your project
>
> >>>> manually:
>
> >>>>
>
> >>>> gnatmake -P<project>.gpr
>
> >>>
>
> >>> $ gnatmake -Ptest.gpr
>
> >>> test.gpr:10:04: no value defined for "runtime"
>
> >>> test.gpr:10:30: warning: undefined external reference
>
> >>> test.gpr:13:04: no value defined for "mode"
>
> >>> test.gpr:13:36: warning: undefined external reference
>
> >>> librdf.gpr:11:25: warning: undefined external reference
>
> >>> librdf.gpr:12:28: warning: undefined external reference
>
> >>> librdf.gpr:15:04: no value defined for "runtime"
>
> >>> librdf.gpr:15:30: warning: undefined external reference
>
> >>> librdf.gpr:16:04: no value defined for "mode"
>
> >>> librdf.gpr:16:36: warning: undefined external reference
>
> >>> gnatmake: "test.gpr" processing failed
>
> >>
>
> >> You need to define the scenario variables runtime & mode:
>
> >>
>
> >> $ gnatmake -Ptest.gpr -Xruntime=... -Xmode=...
>
> >
>
> > $ gnatmake -Ptest.gpr -Xruntime=full -Xmode=checks
>
> > test.gpr:10:04: no value defined for "runtime"
>
> > test.gpr:10:30: warning: undefined external reference
>
> > test.gpr:13:04: no value defined for "mode"
>
> > test.gpr:13:36: warning: undefined external reference
>
> > librdf.gpr:11:25: warning: undefined external reference
>
> > librdf.gpr:12:28: warning: undefined external reference
>
> > librdf.gpr:15:04: no value defined for "runtime"
>
> > librdf.gpr:15:30: warning: undefined external reference
>
> > librdf.gpr:16:04: no value defined for "mode"
>
> > librdf.gpr:16:36: warning: undefined external reference
>
> > gnatmake: "test.gpr" processing failed
>
>
>
> Oh.
>
>
>
> Well, I guess the next thing is for you to show us test.gpr and
>
> librdf.gpr.
>
>
>
> This could have gone quicker if you'd done that in the first place.
>
>
>
> Please, try to put yourself in our shoes. How could you possibly help us
>
> if we asked you that question with just that information?
https://github.com/vporton/redland-bindings/tree/ada2012
> Actually, I think there *is* an error in gnatmake/gprbuild: maybe that
>
> should have been RUNTIME and MODE.
>
>
>
> I wrote this in a GPR
>
>
>
> type Var_Type is ("foo", "bar");
>
> Var : Var_Type := external ("VAR");
>
>
>
> and then
>
>
>
> $ gprbuild -P test2 -Xvar=foo
>
> test2.gpr:19:04: no value defined for "var"
>
> test2.gpr:19:24: warning: undefined external reference
>
>
>
> whereas
>
>
>
> $ gprbuild -P test2 -XVAR=foo
>
>
>
> works fine. So the error message is confusing; the undefined symbol is
>
> shown in lower case, disregarding the actual case required.
>
>
>
> I've reported this to AdaCore.
^ permalink raw reply [flat|nested] 35+ messages in thread