sionescu / iolib

Common Lisp I/O library
http://common-lisp.net/project/iolib/
MIT License
141 stars 31 forks source link

iolib-v0.8.4 - invalid application of ‘sizeof’ to incomplete type ‘struct lfp_buildinfo’ #68

Closed 28446 closed 2 years ago

28446 commented 3 years ago

Hi *, I get this error after the last update

Debian stretch gcc version 6.3.0 20170516 libfixposix-dev is already the newest version (20110316.git47f17f7-1). libfixposix0 is already the newest version (20110316.git47f17f7-1)

:0:0: note: this is the location of the previous definition /home/felipe/.cache/common-lisp/sbcl-1.5.5-linux-x64/home/felipe/.roswell/lisp/quicklisp/dists/quicklisp/software/iolib-v0.8.4/src/syscalls/ffi-types-unix__grovel.c:12:0: warning: "_LARGEFILE64_SOURCE" redefined #define _LARGEFILE64_SOURCE :0:0: note: this is the location of the previous definition /home/felipe/.cache/common-lisp/sbcl-1.5.5-linux-x64/home/felipe/.roswell/lisp/quicklisp/dists/quicklisp/software/iolib-v0.8.4/src/syscalls/ffi-types-unix__grovel.c: In function ‘main’: /home/felipe/.cache/common-lisp/sbcl-1.5.5-linux-x64/home/felipe/.roswell/lisp/quicklisp/dists/quicklisp/software/iolib-v0.8.4/src/syscalls/ffi-types-unix__grovel.c:35:63: error: invalid application of ‘sizeof’ to incomplete type ‘struct lfp_buildinfo’ fprintf(output, " :size %llu)", (long long unsigned) sizeof(struct lfp_buildinfo)); ^~~~~~ In file included from /home/felipe/.roswell/lisp/quicklisp/dists/quicklisp/software/cffi_0.24.1/grovel/common.h:6:0, from /home/felipe/.cache/common-lisp/sbcl-1.5.5-linux-x64/home/felipe/.roswell/lisp/quicklisp/dists/quicklisp/software/iolib-v0.8.4/src/syscalls/ffi-types-unix__grovel.c:23: /home/felipe/.cache/common-lisp/sbcl-1.5.5-linux-x64/home/felipe/.roswell/lisp/quicklisp/dists/quicklisp/software/iolib-v0.8.4/src/syscalls/ffi-types-unix__grovel.c:40:72: error: invalid use of undefined type ‘struct lfp_buildinfo’ fprintf(output, " :offset %lli)", (long long signed) offsetof(struct lfp_buildinfo, release)); ^ /home/felipe/.cache/common-lisp/sbcl-1.5.5-linux-x64/home/felipe/.roswell/lisp/quicklisp/dists/quicklisp/software/iolib-v0.8.4/src/syscalls/ffi-types-unix__grovel.c:45:72: error: invalid use of undefined type ‘struct lfp_buildinfo’ fprintf(output, " :offset %lli)", (long long signed) offsetof(struct lfp_buildinfo, vcsid)); ^ In file included from /home/felipe/.cache/common-lisp/sbcl-1.5.5-linux-x64/home/felipe/.roswell/lisp/quicklisp/dists/quicklisp/software/iolib-v0.8.4/src/syscalls/ffi-types-unix__grovel.c:23:0: /home/felipe/.roswell/lisp/quicklisp/dists/quicklisp/software/cffi_0.24.1/grovel/common.h:19:54: warning: comparison between pointer and integer #define _64_BIT_VALUE_FITS_SIGNED_P(value) ( (value) <= 0x7FFFFFFFFFFFFFFFLL ) ^ /home/felipe/.cache/common-lisp/sbcl-1.5.5-linux-x64/home/felipe/.roswell/lisp/quicklisp/dists/quicklisp/software/iolib-v0.8.4/src/syscalls/ffi-types-unix__grovel.c:6044:6: note: in expansion of macro ‘_64_BIT_VALUE_FITS_SIGNED_P’ if(_64_BIT_VALUE_FITS_SIGNED_P(SIG_IGN)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/felipe/.roswell/lisp/quicklisp/dists/quicklisp/software/cffi_0.24.1/grovel/common.h:19:54: warning: comparison between pointer and integer #define _64_BIT_VALUE_FITS_SIGNED_P(value) ( (value) <= 0x7FFFFFFFFFFFFFFFLL ) ^ /home/felipe/.cache/common-lisp/sbcl-1.5.5-linux-x64/home/felipe/.roswell/lisp/quicklisp/dists/quicklisp/software/iolib-v0.8.4/src/syscalls/ffi-types-unix__grovel.c:6058:6: note: in expansion of macro ‘_64_BIT_VALUE_FITS_SIGNED_P’ if(_64_BIT_VALUE_FITS_SIGNED_P(SIG_DFL)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/felipe/.roswell/lisp/quicklisp/dists/quicklisp/software/cffi_0.24.1/grovel/common.h:19:54: warning: comparison between pointer and integer #define _64_BIT_VALUE_FITS_SIGNED_P(value) ( (value) <= 0x7FFFFFFFFFFFFFFFLL ) ^ /home/felipe/.cache/common-lisp/sbcl-1.5.5-linux-x64/home/felipe/.roswell/lisp/quicklisp/dists/quicklisp/software/iolib-v0.8.4/src/syscalls/ffi-types-unix__grovel.c:6299:6: note: in expansion of macro ‘_64_BIT_VALUE_FITS_SIGNED_P’ if(_64_BIT_VALUE_FITS_SIGNED_P(MAP_FAILED)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/felipe/.cache/common-lisp/sbcl-1.5.5-linux-x64/home/felipe/.roswell/lisp/quicklisp/dists/quicklisp/software/iolib-v0.8.4/src/syscalls/ffi-types-unix__grovel.c:26:7: warning: unused variable ‘autotype_tmp’ [-Wunused-variable] int autotype_tmp; ^~~~~~~~~~~~ debugger invoked on a CFFI-GROVEL:GROVEL-ERROR in thread #: Subprocess # with command ("cc" "-o" "/home/felipe/.cache/common-lisp/sbcl-1.5.5-linux-x64/home/felipe/.roswell/lisp/quicklisp/dists/quicklisp/software/iolib-v0.8.4/src/syscalls/ffi-types-unix__grovel-tmp5GEXGEG5.o" "-c" "-g" "-Wall" "-Wundef" "-Wsign-compare" "-Wpointer-arith" "-O3" "-D_LARGEFILE_SOURCE" "-D_LARGEFILE64_SOURCE" ...) exited with error code 1 Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL. restarts (invokable by number or by possibly-abbreviated name): 0: [RETRY ] Retry # on #. 1: [ACCEPT ] Continue, treating # on # as having been successful. 2:
chalaev commented 3 years ago

Same problem:

cc -o /home/user/.cache/common-lisp/sbcl-2.1.7-linux-x64/home/user/quicklisp/dists/quicklisp/software/iolib-v0.8.4/src/syscalls/ffi-types-unix__grovel-tmpGHU3ALSV.o \
-c -g -Wall -Wundef -Wsign-compare -Wpointer-arith -O3 -D_LARGEFILE_SOURCE \
-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Wunused-parameter -fno-omit-frame-pointer \
-momit-leaf-frame-pointer -fPIC -I/home/user/quicklisp/dists/quicklisp/software/cffi_0.24.1/ \
/home/user/.cache/common-lisp/sbcl-2.1.7-linux-x64/home/user/quicklisp/dists/quicklisp/software/iolib-v0.8.4/src/syscalls/ffi-types-unix__grovel.c

fails with

 error: invalid application of 'sizeof' to incomplete type 'struct lfp_buildinfo'
   fprintf(output, " :size %llu)", (long long unsigned) sizeof(struct lfp_buildinfo));

The fastest way to fix is to downgrade to version 0.8.3 by downgrading Quicklisp: (install-dist "http://beta.quicklisp.org/dist/quicklisp/2021-05-31/distinfo.txt" :replace t)

dlowe-net commented 2 years ago

I was able to fix this by compiling libfixposix straight from https://github.com/sionescu/libfixposix. Honestly, though, Debian stretch is out of maintenance scope even for Debian and it's probably time to upgrade.

sionescu commented 2 years ago

@dlowe-net Unfortunately I have no control over what Debian maintainers do.