guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Again on Windows support (2)


From: carlo\.bramix
Subject: Re: Again on Windows support (2)
Date: Fri, 19 Jun 2009 16:17:39 +0200

Hello,
I tried the same thing with cygwin I got:

$ ./pre-inst-guile -c '(display "foo")'
argc=3
argv[0]=/home/Carlo/guile/libguile/.libs/guile
argv[1]=-c
argv[2]=(display "foo")
foo

But the compilation failed even under cygwin; here you are what happens:

make[3]: Entering directory `/home/Carlo/guile/module'
/usr/bin/mkdir -p `dirname system/base/pmatch.go`
../pre-inst-guile-env ../guile-tools compile -o "system/base/pmatch.go" 
"/cygdrive/c/msys/1.0/home/Carlo/guile-svn/module/system/base/pmatch.scm"
argc=8
argv[0]=/home/Carlo/guile/libguile/.libs/guile
argv[1]=-e
argv[2]=(@ (scripts compile) compile)
argv[3]=-s
argv[4]=/cygdrive/c/msys/1.0/home/Carlo/guile-svn/scripts/compile
argv[5]=-o
argv[6]=system/base/pmatch.go
argv[7]=/cygdrive/c/msys/1.0/home/Carlo/guile-svn/module/system/base/pmatch.scm

Backtrace:
In unknown file:
   ?:  47* [try-load-module (system vm vm)]
   ?:  48  (or (begin (try-module-linked name)) (try-module-autoload name) ...)
   ?:  49* [try-module-autoload (system vm vm)]
   ?:  50  (let* (# # # #) (resolve-module dir-hint-module-name #f) (and # #))
     ...
   ?:  51  (letrec (#) (dynamic-wind # # #) didit)
   ?:  52* [dynamic-wind #<procedure #f ()> #<procedure #f ()> #<procedure #f 
()>]
   ?:  53* [#<procedure #f ()>]
   ?:  54* (let* ((file #)) (let (# #) (cond # #)))
   ?:  55  (let ((compiled #) (source #)) (cond (# # #) (compiled #)))
     ...
   ?:  56  [with-fluid* #<fluid 7> #f #<procedure #f ()>]
   ?:  57* [#<procedure #f ()>]
   ?:  58* [load-file #<primitive-procedure primitive-load> ...]
   ?:  59* [save-module-excursion #<procedure #f ()>]
   ?:  60  (let (# #) (dynamic-wind # thunk #))
   ?:  61  [dynamic-wind #<procedure #f ()> #<procedure #f ()> #<procedure #f 
()>]
   ?:  62* [#<procedure #f ()>]
   ?:  63* [primitive-load 
"/cygdrive/c/msys/1.0/home/Carlo/guile-svn/module/system/vm/vm.scm"]
   ?:  64* (define-module (system vm vm) #:use-module ...)
   ?:  65  (eval-when (eval load compile) (let* ((m #)) (set-current-module m) 
m))
     ...
   ?:  66  (let* ((m (process-define-module #))) (set-current-module m) m)
   ?:  67* [process-define-module ((system vm vm) #:use-module (#) 
#:use-module...)]
   ?:  68  (let* (# # # #) (beautify-user-module! module) (# kws # # ...) ...)
   ?:  69* [loop (#:use-module ((system vm frame)) #:use-module ...) () ...]
   ?:  70  (if (null? kws) (call-with-deferred-observers (lambda () # ...)) ...)
     ...
   ?:  71  (let* ((interface-args #) (interface #)) (and (eq? # #) (or # #) 
...) ...)
   ?:  72* [apply #<procedure resolve-interface (name . args)> ((system vm 
frame))]
   ?:  73  [resolve-interface (system vm frame)]
     ...
   ?:  74  (let* (# # # # ...) (and # #) (if # public-i #))
   ?:  75* [resolve-module (system vm frame)]
   ?:  76  (if (equal? name (quote (guile))) the-root-module ...)
     ...
   ?:  77  (cond (# already) (autoload # #) (else #))
   ?:  78* [try-load-module (system vm frame)]
   ?:  79  (or (begin (try-module-linked name)) (try-module-autoload name) ...)
   ?:  80* [try-module-autoload (system vm frame)]
   ?:  81  (let* (# # # #) (resolve-module dir-hint-module-name #f) (and # #))
     ...
   ?:  82  (letrec (#) (dynamic-wind # # #) didit)
   ?:  83* [dynamic-wind #<procedure #f ()> #<procedure #f ()> #<procedure #f 
()>]
   ?:  84* [#<procedure #f ()>]
   ?:  85* (let* ((file #)) (let (# #) (cond # #)))
   ?:  86  (let ((compiled #) (source #)) (cond (# # #) (compiled #)))
     ...
   ?:  87  [with-fluid* #<fluid 7> #f #<procedure #f ()>]
   ?:  88* [#<procedure #f ()>]
   ?:  89* [load-file #<primitive-procedure primitive-load> ...]
   ?:  90* [save-module-excursion #<procedure #f ()>]
   ?:  91  (let (# #) (dynamic-wind # thunk #))
   ?:  92  [dynamic-wind #<procedure #f ()> #<procedure #f ()> #<procedure #f 
()>]
   ?:  93* [#<procedure #f ()>]
   ?:  94* [primitive-load 
"/cygdrive/c/msys/1.0/home/Carlo/guile-svn/module/system/vm/frame.scm"]
   ?:  95* (define-module (system vm frame) #:use-module ...)
   ?:  96  (eval-when (eval load compile) (let* ((m #)) (set-current-module m) 
m))
     ...
   ?:  97  (let* ((m (process-define-module #))) (set-current-module m) m)
   ?:  98* [process-define-module ((system vm frame) #:use-module (#) ...)]
   ?:  99  (let* (# # # #) (beautify-user-module! module) (# kws # # ...) ...)
   ?: 100* [loop (#:use-module ((system vm program)) #:use-module ...) () ...]
   ?: 101  (if (null? kws) (call-with-deferred-observers (lambda () # ...)) ...)
     ...
   ?: 102  (let* ((interface-args #) (interface #)) (and (eq? # #) (or # #) 
...) ...)
   ?: 103* [apply #<procedure resolve-interface (name . args)> ((system vm 
program))]
   ?: 104  [resolve-interface (system vm program)]
     ...
   ?: 105  (let* (# # # # ...) (and # #) (if # public-i #))
   ?: 106* [resolve-module (system vm program)]
   ?: 107  (if (equal? name (quote (guile))) the-root-module ...)
     ...
   ?: 108  (cond (# already) (autoload # #) (else #))
   ?: 109* [try-load-module (system vm program)]
   ?: 110  (or (begin (try-module-linked name)) (try-module-autoload name) ...)
   ?: 111* [try-module-autoload (system vm program)]
   ?: 112  (let* (# # # #) (resolve-module dir-hint-module-name #f) (and # #))
     ...
   ?: 113  (letrec (#) (dynamic-wind # # #) didit)
   ?: 114* [dynamic-wind #<procedure #f ()> #<procedure #f ()> #<procedure #f 
()>]
   ?: 115* [#<procedure #f ()>]
   ?: 116* (let* ((file #)) (let (# #) (cond # #)))
   ?: 117  (let ((compiled #) (source #)) (cond (# # #) (compiled #)))
     ...
   ?: 118  [with-fluid* #<fluid 7> #f #<procedure #f ()>]
   ?: 119* [#<procedure #f ()>]
   ?: 120* [load-file #<primitive-procedure primitive-load> ...]
   ?: 121* [save-module-excursion #<procedure #f ()>]
   ?: 122  (let (# #) (dynamic-wind # thunk #))
   ?: 123  [dynamic-wind #<procedure #f ()> #<procedure #f ()> #<procedure #f 
()>]
   ?: 124* [#<procedure #f ()>]
   ?: 125* [primitive-load 
"/cygdrive/c/msys/1.0/home/Carlo/guile-svn/module/system/vm/program.scm"]
   ?: 126* [dynamic-call "scm_init_programs" #<dynamic-object "libguile">]

<unnamed port>: In procedure dynamic-func in expression (dynamic-call 
"scm_init_programs" (dynamic-link "libguile")):
<unnamed port>: No error
make[3]: *** [system/base/pmatch.go] Error 1
make[3]: Leaving directory `/home/Carlo/guile/module'
make[2]: *** [all-recursive] Error 1

Sincerely,

Carlo Bramini.


---------- Initial Header -----------

>From      : address@hidden
To          : "guile-devel" address@hidden
Cc          :
Date      : Fri, 19 Jun 2009 10:48:23 +0200
Subject : Re: Again on Windows support (2)

> Hello,
> this is the command that I gave me some results:
>
> $ ./pre-inst-guile-env ./libtool --mode=execute gdb --args libguile/guile.exe 
> -c '(display "foo")'
>
> As you can see I added "--args" option to GDB.
> Without "--args" option, GDB says:
>
> C:\msys\1.0\home\Carlo\guile/(display "foo"): Invalid argument.
> argc=1
> argv[0]=C:/msys/1.0/home/Carlo/guile/libguile/.libs/guile.exe
>
> With "--args" option I had this:
>
> argc=4
> argv[0]=C:/msys/1.0/home/Carlo/guile/libguile/.libs/guile.exe
> argv[1]=-c
> argv[2]=\(display\
> argv[3]="foo"\)
>
> Since I had no idea about those unknown '\' characters, I added some debug 
> prints before scm_boot_guile():
>
> int
> main (int argc, char **argv)
> {
> int x;
> printf("argc=%d\n",argc);
> for (x=0; x<argc; x++)
> printf("argv[%d]=%s\n",x,argv[x]);
>
> scm_boot_guile (argc, argv, inner_main, 0);
> return 0; /* never reached */
> }
>
> Then I launched libguile/guile.exe normally and I got this:
>
> argc=4
> argv[0]=C:/msys/1.0/home/Carlo/guile/libguile/.libs/guile.exe
> argv[1]=-c
> argv[2]=(display
> argv[3]=foo)
>
> In this case, no more '/' but the '"' characters around the "foo" word are 
> disappeared.
> Anyways, I seems that the parameter has been split in two...
>
> Sincerely,
>
> Carlo Bramini.
>
> ---------- Initial Header -----------
>
> From      : "Neil Jerram" address@hidden
> To          : "carlo.bramix" address@hidden
> Cc          : "guile-devel" address@hidden
> Date      : Wed, 17 Jun 2009 22:09:08 +0100
> Subject : Re: Again on Windows support (2)
>
> > Neil Jerram <address@hidden> writes:
> >
> > > "carlo.bramix" <address@hidden> writes:
> > >
> > >> $ ./pre-inst-guile -c '(display "foo")'
> > >> Backtrace:
> > >> In unknown file:
> > >>    ?: 0* (begin (eval-string "(display") (quit))
> > >>    ?: 1* [eval-string "(display"]
> > >
> > > That is weird.
> > >
> > > Can we first rule out a problem with your shell?  What output do you
> > > get from this?
> > >
> > > $ set - '(display "foo")' && echo "--${1}--" && echo "--${2}--"
> >
> > Assuming that that gives the expected output, i.e.
> >
> > --(display "foo")--
> > ----
> >
> > my next suggestion would be to run under GDB, with a breakpoint on
> > scm_shell().  The invocation for doing that is
> >
> > ./pre-inst-guile-env ./libtool --mode=execute gdb libguile/guile -c 
> > '(display "foo")'
> >
> > In scm_shell, I would expect:
> > argc to be 3
> > argv[1] to be "-c"
> > argv[2] to be "(display \"foo\")"
> > scm_get_meta_args () to return 0
> > and hence not to execute the "if (new_argv)" block of code.
> >
> > Can you check those points?
> >
> > Regards,
> >         Neil
> >
>






reply via email to

[Prev in Thread] Current Thread [Next in Thread]