Re: tweak for cffi-grovel::trim-whitespaces?
On Wed, Nov 11, 2015 at 4:39 PM, Mirko Vukovic <mirko.vukovic@gmail.com> wrote:
Hi Louis,
(I reply to you and not to the forum since you replied to me only - you are welcome to forward my reply to the forum)
Oops, my mistake.
I downloaded from github and got qualified success: - At first loading I had to specify the path to ffi.h using cffi::*cc-flags* for the compilation to proceed
That's unexpected. Does that mean it failed to execute pkg-config? If the compilation log doesn't yield any tips, perhaps you could tweak the pkg-config-cflags definition (in cffi/grovel/grove.lisp) to add some debugging output and see what's going on there?
I downloaded from github and got qualified success: - At first loading I had to specify the path to ffi.h using cffi::*cc-flags* for the compilation to proceed - On subsequent loadings, I did not need to do that
I used ql:quickload to load :cffi-libffi
Tested on CCL 1-11 and SBCL 1.3.0
Both Antik and GSLL compile nicely (except for some other minor issues, but those are for the antik/gsll forum).
Thanks,
Mirko
Thanks, -- Luís Oliveira http://kerno.org/~luis/
On Wed, Nov 11, 2015 at 12:07 PM, Luís Oliveira <luismbo@gmail.com> wrote:
On Wed, Nov 11, 2015 at 4:39 PM, Mirko Vukovic <mirko.vukovic@gmail.com> wrote:
Issue: loading cffi-libffi, CFFI fresh from git repository Platform: - 64-bit windows 7 - MSYS2 & MinGW64 - CCL1.11 or SBCL 1.30.0 - CFFI, fresh from git
I downloaded from github and got qualified success: - At first loading I had to specify the path to ffi.h using cffi::*cc-flags* for the compilation to proceed
That's unexpected. Does that mean it failed to execute pkg-config? If the compilation log doesn't yield any tips, perhaps you could tweak the pkg-config-cflags definition (in cffi/grovel/grove.lisp) to add some debugging output and see what's going on there?
Running in the shell
pkg-config libffi --cflags
returns: -IE:/msys64/mingw64/lib/libffi-3.2.1/include as expected. 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. Mirko
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/
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
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
participants (2)
-
Luís Oliveira
-
Mirko Vukovic