Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

gcc/gnat 3.3

6 views
Skip to first unread message

Adrian Hoe

unread,
Oct 17, 2003, 10:45:00 AM10/17/03
to
Hi,

Has anyone built gcc/gnat 3.3 for Sparc Solaris 9? I tried to build one
from source but failed. Generated too many errors and I gave up. :(

Thanks.
--
Adrian Hoe
m a i l b o x AT a d r i a n h o e . c o m

Jeff C,

unread,
Oct 17, 2003, 5:12:10 PM10/17/03
to

"Adrian Hoe" <Adri...@AdaUtopia.com> wrote in message
news:3f8fff8b$1...@news.tm.net.my...


I've done it on Sparc Solaris 8. (32 bit though)

Did you follow the directions exactly? (the touch commands, not building in
the source directory, use GNU make, etc)
And what did you use for a bootstrap program?

Perhaps this weekend when I (hopefully) re-release my properly marked GNAT
5.01p for Redhat 9 x86 I
could also put together some sort of Solaris (8) package.


Ludovic Brenta

unread,
Oct 17, 2003, 5:48:42 PM10/17/03
to
"Jeff C," <nolonge...@userealemailsniff.com> writes:
> Perhaps this weekend when I (hopefully) re-release my properly
> marked GNAT 5.01p for Redhat 9 x86 I could also put together some
> sort of Solaris (8) package.

I am suspicious about this "5.01p" version number. In my
understanding, the "p" stands for something like "published" or
"public", i.e. it denotes one of ACT's stable releases. Since I am
not aware of any 5.01p official release by ACT, I would suggest you
use a version number that denotes that this is from CVS, such as
e.g. 5.01.cvs.20031017.

--
Ludovic Brenta.

Jeff C,

unread,
Oct 17, 2003, 6:01:30 PM10/17/03
to

"Ludovic Brenta" <ludovic...@insalien.org> wrote in message
news:m3ad7za6...@insalien.org...


Actually p stands for public. Since this is not just a random CVS grab at a
random time but a pull of the tagged CVS
files that were "released" for 5.01 it seems pretty reasonable..Note though
that the RPM and the directory that it
gets installed in is actually 5.01p-jmc to further differentiate it from
real real version that may or may not some day be
publically released by ACT.

Finally, I have discussed it with ACT and they were Ok with calling it 5.01p
which seems good enough for me.

But of course you are right to be suspicious about this!! Who knows who I am
or what evil lurks in the heart of
men..So, if you want a real 5.01 where someone stands behind what is
actually in it I suggest you pay several thousand dollars to ACT and get a
5.01a since even ACT does not promise anything in particular (other than it
being good
for student and reseatch use) about the "p" releases.


Andreas Almroth

unread,
Oct 20, 2003, 3:04:56 PM10/20/03
to
Adrian Hoe wrote:
> Hi,
>
> Has anyone built gcc/gnat 3.3 for Sparc Solaris 9? I tried to build one
> from source but failed. Generated too many errors and I gave up. :(
>
> Thanks.

I have built a CSW build for SPARC and Intel Solaris 8, found at
http://www.blastwave.org.
It does work with Solaris 9, but with the exception for that there is a
problem with threads on SPARC (as noted by several sources).
I still have the build tree for native Solaris 9 on one of the servers,
so I might be able to schedule some time to test with other threading
libraries than the native one. But please let me know if interested...

The developers have changed the way of fiddling with threads (task
control in the run-time) to cater for the change in the thread API in
Solaris 9 in the later 5.01 source tree, but that change does not really
work when incorporated into the GCC tree the way I have tested it.
The former method was very very specific to how GCC produces the
binaries, and the new method is somewhat less "hack'n'slashy", but I
don't seem to get it to work though.
The fault most likely on my side of course...
Using a "clean" 5.xx would probably be a way to verify...

BTW, just being curious, would you mind adding some meat on the
"generated too many errors"? Just interested to know what went wrong...

Cheers,
Andreas


Adrian Hoe

unread,
Oct 24, 2003, 5:13:10 AM10/24/03
to
I am back with c.l.a. I was unable to access my news server few days
ago. I think it should be a problem at my isp end.


Andreas Almroth wrote:
> Adrian Hoe wrote:
>
>> Hi,
>>
>> Has anyone built gcc/gnat 3.3 for Sparc Solaris 9? I tried to build
>> one from source but failed. Generated too many errors and I gave up. :(
>>
>> Thanks.
>
>
> I have built a CSW build for SPARC and Intel Solaris 8, found at
> http://www.blastwave.org.
> It does work with Solaris 9, but with the exception for that there is a
> problem with threads on SPARC (as noted by several sources).
> I still have the build tree for native Solaris 9 on one of the servers,
> so I might be able to schedule some time to test with other threading
> libraries than the native one. But please let me know if interested...

Thanks for the link. I will check it out.

> The developers have changed the way of fiddling with threads (task
> control in the run-time) to cater for the change in the thread API in
> Solaris 9 in the later 5.01 source tree, but that change does not really
> work when incorporated into the GCC tree the way I have tested it.
> The former method was very very specific to how GCC produces the
> binaries, and the new method is somewhat less "hack'n'slashy", but I
> don't seem to get it to work though.
> The fault most likely on my side of course...
> Using a "clean" 5.xx would probably be a way to verify...
>
> BTW, just being curious, would you mind adding some meat on the
> "generated too many errors"? Just interested to know what went wrong...

I was trying to re-generate the build errors. But I could not get to
make bootstrap with Ada although I did:

% ../configure --enable-languages=c,ada

gnat was not built and I look into Make-lang, Ada was not in there. I
don't know why.

I am using gcc-3.3.2 instead of 3.3 the last time I tried to build.

Adrian Hoe

unread,
Oct 27, 2003, 11:19:14 PM10/27/03
to
Adrian Hoe wrote:

> Andreas Almroth wrote:
>
>> The developers have changed the way of fiddling with threads (task
>> control in the run-time) to cater for the change in the thread API in
>> Solaris 9 in the later 5.01 source tree, but that change does not
>> really work when incorporated into the GCC tree the way I have tested it.
>> The former method was very very specific to how GCC produces the
>> binaries, and the new method is somewhat less "hack'n'slashy", but I
>> don't seem to get it to work though.
>> The fault most likely on my side of course...
>> Using a "clean" 5.xx would probably be a way to verify...
>>
>> BTW, just being curious, would you mind adding some meat on the
>> "generated too many errors"? Just interested to know what went wrong...
>
>
> I was trying to re-generate the build errors. But I could not get to
> make bootstrap with Ada although I did:
>
> % ../configure --enable-languages=c,ada
>
> gnat was not built and I look into Make-lang, Ada was not in there. I
> don't know why.
>
> I am using gcc-3.3.2 instead of 3.3 the last time I tried to build.

I can't configure to build the gnat in gcc 3.3.2.

With the command below:

% ../configure --enable-languages=c,ada

and I get:
...
checking for compiler driver that understands Ada... (cached) no
...

After the configure, I checked Make-lang and Ada is not in there.

Can someone tell me what's going wrong here?

I have gcc 2.95.3 and gnat 3.15p installed on Sun Blade 150/Solaris 9.

Jeff C,

unread,
Oct 27, 2003, 11:26:10 PM10/27/03
to

"Adrian Hoe" <Adri...@nowhere.com> wrote in message
news:3f9ded55$1...@news.tm.net.my...

There are probably a few was to work around this but the easiest thing is to
ignore you 2.95.3 install (move
out of your path) and bootstrap with 3.15.

Note that it is saying (cached) which means it will not run this test again
so blow away your build
area and start over (easiest way).

Also your configure looks a little strange

../configure

Where are you building from? You should not build from "inside" the source
directories.
I suppose of you made a new directory inside the top most level of the gcc
directory and built
from in there this configure path would make sense.

Finally, make sure you follow all of the other GNAT specific build
instructions from the manual.

Steve

unread,
Oct 28, 2003, 9:48:05 AM10/28/03
to

"Adrian Hoe" <Adri...@nowhere.com> wrote in message
news:3f9ded55$1...@news.tm.net.my...
> Adrian Hoe wrote:
[snip]

> With the command below:
>
> % ../configure --enable-languages=c,ada
>
> and I get:
> ...
> checking for compiler driver that understands Ada... (cached) no
> ...
>
> After the configure, I checked Make-lang and Ada is not in there.
>
> Can someone tell me what's going wrong here?
>

Did you follow the instructions at http://gcc.gnu.org/install/build.html

For "Building the Ada compiler"

I haven't done this myself, but the question comes up frequently on the gcc
mailing list. After reading this page and following the instructions most
are successful.

Steve
(The Duck)

Adrian Hoe

unread,
Oct 28, 2003, 10:36:14 AM10/28/03
to
Jeff C, wrote:
>
>
> There are probably a few was to work around this but the easiest thing is to
> ignore you 2.95.3 install (move
> out of your path) and bootstrap with 3.15.

DO you mean gcc 3.15?

> Note that it is saying (cached) which means it will not run this test again
> so blow away your build
> area and start over (easiest way).

I will always get the same message when I deleted the whole build area
and start over.


> Also your configure looks a little strange
>
> ../configure
>
> Where are you building from? You should not build from "inside" the source
> directories.
> I suppose of you made a new directory inside the top most level of the gcc
> directory and built
> from in there this configure path would make sense.


I built from gcc-3.3.2/objdir

> Finally, make sure you follow all of the other GNAT specific build
> instructions from the manual.


Yes. I followed exactly the manual.

Jeff C,

unread,
Oct 28, 2003, 7:24:26 PM10/28/03
to

"Adrian Hoe" <Adri...@nowhere.com> wrote in message
news:3f9e8c01$1...@news.tm.net.my...

> Jeff C, wrote:
> >
> >
> > There are probably a few was to work around this but the easiest thing
is to
> > ignore you 2.95.3 install (move
> > out of your path) and bootstrap with 3.15.
>
> DO you mean gcc 3.15?

No, I mean GNAT 3.15p

You have to have a GNAT compiler already installed to start with. It is
easiest to just use (if you have it) GNAT for all parts of the bootstrap..
So, bootstrap such that when you type

which gcc (assuming csh)
it comes back with a path to the gcc that you installed already from GNAT
3.15p


Adrian Hoe

unread,
Nov 1, 2003, 12:51:17 AM11/1/03
to

Do you suggest to bootstrap gnat only?

Anyhow, I'm still unable to bootstrap gnat. The configure does not
create the "ada" directory in <obj> directory.

Here's the which results:

%which gcc
/opt/sfw/bin/gcc

%which gnatmake
/opt/sfw/bin/gnat/gnatmake

Bonk! (Banging my head on the keyboard :))

Jeff C,

unread,
Nov 1, 2003, 9:22:07 AM11/1/03
to

"Adrian Hoe" <Adri...@nowhere.com> wrote in message
news:3fa348e4$1...@news.tm.net.my...

> Jeff C, wrote:
>
> Do you suggest to bootstrap gnat only?
>
> Anyhow, I'm still unable to bootstrap gnat. The configure does not
> create the "ada" directory in <obj> directory.
>
> Here's the which results:
>
> %which gcc
> /opt/sfw/bin/gcc
>
> %which gnatmake
> /opt/sfw/bin/gnat/gnatmake
>


I am not suggested to bootrap GNAT only. I AM suggesting that the bootstrap
should only be done with your existing GNAT gcc and not a mix of a C only
gcc and a GNAT gcc.

Remove /opt/sfw/bin from your path so that when you type

which gcc

You get

/opt/sfw/bin/gnat/gcc

It looks to me like configure is finding a gcc that does not know how to
compile Ada.

There are ways of using one gcc for bootrapping the Ada part and one for the
C part but there
probably is not good reason for that in most cases.


Jeff C,

unread,
Nov 1, 2003, 9:28:26 AM11/1/03
to
If you still have problems getting this to go after fixing your path I could
probably build a binary Solaris install from
the source files I used to make the Rehat 9 GNAT 5.01p RPM.

Note that I don't think I know how to bundle it like ACT does with the
./doconfig ./doinstall (or is it just
doinstall on the newer versions...hmm) commands but I could make something
that goes to someplace under /opt pretty easily.


Ludovic Brenta

unread,
Nov 1, 2003, 9:52:06 AM11/1/03
to

Adrian, you do not need to change your path. You can pass the CC
environment variable to ./configure so it'll pick up the correct
compiler driver. Like so in bash or ksh:

$ CC=/opt/sfw/bin/gnat/gnatgcc ./configure --enable-languages=c,ada

That's how I bootstrap gnat 3.15p on Debian GNU/Linux.

In csh I suppose you'd do:

% setenv CC /opt/sfw/bin/gnat/gcc
% ./configure --enable-languages=c,ada

HTH

--
Ludovic Brenta.

Andreas Almroth

unread,
Nov 1, 2003, 11:29:26 AM11/1/03
to
Steve wrote:
> "Adrian Hoe" <Adri...@nowhere.com> wrote in message
> news:3f9ded55$1...@news.tm.net.my...
>
>>Adrian Hoe wrote:
>
> [snip]
>

<snip>

>
> Did you follow the instructions at http://gcc.gnu.org/install/build.html
>
> For "Building the Ada compiler"
>
> I haven't done this myself, but the question comes up frequently on the gcc
> mailing list. After reading this page and following the instructions most
> are successful.
>

Or, use my newly built package of 3.3.2 for Solaris 8 (SPARC and Intel).
Not yet released by CSW project, but available (even less supported...)
in my home dir at CSW.

http://www.blastwave.org/~aalmroth/
gcc3-3.3.2,REV=2003.10.29-SunOS5.8-i386-CSW.pkg.gz
gcc3-3.3.2,REV=2003.10.29-SunOS5.8-sparc-CSW.pkg.gz
gcc3rt-3.3.2,REV=2003.10.29-SunOS5.8-i386-CSW.pkg.gz
gcc3rt-3.3.2,REV=2003.10.29-SunOS5.8-sparc-CSW.pkg.gz

But recommended is to wait until we release it in the unstable
distribution through the mirror sites, although what is there is what I
have put forward as final candidate.

/Andreas

Adrian Hoe

unread,
Nov 2, 2003, 10:49:59 PM11/2/03
to
Andreas Almroth wrote:

I'm interested but I want to learn to build one for myself. I have been
trying to bootstrap one some time ago. Each time I tried, it failed and
some high priority tasks came along and I was forced to defer. :)

Adrian Hoe

unread,
Nov 3, 2003, 4:36:34 AM11/3/03
to

Ludovic Brenta wrote:


Thanks for the tips. Now the configure recognized ada and created
ada/Makefile in obj/gcc but I encountered an error during bootstrap:

Bootstrapping the compiler
make: Fatal error in reader: Makefile, line 987: Unexpected end of line seen
Current working directory /home/byhoe/download/gcc-3.3.2/gcc-3.3.2/obj/gcc
*** Error code 1
make: Fatal error: Command failed for target `bootstrap'

I touched those files as in the Build document of gcc.

I attach my obj/Makefile:

Makefile

Andreas Almroth

unread,
Nov 5, 2003, 1:35:04 PM11/5/03
to
Adrian Hoe wrote:
>
>
> Ludovic Brenta wrote:
>

[snip]

>
> Thanks for the tips. Now the configure recognized ada and created
> ada/Makefile in obj/gcc but I encountered an error during bootstrap:
>
> Bootstrapping the compiler
> make: Fatal error in reader: Makefile, line 987: Unexpected end of line
> seen
> Current working directory
/home/byhoe/download/gcc-3.3.2/gcc-3.3.2/obj/gcc
> *** Error code 1
> make: Fatal error: Command failed for target `bootstrap'

I only say: Use GNU make.
The Makefiles are in some cases using gmake only contructs. I believe it
is also mentioned in the build documentation...

Godd luck building it! Should not be hard now, as the configure script
found ada.

/Andreas

Adrian Hoe

unread,
Nov 6, 2003, 12:06:25 AM11/6/03
to
Andreas Almroth wrote:

>
> I only say: Use GNU make.
> The Makefiles are in some cases using gmake only contructs. I believe it
> is also mentioned in the build documentation...
>
> Godd luck building it! Should not be hard now, as the configure script
> found ada.
>

Argh! I mixed up both "make" and "gmake". I was so used to "make".


Now it began to compile but not for long. I encountered the following
problems:

rm -rf libbackend.a
ar rc libbackend.a alias.o bb-reorder.o bitmap.o builtins.o
caller-save.o calls.o cfg.o cfganal.o cfgbuild.o cfgcleanup.o
cfglayout.o cfgloop.o cfgrtl.o combine.o conflict.o convert.o cse.o
cselib.o dbxout.o debug.o df.o diagnostic.o doloop.o dominance.o
dwarf2asm.o dwarf2out.o dwarfout.o emit-rtl.o except.o explow.o expmed.o
expr.o final.o flow.o fold-const.o function.o gcse.o genrtl.o
ggc-common.o global.o graph.o gtype-desc.o haifa-sched.o hashtable.o
hooks.o ifcvt.o insn-attrtab.o insn-emit.o insn-extract.o insn-opinit.o
insn-output.o insn-peep.o insn-recog.o integrate.o intl.o jump.o
langhooks.o lcm.o lists.o local-alloc.o loop.o mbchar.o optabs.o
params.o predict.o print-rtl.o print-tree.o profile.o ra.o ra-build.o
ra-colorize.o ra-debug.o ra-rewrite.o real.o recog.o reg-stack.o
regclass.o regmove.o regrename.o reload.o reload1.o reorg.o resource.o
rtl.o rtlanal.o rtl-error.o sbitmap.o sched-deps.o sched-ebb.o
sched-rgn.o sched-vis.o sdbout.o sibcall.o simplify-rtx.o ssa.o
ssa-ccp.o ssa-dce.o stmt.o stor-layout.o stringpool.o timevar.o toplev.o
tracer.o tree.o tree-dump.o tree-inline.o unroll.o varasm.o varray.o
version.o vmsdbgout.o xcoffout.o et-forest.o ggc-page.o sparc.o
ranlib libbackend.a
/opt/sfw/bin/gnat/gcc -g -DIN_GCC -W -Wall -Wwrite-strings
-Wstrict-prototypes -Wmissing-prototypes -Wtraditional
-DHAVE_CONFIG_H -o cc1 \
c-parse.o c-lang.o c-pretty-print.o attribs.o c-errors.o c-lex.o
c-pragma.o c-decl.o c-typeck.o c-convert.o c-aux-info.o c-common.o
c-opts.o c-format.o c-semantics.o c-objc-common.o c-dump.o libcpp.a
main.o libbackend.a ./intl/libintl.a ../libiberty/libiberty.a
Undefined
first referenced
symbol in file
fibheap_delete_node libbackend.a(tracer.o)
physmem_total libbackend.a(ggc-common.o)
fibheap_empty libbackend.a(tracer.o)
htab_hash_string libbackend.a(dwarf2out.o)
fibheap_insert libbackend.a(tracer.o)
fibheap_new libbackend.a(tracer.o)
htab_create_alloc libbackend.a(cselib.o)
lbasename libcpp.a(cppfiles.o)
fibheap_delete libbackend.a(tracer.o)
fibheap_extract_min libbackend.a(tracer.o)
reconcat c-aux-info.o
ld: fatal: Symbol referencing errors. No output written to cc1
gmake[1]: *** [cc1] Error 1
gmake[1]: Leaving directory `/home/byhoe/download/gcc-3.3.2/gcc-3.3.2/obj'
gmake: *** [stage1_build] Error 2


Do you have any idea how to solve this? I see that I am close but not so close yet. :(


Thanks. :)

Adrian Hoe

unread,
Nov 6, 2003, 12:20:57 AM11/6/03
to

Adrian Hoe wrote:

These undefined symbols can be found in the C source files under the
directory gcc-3.3.2/libiberty

When I did gmake bootstrap, it gave me an error for missing libiberty.a.
So I copied the file from one of the system lib directory. It seems like
gcc bootstrap needs to compile those files in gcc-3.3.2/libiberty to
produce libiberty.a. Is my assumption correct? If yes, how do I make
libiberty? The Makefile does not have the lines to make libiberty.a

How?--

Andreas Almroth

unread,
Nov 6, 2003, 1:19:19 AM11/6/03
to
Adrian Hoe wrote:
[snip]

>> Do you have any idea how to solve this? I see that I am close but not
>> so close yet. :(

[snip]


> These undefined symbols can be found in the C source files under the
> directory gcc-3.3.2/libiberty
>
> When I did gmake bootstrap, it gave me an error for missing libiberty.a.
> So I copied the file from one of the system lib directory. It seems like
> gcc bootstrap needs to compile those files in gcc-3.3.2/libiberty to
> produce libiberty.a. Is my assumption correct? If yes, how do I make
> libiberty? The Makefile does not have the lines to make libiberty.a

That is very odd, as libiberty is about the first part that is being
built when bootstrapping, and possibly when doing the other builds as well.

I'm using the following configure;
cd objdir
../gcc-3.3.2/configure --enable-languages=c,ada enable-threads
--enable-multilib --disable-nls
cd ../gcc-3.3.2/gcc/ada
touch treeprs.ads [es]info.h nmake.ad[bs]
cd ~
cd objdir
gmake bootstrap


This will build a 32/64 bit (SPARC) capable compiler, with shared and
static libraries, with thread support (default native), and no
internationalisation.

As I write this, the compile is well into building stage2.

Try the above configure (if not already using it), and see what happens.
Perhaps it is something wrong with your development environment/paths.
I'm using CSW build for all dev tools, you are using SFW, but that
should theoretically not make a difference, but who knows.
What about your environment variables?
PATH=/usr/bin:/usr/ccs/bin:/opt/csw/bin
Well, in your case /usr/sfw/bin -^
LD_OPTIONS='-R/opt/csw/gcc3/lib -R/opt/csw/lib -L/opt/csw/gcc3/lib
-L/opt/csw/lib'
Change according to SFW places for libraries.
CC=gcc
CFLAGS='-O2'
LIBCFLAGS='-g -O2'
CXXFLAGS='-I/opt/csw/include'


/Andreas


Adrian Hoe

unread,
Nov 6, 2003, 1:33:14 AM11/6/03
to
I have got it working. gcc/gnat is bootstrapping and hopefully this time
will work. Will let you all know.

Thanks.


Adrian Hoe wrote:


--

Adrian Hoe

unread,
Nov 6, 2003, 1:52:14 AM11/6/03
to

Andreas Almroth wrote:

Did you get the following message?

*** This configuration is not supported in the following subdirectories:
target-libffi target-boehm-gc target-zlib target-libjava zlib
fastjar target-libobjc
(Any other directories should still work fine.)

--

Andreas Almroth

unread,
Nov 6, 2003, 3:54:18 AM11/6/03
to
Adrian Hoe wrote:
>
[snip]

>
> Did you get the following message?
>
> *** This configuration is not supported in the following subdirectories:
> target-libffi target-boehm-gc target-zlib target-libjava zlib
> fastjar target-libobjc
> (Any other directories should still work fine.)
>

yup, as we are not building support for C++, Java, Fortran or Objective-C.

/Andreas


Adrian Hoe

unread,
Nov 6, 2003, 6:17:41 AM11/6/03
to

Andreas Almroth wrote:

Yes! I have successfully built gcc-3.3.2. I tried to compile one of my
Ada program and it works. Now, my Ada program is statically linked and
the binary file is large. How do I make a dynamic link?

Here's the contents of
/usr/local/lib/gcc-lib/sparc-sun-solaris2.9/3.3.2/adalib


pyxis2% dir lib*
20 -rw-r--r-- 1 root other 9804 Nov 6 19:01 libgmem.a
2224 -rw-r--r-- 1 root other 1123904 Nov 6 19:01 libgnarl.a
2 lrwxrwxrwx 1 root other 13 Nov 6 19:01 libgnarl.so
-> libgnarl-*.so
12240 -rw-r--r-- 1 root other 6250572 Nov 6 19:01 libgnat.a
2 lrwxrwxrwx 1 root other 12 Nov 6 19:01 libgnat.so
-> libgnat-*.so

I see a file, Makefile.adalib in the same directory. Is this for
building the necessary lib files? How do I do it?

After bootstrapping, I tried "make gnatlib_and_tools" and succeeded
without errors. But I don't get the dynamic library files. Have I missed
something?

Andreas Almroth

unread,
Nov 6, 2003, 8:55:23 AM11/6/03
to
Adrian Hoe wrote:

>
> Yes! I have successfully built gcc-3.3.2. I tried to compile one of my
> Ada program and it works. Now, my Ada program is statically linked and
> the binary file is large. How do I make a dynamic link?
>

in the objdir/gcc directory;
gmake gnatlib-shared

Have a look in the Makefile and you will see lots of gnat related stuff...

/Andreas

Adrian Hoe

unread,
Nov 6, 2003, 11:09:59 PM11/6/03
to

Andreas Almroth wrote:

Thanks again and it built.


After gmake gnatlib-shared, I got these in ada/rts:

22 -rw-r--r-- 1 byhoe staff 10436 Nov 7 10:56 libgmem.a
2112 -rwxr-xr-x 1 byhoe staff 1066876 Nov 7 10:56 libgnarl-3.15.so
2224 -rw-r--r-- 1 byhoe staff 1123904 Nov 7 10:44 libgnarl.a
2 lrwxrwxrwx 1 byhoe staff 16 Nov 7 10:56 libgnarl.so
-> libgnarl-3.15.so*
10992 -rwxr-xr-x 1 byhoe staff 5613388 Nov 7 10:56 libgnat-3.15.so
12240 -rw-r--r-- 1 byhoe staff 6250572 Nov 7 10:44 libgnat.a
2 lrwxrwxrwx 1 byhoe staff 15 Nov 7 10:56 libgnat.so
-> libgnat-3.15.so*


Notice the 3.15 in libgnat and libgnarl. Is this normal? Should I rename
to 3.3.2?

I'm still not able to dynamic link. What is still missing?

Adrian Hoe

unread,
Nov 6, 2003, 11:15:15 PM11/6/03
to
Andreas Almroth wrote:


When I tried to run a simple tasking program, I got "Segmentation Fault
(code dumped)". Could gcc not build properly? I believe the threading
was not build properly. Or did I miss some parameters?

I followed:

../gcc-3.3.2/configure --enable-languages=c,ada --enable-threads

--enable-multilib --disable-nls
cd ../gcc-3.3.2/gcc/ada
touch treeprs.ads [es]info.h nmake.ad[bs]

Simple tasking source:


with Ada.Text_Io; use Ada.Text_Io;

procedure Welcome is
task Hello;

task body Hello is
begin
Put_Line ("Hello.");
end Hello;

task World;

task body World is
begin
Put_Line ("World!");
end World;

begin
Put_Line ("Welcome!");
end Welcome;

Andreas Almroth

unread,
Nov 7, 2003, 1:50:01 AM11/7/03
to
Adrian Hoe wrote:
>
> After gmake gnatlib-shared, I got these in ada/rts:
>
> 22 -rw-r--r-- 1 byhoe staff 10436 Nov 7 10:56 libgmem.a
> 2112 -rwxr-xr-x 1 byhoe staff 1066876 Nov 7 10:56 libgnarl-3.15.so
> 2224 -rw-r--r-- 1 byhoe staff 1123904 Nov 7 10:44 libgnarl.a
> 2 lrwxrwxrwx 1 byhoe staff 16 Nov 7 10:56 libgnarl.so
> -> libgnarl-3.15.so*
> 10992 -rwxr-xr-x 1 byhoe staff 5613388 Nov 7 10:56 libgnat-3.15.so
> 12240 -rw-r--r-- 1 byhoe staff 6250572 Nov 7 10:44 libgnat.a
> 2 lrwxrwxrwx 1 byhoe staff 15 Nov 7 10:56 libgnat.so ->
> libgnat-3.15.so*
>
>
> Notice the 3.15 in libgnat and libgnarl. Is this normal? Should I rename
> to 3.3.2?
>

Normal I guess, probably the stuff from gnat 3.15, but who knows...

> I'm still not able to dynamic link. What is still missing?

Have you tried
export LD_OPTIONS='-R... -L...'
Replace ... with the path to the dynamic libraries
Try compile your app, and check with ldd command if it references the *.so.
Also check the gnat manual for command line options run-time options.

/Andreas

Andreas Almroth

unread,
Nov 7, 2003, 2:00:29 AM11/7/03
to
Adrian Hoe wrote:
>
> When I tried to run a simple tasking program, I got "Segmentation Fault
> (code dumped)". Could gcc not build properly? I believe the threading
> was not build properly. Or did I miss some parameters?
>

Right, as I mentioned earlier in the thread, tasking is not working on
Solaris 9 (SPARC). The sort of workaround (hack in my opinion) that
worked up to Solaris 8, does not work, as Sun apparently changed the
behaviour on how in the memory keep track on threads.

Although I fairly sure it won't work, you could experiment with using
alternative thread libraries, and hope that the ada code is designed to
change its behaviour. Check in the configure doc for supported threading
models by gcc, and hopefully those works with ada rts as well.

In the gnat 5.0 sources there is a new implementation, which I have
tried to use in 3.3 (not 3.3.2), but it did not work. Fault on my side
I'm sure.
The upcoming version of gcc is rumored to have a newly synced ada tree
from the latest? gnat, so we will have to wait and see.

I'm currently on Solaris 8, so I have no problem using tasking in the
application I'm developing, but migration to Solaris 9 is "on wait"
until tasking is proven to work.

/Andreas

Adrian Hoe

unread,
Nov 7, 2003, 2:15:25 AM11/7/03
to
Andreas Almroth wrote:

So, the tasking problem is caused by Solaris 9. I'm sure ACT or someone
is working on this issue? Does anyone know of any progress?

Too bad I don't have the Solaris 8 CDs. It came pre-installed with
Solaris 9 CDs bundled in SB150. :( I guess I will have to wait till a
gnat workaround has been released. :(

How about Solaris 10? I read there is a major work out on Solaris 10
architecture. Any news?

Andreas Almroth

unread,
Nov 7, 2003, 12:05:53 PM11/7/03
to
Adrian Hoe wrote:
>
> So, the tasking problem is caused by Solaris 9. I'm sure ACT or someone
> is working on this issue? Does anyone know of any progress?

I would re-phrase that as; gnat/gcc 3.3.2 is using a non-portable way
between Solaris releases of keeping track on threads in its run-time
environment.
I don't think Sun intended it to be used as it is used right now.
It apparently cuts down the overhead during run-time, but to the cost of
being non-portable.

>
> Too bad I don't have the Solaris 8 CDs. It came pre-installed with
> Solaris 9 CDs bundled in SB150. :( I guess I will have to wait till a
> gnat workaround has been released. :(
>

I believe the Solaris 8 CD's are still downloadable from sun.com if you
have a good link and a cd-writer.

> How about Solaris 10? I read there is a major work out on Solaris 10
> architecture. Any news?

There are news, but not related to this news group. Check out
comp.unix.solaris and the developer part of sun.com

/Andreas

Adrian Hoe

unread,
Nov 19, 2003, 3:10:45 AM11/19/03
to
Andreas Almroth wrote:


Nope! LD_OPTIONS alone does not work. I need -lgnat -L/usr/local/lib/gcc-lib/sparc-sun-solaris2.9/3.3.2/adalib --RTS=/usr/local/lib/gcc-lib/sparc-sun-solaris2.9/3.3.2/ for gnatmake.


Just checking of I have LD_OPTIONS correct:


$ env

LD_OPTIONS=-R/usr/local/lib/gcc-lib/sparc-sun-solaris2.9/3.3.2/
-L/usr/local/lib/gcc-lib/sparc-sun-solaris2.9/3.3.2/adalib

Is there a way to save -largs and -L<libpath> each time I use gnatmake.
I just want to use gnatmake without the hassle to type -l and -L
everytime so let's forget about Makefile.

0 new messages