On 9/25/18 3:42 AM, Jonathan Wakely wrote: > On Tue, 25 Sep 2018 at 10:38, nosay <chenwen1228@xxxxxxx> wrote: >> >> Hi, Jeff Law. >> >> In my environment, neither egcs-1.1.2 nor gcc-2.95.2 can be compiled successfully . There are some errors in the code, for example: >> decl.c: In function 'start_struct': >> decl.c:4448:1: error: argument 'code' doesn't match prototype >> start_struct (code, name) >> ^ >> In file included from decl.c:187:0: >> ch-tree.h:736:13: error: prototype declaration >> extern tree start_struct PROTO((enum tree_code, tree)); >> ^ >> >> Can you teach me how to resolve this problem? > > It's going to be very difficult to compile such old code on a modern > system. You will need a lot of patience and persistence, and it is > unlikely that people on this mailing list are going to want to give > you the answer to every little problem along the way. Right. Those compilers are roughly 20 years old at this point. It is highly likely they will need various hacks to get them to build with more modern tools. You may need to change the default C dialect as well as I think GCC defaults to C99 now rather than C89. > > You could try installing an old version of Debian or Ubuntu in a VM or > a container, and compile egcs inside that VM/container. That might be > a shortcut to getting an old environment (with old GCC and glibc) that > can be used to build even older versions. I'd think this is the better solution. I'd expect something like Red Hat Linux 6 or Red Hat Linux 7 in a VM/container would be the way to go (do not confuse Red Hat Linux 6/7 with Red Hat Enterprise Linux 6/7). Jeff