Closed ghost closed 8 years ago
How are you installing Nimble?
@dom96 like this
git clone https://github.com/nim-lang/nimble.git .nimble
cd .nimble
git clone -b v0.13.0 --depth 1 https://github.com/nim-lang/nim vendor/nim
nim -d:release c -r src/nimble install
and this:
git clone https://github.com/nim-lang/nimble.git
cd nimble
git clone -b v0.13.0 --depth 1 https://github.com/nim-lang/nim vendor/nim
nim -d:release c -r src/nimble install
and both of them failed
@dom96 but "cd .Nim ; nim e install_nimble.nims" works - is it the new recommended way?
@stevendobay i have the same issue installing as described in the README on osx. But where is .Nim
directory located you describe in your latest comment?
You can use nim e install_nimble.nims
but I don't personally recommend it.
Some more questions:
Keep in mind that Nimble installs packages to $HOME/.nimble
(~/.nimble
), so if you are cloning Nimble into ~/.nimble
bad things will happen.
@aurora Also, please let me know how you installed Nim.
I just attempted to reproduce this and couldn't. My Nim is in ~/projects/nim
with ~/projects/nim/bin
added to my PATH
.
I executed the following commands:
cd /tmp
git clone https://github.com/nim-lang/nimble.git
cd nimble
git clone -b v0.13.0 --depth 1 https://github.com/nim-lang/nim vendor/nim
nim -d:release c -r src/nimble install
I can then execute which nimble
and get /Users/dom/.nimble/bin/nimble
.
This is on Mac OS X 10.11.3.
My nim
is located in /usr/local/bin
(other stuff accordingly in /usr/local/lib/nim
. I built nim as described on the website from github and used the install script generated by make install
to install it accordingly.
@aurora I would recommend removing Nim from /usr/local/bin
and /usr/local/lib/nim
and simply adding it to your PATH like I did. Nim is known to misbehave when its installed in that manner. Of course it really shouldn't and these installation problems need to be fixed.
Actually, I have a feeling that this might have already been fixed in Nim's devel
branch. Did you build the master
branch?
No, i am on devel
as you recommended a while ago to me on irc ;-).
I see. That sucks, must still be a bug then :(
I just moved the nim installation to ~
and indeed,
nimble installed successfully.
I can live with this until nim 1.0 ;-). Thanks for your help!
Great :)
@dom96 my .Nim folder is under the home directory(~) and nim(/home/steven/.Nim/bin/nim) has been set up as an alternative(sudo update-alternative...). Cloning nimble to ~/nimble doesn't solve the problem.
@stevendobay That may the problem, can you instead add /home/steven/.Nim/bin/nim
to your PATH and try again?
met same issue, find a solution:
cd /tmp
git clone https://github.com/nim-lang/nimble.git
cd nimble
git clone -b v0.13.0 --depth 1 https://github.com/nim-lang/nim vendor/nim
ln -s vendor/nim/lib .
nim -d:release c -r src/nimble install
worked with nim installed by brew. Nim 0.13.0 with osx 10.11.4, nim located at /usr/local/bin/nim
Have the same issue back in March and had to postpone trying to use Nim due to this issue.
Finally have time to revisit this, and good to see that it wasn't just me having the issue.
@pandada8 - verified that your solution works, thanks.
I had the same issue and @pandada8's solution worked for me. I was using nim compiled from the devel branch as of this morning and instead of using
git clone -b v0.13.0 --depth 1 https://github.com/nim-lang/nim vendor/nim
I used
git clone -b devel --depth 1 https://github.com/nim-lang/nim vendor/nim
My installation was indeed /usr/local/bin, however I had the same issue when having nim installed from my home directory using the PATH environment var.
I'm still not sure what the problem is here. If you have latest Nim (from devel
branch) and latest Nimble then everything should work.
I have tested Nimble on my MacBook and on a fresh Arch Linux install and was not able to reproduce this :\
Also, the "download a copy of Nim into vendor/nim
" shouldn't be necessary anymore.
What does printenv | sort
show your environment variables to be?
Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.uMzkdn4nUp/Render
DISPLAY=/private/tmp/com.apple.launchd.I5613DhGUI/org.macosforge.xquartz:0
GEM_HOME=/Users/dom/.rvm/gems/ruby-2.3.0
GEM_PATH=/Users/dom/.rvm/gems/ruby-2.3.0:/Users/dom/.rvm/gems/ruby-2.3.0@global
HOME=/Users/dom
IRBRC=/Users/dom/.rvm/rubies/ruby-2.3.0/.irbrc
LANG=en_GB.UTF-8
LC_CTYPE=en_GB.UTF-8
LESS=-R
LOGNAME=dom
LSCOLORS=Gxfxcxdxbxegedabagacad
MY_RUBY_HOME=/Users/dom/.rvm/rubies/ruby-2.3.0
OLDPWD=/Users/dom/projects/nimble
PAGER=less
PATH=/Users/dom/.rvm/gems/ruby-2.3.0/bin:/Users/dom/.rvm/gems/ruby-2.3.0@global/bin:/Users/dom/.rvm/rubies/ruby-2.3.0/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/dom/projects/nim/bin:/Users/dom/.nimble/bin:/Users/dom/.rvm/bin
PWD=/Users/dom/projects/nimble
RUBY_VERSION=ruby-2.3.0
SHELL=/bin/zsh
SHLVL=1
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.qQqL3m8IEM/Listeners
TERM=xterm-256color
TERM_PROGRAM=Apple_Terminal
TERM_PROGRAM_VERSION=361.1
TERM_SESSION_ID=6D595627-AFDF-414A-AB4A-417A4678AAB4
TMPDIR=/var/folders/qs/3mwpxj8s1td75h2bby7g18xw0000gn/T/
USER=dom
XPC_FLAGS=0x0
XPC_SERVICE_NAME=0
ZSH=/Users/dom/.oh-my-zsh
_=/usr/bin/printenv
__CF_USER_TEXT_ENCODING=0x1F5:0x0:0x0
_system_arch=x86_64
_system_name=OSX
_system_type=Darwin
_system_version=10.11
rvm_bin_path=/Users/dom/.rvm/bin
rvm_path=/Users/dom/.rvm
rvm_prefix=/Users/dom
rvm_version=1.27.0 (latest)
And where is your nim installation?
/Users/dom/projects/nim
and /Users/dom/projects/nim/bin
is in my PATH.
So, if you remove the vendor/nim
dir do you simply get the error mentioned in the OP? Can you verify that you've got the latest Nimble commit?
Interesting. You have pretty much the same setup as I do. What's more interesting is that with a fresh clone of the nimble repo, I can't reproduce the error either. It's possible when I produced the error that my environment was slightly different since I still had my copy of /usr/local/bin/nim (which I changed as per your advice).
Looking closer, for me to reproduce the exact error, I have to do these steps:
./koch install /usr/local/bin
After this, I get the error:
FAILURE: Could not read package info file in /home/joey/Downloads/nimble/nimble.nimble;
Reading as ini file failed with:
Invalid section: .
Evaluating as NimScript file failed with:
Error: cannot open '/home/joey/Downloads/nimble/lib/system.nim'.
Error: execution of an external program failed: '/home/joey/Downloads/nimble/src/nimble install'
So it seems to me that the nimble source code is expecting lib/system.nim to exist in the root nimble directory, when it should be looking in vendor/nim. Hopefully this helps debug the issue :)
If I remove vendor/nim in the situation above, without the Nim path, I get this error:
nimblepkg/nimscriptsupport.nim(8, 11) Error: cannot open 'compiler/ast'
My nimble commit is 5deff1501a691108a16095e37f053e8d62738f4c dated at what looks like this morning.
Yay. I can reproduce it. Thank you!
Yay :)
@jyapayne Should hopefully work now, wanna give it a go? :)
Yep, it worked like a charm! :)
Awesome :D
Thanks for testing!
No problem! Glad to help scratch an itch :)
Hi all, I've just updated my nim installation to the latest(0.13.1) and the nimble install fails with the following message:
System props: Linux Mint 17.1, intel, x86_64, Nim_0.13.1