dom96 / choosenim

Tool for easily installing and managing multiple versions of the Nim programming language.
BSD 3-Clause "New" or "Revised" License
679 stars 67 forks source link

SIGILL: Illegal operation on update #257

Closed ilmanzo closed 2 years ago

ilmanzo commented 3 years ago

on one of my systems I got this strange issue with choosenim: each operation gives SIGILL.

$ choosenim --version
choosenim v0.7.5 (2021-01-02 22:19:38) [linux/amd64]

$ choosenim --debug update stable
      Info: No client ID found in '/home/andrea/.choosenim/analytics', not sending analytics.
      Info: No client ID found in '/home/andrea/.choosenim/analytics', not sending analytics.
   Updating stable
       Http Requesting http://nim-lang.org/channels/stable
SIGILL: Illegal operation.

same with a fresh download from the website :

$ curl https://nim-lang.org/choosenim/init.sh -sSf | sh
choosenim-init: Downloading choosenim-0.7.4_linux_amd64
SIGILL: Illegal operation.

with advice from dom96 on Discord, I tried an older version and that works.

$ ./choosenim-0.5.0_linux_amd64 update stable
   Updating stable
Downloading Nim 1.4.8 from nim-lang.org
[##################################################] 100.0% 0kb/s
 Extracting nim-1.4.8-linux_x64.tar.xz
   Building Nim 1.4.8
 Compiler:  Already built
    Tools:  Already built
    Updated to 1.4.8

the problematic system is a standard Debian 10:

$ uname -a
Linux hpmicro 4.19.0-16-amd64 #1 SMP Debian 4.19.181-1 (2021-03-19) x86_64 GNU/Linux

$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 10 (buster)
Release:        10
Codename:       buster

ping me if you need further details

dom96 commented 2 years ago

With the new 0.8.0 release this will hopefully no longer be a problem. Please have a test and let me know: https://github.com/dom96/choosenim/releases/tag/v0.8.0

ilmanzo commented 2 years ago

confirmed, 0.8.0 works! Many thanks

$ ./choosenim-0.8.0_linux_amd64 update self
   Updating choosenim
      Info: Already up to date at version 0.8.0

there's still a minor glitch, when a wrong command is specified, it displays some strange file path info

$ choosenim asdasd
       Tip: 4 messages have been suppressed, use --verbose to show them.
     Error: /mnt/c/Users/morfe/projects/choosenim/src/choosenim.nim(354) choosenim
        ... /mnt/c/Users/morfe/projects/choosenim/src/choosenim.nim(335) performAction
        ... /mnt/c/Users/morfe/projects/choosenim/src/choosenim.nim(128) choose
        ... /mnt/c/Users/morfe/projects/choosenim/src/choosenim.nim(64) chooseVersion
        ... /mnt/c/Users/morfe/projects/choosenim/src/choosenimpkg/utils.nim(18) parseVersion
        ... Invalid version, path or unknown channel.
        ... Try 1.0.6, #head, #commitHash, or stable.
        ... For example: choosenim #head.
        ...
        ... See --help for more examples.
dom96 commented 2 years ago

ahh yeah, that's because it's built in debug mode. Thanks for the callout though. I have to fix one more thing and will ensure I build it in release mode for the release :)