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

Windows: 'update stable' downloads wrong architecture #315

Open
matkuki opened this issue Nov 28, 2022 · 3 comments
Open

Windows: 'update stable' downloads wrong architecture #315

matkuki opened this issue Nov 28, 2022 · 3 comments

Comments

@matkuki
Copy link

matkuki commented Nov 28, 2022

Hi,

My specs: Windows 10 x64, choosenim installed manually.

I had installed 1.6.8 previously a couple of months ago with choosenim update stable and it worked without problems.
Tried the same with 1.6.10 a couple of days ago, but it downloaded the x86 version. Here is the forum post I posted the problem on: https://forum.nim-lang.org/t/9643. I removed 1.6.10 and reinstalled it at least twice with:

choosenim 1.6.8
choosenim remove 1.6.10
choosenim update stable

... but each time it downloaded the wrong architecture.
But after a day, maybe because of a reboot or something else (I honestly don't know what else could it be), it worked?

Any ideas what went wrong here?

@matkuki
Copy link
Author

matkuki commented Dec 23, 2022

Here is the same problem with Nim 2 RC1:

C:\>choosenim update devel
   Updating devel
      Info: Using the 'GITHUB_TOKEN' environment variable for GitHub API Token.
Downloading Nim latest-devel from GitHub
[##################################################] 100.0% 0kb/s
 Extracting windows_x32.zip
    Setting up git repository
   Building Nim #devel
  Compiler: Already built
    Updated to #devel
   Switched to Nim #devel

C:\>nim --version
Nim Compiler Version 1.9.1 [Windows: i386]
Compiled at 2022-12-21
Copyright (c) 2006-2022 by Andreas Rumpf

active boot switches: -d:release

@daniel-j
Copy link

It happened to me the other day too on Windows, I think when trying to upgrade to 1.6.12. Deleted everything choosenim and nimble related and reinstalled, and got x64.

@matkuki
Copy link
Author

matkuki commented Jun 2, 2023

Hey @daniel-j

It happened to me the other day too on Windows, I think when trying to upgrade to 1.6.12. Deleted everything choosenim and nimble related and reinstalled, and got x64.

I tried that, no changes.

NEW OBSERVATION:

choosenim update devel while located in the C:\ or C:\Windows\ or C:\Windows\System32 or ... directory installs wrong version:

C:\WINDOWS\system32>choosenim update devel
   Updating devel
      Info: Using the 'GITHUB_TOKEN' environment variable for GitHub API Token.
Downloading Nim latest-devel from GitHub
[##################################################] 100.0% 0kb/s
 Extracting windows_x32.zip
    Setting up git repository
   Building Nim #devel
  Compiler: Already built
    Updated to #devel
      Info: Version #devel already selected

choosenim update devel in any other directory like C:\Users\ or C:\Nim or C:\whatever installs correct version:

C:\Users\matic> choosenim update devel
   Updating devel
      Info: Using the 'GITHUB_TOKEN' environment variable for GitHub API Token.
Downloading Nim latest-devel from GitHub
[##################################################] 100.0% 0kb/s
 Extracting windows_x64.zip
    Setting up git repository
   Building Nim #devel
  Compiler: Already built
    Updated to #devel
      Info: Version #devel already selected

Where is the heuristic to detect the architecture on Windows in the code located?

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

No branches or pull requests

2 participants