-
Notifications
You must be signed in to change notification settings - Fork 189
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
Cannot compile nimble on Ubuntu Linux 14.04 (i686) #278
Comments
Nimble should be bundled with every Nim release now so compiling it yourself shouldn't be necessary. |
Hi! What do you mean with "bundled" exactly? I installed nim version 0.15.2 (I built it using build.sh, as usual), and there's no nimble executable in the /bin directory, and nothing in tools. As far as I can tell the install_nimble.nims and installations.nims scripts download it by cloning the nimble repo. Maybe I am just missing something really obvious here... :) |
1 similar comment
Hi! What do you mean with "bundled" exactly? I installed nim version 0.15.2 (I built it using build.sh, as usual), and there's no nimble executable in the /bin directory, and nothing in tools. As far as I can tell the install_nimble.nims and installations.nims scripts download it by cloning the nimble repo. Maybe I am just missing something really obvious here... :) |
oh right. The source code is only bundled not the executable, my bad. Does running |
Nope... :( same error! |
Can you show me the error that you get when you execute that? |
Sure:
The thing that really spins me out is the fact that compiling that file with gcc manually actually works! So why doesn't it work when the nim compiler calls gcc as an external program? |
hrm, can you try compiling with the Also maybe try removing the other flags, like |
It is always coming up with the same error "execution of external program failed", even though if I execute it manually it compiles! |
Well. I'm stumped. @Araq please help. On Monday, 14 November 2016, Fabio Cevasco notifications@github.com wrote:
|
This is just a hypothesis, of course, but I have seen this before. Your machine doesn't have enough RAM to compile Nimble, the RAM suffices for the Nim compiler but not for Nim invoking GCC. When you execute GCC manually you do this after Nim has finished and so the memory that Nim takes is available for GCC. That Nimble is a bigger Nim program that the compiler itself is weird (bootstrapping works after all on your machine, right?), but on my machine the nimble binary is twice the size of Nim's so Nimble is definitely more taxing than Nim itself (we need to investigate why that is, in theory Nimble should be smaller). |
Interesting... The machine I am trying to compile nimble on actually only has 512MB of RAM! However I did try to compile another nim program of mine (LiteStore) on the same machine and it worked fine... The resulting executable (in release mode) is over 2MB:
How big is nimble? |
That must be the problem. Nimble includes compiler sources and so it likely requires more RAM to build than the compiler itself. Solution would be to enable swap. That said, I think we should do better here. An error message that says "out of memory" would be nice. (that's a Nim bug though). |
Seems impossible to do, Linux performs memory overcommit, processes crash with segmentation faults for OOM. |
Well the final executable size hardly is correlated with how much RAM is used during compilation. Doesn't surprise me at all. |
Closing this because it isn't a Nimble issue. |
I downloaded and installed nim on a linux system, but I am unable to compile nimble.
When I execute
nim e install_tools.nims
, I get the following error:...which is weird, especially because if I run just the following command:
...I get no errors whatsoever.
Here's some more info on my system:
Nim version (installed in /opt/nim, /opt/nim/bin is in $PATH):
Linux version/distro:
GCC version:
Things I also tried:
I am able to compile any other nim program except nimble. :(
Any ideas?
--- EDIT
Meanwhile I upgraded to ubuntu 16.04.1 -- same problem :(
The text was updated successfully, but these errors were encountered: