Skip to content
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

nim-2.0.0: finish.exe couldn't finish its work #22403

Open
geff10 opened this issue Aug 7, 2023 · 11 comments
Open

nim-2.0.0: finish.exe couldn't finish its work #22403

geff10 opened this issue Aug 7, 2023 · 11 comments

Comments

@geff10
Copy link

geff10 commented Aug 7, 2023

error message: Could not patch 'config/nim.cfg' [Error] Reason: patch substring not found: #gcc.path = r"$nim\dist\mingw\bin"

I have mingw. I also tried to reinstall it through chocolatey, update it. Then download the .7z manually from Nim's page, then also through finish.exe

@Araq
Copy link
Member

Araq commented Aug 10, 2023

I tested this myself and it worked for me. Also my nim.cfg has this line.

@geff10
Copy link
Author

geff10 commented Aug 10, 2023

@Araq mine doesn't. Do you have any idea whose (which script's/module's/component's) responsibility is to put that line there?
I would be glad if I could use Nim "out of the box" with minimal to no configuration.

@geff10
Copy link
Author

geff10 commented Aug 10, 2023

extra info: I try to use Nim in Windows 11 environment (but I assume you already figured it out)

@Araq
Copy link
Member

Araq commented Aug 11, 2023

Ping @ringabout can you reproduce this?

@ringabout
Copy link
Member

secs

@ringabout
Copy link
Member

Btw, you might as well try choosenim, which certainly works for me for the time being.

@ringabout
Copy link
Member

Yeah, I can reproduce it. Let me check the config.

Could not patch 'config/nim.cfg' [Error]
Reason: patch substring not found:
#gcc.path = r"$nim\dist\mingw\bin"

@ringabout
Copy link
Member

ringabout commented Aug 11, 2023

Yeah, the problem is that you might have run the finish.exe more than once. So the line in the config has been replaced by the actual path.

@ringabout
Copy link
Member

ringabout commented Aug 11, 2023

It's just a warning. Should I add something to detect it by special comments and give a better warning or something?

@geff10
Copy link
Author

geff10 commented Aug 11, 2023

@ringabout not really just a warning, as Nim didn't work me at all (like if it weren't in the path variable unknown command). I put that line into the config, run finish.exe. It was successful. Now Nim starts, but now I get this error:
[..path_to_code..]Hello.Nim(1, 9) Warning: imported and not used: 'strutils' [UnusedImport]
CC: C:/programs/nim/nim-2.0.0/lib/system/exceptions.nim
Error: invocation of external compiler program failed. The system cannot find the file specified.
Additional info: Requested command not found: 'C:\programs\nim\nim-2.0.0\dist\mingw\bin\gcc.exe -c -w -fmax-errors=3 -mno-ms-bitfields -IC:\programs\nim\nim-2.0.0\lib -ID:[path] -o [userdirectorypath]\nimcache\Hello_d@mC@c@sprograms@[email protected]@slib@[email protected] [userdirectorypath]\nimcache\Hello_d@mC@c@sprograms@[email protected]@slib@[email protected]'. OS error: 2

@ringabout
Copy link
Member

What about gcc -v? Does C:\programs\nim\nim-2.0.0\dist\mingw\bin\gcc.exe exist? DId you restart the computer to put path environment variables in effect?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants