From: Maciej Sobczak on
Hi,

I tried to find what are the options for using Ada on Mac OS X.
The archives of comp.lang.ada show only some old posts, so I hope to get
some more up to date information after asking afresh.

I have found the following:

http://www.macada.org/compiler.html

http://sourceforge.net/project/showfiles.php?group_id=132622&package_id=146743

Do you have any (strong?) opinions on these?
Would you recommend something else?

The objective is to have a free compiler for personal use.

--
Maciej Sobczak : http://www.msobczak.com/
Programming : http://www.msobczak.com/prog/
From: Jerry on
On Apr 19, 12:50 am, Maciej Sobczak <no.s...(a)no.spam.com> wrote:
> Hi,
>
> I tried to find what are the options for using Ada on Mac OS X.
> The archives of comp.lang.ada show only some old posts, so I hope to get
> some more up to date information after asking afresh.
>
> I have found the following:
>
> http://www.macada.org/compiler.html
>
> http://sourceforge.net/project/showfiles.php?group_id=132622&package_...
>
> Do you have any (strong?) opinions on these?
> Would you recommend something else?
>
> The objective is to have a free compiler for personal use.
>
> --
> Maciej Sobczak :http://www.msobczak.com/
> Programming :http://www.msobczak.com/prog/

You are in the right neighborhood. The official site for Ada on Mac is
macada.org but it is out of date and thus gives a poor first
impression--the Mac Ada community is actually quite strong. There is a
new "experimental" web site at http://www.macada.org/macada/macada/Welcome.html.

**DO** join the mailing list which is very responsive. GNAT 4.2 and
4.3 are available as is a plug-in for Xcode, all in a proper Mac-style
installer.

Jerry

From: Maciej Sobczak on
Hi,

Jerry wrote:

> There is a
> new "experimental" web site at http://www.macada.org/macada/macada/Welcome.html.

OK, thank you for the link.
The package installed correctly (not counting the fact that I have
downloaded the i386 package whereas the labels in the installation
window were always PPC - this seems to be a label-only issue).

The compiler works fine, but somehow I cannot link:

~/temp/ada $ gnatmake hello
gcc -c hello.adb
gnatbind -x hello.ali
gnatlink hello.ali
/usr/bin/ld: Undefined symbols:
__Unwind_Resume
__Unwind_ForcedUnwind
__Unwind_GetDataRelBase
__Unwind_GetIP
__Unwind_GetLanguageSpecificData
__Unwind_GetRegionStart
__Unwind_GetTextRelBase
__Unwind_RaiseException
__Unwind_SetGR
__Unwind_SetIP
collect2: ld returned 1 exit status
gnatlink: cannot call /usr/local/ada-4.2/bin/gcc
gnatmake: *** link failed.
~/temp/ada $

I have noticed that there is a separate toolchain, complete together
with gcc, in /usr/local/ada-4.2/bin, so I have added that to my PATH (at
the beginning).
Still, the linker fails.

Running gnatlink -v -v on the .ali file gives this output:

~/temp/ada $ gnatlink -v -v hello.ali

GNATLINK 4.2.0 20060409 (experimental)
Copyright 1995-2006, Free Software Foundation, Inc
gcc -c -gnatA -gnatWb -gnatiw -v -gnatws b~hello.adb
Using built-in specs.
Target: i686-apple-darwin8
Configured with: /Users/drew/Developer/Compiler/gcc-head/configure
--target=i686-apple-darwin8 --host=i686-apple-darwin8
--build=i686-apple-darwin8 --prefix=/usr/local/ada-4.2 --disable-libssp
--with-arch=pentium-m --with-tune=prescott --enable-languages=c,ada
Thread model: posix
gcc version 4.2.0 20060409 (experimental)
/usr/local/ada-4.2/libexec/gcc/i686-apple-darwin8/4.2.0/gnat1 -quiet
-dumpbase b~hello.adb -gnatA -gnatWb -gnatiw -gnatws -march=pentium-m
-fPIC b~hello.adb -o /var/tmp//ccPT1Rjw.s
as -arch i386 -force_cpusubtype_ALL -o b~hello.o /var/tmp//ccPT1Rjw.s
/usr/local/ada-4.2/bin/gcc b~hello.o ./hello.o -v -o hello -L./
-L/usr/local/ada-4.2/lib/gcc/i686-apple-darwin8/4.2.0/adalib/
/usr/local/ada-4.2/lib/gcc/i686-apple-darwin8/4.2.0/adalib/libgnat.a
Using built-in specs.
Target: i686-apple-darwin8
Configured with: /Users/drew/Developer/Compiler/gcc-head/configure
--target=i686-apple-darwin8 --host=i686-apple-darwin8
--build=i686-apple-darwin8 --prefix=/usr/local/ada-4.2 --disable-libssp
--with-arch=pentium-m --with-tune=prescott --enable-languages=c,ada
Thread model: posix
gcc version 4.2.0 20060409 (experimental)
/usr/local/ada-4.2/libexec/gcc/i686-apple-darwin8/4.2.0/collect2
-dynamic -arch i386 -weak_reference_mismatches non-weak -o hello
-lcrt1.o -L./
-L/usr/local/ada-4.2/lib/gcc/i686-apple-darwin8/4.2.0/adalib/
-L/usr/local/ada-4.2/lib/gcc/i686-apple-darwin8/4.2.0
-L/usr/local/ada-4.2/lib/gcc/i686-apple-darwin8/4.2.0/../../.. b~hello.o
../hello.o
/usr/local/ada-4.2/lib/gcc/i686-apple-darwin8/4.2.0/adalib/libgnat.a
-lgcc -lSystem
/usr/bin/ld: Undefined symbols:
__Unwind_Resume
__Unwind_ForcedUnwind
__Unwind_GetDataRelBase
__Unwind_GetIP
__Unwind_GetLanguageSpecificData
__Unwind_GetRegionStart
__Unwind_GetTextRelBase
__Unwind_RaiseException
__Unwind_SetGR
__Unwind_SetIP
collect2: ld returned 1 exit status
gnatlink: cannot call /usr/local/ada-4.2/bin/gcc
~/temp/ada $

Any thoughts?

> **DO** join the mailing list which is very responsive.

comp.lang.ada is responsive, too! ;-)


--
Maciej Sobczak : http://www.msobczak.com/
Programming : http://www.msobczak.com/prog/
From: Benjamin Place on
On 4/19/07, Maciej Sobczak <no.spam(a)no.spam.com> wrote:
> comp.lang.ada is responsive, too! ;-)

Yes, but Drew Reynolds is the one you want to talk to, and he'll
respond lots faster on the GNAT-OSX list.

I'm sure I've seen this problem on that list, but I do not know the
solution since I haven't
yet installed GNAT on my MacBook. If it has come up before, you'll get
even faster response.

Cheers,
Ben
From: John B. Matthews on
In article <f07o5n$a1u$1(a)cernne03.cern.ch>,
Maciej Sobczak <no.spam(a)no.spam.com> wrote:
> Hi,
> Jerry wrote:
> > There is a new "experimental" web site at
> > http://www.macada.org/macada/macada/Welcome.html.
> [...]
> The compiler works fine, but somehow I cannot link:
>
> ~/temp/ada $ gnatmake hello
> gcc -c hello.adb
> gnatbind -x hello.ali
> gnatlink hello.ali
> /usr/bin/ld: Undefined symbols:
> __Unwind_Resume
> __Unwind_ForcedUnwind
> __Unwind_GetDataRelBase
> __Unwind_GetIP
> __Unwind_GetLanguageSpecificData
> __Unwind_GetRegionStart
> __Unwind_GetTextRelBase
> __Unwind_RaiseException
> __Unwind_SetGR
> __Unwind_SetIP
> collect2: ld returned 1 exit status
> gnatlink: cannot call /usr/local/ada-4.2/bin/gcc
> gnatmake: *** link failed.

The missing symbols are in libgcc_s.1.dylib. Depending on your
LD_LIBRARY PATH, you may have to specify the search path, too:

gnatmake hello -largs -L/usr/local/ada-4.2/lib -lgcc_s.1

This is a problem in the 4.2 compiler; it's fixed in 4.3, but that has
other problems; 3.3 is very stable, but a tad old:-)

See also the mailing list archive:
<http://hermes.gwu.edu/cgi-bin/wa?A2=ind0704&L=gnat-osx&D=0&P=3092>.

John
--
jmatthews at wright dot edu

> I have noticed that there is a separate toolchain, complete together
> with gcc, in /usr/local/ada-4.2/bin, so I have added that to my PATH (at
> the beginning).
> Still, the linker fails.
>
> Running gnatlink -v -v on the .ali file gives this output:
>
> ~/temp/ada $ gnatlink -v -v hello.ali
>
> GNATLINK 4.2.0 20060409 (experimental)
> Copyright 1995-2006, Free Software Foundation, Inc
> gcc -c -gnatA -gnatWb -gnatiw -v -gnatws b~hello.adb
> Using built-in specs.
> Target: i686-apple-darwin8
> Configured with: /Users/drew/Developer/Compiler/gcc-head/configure
> --target=i686-apple-darwin8 --host=i686-apple-darwin8
> --build=i686-apple-darwin8 --prefix=/usr/local/ada-4.2 --disable-libssp
> --with-arch=pentium-m --with-tune=prescott --enable-languages=c,ada
> Thread model: posix
> gcc version 4.2.0 20060409 (experimental)
> /usr/local/ada-4.2/libexec/gcc/i686-apple-darwin8/4.2.0/gnat1 -quiet
> -dumpbase b~hello.adb -gnatA -gnatWb -gnatiw -gnatws -march=pentium-m
> -fPIC b~hello.adb -o /var/tmp//ccPT1Rjw.s
> as -arch i386 -force_cpusubtype_ALL -o b~hello.o /var/tmp//ccPT1Rjw.s
> /usr/local/ada-4.2/bin/gcc b~hello.o ./hello.o -v -o hello -L./
> -L/usr/local/ada-4.2/lib/gcc/i686-apple-darwin8/4.2.0/adalib/
> /usr/local/ada-4.2/lib/gcc/i686-apple-darwin8/4.2.0/adalib/libgnat.a
> Using built-in specs.
> Target: i686-apple-darwin8
> Configured with: /Users/drew/Developer/Compiler/gcc-head/configure
> --target=i686-apple-darwin8 --host=i686-apple-darwin8
> --build=i686-apple-darwin8 --prefix=/usr/local/ada-4.2 --disable-libssp
> --with-arch=pentium-m --with-tune=prescott --enable-languages=c,ada
> Thread model: posix
> gcc version 4.2.0 20060409 (experimental)
> /usr/local/ada-4.2/libexec/gcc/i686-apple-darwin8/4.2.0/collect2
> -dynamic -arch i386 -weak_reference_mismatches non-weak -o hello
> -lcrt1.o -L./
> -L/usr/local/ada-4.2/lib/gcc/i686-apple-darwin8/4.2.0/adalib/
> -L/usr/local/ada-4.2/lib/gcc/i686-apple-darwin8/4.2.0
> -L/usr/local/ada-4.2/lib/gcc/i686-apple-darwin8/4.2.0/../../.. b~hello.o
> ./hello.o
> /usr/local/ada-4.2/lib/gcc/i686-apple-darwin8/4.2.0/adalib/libgnat.a
> -lgcc -lSystem
> /usr/bin/ld: Undefined symbols:
> __Unwind_Resume
> __Unwind_ForcedUnwind
> __Unwind_GetDataRelBase
> __Unwind_GetIP
> __Unwind_GetLanguageSpecificData
> __Unwind_GetRegionStart
> __Unwind_GetTextRelBase
> __Unwind_RaiseException
> __Unwind_SetGR
> __Unwind_SetIP
> collect2: ld returned 1 exit status
> gnatlink: cannot call /usr/local/ada-4.2/bin/gcc
> ~/temp/ada $
>
> Any thoughts?
>
> > **DO** join the mailing list which is very responsive.
>
> comp.lang.ada is responsive, too! ;-)