From: Ken B. <kb...@co...> - 2018-02-24 20:46:31
|
On 3/5/2017 2:40 PM, Bruno Haible wrote: > Hi Ken, > >> I also tried using angle brackets instead of double quotes around config.h. But I still got an error: >> >> ../../ccmp2c /home/kbrown/src/cygclisp/clisp-2.49-1.20170303hg15769.x86_64/src/clisp/modules/clx/new-clx/clx.f > genclx.c >> gcc -I/home/kbrown/src/cygclisp/clisp-2.49-1.20170303hg15769.x86_64/src/clisp/src -I/home/kbrown/src/cygclisp/clisp-2.49-1.20170303hg15769.x86_64/build/gllib -I/home/kbrown/src/cygclisp/clisp-2.49-1.20170303hg15769.x86_64/src/clisp/src/gllib -I/home/kbrown/src/cygclisp/clisp-2.49-1.20170303hg15769.x86_64/build/gllib -I/home/kbrown/src/cygclisp/clisp-2.49-1.20170303hg15769.x86_64/src/clisp/src/gllib -I. -ggdb -O2 -pipe -Wimplicit-function-declaration -W -Wswitch -Wcomment -Wpointer-arith -Wreturn-type -Wmissing-declarations -Wimplicit -Wno-sign-compare -Wno-format-nonliteral -O -fno-strict-aliasing -DENABLE_UNICODE -DDYNAMIC_MODULES -DDLL_EXPORT -DPIC -DWANT_XPM=1 -DWANT_XSHAPE=1 genclx.c -o genclx >> In file included from /home/kbrown/src/cygclisp/clisp-2.49-1.20170303hg15769.x86_64/build/gllib/stdlib.h:96:0, >> from genclx.c:3: >> /home/kbrown/src/cygclisp/clisp-2.49-1.20170303hg15769.x86_64/build/gllib/unistd.h:139:3: error: #error "Please include config.h first." >> #error "Please include config.h first." >> ^ >> In file included from /usr/include/sys/types.h:68:0, >> from /home/kbrown/src/cygclisp/clisp-2.49-1.20170303hg15769.x86_64/build/gllib/sys/types.h:28, >> from /usr/include/stdio.h:61, >> from genclx.c:2: >> >> >> Am I doing something wrong? There's no "config.h not found" error, so I'm puzzled by the error message. > > It's a constraint imposed by gnulib that config.h needs to be the first > include file to be included in a compilation unit. > > But more fundamentally, the use of gnulib is fundamentally broken regarding > clisp modules: > - The clx module should not even see build/gllib/unistd.h. > - The syscalls module should not rely on the getloadavg module from the > clisp core. This is most evidently seen by a link error on AIX. > So, you cannot do anythere here until this fundamental mistake is fixed. > clisp's modules are designed as separately compilable units; therefore they > must use *independent* autoconf configurations; therefore their uses of > gnulib must be independent as well. For the record, I found a simple workaround (attached) that allows me to build clx/new-clx on Cygwin. Ken |