A bit more progress ... see below:
On Wed, Nov 11, 2015 at 2:51 PM, Mirko Vukovic mirko.vukovic@gmail.com wrote:
On Wed, Nov 11, 2015 at 1:32 PM, Luís Oliveira luismbo@gmail.com wrote:
On Wed, Nov 11, 2015 at 6:14 PM, Mirko Vukovic mirko.vukovic@gmail.com wrote:
I traced INVOKE, and UIOP/RUN-PROGRAM:RUN-PROGRAM.
The problem originates in reading the output of uiop/run-program:run-program. Here are the trace outputs for (CFFI-TOOLCHAIN:INVOKE "pkg-config.exe" "--version"):
<1 UIOP/RUN-PROGRAM:RUN-PROGRAM returned 3 values : <1 NIL <1 NIL <1 0 <0 CFFI-TOOLCHAIN:INVOKE returned 3 values : <0 NIL <0 NIL <0 0
For some reason, the output of pkg-config is not being read.
I will play with CCL:run-program to get output out of it, and then trace this back to uiop and invoke.
Good job. Thanks for debugging this. Perhaps Faré can chime in since he touched this code last. (I've cced him.)
Cheers,
-- Luís Oliveira http://kerno.org/~luis/
To augment: this is not just a Windows+CCL issue. On Windows+SBCL I get the same behavior:
CL-USER> (trace cffi-toolchain:invoke uiop/run-program:run-program) (CFFI-TOOLCHAIN:INVOKE UIOP/RUN-PROGRAM:RUN-PROGRAM) CL-USER> (CFFI-TOOLCHAIN:INVOKE "pkg-config.exe" "--version") 0: (CFFI-TOOLCHAIN:INVOKE "pkg-config.exe" "--version") ; pkg-config.exe --version 1: (UIOP/RUN-PROGRAM:RUN-PROGRAM ("pkg-config.exe" "--version") :OUTPUT :INTERACTIVE :ERROR-OUTPUT :INTERACTIVE) 1: UIOP/RUN-PROGRAM:RUN-PROGRAM returned NIL NIL 0 0: CFFI-TOOLCHAIN:INVOKE returned NIL NIL 0 NIL NIL 0
Mirko
If I modify INVOKE so that argument of RUN-PROGRAM'S :OUTPUT keyword is :STRING (instead of :INTERACTIVE) I can capture the command output:
CL-USER> (CFFI-TOOLCHAIN:INVOKE "pkg-config.exe" "libffi" "--cflags") 0: (CFFI-TOOLCHAIN:INVOKE "pkg-config.exe" "libffi" "--cflags") ; pkg-config.exe libffi --cflags 1: (UIOP/RUN-PROGRAM:RUN-PROGRAM ("pkg-config.exe" "libffi" "--cflags") :OUTPUT :STRING :ERROR-OUTPUT :STRING) 1: UIOP/RUN-PROGRAM:RUN-PROGRAM returned "-IE:/msys64/mingw64/lib/libffi-3.2.1/include
" "" 0 0: CFFI-TOOLCHAIN:INVOKE returned "-IE:/msys64/mingw64/lib/libffi-3.2.1/include^M
" "" 0 "-IE:/msys64/mingw64/lib/libffi-3.2.1/include^M
" "" 0
My eyes glazed over while reading RUN-PROGRAM's description of the :INTERACTIVE keyword.
Hopefully this can lead to a fix in UIOP or CFFI.
Mirko