Skip to content

CLX build problem

Hi,

While rebuilding on Debian I see:

../../ccmp2c /build/clisp-2.49.20240712.gitf5acef3/modules/clx/new-clx/clx.f > genclx.c
gcc -Wdate-time -D_FORTIFY_SOURCE=2 -I/usr/include/libsvm  -I/build/clisp-2.49.20240712.gitf5acef3/src -I/build/clisp-2.49.20240712.gitf5acef3/debian/build/gllib -I/build/clisp-2.49.20240712.gitf5acef3/src/gllib -g -O2 -We
rror=implicit-function-declaration -ffile-prefix-map=/build/clisp-2.49.20240712.gitf5acef3=. -fstack-protector --param=ssp-buffer-size=4 -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -no-integra
ted-cpp -W -Wswitch -Wcomment -Wpointer-arith -Wreturn-type -Wmissing-declarations -Wimplicit -Wno-sign-compare -Wno-format-nonliteral -Wno-shift-negative-value -O -fwrapv -fno-strict-aliasing -DNO_ASM -DENABLE_UNICODE -DD
YNAMIC_FFI -DDYNAMIC_MODULES  -fPIC -DPIC -DWANT_XPM=1 -DWANT_XSHAPE=1 genclx.c -o genclx
In file included from genclx.c:1:
/build/clisp-2.49.20240712.gitf5acef3/debian/build/gllib/stdio.h:71:3: error: #error "Please include config.h first."
   71 |  #error "Please include config.h first."
      |   ^~~~~

This is due to the -I/build/clisp-2.49.20240712.gitf5acef3/debian/build/gllib without it

gcc -Wdate-time -D_FORTIFY_SOURCE=2 -I/usr/include/libsvm  -I/build/clisp-2.49.20240712.gitf5acef3/src -I/build/clisp-2.49.20240712.gitf5acef3/src/gllib -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/clisp-2.49.20240712.gitf5acef3=. -fstack-protector --param=ssp-buffer-size=4 -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -no-integrated-cpp -W -Wswitch -Wcomment -Wpointer-arith -Wreturn-type -Wmissing-declarations -Wimplicit -Wno-sign-compare -Wno-format-nonliteral -Wno-shift-negative-value -O -fwrapv -fno-strict-aliasing -DNO_ASM -DENABLE_UNICODE -DDYNAMIC_FFI -DDYNAMIC_MODULES  -fPIC -DPIC -DWANT_XPM=1 -DWANT_XSHAPE=1 genclx.c -o genclx

works just fine. The following patch fixes it:

--- clisp.orig/modules/clx/new-clx/Makefile.in
+++ clisp/modules/clx/new-clx/Makefile.in
@@ -35,7 +35,7 @@

 clx.d: $(srcdir)/clx.f
        $(CCMP2C) $(srcdir)/clx.f > genclx.c
-       $(CC) $(CPPFLAGS) $(CFLAGS) $(WANTS) genclx.c -o genclx
+       $(CC) $(CFLAGS) $(WANTS) genclx.c -o genclx
        ./genclx -l -o clx.d > clx.d
        $(RM) genclx.c
        $(RM) genclx
Edited by Peter Van Eynde