Tips - ktakashi/scheme-env GitHub Wiki

Tips

This page is sort of knowledge base. I'll add some tips, workaround etc, whenever I find it.

How to install Chez v9.5 with glibc >= 2.26

Since glibc 2.26, the xlocale.h is removed and Chez v9.5 depends on this file. If you get the compilation error saying the file is missing, then you can execute the following command and deceive the compiler:

$ sudo ln -s /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h /usr/include/x86_64-linux-gnu/xlocale.h

How to install Chez v9.5 with gcc >= 8.2.0

On GCC 8.2.0 or greater, you may get an error like the following:

prim5.c: In function ‘s_showalloc’:
prim5.c:329:85: error: ‘td of ’ directive output may be truncated writing 6 bytes into a region of size between 0 and 18 [-Werror=format-truncation=]
   snprintf(fmtbuf, FMTBUFSIZE, "%%#0%dtx %%#0%dtx (+ %%#0%dtx bytes @ %%#0%dtx) %%%dtd of %%%dtd\n",

There are 2 ways to resolve this issue:

  1. Using Clang
  2. Specifying -Wno-format-truncation The first option is like this
$ CC=clang scheme-env install chez

The second option is like this

$ CFLAGS="-Wno-format-truncation" scheme-env install chez