Hi, I posted about this on cffi-devel and was redirected here. I'm running linux (kernel 2.6.26), glibc 2.8, sbcl 1.0.20.30, and iolib/cffi from their respective scm's. The asdf load-op fails when groveling the "grovel.c" file in net.sockets with the following error:
External process exited with code 1. Command was: "gcc" "-m32" "-fPIC" "-o" "/home/elliott/source/git/iolib/net.sockets/grovel" "/home/elliott/source/git/iolib/net.sockets/grovel.c" Output was: /home/elliott/source/git/iolib/net.sockets/grovel.c: In function 'main': /home/elliott/source/git/iolib/net.sockets/grovel.c:1705: error: invalid application of 'sizeof' to incomplete type 'struct ucred' /home/elliott/source/git/iolib/net.sockets/grovel.c:1711: error: dereferencing pointer to incomplete type /home/elliott/source/git/iolib/net.sockets/grovel.c:1716: error: dereferencing pointer to incomplete type /home/elliott/source/git/iolib/net.sockets/grovel.c:1721: error: dereferencing pointer to incomplete type
[Condition of type SIMPLE-ERROR]
Restarts: 0: [TRY-RECOMPILING] Try recompiling grovel 1: [RETRY] Retry performing #<ASDF:COMPILE-OP NIL {B4F0881}> on #<CFFI-GROVEL:GROVEL-FILE "grovel" {B743CA9}>. 2: [ACCEPT] Continue, treating #<ASDF:COMPILE-OP NIL {B4F0881}> on #<CFFI-GROVEL:GROVEL-FILE "grovel" {B743CA9}> as having been successful. 3: [ABORT] Return to SLIME's top level. 4: [TERMINATE-THREAD] Terminate this thread (#<THREAD "repl-thread" RUNNING {ADDC0C9}>)
Backtrace: 0: (CFFI-GROVEL::INVOKE "gcc")[:EXTERNAL] 1: (CFFI-GROVEL:PROCESS-GROVEL-FILE #P"/home/elliott/source/git/iolib/net.sockets/grovel.lisp" #P"/home.. 2: ((SB-PCL::FAST-METHOD ASDF:PERFORM (ASDF:COMPILE-OP CFFI-GROVEL:GROVEL-FILE)) ..) 3: ((LAMBDA (SB-PCL::.PV. SB-PCL::.NEXT-METHOD-CALL. SB-PCL::.ARG0. SB-PCL::.ARG1.)) ..) 4: ((SB-PCL::FAST-METHOD ASDF:PERFORM :AROUND (ASDF:COMPILE-OP CFFI-GROVEL::CC-FLAGS-MIXIN)) ..) 5: ((SB-PCL::FAST-METHOD ASDF:PERFORM :AROUND (ASDF:COMPILE-OP ASDF:CL-SOURCE-FILE)) ..) 6: ((LAMBDA ())) 7: ((FLET SB-THREAD::WITH-RECURSIVE-LOCK-THUNK)) 8: ((FLET #:WITHOUT-INTERRUPTS-BODY-[CALL-WITH-RECURSIVE-LOCK]508)) 9: (SB-THREAD::CALL-WITH-RECURSIVE-LOCK ..) 10: (SB-C::%WITH-COMPILATION-UNIT #<CLOSURE (LAMBDA #) {BAE106D}>)[:EXTERNAL] 11: (ASDF:OPERATE ASDF:LOAD-OP IOLIB)[:EXTERNAL]
In doing some searching online I found that glibc now wraps the ucred struct in USE_GNU. This seems to be a glibc 2.8 bug, so in my opinion I don't think valid for iolib to account for. The work around I've put in place is to add ':cc-flags ("-D_GNU_SOURCE")' to the net.sockets.asd's grovel-file and wrapper-file components and all compiles fine for me. elliott