comp.lang.ada
 help / color / mirror / Atom feed
* Upgrading GNAT GPS 5.0 -> 5.3
@ 2014-08-13 17:50 Victor Porton
  2014-08-13 19:17 ` Victor Porton
  2014-08-13 19:28 ` Simon Wright
  0 siblings, 2 replies; 35+ messages in thread
From: Victor Porton @ 2014-08-13 17:50 UTC (permalink / raw)


After upgrading GNAT GPS 5.0 -> 5.3 (Debian Linux) the project files stopped 
to work.

I was forced to downgrade.

What to do? How to upgrade the project files?

-- 
Victor Porton - http://portonvictor.org


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

* Re: Upgrading GNAT GPS 5.0 -> 5.3
  2014-08-13 17:50 Upgrading GNAT GPS 5.0 -> 5.3 Victor Porton
@ 2014-08-13 19:17 ` Victor Porton
  2014-08-13 19:28 ` Simon Wright
  1 sibling, 0 replies; 35+ messages in thread
From: Victor Porton @ 2014-08-13 19:17 UTC (permalink / raw)


Victor Porton wrote:

> After upgrading GNAT GPS 5.0 -> 5.3 (Debian Linux) the project files
> stopped to work.
> 
> I was forced to downgrade.
> 
> What to do? How to upgrade the project files?

I am about problems with gprbuild, not GNAT GPS itself.

-- 
Victor Porton - http://portonvictor.org


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

* Re: Upgrading GNAT GPS 5.0 -> 5.3
  2014-08-13 17:50 Upgrading GNAT GPS 5.0 -> 5.3 Victor Porton
  2014-08-13 19:17 ` Victor Porton
@ 2014-08-13 19:28 ` Simon Wright
  2014-08-13 19:33   ` Victor Porton
  1 sibling, 1 reply; 35+ messages in thread
From: Simon Wright @ 2014-08-13 19:28 UTC (permalink / raw)


Victor Porton <porton@narod.ru> writes:

> After upgrading GNAT GPS 5.0 -> 5.3 (Debian Linux) the project files stopped 
> to work.
>
> I was forced to downgrade.
>
> What to do? How to upgrade the project files?

No idea, since I can't see the error messages (if any) on your computer
screen.

GPS uses gnatmake (or gprbuild) to do the actual build, so you should be
able to run the build just as well from the command line, which will
make it easier to see what's going wrong.

And I don't recognise "GNAT GPS 5.0" (or "5.3"). Do you mean GNAT GPL
2013/2014? (GPS comes as part of the compiler bundle from
libre.adacore.com now). Or is this in a Debian package?

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

* Re: Upgrading GNAT GPS 5.0 -> 5.3
  2014-08-13 19:28 ` Simon Wright
@ 2014-08-13 19:33   ` Victor Porton
  2014-08-13 19:41     ` Per Sandberg
  0 siblings, 1 reply; 35+ messages in thread
From: Victor Porton @ 2014-08-13 19:33 UTC (permalink / raw)


Simon Wright wrote:

> Victor Porton <porton@narod.ru> writes:
> 
>> After upgrading GNAT GPS 5.0 -> 5.3 (Debian Linux) the project files
>> stopped to work.
>>
>> I was forced to downgrade.
>>
>> What to do? How to upgrade the project files?
> 
> No idea, since I can't see the error messages (if any) on your computer
> screen.
> 
> GPS uses gnatmake (or gprbuild) to do the actual build, so you should be
> able to run the build just as well from the command line, which will
> make it easier to see what's going wrong.

From inside GNAT GPS:

gprbuild -d -P/home/porton/Projects/redland-bindings/ada/test.gpr -
XRUNTIME=full -XMODE=Install run_all_tests.adb --subdirs=check -cargs:Ada -g 
-O0 -gnato -fstack-check -gnatVa -cargs:C -g -O0 -fstack-check 
-cargs:C++ -g -O0 -fstack-check
test.gpr:4:09: no languages defined for this project
librdf.gpr:1:17: no languages defined for this project
librdf.gpr:3:25: warning: libraries are not supported on this platform
aunit_build.gpr:3:09: no languages defined for this project
aunit_build.gpr:22:25: warning: libraries are not supported on this platform
gprbuild: "/home/porton/Projects/redland-bindings/ada/test.gpr" processing 
failed
[2014-08-13 22:29:54] process exited with status 4 (elapsed time: 00.40s)

My project is available at

https://github.com/vporton/redland-bindings/tree/ada2012

> And I don't recognise "GNAT GPS 5.0" (or "5.3"). Do you mean GNAT GPL
> 2013/2014? (GPS comes as part of the compiler bundle from
> libre.adacore.com now). Or is this in a Debian package?

I use Debian package gnat-gps 5.3-2.2 with gnat 4.9.

-- 
Victor Porton - http://portonvictor.org

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

* Re: Upgrading GNAT GPS 5.0 -> 5.3
  2014-08-13 19:33   ` Victor Porton
@ 2014-08-13 19:41     ` Per Sandberg
  2014-08-13 20:10       ` Victor Porton
  0 siblings, 1 reply; 35+ messages in thread
From: Per Sandberg @ 2014-08-13 19:41 UTC (permalink / raw)


postinstall for gprbuild has not been performed.
Run gprconfiog to correct to select the default compilers.
For further info see the manual.

/Per


On 13.08.2014 21:33, Victor Porton wrote:
> Simon Wright wrote:
>
>> Victor Porton <porton@narod.ru> writes:
>>
>>> After upgrading GNAT GPS 5.0 -> 5.3 (Debian Linux) the project files
>>> stopped to work.
>>>
>>> I was forced to downgrade.
>>>
>>> What to do? How to upgrade the project files?
>>
>> No idea, since I can't see the error messages (if any) on your computer
>> screen.
>>
>> GPS uses gnatmake (or gprbuild) to do the actual build, so you should be
>> able to run the build just as well from the command line, which will
>> make it easier to see what's going wrong.
>
>  From inside GNAT GPS:
>
> gprbuild -d -P/home/porton/Projects/redland-bindings/ada/test.gpr -
> XRUNTIME=full -XMODE=Install run_all_tests.adb --subdirs=check -cargs:Ada -g
> -O0 -gnato -fstack-check -gnatVa -cargs:C -g -O0 -fstack-check
> -cargs:C++ -g -O0 -fstack-check
> test.gpr:4:09: no languages defined for this project
> librdf.gpr:1:17: no languages defined for this project
> librdf.gpr:3:25: warning: libraries are not supported on this platform
> aunit_build.gpr:3:09: no languages defined for this project
> aunit_build.gpr:22:25: warning: libraries are not supported on this platform
> gprbuild: "/home/porton/Projects/redland-bindings/ada/test.gpr" processing
> failed
> [2014-08-13 22:29:54] process exited with status 4 (elapsed time: 00.40s)
>
> My project is available at
>
> https://github.com/vporton/redland-bindings/tree/ada2012
>
>> And I don't recognise "GNAT GPS 5.0" (or "5.3"). Do you mean GNAT GPL
>> 2013/2014? (GPS comes as part of the compiler bundle from
>> libre.adacore.com now). Or is this in a Debian package?
>
> I use Debian package gnat-gps 5.3-2.2 with gnat 4.9.
>

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

* Re: Upgrading GNAT GPS 5.0 -> 5.3
  2014-08-13 19:41     ` Per Sandberg
@ 2014-08-13 20:10       ` Victor Porton
  2014-08-13 20:29         ` Björn Lundin
  2014-08-14  7:19         ` Egil H H
  0 siblings, 2 replies; 35+ messages in thread
From: Victor Porton @ 2014-08-13 20:10 UTC (permalink / raw)


Per Sandberg wrote:

> postinstall for gprbuild has not been performed.
> Run gprconfiog to correct to select the default compilers.
> For further info see the manual.

The problem was fixed by updating the package gprbuild.

However a new problem appeared:

-lraptor2 is not passed to the linker, what causes error messages about 
undefined symbols.

I have in test.gpr

   package Compiler is
      for Default_Switches ("ada") use ("-g", "-O2", "-gnat2012");
   end Compiler;

   package Linker is
      for Linker_Options use ("-lraptor2");
   end Linker;

You can view test.gpr file entirely at

https://github.com/vporton/redland-bindings/blob/ada2012/ada/test.gpr

> /Per
> 
> 
> On 13.08.2014 21:33, Victor Porton wrote:
>> Simon Wright wrote:
>>
>>> Victor Porton <porton@narod.ru> writes:
>>>
>>>> After upgrading GNAT GPS 5.0 -> 5.3 (Debian Linux) the project files
>>>> stopped to work.
>>>>
>>>> I was forced to downgrade.
>>>>
>>>> What to do? How to upgrade the project files?
>>>
>>> No idea, since I can't see the error messages (if any) on your computer
>>> screen.
>>>
>>> GPS uses gnatmake (or gprbuild) to do the actual build, so you should be
>>> able to run the build just as well from the command line, which will
>>> make it easier to see what's going wrong.
>>
>>  From inside GNAT GPS:
>>
>> gprbuild -d -P/home/porton/Projects/redland-bindings/ada/test.gpr -
>> XRUNTIME=full -XMODE=Install run_all_tests.adb --subdirs=check -cargs:Ada
>> -g -O0 -gnato -fstack-check -gnatVa -cargs:C -g -O0 -fstack-check
>> -cargs:C++ -g -O0 -fstack-check
>> test.gpr:4:09: no languages defined for this project
>> librdf.gpr:1:17: no languages defined for this project
>> librdf.gpr:3:25: warning: libraries are not supported on this platform
>> aunit_build.gpr:3:09: no languages defined for this project
>> aunit_build.gpr:22:25: warning: libraries are not supported on this
>> platform gprbuild: "/home/porton/Projects/redland-bindings/ada/test.gpr"
>> processing failed
>> [2014-08-13 22:29:54] process exited with status 4 (elapsed time: 00.40s)
>>
>> My project is available at
>>
>> https://github.com/vporton/redland-bindings/tree/ada2012
>>
>>> And I don't recognise "GNAT GPS 5.0" (or "5.3"). Do you mean GNAT GPL
>>> 2013/2014? (GPS comes as part of the compiler bundle from
>>> libre.adacore.com now). Or is this in a Debian package?
>>
>> I use Debian package gnat-gps 5.3-2.2 with gnat 4.9.
>>
-- 
Victor Porton - http://portonvictor.org


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

* Re: Upgrading GNAT GPS 5.0 -> 5.3
  2014-08-13 20:10       ` Victor Porton
@ 2014-08-13 20:29         ` Björn Lundin
  2014-08-13 20:36           ` Victor Porton
  2014-08-14  7:19         ` Egil H H
  1 sibling, 1 reply; 35+ messages in thread
From: Björn Lundin @ 2014-08-13 20:29 UTC (permalink / raw)


On 2014-08-13 22:10, Victor Porton wrote:
> for Linker_Options use ("-lraptor2");

for Linker_Options use ("-Lsome/path/to/your/lib","-lraptor2");

or make it visible via the default paths for ld
(which I think may be in /etc/ld.so.conf or better, a new file in
/etc/ld.so.conf.d/)

--
Björn

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

* Re: Upgrading GNAT GPS 5.0 -> 5.3
  2014-08-13 20:29         ` Björn Lundin
@ 2014-08-13 20:36           ` Victor Porton
  2014-08-13 22:36             ` Björn Lundin
  0 siblings, 1 reply; 35+ messages in thread
From: Victor Porton @ 2014-08-13 20:36 UTC (permalink / raw)


Björn Lundin wrote:

> On 2014-08-13 22:10, Victor Porton wrote:
>> for Linker_Options use ("-lraptor2");
> 
> for Linker_Options use ("-Lsome/path/to/your/lib","-lraptor2");
> 
> or make it visible via the default paths for ld
> (which I think may be in /etc/ld.so.conf or better, a new file in
> /etc/ld.so.conf.d/)

This does not help.

cat /etc/ld.so.conf.d/i386-linux-gnu.conf 
# Multiarch support
/lib/i386-linux-gnu
/usr/lib/i386-linux-gnu
/lib/i486-linux-gnu
/usr/lib/i486-linux-gnu


/usr/lib/i386-linux-gnu/libraptor2.so

-- 
Victor Porton - http://portonvictor.org


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

* Re: Upgrading GNAT GPS 5.0 -> 5.3
  2014-08-13 20:36           ` Victor Porton
@ 2014-08-13 22:36             ` Björn Lundin
  2014-08-14 12:03               ` Victor Porton
  0 siblings, 1 reply; 35+ messages in thread
From: Björn Lundin @ 2014-08-13 22:36 UTC (permalink / raw)


On 2014-08-13 22:36, Victor Porton wrote:
> Björn Lundin wrote:
> 
>> On 2014-08-13 22:10, Victor Porton wrote:
>>> for Linker_Options use ("-lraptor2");
>>
>> for Linker_Options use ("-Lsome/path/to/your/lib","-lraptor2");
>>
>> or make it visible via the default paths for ld
>> (which I think may be in /etc/ld.so.conf or better, a new file in
>> /etc/ld.so.conf.d/)
> 
> This does not help.
> 
> cat /etc/ld.so.conf.d/i386-linux-gnu.conf 
> # Multiarch support
> /lib/i386-linux-gnu
> /usr/lib/i386-linux-gnu
> /lib/i486-linux-gnu
> /usr/lib/i486-linux-gnu
> 
> 
> /usr/lib/i386-linux-gnu/libraptor2.so
> 

Then a screenshot of the actual error would help other to help you.

did you try
for Linker_Options use ("-L/usr/lib/i386-linux-gnu","-lraptor2");
?



--
Björn

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

* Re: Upgrading GNAT GPS 5.0 -> 5.3
  2014-08-13 20:10       ` Victor Porton
  2014-08-13 20:29         ` Björn Lundin
@ 2014-08-14  7:19         ` Egil H H
  2014-08-14  7:32           ` Simon Wright
                             ` (3 more replies)
  1 sibling, 4 replies; 35+ messages in thread
From: Egil H H @ 2014-08-14  7:19 UTC (permalink / raw)


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.





^ 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
                             ` (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-13 22:36             ` Björn Lundin
@ 2014-08-14 12:03               ` Victor Porton
  0 siblings, 0 replies; 35+ messages in thread
From: Victor Porton @ 2014-08-14 12:03 UTC (permalink / raw)


Björn Lundin wrote:

> On 2014-08-13 22:36, Victor Porton wrote:
>> Björn Lundin wrote:
>> 
>>> On 2014-08-13 22:10, Victor Porton wrote:
>>>> for Linker_Options use ("-lraptor2");
>>>
>>> for Linker_Options use ("-Lsome/path/to/your/lib","-lraptor2");
>>>
>>> or make it visible via the default paths for ld
>>> (which I think may be in /etc/ld.so.conf or better, a new file in
>>> /etc/ld.so.conf.d/)
>> 
>> This does not help.
>> 
>> cat /etc/ld.so.conf.d/i386-linux-gnu.conf
>> # Multiarch support
>> /lib/i386-linux-gnu
>> /usr/lib/i386-linux-gnu
>> /lib/i486-linux-gnu
>> /usr/lib/i486-linux-gnu
>> 
>> 
>> /usr/lib/i386-linux-gnu/libraptor2.so
>> 
> 
> Then a screenshot of the actual error would help other to help you.
> 
> did you try
> for Linker_Options use ("-L/usr/lib/i386-linux-gnu","-lraptor2");

This does not help.

-- 
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
  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 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: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 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-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

* 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-15 12:07                               ` porton.victor
@ 2014-08-16 11:55                                 ` Stephen Leake
  2014-08-16 16:11                                 ` Simon Wright
  1 sibling, 0 replies; 35+ messages in thread
From: Stephen Leake @ 2014-08-16 11:55 UTC (permalink / raw)


porton.victor@gmail.com writes:

> <_lots_ of quoted lines, apparently one new line>

please trim your posts; having to scroll thru pages of previous post to
find one new line in the middle is just not worth it

-- 
-- Stephe

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

* Re: Upgrading GNAT GPS 5.0 -> 5.3
  2014-08-15 12:07                               ` porton.victor
  2014-08-16 11:55                                 ` Stephen Leake
@ 2014-08-16 16:11                                 ` Simon Wright
  1 sibling, 0 replies; 35+ messages in thread
From: Simon Wright @ 2014-08-16 16:11 UTC (permalink / raw)


porton.victor@gmail.com writes:

>> 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

The thing is, you need to make it easy for us to help you. In this case,
the first 10 or so lines of the GPR (leading up to the line that
gprbuild complained about) would have made a world of difference. Who
knows, if you'd extracted them to post and looked at them, you might
have seen the answer for yourself.


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

end of thread, other threads:[~2014-08-16 16:11 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-13 17:50 Upgrading GNAT GPS 5.0 -> 5.3 Victor Porton
2014-08-13 19:17 ` Victor Porton
2014-08-13 19:28 ` Simon Wright
2014-08-13 19:33   ` Victor Porton
2014-08-13 19:41     ` Per Sandberg
2014-08-13 20:10       ` Victor Porton
2014-08-13 20:29         ` Björn Lundin
2014-08-13 20:36           ` Victor Porton
2014-08-13 22:36             ` Björn Lundin
2014-08-14 12:03               ` Victor Porton
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
2014-08-14 15:56             ` Dmitry A. Kazakov
2014-08-14 15:59               ` Victor Porton
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:18                       ` Victor Porton
2014-08-14 17:22                     ` Dmitry A. Kazakov
2014-08-14 17:27                       ` Victor Porton
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: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
2014-08-15  6:36                               ` Simon Wright
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

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