PMunch / ratel

131 stars 4 forks source link

nimble install ratel fails #12

Closed blippy closed 2 years ago

blippy commented 2 years ago

Typing nimble install ratel gives me:

Downloading https://github.com/PMunch/ratel using git
   Warning: Package 'ratel' has an incorrect structure. It should contain a single directory hierarchy for source files, named 'ratelpkg', but file 'progmem.nim' is in a directory named 'board' instead. This will be an error in the future.
      Hint: If 'board' contains source files for building 'ratel', rename it to 'ratelpkg'. Otherwise, prevent its installation by adding `skipDirs = @["board"]` to the .nimble file.
  Verifying dependencies for ratel@0.2.0
      Info: Dependency on nimscripter@any version already satisfied
  Verifying dependencies for nimscripter@1.0.13
      Info: Dependency on https://github.com/disruptek/assume@>= 0.4.0 already satisfied
  Verifying dependencies for assume@0.4.0
      Info: Dependency on https://github.com/disruptek/balls@>= 2.0.0 & < 4.0.0 already satisfied
   Warning: Package 'balls' has an incorrect structure. It should contain a single directory hierarchy for source files, named 'ballspkg', but file 'style.nim' is in a directory named 'balls' instead. This will be an error in the future.
      Hint: If 'balls' contains source files for building 'balls', rename it to 'ballspkg'. Otherwise, prevent its installation by adding `skipDirs = @["balls"]` to the .nimble file.
  Verifying dependencies for balls@3.7.0
      Info: Dependency on https://github.com/disruptek/grok@>= 0.5.0 & < 1.0.0 already satisfied
  Verifying dependencies for grok@0.5.3
      Info: Dependency on https://github.com/disruptek/ups@< 1.0.0 already satisfied
  Verifying dependencies for ups@0.0.7
      Info: Dependency on npeg@>= 0.23.2 & < 1.0.0 already satisfied
  Verifying dependencies for npeg@0.26.0
      Info: Dependency on https://github.com/planetis-m/sync@>= 1.0.0 & < 2.0.0 already satisfied
  Verifying dependencies for sync@1.5.0
      Info: Dependency on compiler@any version already satisfied
   Warning: Package 'compiler' has an incorrect structure. It should contain a single directory hierarchy for source files, named 'compiler', but file 'crashtester.nim' is in a directory named 'nimsuggest' instead. This will be an error in the future.
      Hint: If 'nimsuggest' contains source files for building 'compiler', rename it to 'compiler'. Otherwise, prevent its installation by adding `skipDirs = @["nimsuggest"]` to the .nimble file.
  Verifying dependencies for compiler@1.6.4
      Info: Dependency on cligen@any version already satisfied
  Verifying dependencies for cligen@1.5.23
 Installing ratel@0.2.0
   Building ratel/ratel using c backend
/home/pi/.nimble/pkgs/compiler-1.6.4/compiler/commands.nim(56, 16) Error: cannot open file: ../doc/basicopt.txt
    Prompt: Build failed for 'ratel@0.2.0', would you like to try installing 'ratel@#head' (latest unstable)? [y/N]
    Answer: 

I'm using nim 1.6.4

PMunch commented 2 years ago

Hmm, it's actually the Nim compiler that fails to build (the compiler is imported as a library to run NimScript within the Ratel helper program). This is probably related to how you installed Nim. Did you install manually, through choosenim, or through your OSs package manager?

PMunch commented 2 years ago

Could you try nimble install ratel --path:"$nim"?

blippy commented 2 years ago

I have Debian Stable, with the default version of 1.4.2. I think a more recent one is required for your package, though, so I downloaded the a version from nim's website, which is 1.6.4. I'm using 1.6.4, which resides in /usr/local/bin

Running nimble install ratel --path:"$nim" produces:

Downloading https://github.com/PMunch/ratel using git
   Warning: Package 'ratel' has an incorrect structure. It should contain a single directory hierarchy for source files, named 'ratelpkg', but file 'progmem.nim' is in a directory named 'board' instead. This will be an error in the future.
      Hint: If 'board' contains source files for building 'ratel', rename it to 'ratelpkg'. Otherwise, prevent its installation by adding `skipDirs = @["board"]` to the .nimble file.
  Verifying dependencies for ratel@0.2.0
      Info: Dependency on nimscripter@any version already satisfied
  Verifying dependencies for nimscripter@1.0.13
      Info: Dependency on https://github.com/disruptek/assume@>= 0.4.0 already satisfied
  Verifying dependencies for assume@0.4.0
      Info: Dependency on https://github.com/disruptek/balls@>= 2.0.0 & < 4.0.0 already satisfied
   Warning: Package 'balls' has an incorrect structure. It should contain a single directory hierarchy for source files, named 'ballspkg', but file 'style.nim' is in a directory named 'balls' instead. This will be an error in the future.
      Hint: If 'balls' contains source files for building 'balls', rename it to 'ballspkg'. Otherwise, prevent its installation by adding `skipDirs = @["balls"]` to the .nimble file.
  Verifying dependencies for balls@3.7.0
      Info: Dependency on https://github.com/disruptek/grok@>= 0.5.0 & < 1.0.0 already satisfied
  Verifying dependencies for grok@0.5.3
      Info: Dependency on https://github.com/disruptek/ups@< 1.0.0 already satisfied
  Verifying dependencies for ups@0.0.7
      Info: Dependency on npeg@>= 0.23.2 & < 1.0.0 already satisfied
  Verifying dependencies for npeg@0.26.0
      Info: Dependency on https://github.com/planetis-m/sync@>= 1.0.0 & < 2.0.0 already satisfied
  Verifying dependencies for sync@1.5.0
      Info: Dependency on compiler@any version already satisfied
   Warning: Package 'compiler' has an incorrect structure. It should contain a single directory hierarchy for source files, named 'compiler', but file 'crashtester.nim' is in a directory named 'nimsuggest' instead. This will be an error in the future.
      Hint: If 'nimsuggest' contains source files for building 'compiler', rename it to 'compiler'. Otherwise, prevent its installation by adding `skipDirs = @["nimsuggest"]` to the .nimble file.
  Verifying dependencies for compiler@1.6.4
      Info: Dependency on cligen@any version already satisfied
  Verifying dependencies for cligen@1.5.23
 Installing ratel@0.2.0
   Building ratel/ratel using c backend
command line(1, 2) Error: argument for command line option expected: '--path'
    Prompt: Build failed for 'ratel@0.2.0', would you like to try installing 'ratel@#head' (latest unstable)? [y/N]
    Answer: 
PMunch commented 2 years ago

I don't really see why, but this is very likely caused by me installing it through choosenim (which I highly recommend) over the manual/package manager way. I'll try to find a good fix for this though.

blippy commented 2 years ago

I'll see if choosenim helps. I'm a nooby nim programmer, btw.

blippy commented 2 years ago

I installed choosenim, which uses Nim 1.6.6. The problems remain.

blippy commented 2 years ago

Now I tried nimble install ratel and got a successful build.

ownloading https://github.com/PMunch/ratel using git
   Warning: Package 'ratel' has an incorrect structure. It should contain a single directory hierarchy for source files, named 'ratelpkg', but file 'progmem.nim' is in a directory named 'board' instead. This will be an error in the future.
      Hint: If 'board' contains source files for building 'ratel', rename it to 'ratelpkg'. Otherwise, prevent its installation by adding `skipDirs = @["board"]` to the .nimble file.
  Verifying dependencies for ratel@0.2.0
      Info: Dependency on nimscripter@any version already satisfied
  Verifying dependencies for nimscripter@1.0.13
      Info: Dependency on https://github.com/disruptek/assume@>= 0.4.0 already satisfied
  Verifying dependencies for assume@0.4.0
      Info: Dependency on https://github.com/disruptek/balls@>= 2.0.0 & < 4.0.0 already satisfied
   Warning: Package 'balls' has an incorrect structure. It should contain a single directory hierarchy for source files, named 'ballspkg', but file 'style.nim' is in a directory named 'balls' instead. This will be an error in the future.
      Hint: If 'balls' contains source files for building 'balls', rename it to 'ballspkg'. Otherwise, prevent its installation by adding `skipDirs = @["balls"]` to the .nimble file.
  Verifying dependencies for balls@3.7.0
      Info: Dependency on https://github.com/disruptek/grok@>= 0.5.0 & < 1.0.0 already satisfied
  Verifying dependencies for grok@0.5.3
      Info: Dependency on https://github.com/disruptek/ups@< 1.0.0 already satisfied
  Verifying dependencies for ups@0.0.7
      Info: Dependency on npeg@>= 0.23.2 & < 1.0.0 already satisfied
  Verifying dependencies for npeg@0.26.0
      Info: Dependency on https://github.com/planetis-m/sync@>= 1.0.0 & < 2.0.0 already satisfied
  Verifying dependencies for sync@1.5.0
      Info: Dependency on compiler@any version already satisfied
   Warning: Package 'compiler' has an incorrect structure. It should contain a single directory hierarchy for source files, named 'compiler', but file 'crashtester.nim' is in a directory named 'nimsuggest' instead. This will be an error in the future.
      Hint: If 'nimsuggest' contains source files for building 'compiler', rename it to 'compiler'. Otherwise, prevent its installation by adding `skipDirs = @["nimsuggest"]` to the .nimble file.
  Verifying dependencies for compiler@1.6.6
      Info: Dependency on cligen@any version already satisfied
  Verifying dependencies for cligen@1.5.23
 Installing ratel@0.2.0
   Building ratel/ratel using c backend
/home/pi/.nimble/pkgs/assume-0.4.0/assume/spec.nim(162, 12) Warning: compiler bug workaround; see https://github.com/nim-lang/Nim/issues/18867 [User]
   Success: ratel installed successfully.
PMunch commented 2 years ago

Great to hear, so yes it's a packaging issue for the "compiler" package.. I'll see if I can at least make it smoother to get it installed without choosenim.

blippy commented 2 years ago

It still doesn't work. I think you need to release a new version of ratel??

PMunch commented 2 years ago

Oh sorry, I forgot that Nimble only works on tags. I pushed a new tag now, so I think it should work. I'll make a release on GitHub out of the tag as well just to be sure. I will hopefully get some more work done on Ratel over the weekend, adding some new features and possibly writing some more docs.

blippy commented 2 years ago

OK. Example now compiles.