-
Notifications
You must be signed in to change notification settings - Fork 22
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
JPM breaks its launcher script during bootstrap #92
Comments
My #!/home/user/.local/bin/janet
#!/usr/bin/env janet
(put root-env :syspath "/home/user/.local/lib/janet")
(import jpm/cli)
# Reset the syspath after overriding
(put root-env :syspath (os/getenv "JANET_PATH" (dyn :syspath)))
(defn main [& argv]
(cli/main ;argv)) How did you install FWIW, I typically do:
or use the |
I just ran |
Thanks for the details. It's possible it might have something to do with: Line 1 in d93b7c2
Looks like the default for Though that's from a config that looks like it's for BSDs, the linux and macos ones also have the same value for Are you using some kind of BSD system? |
I'm on Chimera Linux, which does have a somewhat BSD-ian setup, but it's not BSD. |
Ah I see. That's not one I'm familiar with, but I gave one of the live isos a try. At least using I also tried without For the latter case, my
Possibly obvious but Update: forgot to mention I built janet from source after cloning its repository. |
Chimera packages Janet, so naturally they put it directly under |
Just a guess, but I think then it might be that things might work better if Though, may be that's not really that great from the perspective of working with the packaging system. Or may be there is a package for Update: Options that seem like they might work better include:
May be others will have additional / better ideas... Update 2: To give additional info about why just changing the first line of
via the Self Installation (Bootstrapping) section of the README. |
Yes, the issue here is the JPM config thinks that the PREFIX of janet is set to /usr/local. What is the output of jpm show-paths? |
The original installation gives:
Reinstalling with
(and doesn't require manually editing the There is no package for JPM, AFAIK. I could probably make one -- I've made a few for Chimera already -- but I've barely tried Janet in the first place, so I'm not sure I want to sign up for that yet. Besides which, it would probably be best to actually fix the bug here instead of in Chimera, since the bug's likely to reappear in any distro that packages Janet but forgets JPM. Also, I don't know enough about JPM's internals to be sure, but judging from these paths I think both JPMs want to install global libraries to |
I think the cause is here: Lines 20 to 29 in d93b7c2
When JPM's bootstrap generates a config file, it tries to guess the prefix by (1) checking the The problem is that if you start Janet by typing The solution to this is presumably to do some kind of search through the PATH of the user to work out the absolute path to the executable if it's invoked with a non-absolute path. |
I can confirm that the same issue happens on Fedora. |
@alternateved Is there a janet package for Fedora? FWIW, if you are building from source (or are willing to), the setup I use is very close to what is described here. I typically use |
@sogaiu Yes, there is: https://src.fedoraproject.org/rpms/janet When using Fedora's janet package jpm cannot be installed with When using
|
Ah, I just realised that in order to have |
@alternateved Yes:
is expected AFAIU. My understanding is based on jpm's README:
I presume Fedora's package essentially uses a So I think there is a kind of conflict here. As I mentioned in this comment, I think there are at least two ways that might resolve the situation:
The intention of my suggestion was to use the second approach, i.e. a source build for both Janet and JPM, so they would end up using the same |
/usr/local/bin/jpm
begins with this:which is obviously nonsense, and prevents JPM from running, since my Janet is at
/usr/bin/janet
. Deleting the first shebang line fixes the issue.The text was updated successfully, but these errors were encountered: