New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Config-tethered Racket fails to start, Argument list too long
#4133
Comments
It looks like the P.S. — To check what the launcher runs, searching backwards in the executable for |
A guess about the |
Thanks for the ideas! They led me to at least one problem—the Inspecting the
One difference from previous ways of building Racket is that I've been invoking the original I think I remember that the command line is just written into a static string in the binary, but, if it were embedded in compiled Racket code, I know there have been problems in the past from Guix trying to patch paths (or not finding paths it expects to be able to patch). Does the launcher executable |
With further experimentation, it appears it is indeed the final |
The example at #4133 now (as of commit cbf1bed) reproduces the issue without Guix. Just adding launcher with |
The associated |
As a workaround, skipping the separate The working |
For MrEd and GRacket, I think the repair is to make |
Yes, I can confirm that just replacing: (define (config-flags)
(list "-X" (path->string (find-collects-dir)) "-G" (path->string (find-config-dir)))) is enough to be able to run (I haven't looked into whether there's anything else around there that also ought to be repaired.) On the other hand, it appears that skipping the separate |
I think the problem with racket/racket/collects/compiler/embed.rkt Line 1536 in b43e120
finds the path to the racket from that main distribution layer, if one exists, despite being called with #:untethered? #f .
|
I think we need to do something here: racket/racket/collects/compiler/find-exe.rkt Lines 23 to 28 in b43e120
to account for the fact that the result of find-{addon,config}-tethered-console-bin-dir may also be included in the list returned by (get-console-bin-search-dirs) .
|
In LiberalArtist/racket-issue-4133@4ab1e4f, I've adjusted the |
I've pushed the change to For the other problem, we could change https://docs.racket-lang.org/raco/tethered-install.html where its says "The 'bin-dir and 'gui-bin-dir configurations can point to the same directories" to say that they should not point to the same directories. (I think the original text said that, and then later I forgot why it mattered.) But maybe it's better to change |
Thanks! I've switched to building with racket/gui@563c684, and it seems to be working.
I'm still thinking this through (and trying to remember what I thought about this before). I tracked down our previous conversation about Concretely, as far as I can tell, it doesn't cause any problems for my use case to define racket/racket/collects/compiler/find-exe.rkt Lines 14 to 28 in b43e120
remove the tethered directories, as you suggest (I think). That approach does seem somewhat better, in that having to configure paths to directories that will never be used and may not even exist seems rather confusing.
But something about this doesn't feel entirely satisfying, though I'm not sure what a better approach would be. I'll keep thinking about this. |
Well, apparently I spoke too soon. As I've continued to work on updating Guix to Racket 8.4, I've discovered that an Running
revealing that it can find neither the main collections directory nor the configuration directory (which configures The things in the actual
I'll investigate further. For now, this still works ok: I've just put |
I think |
I have a config-tethered Racket installation where
racket
is an ELF starter executable. It fails to start, like this:Using
file * | grep ELF
reports thatracket
,mzscheme
, andmred
are ELF files, as opposed tosh
launcher scripts. Trying to runmzscheme
fails in exactly the same way asracket
, whilemred
fails with an even more perplexing error:On the other hand, all of the launcher
sh
scripts I've tried, includingdrracket
,raco
, andgracket
, seem to be working fine.There are many non-Racket things which might be to blame, but any hints about how things might go wrong with starter executables would be much appreciated. I'm under the impression that they embed command-line arguments in themselves, though I don't understand exactly how they work.
In a bit more detail, the problematic
racket
is from a "main distribution" layer which chains to a "minimal Racket" layer (withbase
andracket-lib
), which in turn chains to a "vm" layer, with no packages, based on 8.3.900 (CS). Theracket
s in the other layers seem to work fine: the problem seems to begin with the "main distribution" layer.In even more detail, this problem came up while I was experimenting with Guix's Racket packaging. The package definitions are on my fork here, particularly in
gnu/packages/chez-and-racket-bootstrap.scm
andgnu/packages/racket.scm
. I've packed the build results into a tarball at https://philipmcgrath.com/tmp/4rmfs0mgavgbis6bdygi7igzwnymxdmp-racket-tarball-pack.tar.gz (n.b. it is 573 MiB gzipped): if unpacked at the root of anyx86_64-linux
system, you should be able to run (or not run, as the case may be)/opt/guix-pack-profile/bin/racket
and find the paths to the other layers in/opt/guix-pack-profile/etc/racket/config.rktd
. (The contents can of course be inspected anywhere.)Alternatively, on a system with Guix installed (generic instructions), you could run:
to create
rkt
as a symlink to a directory much like/opt/guix-pack-profile/
in the tarball, or use:to build a tarball equivalent to the above. On Debian stable, this should be enough to be able to run those commands:
The text was updated successfully, but these errors were encountered: