When installing gcc 3.4.0 from scratch using a non default prefix and exec prefix, the resulting ADA compiler cannot compile anything after installation. The compiler has been configured as noted below, compiled with "make bootstrap && make -C gcc gnatlib_and_tools" and installed with "make install". After installation, the following ADA programm cannot be compiled: "procedure conftest is begin null; end conftest;". The command "gcc -c conftest.adb" results in the following error message: fatal error, run-time library not installed correctly cannot locate file system.ads compilation abandoned gcc -v -c conftest.adb gives the following output: Reading specs from /net/camos/opt/exec/Linux-i686/lib/gcc/i686-pc-linux- gnu/3.4.0/specs Configured with: /home/schoepf/net/src/extern/gcc-3.4.0/configure -- prefix=/net/camos/opt --exec-prefix=/net/camos/opt/exec/Linux-i686 --enable- languages=c,c++,ada Thread model: posix gcc version 3.4.0 /net/camos/opt/exec/Linux-i686/libexec/gcc/i686-pc-linux-gnu/3.4.0/gnat1 - quiet -dumpbase conftest.adb -mtune=pentiumpro conftest.adb -o /tmp/ccp9fm08.s fatal error, run-time library not installed correctly cannot locate file system.ads compilation abandoned "strace /net/camos/opt/exec/Linux-i686/libexec/gcc/i686-pc-linux- gnu/3.4.0/gnat1 -quiet -dumpbase conftest.adb -mtune=pentiumpro conftest.adb - o /tmp/ccp9fm08.s" gives the following results: ... open("/net/camos/opt/exec/Linux-i686/exec/Linux-i686/lib/gcc/i686-pc-linux- gnu/3.4.0/ada_source_path", O_RDONLY) = -1 ENOENT (No such file or directory) open("/net/camos/opt/exec/Linux-i686/exec/Linux-i686/lib/gcc/i686-pc-linux- gnu/3.4.0/ada_object_path", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("system.ads", 0xbfffecd0) = -1 ENOENT (No such file or directory) stat64("/net/camos/opt/exec/Linux-i686/exec/Linux-i686/lib/gcc/i686-pc-linux- gnu/3.4.0/adainclude/system.ads", 0xbfffec10) = -1 ENOENT (No such file or directory) write(1, "fatal error, run-time library no"..., 54fatal error, run-time library not installed correctly ) = 54 write(1, "cannot locate file system.ads\n", 30cannot locate file system.ads ) = 30 write(2, "compilation abandoned\n", 22compilation abandoned ... It looks like the compiler doubles the exec prefix in the path, therefore it doesn't find the file located here: /net/camos/opt/exec/Linux-i686/lib/gcc/i686-pc-linux- gnu/3.4.0/adainclude/system.ads
You did not follow the directions. The directions say "cd gcc && make -C gnatlib_and_tools" not "make -C gcc gnatlib_and_tools" Can you try that?
Subject: RE: ada compiler not working after installation pinskia at gcc dot gnu dot org wrote: > ------- Additional Comments From pinskia at gcc dot gnu dot org > 2004-06-04 11:23 ------- You did not follow the directions. > The directions say "cd gcc && make -C gnatlib_and_tools" not "make -C > gcc gnatlib_and_tools" > > Can you try that? I did try this in a new directory and got the same results.
Are you sure that your orginal Ada compiler is working?
Subject: RE: ada compiler not working after installation pinskia at gcc dot gnu dot org wrote: > ------- Additional Comments From pinskia at gcc dot gnu dot org > 2004-06-04 14:42 ------- Are you sure that your orginal Ada compiler > is working? Yes. I tried it with the following compilers: Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.2.3/specs Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --with-system-zlib --enable-__cxa_atexit --host=i386-redhat-linux Thread model: posix gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-20) and Reading specs from /usr/lib/gcc-lib/i586-suse-linux/3.3.1/specs Configured with: ../configure --enable-threads=posix --prefix=/usr --with-local-prefix=/usr/local --infodir=/usr/share/info --mandir=/usr/share/man --libdir=/usr/lib --enable-languages=c,c++,f77,objc,java,ada --disable-checking --enable-libgcj --with-gxx-include-dir=/usr/include/g++ --with-slibdir=/lib --with-system-zlib --enable-shared --enable-__cxa_atexit i586-suse-linux Thread model: posix gcc version 3.3.1 (SuSE Linux) Both are installed from the RPMs supplied by the respective vendors. And with both compilers the compilation log for gcc 3.4.0 looks ok. They are both able to compile the empty test program without errors.
Subject: RE: ada compiler not working after installation One more thing to note. When I set GCC_ROOT to /net/camos/opt, the compiler works ok. (It is able to compile itself.)
Subject: RE: ada compiler not working after installation Further debugging shows that the problem must be somewhere in Relocate_Path in the file osint.adb. It is called with Prefix=/net/camos/opt/ and Path=/net/camos/opt/exec/Linux-i686/lib/gcc/i686-pc-linux-gnu/3.4.0/. Further down, Std_Prefix is initialized with /net/camos/opt/exec/Linux-i686/. Then a new path is constructed and returned as /net/camos/opt/exec/Linux-i686/exec/Linux-i686/lib/gcc/i686-pc-linux-gnu/3.4.0/ which is wrong. As this code has been added for GCC 3.4.0 (file revision 1.13), it probably does not handle exec prefixes correctly.
Right, alternate exec-prefix have never been supported by the Ada front-end. Suggestions/patches welcome to add this capability. Arno
Changing summary line. Arno