mit-scheme-devel
[Top][All Lists]
Advanced

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

MIT Scheme 11.1 fails to build because of Werror


From: Gabriel Schnoering
Subject: MIT Scheme 11.1 fails to build because of Werror
Date: Mon, 1 Feb 2021 13:30:00 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0

Dear devs,

I can't get the latest MIT scheme (11.1) to work on my system (Up to date Gentoo, 64 bits). At first the package doesn't compile with gcc 10.2 (I guess it would be similar with previous versions) because of Werror in the microcode/ folder and in particular termcap.c. Some of the issues reported are quite serious I guess such as casting a 64 bits pointer into a 32 bits int. When I skip Werror from the configure.ac/Makefile files it does build but fails later building make.com.
I have added both cases at the end of the message.

MIT scheme 10.1.10 builds and runs fine on the same system.
My objective is to have the new MIT Scheme version to work with the latest scimutils.

I followed the README procedure:
unpack
cd src/
./Setup.sh
./configure
make


Best,
Gabriel

----- Werror make build fail -------------------------------------

gcc -DHAVE_CONFIG_H -DMIT_SCHEME -DDEFAULT_LIBRARY_PATH=\"/usr/local/lib/mit-scheme-x86-64-11.1\" -I. -I. -O3  -frounding-math -fno-builtin-floor -Wall -Wclobbered -Wempty-body -Wignored-qualifiers -Wimplicit-fallthrough -Wmissing-field-initializers -Wmissing-parameter-type -Wnested-externs -Wold-style-declaration -Woverride-init -Wpointer-arith -Wredundant-decls -Wshift-negative-value -Wtype-limits -Wundef -Wuninitialized -Wwrite-strings -Wno-error=stringop-truncation -Werror -o termcap.o -c termcap.c
termcap.c:147:1: error: return type defaults to ‘int’ [-Werror=implicit-int]
  147 | memory_out ()
      | ^~~~~~~~~~
termcap.c: In function ‘convert_ospeed’:
termcap.c:181:24: error: implicit declaration of function ‘OS_baud_index_to_rate’ [-Werror=implicit-function-declaration]
  181 |   unsigned int rate = (OS_baud_index_to_rate (os));
      |                        ^~~~~~~~~~~~~~~~~~~~~
termcap.c:181:24: error: nested extern declaration of ‘OS_baud_index_to_rate’ [-Werror=nested-externs]
termcap.c: At top level:
termcap.c:330:1: error: return type defaults to ‘int’ [-Werror=implicit-int]
  330 | tputs (string, nlines, outfun)
      | ^~~~~
termcap.c: In function ‘tputs’:
termcap.c:338:5: error: ‘return’ with no value, in function returning non-void [-Werror=return-type]
  338 |     return;
      |     ^~~~~~
termcap.c:330:1: note: declared here
  330 | tputs (string, nlines, outfun)
      | ^~~~~
termcap.c: In function ‘tgetent’:
termcap.c:457:49: error: passing argument 2 of ‘find_capability’ discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
  457 |       indirect = tgetst1 (find_capability (tem, "tc"), 0);
      |                                                 ^~~~
termcap.c:203:36: note: expected ‘char *’ but argument is of type ‘const char *’
  203 | find_capability (char * bp, char * cap)
      |                             ~~~~~~~^~~
termcap.c:479:9: error: assignment discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
  479 |     tem = "/etc/termcap";
      |         ^
termcap.c:540:45: error: passing argument 2 of ‘find_capability’ discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
  540 |       term = tgetst1 (find_capability (bp2, "tc"), 0);
      |                                             ^~~~
termcap.c:203:36: note: expected ‘char *’ but argument is of type ‘const char *’
  203 | find_capability (char * bp, char * cap)
      |                             ~~~~~~~^~~
termcap.c:554:12: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
  554 |     return (int) bp;
      |            ^
termcap.c: In function ‘scan_file’:
termcap.c:570:9: error: unused variable ‘tem’ [-Werror=unused-variable]
  570 |   char *tem;
      |         ^~~
termcap.c: In function ‘memory_out’:
termcap.c:149:3: error: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ [-Werror=unused-result]
  149 |   write (2, "Virtual memory exhausted\n", 25);
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[2]: *** [Makefile:182: termcap.o] Error 1


-----------------------------------

Bad compiled-code version in FASL File: make.com
File has: compiled-code interface 3; architecture 14.
Expected: compiled-code interface 4; architecture 14.
override-init -Wpointer-arith -Wredundant-decls -Wshift-negative-value -Wtype-limits -Wundef -Wuninitializ
Microcode Error: No error handlers.
Error code 0x3a (fasload-compiled-mismatch).
-O3  -frounding-math -fno-builtin-floor -Wall -Wclobbered -Wempty-body -Wignored-qualifiers -Wimplicit-fal
**** Stack Trace ****
override-init -Wpointer-arith -Wredundant-decls -Wshift-negative-value -Wtype-limits -Wundef -Wuninitializ
{0x800f88}
    Return code: [return-code pop-return-error]
    Expression: #f
{0x800f98}
    Return code: [return-code internal-apply]
    Expression: #f
{0x800fa8}  ...: [false 0x2]
{0x800fb0}  ...: [primitive BINARY-FASLOAD]
{0x800fb8}  ...: "make.com"
{0x800fc0}
    Return code: [return-code combination-save-value]
    Expression: [combination [primitive SCODE-EVAL] ... (2 args) 0x848ba8]
{0x800fd0}  ...: #f
{0x800fd8}  ...: [manifest-nm-vector 0x1] (skipping)
{0x800fe8}  ...: #f
{0x800ff0}
    Return code: [return-code non-existent-continuation]
    Expression: #f
lthrough -Wmissing-field-initializers -Wmissing-parameter-type -Wnested-externs -Wold-style-declaration -W
No error handler.
make[1]: *** [Makefile:821: lib/runtime.com] Error 1
make[1]: *** Waiting for unfinished jobs....




reply via email to

[Prev in Thread] Current Thread [Next in Thread]