jackmott / nim_simd

Nim experiment for a write once run optimum simd anywhere *at runtime* library
MIT License
30 stars 1 forks source link

Can't compile using nimble #3

Closed sdwfrost closed 6 years ago

sdwfrost commented 6 years ago

Using choosenim nim#devel on OSX, I get the following error when installing with nimble:

$ nimble install
   Warning: Package 'nimsimd' has an incorrect structure. It should contain a single directory hierarchy for source files, named 'nimsimdpkg', but file 'avx.nim' is in a directory named 'nimsimd' instead. This will be an error in the future.
      Hint: If 'nimsimd' contains source files for building 'nimsimd', rename it to 'nimsimdpkg'. Otherwise, prevent its installation by adding `skipDirs = @["nimsimd"]` to the .nimble file.
  Verifying dependencies for nimsimd@0.1.0
   Warning: No nimblemeta.json file found in /Users/simon/.nimble/pkgs/nimsimd-0.1.0
 Installing nimsimd@0.1.0
   Building nimsimd/nimsimd using c backend
Error: unhandled exception: Is a directory [OSError]
ghost commented 6 years ago

@jackmott This line should be removed from nimble to fix this issue, because as I think nimsimd doesn't need to provide any binaries to actual users of it: https://github.com/jackmott/nim_simd/blob/master/nimsimd.nimble#L7

sdwfrost commented 6 years ago

This fixes the compilation problem. Would it be possible to have an examples or test directory with some minimal code to test whether the package works properly?

jackmott commented 6 years ago

I've made an examples directory, you should be able to compile and run simple.nim and verify that the two arrays are added, and that it is detecting your cpu correctly. There is also a simplex_noise.nim which is not fully working yet.