unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: "carlo\.bramix" <carlo.bramix@libero.it>
To: "guile-devel" <guile-devel@gnu.org>
Subject: Re: Again on Windows support (2)
Date: Fri, 19 Jun 2009 16:17:39 +0200	[thread overview]
Message-ID: <KLHP1F$B8DA409B4018EC170F464869B4CD4CB8@libero.it> (raw)

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      : guile-devel-bounces+carlo.bramix=libero.it@gnu.org
To          : "guile-devel" guile-devel@gnu.org
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" neil@ossau.uklinux.net
> To          : "carlo.bramix" carlo.bramix@libero.it
> Cc          : "guile-devel" guile-devel@gnu.org
> Date      : Wed, 17 Jun 2009 22:09:08 +0100
> Subject : Re: Again on Windows support (2)
>
> > Neil Jerram <neil@ossau.uklinux.net> writes:
> >
> > > "carlo.bramix" <carlo.bramix@libero.it> 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	other threads:[~2009-06-19 14:17 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-19 14:17 carlo.bramix [this message]
2009-06-19 16:17 ` Again on Windows support (2) Ludovic Courtès
2009-06-19 18:30 ` Ludovic Courtès
  -- strict thread matches above, loose matches on Subject: below --
2009-07-01 18:55 carlo.bramix
2009-06-26 18:45 carlo.bramix
2009-06-23  9:41 carlo.bramix
2009-06-22 10:22 carlo.bramix
2009-06-22  9:18 carlo.bramix
2009-06-19 19:11 carlo.bramix
2009-06-20 10:53 ` Andy Wingo
2009-06-19  8:48 carlo.bramix
2009-06-19 17:58 ` Neil Jerram
2009-06-19 18:09   ` Neil Jerram
2009-06-19  8:15 carlo.bramix
2009-06-19 17:50 ` Neil Jerram
2009-06-16 18:26 carlo.bramix
2009-06-17 20:41 ` Neil Jerram
2009-06-17 21:09   ` Neil Jerram

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='KLHP1F$B8DA409B4018EC170F464869B4CD4CB8@libero.it' \
    --to=carlo.bramix@libero.it \
    --cc=guile-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).