Re: An error occurred when building gcc-3.3.6

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi again, Jonathan,


I configured gcc-3..3.6 with "./configure --enable-languages=c",

However, an error occurred and please see below. Could you tell me how to proceed and fix it?

Thanks,

Dingjun



./collect2.c: In function ‘error’:
./collect2.c:408:1: warning: traditional C rejects ISO C style function definitions [-Wtraditional]
  408 | error VPARAMS ((const char * msgid, ...))
      | ^~~~~
In file included from /usr/include/fcntl.h:314,
                 from ./system.h:208,
                 from ./collect2.c:30:
In function ‘open’,
    inlined from ‘collect_execute’ at ./collect2.c:1575:22:
/usr/include/x86_64-linux-gnu/bits/fcntl2.h:50:11: error: call to ‘__open_missing_mode’ declared with attribute error: open with O_CREAT or O_TMPFILE in second argument needs 3 arguments
   50 |           __open_missing_mode ();
      |           ^~~~~~~~~~~~~~~~~~~~~~
make[1]: *** [Makefile:1331: collect2.o] Error 1

________________________________
From: Jonathan Wakely <jwakely.gcc@xxxxxxxxx>
Sent: Friday, October 13, 2023 11:29 AM
To: Dingjun Chen <Dingjun.Chen@xxxxxxxxxxxxxxxxxxx>
Cc: gcc-help <gcc-help@xxxxxxxxxxx>
Subject: Re: An error occurred when building gcc-3.3.6


External Email Warning: Do not click any links or open any attachments unless you trust the sender and know the content is safe. From Geotech IT.




On Fri, 13 Oct 2023, 16:01 Dingjun Chen, <Dingjun.Chen@xxxxxxxxxxxxxxxxxxx<mailto:Dingjun.Chen@xxxxxxxxxxxxxxxxxxx>> wrote:
Hi, guys,

I am trying to build gcc-3.3.6 from Index of /mirrors/gcc/releases/gcc-3.3.6 (bigsearcher.com<http://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@xxxxxxxxxxxxxxxxxxx<mailto:Dingjun.Chen@xxxxxxxxxxxxxxxxxxx><mailto:Dingjun.Chen@xxxxxxxxxxxxxxxxxxx<mailto:Dingjun.Chen@xxxxxxxxxxxxxxxxxxx>> | www.geotechairborne.com<http://www.geotechairborne.com><www.geotech.ca<http://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.




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux