From: "Clifford R. Conover" <RConover@montana.edu>
Subject: ADA compile problem
Date: 1998/11/11
Date: 1998-11-12T00:15:54+00:00 [thread overview]
Message-ID: <364A29DB.66614BE2@montana.edu> (raw)
I'm having a little trouble getting GNAT to run on my RedHat 5.2 box.
I followed your directions about building that object using this script
#!/bin/tcsh -f
foreach f (../adainclude/*.ad[bs])
gcc -c -O2 -gnatg -I- $f
end
Then I executed:
mv libgnat.a libgnat.a.old
ar q libgnat.a *.o
rm *.o
ranlib libgnat.a
Then I tried to build the hello example program and got these errors:
[rconover@testb examples]$ gnatmake hello.adb
gnatbind -x hello.ali
gnatlink hello.ali
b_hello.o: In function `adainit':
b_hello.o(.text+0x13): undefined reference to `__gnat_set_globals'
b_hello.o: In function `main':
b_hello.o(.text+0x37): undefined reference to `gnat_argc'
b_hello.o(.text+0x3f): undefined reference to `gnat_argv'
b_hello.o(.text+0x47): undefined reference to `gnat_envp'
b_hello.o(.text+0x4c): undefined reference to `__gnat_initialize'
b_hello.o(.text+0x60): undefined reference to `__gnat_finalize'
b_hello.o(.text+0x65): undefined reference to `gnat_exit_status'
./hello.o: In function `_ada_hello':
./hello.o(.text+0xef): undefined reference to
`__gnat_raise_constraint_error'
./hello.o(.text+0x103): undefined reference to
`__gnat_raise_constraint_error'
/home/rconover/gnat/lib/gcc-lib/i386-linux/2.7.2.1/adalib//libgnat.a(g-io.o):
In function `gnat__io__get':
g-io.o(.text+0x4): undefined reference to `get_int'
/home/rconover/gnat/lib/gcc-lib/i386-linux/2.7.2.1/adalib//libgnat.a(g-io.o):
In function `gnat__io__get__2':
g-io.o(.text+0x10): undefined reference to `get_char'
/home/rconover/gnat/lib/gcc-lib/i386-linux/2.7.2.1/adalib//libgnat.a(g-io.o):
In function `gnat__io__get_line':
g-io.o(.text+0x74): undefined reference to
`__gnat_raise_constraint_error'
g-io.o(.text+0xb7): undefined reference to
`__gnat_raise_constraint_error'
g-io.o(.text+0xe5): undefined reference to
`__gnat_raise_constraint_error'
/home/rconover/gnat/lib/gcc-lib/i386-linux/2.7.2.1/adalib//libgnat.a(g-io.o):
In function `gnat__io__put':
g-io.o(.text+0x12b): undefined reference to `put_int'
/home/rconover/gnat/lib/gcc-lib/i386-linux/2.7.2.1/adalib//libgnat.a(g-io.o):
In function `gnat__io__put__2':
g-io.o(.text+0x13d): undefined reference to `put_char'
/home/rconover/gnat/lib/gcc-lib/i386-linux/2.7.2.1/adalib//libgnat.a(g-io.o):
In function `gnat__io__put__3':
g-io.o(.text+0x171): undefined reference to
`__gnat_raise_constraint_error'
/home/rconover/gnat/lib/gcc-lib/i386-linux/2.7.2.1/adalib//libgnat.a(s-taspda.o):
In function `system__task_specific_data__create_tsd':
s-taspda.o(.text+0x11b): undefined reference to `__gnat_malloc'
s-taspda.o(.text+0x12e): undefined reference to
`__gnat_raise_constraint_error'
/home/rconover/gnat/lib/gcc-lib/i386-linux/2.7.2.1/adalib//libgnat.a(s-taspda.o):
In function `system__task_specific_data__destroy_tsd':
s-taspda.o(.text+0x16b): undefined reference to
`__gnat_raise_constraint_error'
s-taspda.o(.text+0x181): undefined reference to `__gnat_free'
gnatmake: *** link failed.
My environment setup:
ADA_INCLUDE_PATH=/home/rconover/gnat/lib/gcc-lib/i386-linux/2.7.2.1/adainclude
ADA_OBJECTS_PATH=/home/rconover/gnat/lib/gcc-lib/i386-linux/2.7.2.1/adalib
C_INCLUDE_PATH=/home/rconover/gnat/lib/gcc-lib/i386-linux/2.7.2.1/include
GCC_EXEC_PREFIX=/home/rconover/gnat/lib/gcc-lib/i386-linux/2.7.2.1/
LD_RUN_PATH=/home/rconover/gnat/lib/gcc-lib/i386-linux/2.7.2.1/adalib
PATH=/home/rconover/gnat/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/rconover/bin:/home/rconover/script
s:
the contents of my ada gnat lib is:
[rconover@testb adalib]$ ls -l l*
-rw-rw-r-- 1 rconover rconover 2087050 Nov 11 16:58 libgnat.a
-rwxrwxrwx 1 rconover rconover 1747844 Nov 11 16:07 libgnat.old
I'm using the rts-fsu selection of files for my adalib.
I've tried using the native selection but it didn't work either.
Gcc when run with "gcc -v" reports:
[rconover@testb 2.7.2.1]$ gcc -v
Reading specs from
/home/rconover/gnat/lib/gcc-lib/i386-linux/2.7.2.1/specs
gcc version 2.7.2.1
Do you have any suggestions on what I could be doing wrong? Any
suggestions are appreciated.
--
-------------------------------------------------------------------
- Clifford "Rusty" Conover - RConover@montana.edu -
-------------------------------------------------------------------
next reply other threads:[~1998-11-11 0:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-11-11 0:00 Clifford R. Conover [this message]
1998-11-12 0:00 ` ADA compile problem grave
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox