From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,890f0efb42e0c802,start X-Google-Attributes: gid103376,public From: "Clifford R. Conover" Subject: ADA compile problem Date: 1998/11/11 Message-ID: <364A29DB.66614BE2@montana.edu>#1/1 X-Deja-AN: 410906852 Content-Transfer-Encoding: 7bit X-Accept-Language: en Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@news.montana.edu X-Trace: netra.msu.montana.edu 910829754 1195 153.90.113.217 (12 Nov 1998 00:15:54 GMT) Organization: Montana State University Mime-Version: 1.0 NNTP-Posting-Date: 12 Nov 1998 00:15:54 GMT Newsgroups: comp.lang.ada Date: 1998-11-12T00:15:54+00:00 List-Id: 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 - -------------------------------------------------------------------