public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jonathan Wakely <jwakely.gcc@gmail.com>
To: Dingjun Chen <Dingjun.Chen@geotechairborne.com>
Cc: gcc-help <gcc-help@gcc.gnu.org>
Subject: Re: An error occurred when building gcc-3.3.6
Date: Fri, 13 Oct 2023 16:29:55 +0100	[thread overview]
Message-ID: <CAH6eHdTvhSwokk1j0CMkHnhuDuMVPa9ikpBNCSbqmhXOjifxYA@mail.gmail.com> (raw)
In-Reply-To: <YT2P288MB00739DDFB9B39A2A1CCB8F4897D2A@YT2P288MB0073.CANP288.PROD.OUTLOOK.COM>

[-- Attachment #1: Type: text/plain, Size: 4652 bytes --]

On Fri, 13 Oct 2023, 16:01 Dingjun Chen, <Dingjun.Chen@geotechairborne.com>
wrote:

> Hi, guys,
>
> I am trying to build gcc-3.3.6 from Index of
> /mirrors/gcc/releases/gcc-3.3.6 (bigsearcher.com)<
> https://bigsearcher.com/mirrors/gcc/releases/gcc-3.3.6/> ,
> the following error message occurred. Could you please tell me how to fix
> it?
>
> My host computer: Dell Inspiron 16 plus 7630.
> GCC on host: gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
> under WSL.
>
> Why do I want to build gcc-3.3.6? because I want to use it to build Linux
> Kernel 2.4.36. It was requested to build Linux Kernel 2.4.36 with the GCC
> version < 4.2. (please see:
> home/dingjun/build_cross_gcc/linux-2.4.36/include/linux/compiler.h:45:2:
> error: #error "GCC >= 4.2 miscompiles kernel 2.4, do not use it!"
>    45 | #error "GCC >= 4.2 miscompiles kernel 2.4, do not use it!")
>
>
> I tried several gcc version (<4.2) and almost each one has some errors.
> Could you some tell me which gcc(<4.2 version) source codes are 100% sure
> to be built without errors?
>

I expect that none of the ancient versions will build without errors using
modern compilers. Modern compilers are stricter and reject code that was
accepted in ancient times.

It looks like the error below is in the fortran compiler. If you don't need
Fortran and other languages, disable them with --enable-languages=c to only
build a C compiler.





> Thanks & regards,
>
> Dingjun
>
>
> /***** an error occurred when building gcc-3.3.6************/
> In file included from ./config.h:17,
>                  from f/proj.h:30,
>                  from f/com.c:83:
> ./tree.h:2244:55: note: expected ‘const char *’ but argument is of type
> ‘unsigned char *’
>  2244 | extern tree build_string                PARAMS ((int, const char
> *));
>       |                                                       ^~~~~~~~~~~~
> ./../include/ansidecl.h:152:33: note: in definition of macro ‘PARAMS’
>   152 | #define PARAMS(ARGS)            ARGS
>       |                                 ^~~~
> f/com.c: At top level:
> f/com.c:11079:1: error: conflicting types for ‘ffecom_gfrt_basictype’;
> have ‘ffeinfoBasictype(ffecomGfrt)’
> 11079 | ffecom_gfrt_basictype (ffecomGfrt gfrt)
>       | ^~~~~~~~~~~~~~~~~~~~~
> In file included from f/com.c:124:
> f/com.h:236:17: note: previous declaration of ‘ffecom_gfrt_basictype’ with
> type ‘ffeinfoKindtype(ffecomGfrt)’
>   236 | ffeinfoKindtype ffecom_gfrt_basictype (ffecomGfrt ix);
>       |                 ^~~~~~~~~~~~~~~~~~~~~
> f/com.c: In function ‘ffecom_init_0’:
> f/com.c:11624:28: warning: comparison between ‘ffeinfoKindtype’ and ‘enum
> <anonymous>’ [-Wenum-compare]
> 11624 |   if (ffecom_pointer_kind_ == FFEINFO_basictypeNONE)
>       |                            ^~
> In file included from f/com.c:16573:
> ./gt-f-com.h: In function ‘gt_ggc_mx_lang_tree_node’:
> ./gt-f-com.h:65:7: warning: switch condition has boolean value
> [-Wswitch-bool]
>    65 |       switch (TREE_CODE (&((*x)).generic) == IDENTIFIER_NODE)
>       |       ^~~~~~
> f/com.c: In function ‘ffe_mark_addressable’:
> f/com.c:14300:9: warning: this statement may fall through
> [-Wimplicit-fallthrough=]
> 14300 |         put_var_into_stack (x, /*rescan=*/true);
>       |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> f/com.c:14303:7: note: here
> 14303 |       case FUNCTION_DECL:
>       |       ^~~~
> f/com.c:14304:30: warning: this statement may fall through
> [-Wimplicit-fallthrough=]
> 14304 |         TREE_ADDRESSABLE (x) = 1;
> f/com.c:14310:7: note: here
> 14310 |       default:
>       |       ^~~~~~~
> make[1]: *** [Makefile:735: f/com.o] Error 1
> make[1]: Leaving directory '/home/dingjun/build_cross_gcc/gcc-3.3.6/gcc'
> make: *** [Makefile:1546: all-gcc] Error 2
> Dingjun Chen  | Software Developer
>
> [Geotech Airborne Geophysical Surveys]
>
> Geotech Ltd. dba Geotech Airborne | 270 INDUSTRIAL PKY S | AURORA ON CA |
> L4G 3T9
> T: +1 905 841 5004 | Dingjun.Chen@geotechairborne.com<mailto:
> Dingjun.Chen@geotechairborne.com> | www.geotechairborne.com<www.geotech.ca
> >
>
> P Please consider the environment before printing this email
>
> This message may contain PRIVILEGED AND PROPRIETARY INFORMATION intended
> solely for the use of the addressee (s) named above. Any disclosure,
> distribution, copying, or use of the information by others is strictly
> prohibited. If you have received this message in error, please advise the
> sender by immediate reply and delete the original message.
>

  reply	other threads:[~2023-10-13 15:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-13 15:00 Dingjun Chen
2023-10-13 15:29 ` Jonathan Wakely [this message]
2023-10-13 15:39   ` Dingjun Chen
2023-10-17 14:35     ` Andrew Haley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAH6eHdTvhSwokk1j0CMkHnhuDuMVPa9ikpBNCSbqmhXOjifxYA@mail.gmail.com \
    --to=jwakely.gcc@gmail.com \
    --cc=Dingjun.Chen@geotechairborne.com \
    --cc=gcc-help@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).