Mon, 19 May 1997 17:03:45 +0200 (MET DST)


Hi guys,
 Did somebody have experience to install g77 and gpc together (the newest
versions?)? If it is you can you read the set of messages below with me
and my system administrator to help us.
 Yous, Vadim
  

---------- Forwarded message ----------
Mon, 19 May 1997 10:47:30 +0200 (MET DST)
fB 
To: Vadim Aleksandrovich Denisyuk 
Linking errors (fwd)_(re) 

Peter wrote:

>     1. Get a recent version of GNU make. Version 3.74 or better is known
>        to work.
>     2. Build GCC in a seperate directory instead of using the GCC source
>        directory.
>     3. Manually delete these files from the GCC object directory:
>        `stor-layout.o' `dbxout.o' `expr.o' `fold-const.o' `optabs.o'
>        `convert.o' `function.o' `setop.o' `toplev.o' then resume `make'.

This was in the FAQ.  Still I have:
Undefined                       first referenced
 symbol                             in file
reg_known_equiv_p                   ../gcc-2.7.2.2/sched.o
read_dependence                     ../gcc-2.7.2.2/sched.o
record_base_value                   ../gcc-2.7.2.2/loop.o
output_dependence                   ../gcc-2.7.2.2/sched.o
true_dependence                     ../gcc-2.7.2.2/cse.o
anti_dependence                     ../gcc-2.7.2.2/sched.o
flag_alias_check                    ../gcc-2.7.2.2/calls.o
reg_known_value                     ../gcc-2.7.2.2/sched.o
init_alias_analysis                 ../gcc-2.7.2.2/cse.o
flag_move_all_movables              ../gcc-2.7.2.2/loop.o
flag_reduce_all_givs                ../gcc-2.7.2.2/loop.o
ld: fatal: Symbol referencing errors. No output written to gpc1
*** Error code 1
make: Fatal error: Command failed for target `gpc1'     

Most of these are defined in ../gcc-2.7.2.2/alias.o, so linking with
that one (which _might_ be dangerous) gives:

Undefined                       first referenced
 symbol                             in file
flag_alias_check                    ../gcc-2.7.2.2/calls.o
flag_argument_noalias               ../gcc-2.7.2.2/alias.o
flag_move_all_movables              ../gcc-2.7.2.2/loop.o
flag_reduce_all_givs                ../gcc-2.7.2.2/loop.o

these I can deal with.

While I am pretty sure I can now produce an executable, you should 
carefully test it, as I did undocumented things to get it to work.

fB

---------- Forwarded message ----------
Mon, 19 May 1997 15:13:18 +0200 (MET DST)
fB 
To: Vadim Denisyuk 
GPC compiled, but it does not work.

Apparently, the new version of GPC does not interact well with
the Solaris linker/loader. This might be due to the modifications
I introduced in order to compile it with G77, though[1].

The error I get while compiling the hello.pas test is:
=========================================================================
% gpc test/standard_pascal/hello.pas
ld: fatal: file test/standard_pascal/hello.pas: unknown type, unable to
process
using elf(3E) libraries
ld: fatal: File processing errors.  No output written to a.out
=========================================================================
So it seems like gpc passes the wrong arguments to ld, something which
did not happen with the previous version. Indeed g77 and gcc work
perfectly with the Solaris-provided ld. On second thought... it seems
like gpc passes everything unchanged to ld, without even attempting to
compile anything. Indeed:
=========================================================================
% ./gpc -c test/standard_pascal/hello.pas
gpc: test/standard_pascal/hello.pas: linker input file unused since
linking not done
=========================================================================
So I probably messed up the command parser somewhere (see note).

I'd install gpc in a completely separate directory with it's own
straightforward version of gcc, but I already tried to do this with
the previous version and, alas, g77 was (rather mysteriously) broken.
I might real soon now experiment a little with doing this again in my
copious free time.

BTW, in the meanwhile I updated GCC/G77 to version 2.7.2.2.f.2 on all
machines, and left 2.7.2.1 installed so that the old version of gpc
still works. This _seems_ not to cause any problem right now.

[1] This essentially reduces to linking gpc1 with ../gcc-2.7.2.2/alias.o
    and introducing the G77-specific options in toplev.c. I also had to
    explicitly #define some constants in a couple of places, though.
    As I could not be bothered to read and understand the source I
    obviously don't know what it's going on.
-- 
fB

---------- Forwarded message ----------
Mon, 19 May 1997 15:43:56 +0200 (MET DST)
fB 
To: Vadim Denisyuk 
Before you ask...

I have done this (from the FAQ):

   A number of Unix configurations use their system's linker instead of
GNU `ld'. Usually, GPC and GCC need a program called `collect2' before
calling the system's `ld'. `collect2' is installed by GCC, and if you
only install GPC, it will not find `collect2', and use the system
linker directly, which will result in various linker errors. The
solution is to copy `collect2' by hand from the GCC directory to the
location where `gpc1' lives.


--
fB

---------- Forwarded message ----------
Mon, 19 May 1997 16:32:57 +0200 (MET DST)
fB 
To: Vadim Aleksandrovich Denisyuk 
Before you ask..._(re) 

The new gpc compiles, but does not work. Seems like in
order to make it to compile I screwed up the command parser.
Sorry, but I exactly remade everything I made last time to compile V2.0
and it did not work anymore. Since I have one Pascal user and about
thirty Fortran users, I'd rather break Pascal than Fortran.
I will try again to check what the problem is, but I think that simply
GPC is not yet able to peacefully coexist with G77.

--
fB


fB (frances@fis.unico.it)

HTML conversion by Lluís de Yzaguirre i Maura
Institut de Lingüística Aplicada - Universitat "Pompeu Fabra"
e-mail: de_yza@upf.es