mikeizbicki / HLearn

Homomorphic machine learning
Other
1.62k stars 135 forks source link

hlearn depends on a version of hmatrix that isn't available on hackage #40

Closed intolerable closed 9 years ago

intolerable commented 10 years ago

HLearn looks for version 0.15.2.2 but only 0.15.2.1 (and the 0.16 branch) are available on hackage – is there somewhere this package should be coming from, and if not, is there a reason HLearn isn't using 0.15.2.1 or 0.16?

0.16 breaks HLearn (duplicate instance declarations since hmatrix 0.16 has instance (Container Vector t, Eq t, Num (Vector t), Product t) => Monoid (Matrix t)) but 0.15.2.1 seems to work.

mikeizbicki commented 10 years ago

Yeah, it's an ugly, temporary hack. hmatrix-0.15.2.1 doesn't compile under ghc 7.8, but version 0.16 doesn't work for the reason you mentioned. I'm in the middle of a pretty hefty refactor that should fix this problem.

In the mean time, I've got a local version of hmatrix that fixes 0.15.1.2 so that it compiles on ghc 7.8. There's just two or three lines that need commenting iirc. If you want, I can put a tar file somewhere that contains the code.

drwebb commented 10 years ago

+1 for the tarball! Trying to get HLearn up and running of a project of mine as well. Thanks.

mikeizbicki commented 10 years ago

I've uploaded the tarball to: izbicki.me/public/cs/github/hmatrix.tgz

intolerable commented 10 years ago

Which version of ghc does hmatrix 0.15.2.1 not compile on? I assume it's specifically 7.8, because it seems to compile fine here (7.8.2).

mikeizbicki commented 10 years ago

I'm using 7.8.2, but I don't remember exactly what the problem was I was having. It might have even been a dependency problem that I mistook for a ghc problem.

Xyclade commented 10 years ago

Sorry to hiijack this ticket, but when trying to install HLearn I got the same issue, however after an attempt to use the tar to get the installation done I get the following error:

next goal: hmatrix (dependency of HLearn-2.0.0.0) rejecting: hmatrix-0.16.0.6, 0.16.0.5, 0.16.0.4, 0.16.0.3, 0.16.0.2, 0.15.2.1, 0.15.2.0, 0.15.0.1, 0.15.0.0, 0.14.1.0, 0.14.0.1, 0.14.0.0, 0.13.1.0, 0.13.0.0, 0.12.0.2, 0.12.0.1, 0.12.0.0, 0.11.1.0, 0.11.0.4, 0.11.0.3, 0.11.0.1, 0.11.0.0, 0.10.0.2, 0.10.0.1, 0.10.0.0, 0.9.3.0, 0.8.3.1, 0.8.2.0, 0.8.1.1, 0.8.1.0, 0.8.0.0, 0.7.2.1, 0.7.1.0, 0.6.0.0, 0.5.2.2, 0.5.2.1, 0.5.2.0, 0.5.1.1, 0.5.0.1, 0.4.0.0, 0.3.0.0, 0.2.1.0, 0.2.0.0, 0.1.1.0, 0.1.0.0 (conflict: HLearn => hmatrix==0.15.2.2) Dependency tree exhaustively searched.

This is after trying to install the hmatrix package with cabal, which gave the following error:

cabal: Error: some packages failed to install: hmatrix-0.15.2.2 failed during the configure step. The exception was: ExitFailure 126

mikeizbicki commented 10 years ago

It looks like hmatrix didn't install because the version isn't in the list you copied. Are you sure the hmatrix tarball installed fine?

Xyclade commented 10 years ago

Well this is embarrassing, it looked like it had installed correctly, but now when I try again it comes up with an error:

Failed to install hmatrix-0.15.2.2 Build log ( /Users/<username>/.cabal/logs/hmatrix-0.15.2.2.log ): /Users/<username>/Downloads/hmatrix/dist/setup/setup: /Users/<username>/Downloads/hmatrix/dist/setup/setup: cannot execute binary file cabal: Error: some packages failed to install: hmatrix-0.15.2.2 failed during the configure step. The exception was: ExitFailure 126

The log contains exactly the same error. This is on Mac OS X mavericks.

So indeed it didn't manage to install it, would running it in a Linux VM solve this issue?

mikeizbicki commented 10 years ago

hmmm... possibly, not sure. hmatrix depends on a lot of non-haskell code. Does hmatrix-0.15.2.1 on hackage install fine? The tarball is just that package with a few class instances removed.

Xyclade commented 10 years ago

The earlier version seems to indeed install fine, while the 0.15.2.2 still errors. I've taken the alternative route and installed an Ubuntu VM, in which it worked right out of the box with Cabal :+1: