[racket] create-embedding-executable

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Sun Jun 27 09:19:35 EDT 2010

Does your call to `create-embedding-executable' work if you disable
debugging in DrRacket or if you run from command-line Racket?

I think the problem is that DrRacket configures the compiler to add
errortrace-debugging instrumentation and to use ".zo" files that are
instrumented, and that is interfering with executable creation. See
also

  http://lists.racket-lang.org/users/archive/2010-May/039505.html

Offhand, I'm not sure whether to blame errortrace for failing to set up
appropriate dependencies or `create-embedding-executable' for not
setting up a separate enough environment when building an executable.
We'll have to work on this more.

At Sun, 27 Jun 2010 13:01:43 +0200, Laurent wrote:
> Hi,
> 
> I'm trying to use `create-embedding-executable' (DrRacket 5.0, WinXP and
> Vista), with this little module:
> 
> #lang racket/gui
> 
> (define f (new frame% [label "Test"]))
> (send f show #t)
> 
> 
> But I don't know exactly how to set the arguments to produce the same result
> as "raco exe --gui", which works fine.
> Going through the collections I found little help.
> The best I could do is this:
> 
> (create-embedding-executable
>    "test.exe"
>    #:modules '((#f "test.rkt"))
>    #:configure-via-first-module? #t
>    #:literal-expression
>    (parameterize ([current-namespace (make-base-namespace)])
>      (compile `(namespace-require ''test)))
>    #:gracket? #t
>    #:collects-path (current-library-collection-paths)
>    #:verbose? #t
>    )
> 
> which effectively creates test.exe, but running the latter fails on:
> 
> link: namespace mismatch; reference (phase 0) to a module "M:\Program
> Files\Rack
> et\collects\errortrace\errortrace-key.rkt" that is not available (phase
> level 0)
> ; reference appears in module: 'test in: init-test-coverage
> 
>  === context ===
> test: [running body]
> loop
> 
> I have absolutely no clue of what is going on here.
> Can someone help me with this?
> 
> Thanks,
> Laurent
> _________________________________________________
>   For list-related administrative tasks:
>   http://lists.racket-lang.org/listinfo/users


Posted on the users mailing list.