nim-lang / Nim

Nim is a statically typed compiled systems programming language. It combines successful concepts from mature languages like Python, Ada and Modula. Its design focuses on efficiency, expressiveness, and elegance (in that order of priority).
https://nim-lang.org
Other
16.55k stars 1.47k forks source link

Installing compiler/nim package via Nimble fails with v1.6.12 #21545

Open elcritch opened 1 year ago

elcritch commented 1 year ago

Description

Running nimble install nim@1.6.12 fails to build.

Nim Version

Tried installing it with both Nim 1.6.10 and 1.6.12. I've also got failures trying nimble install nim@#head, however it fails with a different issue.

Current Output

Verifying dependencies for nim@1.6.12
 Installing nim@1.6.12
   Building nim/compiler/nim using c backend
/private/var/folders/yp/ky1yl8tn1fjclx29ftm_68th0000gn/T/nimble_16158/githubcom_nimlangNimgit_1.6.12/compiler/modulegraphs.nim(14, 38) Warning: imported and not used: 'sequtils' [UnusedImport]
/private/var/folders/yp/ky1yl8tn1fjclx29ftm_68th0000gn/T/nimble_16158/githubcom_nimlangNimgit_1.6.12/compiler/passes.nim(17, 28) Warning: imported and not used: 'sha1' [UnusedImport]
/private/var/folders/yp/ky1yl8tn1fjclx29ftm_68th0000gn/T/nimble_16158/githubcom_nimlangNimgit_1.6.12/compiler/sighashes.nim(12, 62) Warning: imported and not used: 'packages' [UnusedImport]
/private/var/folders/yp/ky1yl8tn1fjclx29ftm_68th0000gn/T/nimble_16158/githubcom_nimlangNimgit_1.6.12/compiler/modules.nim(13, 8) Warning: imported and not used: 'astalgo' [UnusedImport]
   Building nim/nimsuggest/nimsuggest using c backend
nimsuggest.nim(141, 32) Error: undeclared identifier: 'ideExpand'
candidates (edit distance, scope distance); see '--spellSuggest': 
 (5, 7): 'SEEK_END' [var declared in std/posix_other_consts(743, 5)]
 (5, 7): 'ideChanged' [enumField declared in compiler/options.nim(188, 19)]
 (5, 7): 'ideCon' [enumField declared in compiler/options.nim(186, 22)]
 (5, 7): 'ideKnown' [enumField declared in compiler/options.nim(187, 31)]
 (5, 7): 'ideMod' [enumField declared in compiler/options.nim(186, 74)]
 (5, 7): 'ideNone' [enumField declared in compiler/options.nim(186, 5)]
 (5, 7): 'ideType' [enumField declared in compiler/options.nim(188, 31)]
 (5, 7): 'ikExpr' [enumField declared in std/parseutils(607, 5)]
 (5, 7): 'sexpInt' [enumField declared in sexp.nim(23, 5)]
    Prompt: Build failed for 'nim@1.6.12', would you like to try installing 'nim@#head' (latest unstable)? [y/N]
    Answer: n
       Tip: 8 messages have been suppressed, use --verbose to show them.
     Error: Aborting installation due to build failure

Expected Output

No response

Possible Solution

No response

Additional Information

No response

elcritch commented 1 year ago

Also, logs for nimble install nim@#devel:

   Building nim/compiler/nim using c backend
/private/var/folders/yp/ky1yl8tn1fjclx29ftm_68th0000gn/T/nimble_20135/githubcom_nimlangNimgit_#head/compiler/nim.nim(13, 13) Error: cannot open file: std/assertions

Note, I'm running on MacOS on an ARM/M1 machine with a natively compiled Nim install.

ringabout commented 1 year ago

@yyoncho Would you mind having a look if you happen to have some free time?

yyoncho commented 1 year ago

@elcritch try with the latest nimble

edit: by "the latest", I mean the one from master branch of nimble.

elcritch commented 1 year ago

Ok, I'll give it a try.

elcritch commented 1 year ago

It appears to install for me when using:

└─(02:38:40 on master)──> nim -v                                                                                    ──(Thu,Apr06)─┘
Nim Compiler Version 1.9.3 [MacOSX: arm64]
Compiled at 2023-04-02
Copyright (c) 2006-2023 by Andreas Rumpf

active boot switches: -d:release
┌─(~/projs/nims/third-party/nimscripter)─────────────────────────────────────────────(jaremycreechley@Jaremys-MacBook-Pro-2:s017)─┐
└─(02:38:48 on master)──> nimble -v                                                                                 ──(Thu,Apr06)─┘
nimble v0.14.2 compiled at 2023-04-06 09:33:39
git hash: 3575fd54a890d910ace56678aa74b4237d604175