<div dir="ltr">It isn't to do with drracket. It is to do with the fact that it is triggered in a context where, say, the reader doesn't behave the way it would with the default parameters. <div><br></div><div style>
Long story short: there are lots and lots of parameters that affect how compilation and raco setup generally behave. If these are not set to well-known things, then raco setup doesn't work. That's what happened here.</div>
<div style><br></div><div style>Relatedly: raco setup run in a sandbox that limits read and write access doesn't work either.</div><div style><br></div><div style>Robby</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Mon, Feb 4, 2013 at 7:27 AM, Jay McCarthy <span dir="ltr"><<a href="mailto:jay.mccarthy@gmail.com" target="_blank">jay.mccarthy@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I'm not sure why it is a strange configuration, but maybe I missed<br>
that part of the thread.<br>
<br>
More generally, why should running the function version of "raco<br>
setup" behave differently in a DrRacket buffer than it does on the<br>
command line?<br>
<span class="HOEnZb"><font color="#888888"><br>
Jay<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
On Mon, Feb 4, 2013 at 6:17 AM, Robby Findler<br>
<<a href="mailto:robby@eecs.northwestern.edu">robby@eecs.northwestern.edu</a>> wrote:<br>
> Going back in this thread, I think that changing which files DrRacket<br>
> compiles is not the right direction to go to solve the problem discussed<br>
> here. The problem is that planet2 is running raco setup in a strange<br>
> configuration. Avoiding compiling files will not solve this problem.<br>
><br>
> Robby<br>
><br>
><br>
> On Sat, Feb 2, 2013 at 4:31 PM, Robby Findler <<a href="mailto:robby@eecs.northwestern.edu">robby@eecs.northwestern.edu</a>><br>
> wrote:<br>
>><br>
>> Planet 1 explicitly deals with this by having the runtime system give it<br>
>> access to the original parameterization, which it picks and chooses<br>
>> parameters from to restore (to make sure that this kind of thing doesn't<br>
>> happen).<br>
>><br>
>> Robby<br>
>><br>
>><br>
>> On Sat, Feb 2, 2013 at 4:08 PM, Danny Yoo <<a href="mailto:dyoo@hashcollision.org">dyoo@hashcollision.org</a>> wrote:<br>
>>><br>
>>> >>> >> I'm not sure if this is a bug or not, so I'm bringing it up on the<br>
>>> >>> >> list. But when I do the following:<br>
>>> >>> >><br>
>>> >>> >> #lang racket<br>
>>> >>> >> (require compiler/cm)<br>
>>> >>> >> (manager-compile-notify-handler displayln)<br>
>>> >>> >> (managed-compile-zo<br>
>>> >>> >><br>
>>> >>> >><br>
>>> >>> >> "/home/samth/sw/plt/collects/tests/typed-racket/succeed/null-program.rkt")<br>
>>> >>> >><br>
>>> >>> >> Then the compiler places the compiled files in the<br>
>>> >>> >> `compiled/drracket/` directory, and looks for compiled files there<br>
>>> >>> >> as<br>
>>> >>> >> well.<br>
>>><br>
>>><br>
>>> Reviving this thread. This is exactly the root of the issue hitting<br>
>>> Neil Toronto with that weird reader error with Optimization Coach.<br>
>>><br>
>>><br>
>>> When we're installing PLaneT2 packages, part of the process reruns a<br>
>>> raco setup. At that point, raco setup is running under a context of<br>
>>> that customized bytecode compiler/module loader. In fact, it starts<br>
>>> compiling the rest of the collects under that custom<br>
>>> DrRacket-compiling context, and I see the following after executing:<br>
>>><br>
>>><br>
>>> ---<br>
>>> raco setup: version: 5.3.2 [3m]<br>
>>> raco setup: variants: 3m<br>
>>> raco setup: main collects: /Applications/Racket v5.3.2/collects<br>
>>> raco setup: collects paths:<br>
>>> raco setup: /Users/dyoo/Library/Racket/5.3.2/collects<br>
>>> raco setup: /Applications/Racket v5.3.2/collects<br>
>>> raco setup: --- pre-installing collections ---<br>
>>> raco setup: --- compiling collections ---<br>
>>> raco setup: making: racket<br>
>>> raco setup: in racket<br>
>>> raco setup: in racket/base/lang<br>
>>> raco setup: in s-exp/lang<br>
>>> raco setup: in syntax<br>
>>> raco setup: in racket/contract<br>
>>> raco setup: in racket/contract/private<br>
>>> raco setup: in setup<br>
>>> raco setup: in racket/private<br>
>>> raco setup: in config<br>
>>> raco setup: in compiler/private<br>
>>> raco setup: in setup/private<br>
>>> raco setup: in planet<br>
>>> raco setup: in planet/private<br>
>>> raco setup: in racket/unsafe<br>
>>> raco setup: in syntax/private<br>
>>> raco setup: in racket/private/lang<br>
>>> raco setup: in mzlib<br>
>>> raco setup: in mzscheme<br>
>>> raco setup: in scheme<br>
>>> raco setup: in mzscheme/lang<br>
>>> raco setup: in mzlib/private<br>
>>> raco setup: in syntax/parse<br>
>>> raco setup: in syntax/parse/private<br>
>>> raco setup: in compiler<br>
>>> raco setup: in unstable<br>
>>> raco setup: in syntax/parse/experimental<br>
>>> raco setup: in racket/match<br>
>>> raco setup: in syntax/parse/experimental/private<br>
>>> raco setup: in racket/draw/private<br>
>>> raco setup: in ffi/unsafe<br>
>>> raco setup: in ffi<br>
>>> raco setup: in racket/draw/unsafe<br>
>>> raco setup: in file<br>
>>> raco setup: in racket/draw<br>
>>> raco setup: in rackunit<br>
>>> raco setup: in rackunit/private<br>
>>> raco setup: in racket/gui<br>
>>> raco setup: in racket/place/private<br>
>>> raco setup: in mred<br>
>>> raco setup: in mred/private<br>
>>> raco setup: in scheme/private/lang<br>
>>> raco setup: in scheme/private<br>
>>> raco setup: in scheme/base/lang<br>
>>> raco setup: in racket/snip/private<br>
>>> raco setup: in mred/private/wx<br>
>>> raco setup: in mred/private/wx/common<br>
>>> raco setup: in mred/private/wxme<br>
>>> raco setup: in racket/lang<br>
>>> raco setup: in scheme/private/provider/lang<br>
>>> raco setup: in scheme/private/provider<br>
>>> raco setup: in scheme/lang<br>
>>> raco setup: in compatibility<br>
>>> raco setup: --- parallel build using 4 processes ---<br>
>>> raco setup: 3 making:<br>
>>> /Users/dyoo/Library/Racket/5.3.2/pkgs/installed/sxml/sxml (sxml)<br>
>>> raco setup: 2 making: scribblings/main/user<br>
>>> raco setup: 3 making:<br>
>>> /Users/dyoo/Library/Racket/5.3.2/pkgs/installed/sxml/sxml/scribblings<br>
>>> raco setup: 3 making:<br>
>>> /Users/dyoo/Library/Racket/5.3.2/pkgs/installed/sxml/sxml/ssax (ssax)<br>
>>> raco setup: --- updating info-domain tables ---<br>
>>> raco setup: updating: <user>/info-domain/compiled/cache.rktd<br>
>>> raco setup: --- creating launchers ---<br>
>>> raco setup: --- building documentation ---<br>
>>> link: bad variable linkage;<br>
>>> reference to a variable that has the wrong procedure or structure-type<br>
>>> shape<br>
>>> reference phase level: 0<br>
>>> variable module: "/Applications/Racket<br>
>>> v5.3.2/collects/syntax/location.rkt"<br>
>>> variable phase: 0<br>
>>> reference in module: "/Applications/Racket<br>
>>> v5.3.2/collects/racket/date.rkt" in: module-name-fixup<br>
>>> ---<br>
>>><br>
>>><br>
>>> At this point forward, I think the following is happening: it appears<br>
>>> that once this happens, things are completely hosed because DrRacket<br>
>>> is somehow loading both DrRacket-specific bytecode for some modules,<br>
>>> and others with the standard bytecode. The mix leads to the linkage<br>
>>> errors.<br>
>>><br>
>>> Does this explanation sound plausible?<br>
>><br>
>><br>
><br>
><br>
</div></div><div class="im HOEnZb">> _________________________<br>
> Racket Developers list:<br>
> <a href="http://lists.racket-lang.org/dev" target="_blank">http://lists.racket-lang.org/dev</a><br>
><br>
<br>
<br>
<br>
</div><div class="HOEnZb"><div class="h5">--<br>
Jay McCarthy <<a href="mailto:jay@cs.byu.edu">jay@cs.byu.edu</a>><br>
Assistant Professor / Brigham Young University<br>
<a href="http://faculty.cs.byu.edu/~jay" target="_blank">http://faculty.cs.byu.edu/~jay</a><br>
<br>
"The glory of God is Intelligence" - D&C 93<br>
</div></div></blockquote></div><br></div>