nh2 / hemokit

Haskell library for the Emotiv EEG, inspired by the Emokit code
31 stars 13 forks source link

trouble with dependencies #12

Open berkdi opened 7 years ago

berkdi commented 7 years ago

I'm trying to build this (hemokit-0.6.6.tar.gz from https://hackage.haskell.org/package/hemokit#readme ) project on Windows to get the raw data feed. I have no previous experience in neither haskell nor cabal. installed pre-build .exe, plugged usb-receiver and connected epoc+, but no device found upon:

as i understand from earlier posts the pre-build.exe built before vid&pid of 1234;ed02 beknown to writer, so I decided to compile and build the hemokit-dump myself as I believe there is no updated pre-build hemokit.exe. installed haskell platform with ghci 8.2.1 installed cabal updated cabal tried to build homokit.cabal but received missing dependencies:

C:\Users\berkdi\Desktop\Neuroscience\BCI\hemokit-0.6.6>cabal build hemokit
Warning: The package list for 'hackage.haskell.org' does not exist. Run 'cabal
update' to download it.
Resolving dependencies...
Warning: solver failed to find a solution:
Could not resolve dependencies:
trying: hemokit-0.6.6 (user goal)
unknown package: split (dependency of hemokit-0.6.6)
fail (backjumping, conflict set: hemokit, split)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: hemokit, splitTrying configure anyway.
Configuring hemokit-0.6.6...
cabal: Encountered missing dependencies:
aeson >=0.6.1.0,
cipher-aes >=0.2.0,
conduit >=1,
deepseq-generics >=0.1,
hidapi >=0.1.2,
mtl >=2.1.2,
network-simple >=0.4.0.2,
optparse-applicative >=0.11,
pretty-show >=1.0,
split >=0.2.2,
vector >=0.9,
websockets >=0.8.0.0

installed all of them with updated versions, tried to install it all, starting from the simpliest indicating to not cause any inter-dependent problem.

succeeded but starting with vector, it started needing more dependencies and base 4.10 fails to configure, instead it gives:

<interactive>:1:19: error:
    Not in scope: `System.IO.hSetBuffering'
    No module named `System.IO' is imported.

<interactive>:1:43: error:
    Not in scope: `System.IO.stdin'
etc..etc..

Moreover I believe some of these missing dependencies are already in C:\Program Files\Haskell\Platform\8.2.1\lib but still giving "couldnt find module" error upon compiling with WinGHC the same error happens. Trying to install it with "cabal install base" also makes the base 4.10 get rejected, giving

only already installed instances can be used

, If someone could help me I would appreciate greatly. I don't know what to do next...or previously what should have been done.

nh2 commented 7 years ago

Hey, if you want to build from source, it will be easier if you use stack to build hemokit. Install it, and run stack install from the hemokit directory.

However, your problem is likely not that you're not using the latest version; the Windows binary builds I made are still recent enough (the newer commits are just clean-ups that don't change the functionality, so I haven't made an official release with new builds since then).

I think your problem is that you're using the EPOC+. So far hemokit is known to work only with the original EPOC.

But if you can change the code to make it work with the EPOC+, please let me know.

berkdi commented 7 years ago

I've found a modified version of emokit that suppots epoc+. In python version in Windows it manages to connect, or at least it seems so because when there is no device attached/connected, the ticker does not start, but there is no stream of signal data from anything, everything other than the ticker value is 0. I'm not sure if it'll be useful but here is the link: https://github.com/a455bcd9/emokit I'll be trying to find what's causing it, but don't think I can.