On Wed, 2012-04-11 at 09:56 +0100, Andrew Ross wrote:
> On Wed, Apr 11, 2012 at 02:57:23AM +0530, Atri wrote:
> >
> > Unfortunately there is one issue with the svn version that is not
> > present with the 5.9.9 release. It is that the cmake build system fails
> > to detect the presence of the gnat library in my (openSUSE) system and
> > turns off the ada bindings automatically.
> > ==============================================
> > -- Build files have been written
> > to: /home/abuild/rpmbuild/BUILD/plplot/builddir/language_tests/Ada
> > -- Check for working Ada builder: /usr/bin/gnatmake
> > -- Check for working Ada builder: /usr/bin/gnatmake -- works
> > -- gnat version =
> > -- WARNING: gnat library not found. Disabling ada bindings
> > ==============================================
> >
> > With plplot 5.9.9 and a small patch [2], this used to work perfectly
> > fine on all versions of openSUSE, i.e., the build system would detect
> > the presence of gnat 4.6 just fine. Please note that gnat is provided in
> > openSUSE by the package named libada46 which is pulled in automatically
> > when one installs gcc-ada (gcc46-ada), i.e., gnat is installed in an
> > openSUSE system as a dependency of gcc-ada.
> >
> > For now, I have simply turned off the ada bindings for plplot trunk on
> > openSUSE. However, I would be grateful if someone could point me to a
> > real fix for the issue, so that I can get the ada bindings back on
> > again.
> >
>
> Dear Atri,
>
> Thanks for this. In svn there is an alternative fix to your patch
> which checks for the version of gnat detected then looks for
> the gnat-${VERSION} library. This avoids potential mismatches between
> gnat compiler and library. Obviously this isn't working on your
> system as the gnat version is given as blank above. Could you
>
> 1) Give me the output of gnatgcc --version.
All Ada/GNAT compilation in openSUSE is done, as far as I know, by
invoking "gcc -c filename.adb" or "gnatmake". I could find no command
called gnatgcc here. The version shown by the command "gnat" is:-
GNAT 4.6.3
The gcc version is also the same:
gcc version 4.6.3
> 2) Check what the gnat library is actually called. Should be
> something like libgnat or libgnat-4.6
Then gnat library is indeed called libgnat-4.6
(file /usr/lib64/libgnat-4.6 on my system).
> 3) Try modifying cmake/modules/ada to output what CMAKE_Ada_Compiler
> is actually set to (should be gnatgcc?)
>
I had cmake print the output as you asked [1], and here is what it
gives:
CMAKE_Ada_COMPILER = /usr/bin/gcc
This might therefore be the source of the problem, namely, that the next
line in the ada.cmake file
string(REGEX MATCH "gnatgcc [(][^)]*[)] ([0-9]*[.][0-9]*)[.][0-9]"
ADA_OUTPUT_TRIM ${ADA_OUTPUT})
tries to do a regex matching with the string "gnatgcc *" which clearly
fails on openSUSE due to the compiler being simply gcc instead of
gnatgcc.
> Thanks
>
> Andrew
Hope that helps. Bye.
--
Atri
[1] I patched the ada.cmake file with the addition of the following line
to print the ada compiler being used:
message(STATUS "CMAKE_Ada_COMPILER = ${CMAKE_Ada_COMPILER}")
------------------------------------------------------------------------------
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev
_______________________________________________
Plplot-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/plplot-devel