blanu / Dust

A Polymorphic Engine for Filtering-Resistant Transport Protocols
286 stars 31 forks source link

Resolving base-4.6.0.1 dependency issue in Debian 7.2 #14

Closed burncycl closed 10 years ago

burncycl commented 10 years ago

root@Euclid:/etc# cat debian_version 7.2 root@Euclid:/etc# uname -a Linux Euclid 3.2.0-4-amd64 #1 SMP Debian 3.2.51-1 x86_64 GNU/Linux

Resolving dependencies... Configuring Dust-2.2.1... cabal: At least the following dependencies are missing: base >=4.6.0.1 && <5,

I understand you upgraded some stuff and now Dust requires GHC Base 4.6.0.1

That said, how do I resolve this dependency issue? Do I need to compile GHC from source?

I've tried compiling base 4.6.0.1 from source.

Error: configure: creating ./config.status config.status: error: cannot find input file: `base.buildinfo.in'

From my understanding base 4.6.0.1 isn't meant to be installed by itself.

burncycl commented 10 years ago

Additionally:

root@Euclid:/source/Dust/hs# cabal install --only-dependencies Resolving dependencies... cabal: Could not resolve dependencies: trying: Dust-2.2.1 (user goal) next goal: base (dependency of Dust-2.2.1) rejecting: base-4.5.0.0/installed-40b... (conflict: Dust => base>=4.6.0.1 && <5) rejecting: base-4.6.0.1, 4.6.0.0, 4.5.1.0, 4.5.0.0, 4.4.1.0, 4.4.0.0, 4.3.1.0, 4.3.0.0, 4.2.0.2, 4.2.0.1, 4.2.0.0, 4.1.0.0, 4.0.0.0, 3.0.3.2, 3.0.3.1 (global constraint requires installed instance)

blanu commented 10 years ago

This was a tricky problem. As far as I can tell, there is no good way to fix this in Debian. Therefore, I fixed the problem in the package instead. I reverted the base-4.6 dependency so that it should now work with base-4.5 again. However, you need to install my fork of the threefish package from source in order to remove the base-4.6 requirement. You can find it at: https://github.com/blanu/threefish

Please let me know if this works for you. I have the package now successfully compiling on Ubuntu 12.04 again, which had similar issues.

burncycl commented 10 years ago

cd /source git clone https://github.com/blanu/threefish.git cd threefish cabal install

[... some other build stuff ...]

Configuring threefish-0.2.2... Building threefish-0.2.2... Preprocessing library threefish-0.2.2... [ 8 of 12] Compiling Crypto.Threefish.Skein ( Crypto/Threefish/Skein.hs, dist/build/Crypto/Threefish/Skein.o )

Crypto/Threefish/Skein.hs:61:21: Not in scope: `BSL.toStrict' cabal: Error: some packages failed to install: threefish-0.2.2 failed during the building phase. The exception was: ExitFailure 1

burncycl commented 10 years ago

Cross distro compatibility is ideal. Regardless, I can spin up a VM of Ubutnu or whatever distro would get the job done proper.

Please advise.

burncycl commented 10 years ago

Additionally, if you need test environments, I'd be happy to provide.....Last but not least, I have a friend in China who I'd like to test this protocol out with our VPN.

blanu commented 10 years ago

I fixed the toStrict issue, so give it another try.

burncycl commented 10 years ago

Same build process as before.

[...some other build stuff...]

Building threefish-0.2.2... Preprocessing library threefish-0.2.2... [ 1 of 12] Compiling Crypto.Threefish.Mix ( Crypto/Threefish/Mix.hs, dist/build/Crypto/Threefish/Mix.o ) [ 2 of 12] Compiling Crypto.Threefish.Skein.Internal ( Crypto/Threefish/Skein/Internal.hs, dist/build/Crypto/Threefish/Skein/Internal.o ) [ 3 of 12] Compiling Crypto.Threefish.Common ( Crypto/Threefish/Common.hs, dist/build/Crypto/Threefish/Common.o ) [ 4 of 12] Compiling Crypto.Threefish.UBI ( Crypto/Threefish/UBI.hs, dist/build/Crypto/Threefish/UBI.o ) [ 5 of 12] Compiling Crypto.Threefish.Threefish512 ( Crypto/Threefish/Threefish512.hs, dist/build/Crypto/Threefish/Threefish512.o ) [ 6 of 12] Compiling Crypto.Threefish.Threefish256 ( Crypto/Threefish/Threefish256.hs, dist/build/Crypto/Threefish/Threefish256.o ) [ 7 of 12] Compiling Crypto.Threefish ( Crypto/Threefish.hs, dist/build/Crypto/Threefish.o ) [ 8 of 12] Compiling Crypto.Threefish.Skein ( Crypto/Threefish/Skein.hs, dist/build/Crypto/Threefish/Skein.o )

Crypto/Threefish/Skein.hs:81:44: No instance for (Data.String.IsString BS.ByteString) arising from the literal ""' Possible fix: add an instance declaration for (Data.String.IsString BS.ByteString) In the first argument ofBlock256', namely ""' In the second argument ofhash256', namely (Block256 "")' In the second argument of(.)', namely `hash256 32 (Block256 "")' cabal: Error: some packages failed to install: threefish-0.2.2 failed during the building phase. The exception was: ExitFailure 1

blanu commented 10 years ago

Discouraging. Well tell me what version of the bytestring package you have installed and I will just install that and test against it.

burncycl commented 10 years ago

bytestring-0.10.4.0

blanu commented 10 years ago

Okay try it now.

Also, can you can give me your package versions for cereal, array, crypto-api, tagged, and data-default?

The package maintainer wants specific versions that work in order to merge my pull request.

burncycl commented 10 years ago

That did the trick. It compilied and installed. Thanks!

cereal-0.4.0.1 crypto-api-0.12.2.2 array-0.5.0.0 tagged-0.7 data-default-0.5.3

Plus Dependencies:

data-default-class-0.0.1 data-default-instances-base-0.0.1 data-default-instances-containers-0.0.1 data-default-instances-old-locale-0.0.1 data-default-instances-dlist-0.0.1 dlist-0.6

burncycl commented 10 years ago

I realize things may/will change since Dust is in active development.

Regardless, I went ahead and wrote a Wiki article titled:

Installing Dust on Debian

http://www.fyzix.net/index.php?title=Installing_Dust_on_Debian

I will work to maintain this as the code and installation develop.

I hope this helps future Debian Dust users on their course.

Thanks blanu.

burncycl commented 10 years ago

One last question (hopefully). My familiarity with Haskell is pretty basic. Do I need to load these modules into ghci? Or what's the next step to actually playing with this protocol?

blanu commented 10 years ago

This Wiki is very helpful. Thank you. Can you add this information to the project wiki? I've added a link, but it would be could to just have the whole document on the github wiki for ease of access.

As far as using Dust, the easiest way is to use Dust-tools: https://github.com/blanu/Dust-tools These are command line tools which use the Dust engine.

If you want to use Dust in your own application then you should take a look at Dust/Network/DustClient.hs and DustServer.hs as examples of how to use it. The easiest way is to start your own Haskell project with its own .cabal. You can look at Dust-tools as an example of how to set up a simple project which uses Dust. I haven't tried using Dust in ghci, but that should in theory work too.

Thanks for all of your help with resolving the Debian dependencies. Hopefully I can make a patch for threefish that the maintainer will accept and then we can go back where just doing "cabal install Dust" would work.