From elliott at elliottjohnson.net Thu Sep 25 16:07:56 2008 From: elliott at elliottjohnson.net (elliott) Date: Thu, 25 Sep 2008 09:07:56 -0700 Subject: [iolib-devel] net.sockets fails to grovel. Message-ID: <48DBB75C.7060308@elliottjohnson.net> 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 # on #. > 2: [ACCEPT] Continue, treating # on # as having been successful. > 3: [ABORT] Return to SLIME's top level. > 4: [TERMINATE-THREAD] Terminate this thread (#) > > 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 #)[: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 From sionescu at common-lisp.net Thu Sep 25 16:22:19 2008 From: sionescu at common-lisp.net (Stelian Ionescu) Date: Thu, 25 Sep 2008 18:22:19 +0200 Subject: [iolib-devel] net.sockets fails to grovel. In-Reply-To: <48DBB75C.7060308@elliottjohnson.net> References: <48DBB75C.7060308@elliottjohnson.net> Message-ID: <1222359739.3379.6.camel@blackhole.universe.org> On Thu, 2008-09-25 at 09:07 -0700, elliott wrote: > 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 I've commented out the definition of ucred because it's not used at the moment. I plan to implement credential passing in the near future, though. It seems that glibc 2.8 will be adding tons of incompatibilities, so I'll need to test iolib with 2.8 too. -- Stelian Ionescu a.k.a. fe[nl]ix Quidquid latine dictum sit, altum videtur. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 197 bytes Desc: This is a digitally signed message part URL: