nph icon indicating copy to clipboard operation
nph copied to clipboard

Cannot install with Nim 2.2.0

Open fox0430 opened this issue 1 year ago • 3 comments

Nim version

$ nim -v

Nim Compiler Version 2.2.0 [Linux: amd64]
Compiled at 2024-10-02
Copyright (c) 2006-2024 by Andreas Rumpf

git hash: 78983f1876726a49c69d65629ab433ea1310ece1
active boot switches: -d:release

Error messages

$ nimble install nph

Downloading https://github.com/arnetheduck/nph using git
  Verifying dependencies for [email protected]
 Installing [email protected]
   Building nph/nph using c backend
/tmp/nimble_27083/githubcom_arnetheducknph/src/astyaml.nim(107, 39) Error: undeclared field: 'r' for type ast.TLoc [type declared in /home/fox/.choosenim/toolchains/nim-2.2.0/compiler/ast.nim(650, 3)]
Downloading https://github.com/arnetheduck/nph using git
  Verifying dependencies for [email protected]
 Installing [email protected]
   Building nph/nph using c backend
/tmp/nimble_27083/githubcom_arnetheducknph_#head/src/astyaml.nim(107, 39) Error: undeclared field: 'r' for type ast.TLoc [type declared in /home/fox/.choosenim/toolchains/nim-2.2.0/compiler/ast.nim(650, 3)]
       Tip: 8 messages have been suppressed, use --verbose to show them.
nimble.nim(304)          buildFromDir

    Error:  Build failed for the package: nph

fox0430 avatar Oct 02 '24 23:10 fox0430

this is a nimble bug (cc @jmgomez)

arnetheduck avatar Oct 03 '24 06:10 arnetheduck

Error messages

$ nimble install nph

Downloading https://github.com/arnetheduck/nph using git
  Verifying dependencies for [email protected]
 Installing [email protected]
   Building nph/nph using c backend
/tmp/nimble_27083/githubcom_arnetheducknph/src/astyaml.nim(107, 39) Error: undeclared field: 'r' for type ast.TLoc [type declared in /home/fox/.choosenim/toolchains/nim-2.2.0/compiler/ast.nim(650, 3)]
Downloading https://github.com/arnetheduck/nph using git
  Verifying dependencies for [email protected]
 Installing [email protected]
   Building nph/nph using c backend
/tmp/nimble_27083/githubcom_arnetheducknph_#head/src/astyaml.nim(107, 39) Error: undeclared field: 'r' for type ast.TLoc [type declared in /home/fox/.choosenim/toolchains/nim-2.2.0/compiler/ast.nim(650, 3)]
       Tip: 8 messages have been suppressed, use --verbose to show them.
nimble.nim(304)          buildFromDir

    Error:  Build failed for the package: nph

I am also facing the exact same issue.

Thanks for your work on nph!

firasuke avatar Oct 03 '24 09:10 firasuke

This PR which is now merged, should fix it https://github.com/nim-lang/nimble/pull/1267 But note that it requires to use the sat solver like so nimble install nph --solver:sat

jmgomez avatar Oct 03 '24 10:10 jmgomez

got it to work with nimble install nph@#master

TheGoldMonkey avatar Oct 27 '24 06:10 TheGoldMonkey

Still doesn't work for me on Nim 2.2.0. Had to switch to 2.0.12 for it to work.

➜ nimble install nph@#master
Downloading https://github.com/arnetheduck/nph using git
  Verifying dependencies for [email protected]
 Installing [email protected]
   Building nph/nph using c backend
/private/var/folders/nc/1fdhk71d13v2lqdbt3hwt_ph0000gn/T/nimble_35391/githubcom_arnetheducknph_#master/src/astyaml.nim(107, 39) Error: undeclared field: 'r' for type ast.TLoc [type declared in /Users/bradleyhe/.choosenim/toolchains/nim-2.2.0/compiler/ast.nim(650, 3)]
       Tip: 5 messages have been suppressed, use --verbose to show them.
nimble.nim(304)          buildFromDir

    Error:  Build failed for the package: nph

Same output with --solver:sat.

BradleyHe avatar Dec 05 '24 19:12 BradleyHe

This still seems to be present when using the current release of Nimble.

If I do nimble install nimble@\#master && nimble install nph --solver:sat then it works fine. @jmgomez could we get a release of Nimble made at some point?

elcritch avatar Dec 12 '24 03:12 elcritch

@elcritch yes, the plan is to make one as soon as the latest PRs are merged

jmgomez avatar Dec 12 '24 14:12 jmgomez

https://github.com/arnetheduck/nph/releases/tag/v0.6.1 solves this for older nimbles while nimble master should be able to compile any nph version (ie nimble install [email protected] should work with the next nimble release after 0.16.4)

arnetheduck avatar Jan 08 '25 11:01 arnetheduck