Roger Mc Murtrie <[email protected]> writes:
> On 30/04/2010, at 9:15 AM, Stephen Leake wrote:
>
>> Vadim Godunko <[email protected]> writes:
>>
>>> On 04/29/2010 12:46 PM, Roger Mc Murtrie wrote:
>>>> I just realised what's wrong.
>>>> In gnat/config.cgpr I needed to change
>>>> for Driver ("C++") use "/usr/local/ada-4.4/bin/g++";
>>>> for Driver ("C++") use "/usr/bin/g++";
>>>> which was what we had to do to build qtada-gpl-3.0.0.
>>
>> That was put there by gprconfig; it found the "wrong" compiler.
>>
>> So it would be good to figure out why.
>>
>> what does this give:
>>
>> /usr/bin/g++ -dumpmachine
> i686-apple-darwin10
>
>> /usr/bin/g++ -dumpversion
> 4.2.1
>>
>>
>> /usr/local/ada-4.4/bin/g++ -dumpmachine
> i686-apple-darwin9
>
>> /usr/local/ada-4.4/bin/g++ -dumpversion
> 4.4.3
>
>>
>> if both the machine and the version match, the only solution is to
>> ensure that only one is in PATH when gprconfig is run.
gnat-gpl-2009 has gcc 4.3.4. So no wonder things don't work well; it is
best to use the same version of gcc for all language compilers and the
final linker.
There's not much gprbuild can do to help here, except reject all
versions that don't match exactly, which is what it's already trying to
do.
> Roger$echo $PATH
> /opt/subversion/bin:/Library/Frameworks/Python.framework/Versions/2.6/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/texbin:/usr/X11/bin:/usr/local/lib/gnat:/usr/local/lib/gtkada:/usr/local/Trolltech/Qt-4.6.2/bin:/usr/local/gromacs/bin:/usr/local/smlnj-110.67/bin:/opt/local/bin:/usr/local/PostgreSQL/8.4/bin:/usr/local/MySQL/bin:/usr/local/include/gtkada:/Applications_Physics/GAMESS-UK-demo/rungamess:/usr/local/graphviz/bin:/opt/gnat-gpl-2009/bin
>
> When I want to use Ada I put /opt/gnat-gpl-2009/bin at the front of PATH
>
> At one stage a while back I needed to put /usr/bin
> ahead of this in order to get the "right" g++ compiler but that didn't seem
> necessary this time.
>>>
>>>> so I guess I'd better find libgnarl-2009
>>>>
>>> You need to find libgnarl*.dylib file instead and edit config.cgpr
> in config.cgpr, I had to change Toolchain_Version ("Ada") use "GNAT-2009";
> to Toolchain_Version ("Ada") use "GNAT";
>>
>> You never answered this question:
>>
>> Did you found libgnarl*.dylib file? What is its exact name?
> locate libgnarl
> /opt/gnat-gpl-2009/lib/gcc/i386-apple-darwin10.2.0/4.3.4/adalib/libgnarl.a
> /usr/local/ada-4.4/lib/gcc/i686-apple-darwin9/4.4.3/adalib/libgnarl-4.4.dylib
> /usr/local/ada-4.4/lib/gcc/i686-apple-darwin9/4.4.3/adalib/libgnarl.a
> /usr/local/ada-4.4/lib/gcc/i686-apple-darwin9/4.4.3/adalib/libgnarl.dylib
> /usr/local/ada-4.4/lib/gcc/i686-apple-darwin9/4.4.3/x86_64/adalib/libgnarl-4.4.dylib
> /usr/local/ada-4.4/lib/gcc/i686-apple-darwin9/4.4.3/x86_64/adalib/libgnarl.a
> /usr/local/ada-4.4/lib/gcc/i686-apple-darwin9/4.4.3/x86_64/adalib/libgnarl.dylib
> /opt/gnat-gpl-2009/lib/gcc/i386-apple-darwin10.2.0/4.3.4/adalib/libgnarl.a
So you only have dylib files for gnat 4.4.3, and they are in a fairly
canonical location; that explains why gprbuild finds them when
Toolchain_Version is plain "GNAT".
This is a packaging bug in the GNAT GPL 2009 Darwin distribution; it
should include the dylib files.
You are mixing gcc versions, so it's lucky they work, and you probably
will encounter more subtle bugs at some point.
Since you have g++ 4.4.3, and gnat 4.4.3 with dylibs, I suggest you use
just those two, not GNAT GPL 2009. Build gprbuild from source using gnat
4.4.3, then QtAda with that.
I'm not clear on darwin9 vs darwin10; I gather that's the operating
system version. I guess you are currently running darwin10, and the
darwin9 stuff is left over from before an upgrade? If things are mostly
upward compatible, using the darwin9 stuff may be less problematic than
mixing gcc versions.
--
-- Stephe
_______________________________________________
qtada-users mailing list
[email protected]
http://box347.bluehost.com/mailman/listinfo/qtada-users_lists.qtada.com