valderman / threefish

Haskell implementation of the Threefish block cipher and the Skein hash function built on it.
BSD 3-Clause "New" or "Revised" License
4 stars 5 forks source link

PRNG cause crash #3

Open rnhmjoj opened 10 years ago

rnhmjoj commented 10 years ago

When trying to use the PRNG to generate some number ghc crashes:

λ import Crypto.Threefish.Random
λ gen <- newSkeinGen
λ take 5 $ randomRs (0,10) gen
dyld: lazy symbol binding failed: Symbol not found: _mk_config_tweak
  Referenced from: /Users/michele/.cabal/lib/x86_64-osx-ghc-7.8.3/threefish-0.2.6/libHSthreefish-0.2.6-    ghc7.8.3.dylib
  Expected in: flat namespace

dyld: Symbol not found: _mk_config_tweak
  Referenced from: /Users/michele/.cabal/lib/x86_64-osx-ghc-7.8.3/threefish-0.2.6/libHSthreefish-0.2.6-    ghc7.8.3.dylib
  Expected in: flat namespace

[1]    27572 trace trap  ghci
valderman commented 10 years ago

Seems like yet another problem caused by the broken C compiler shipped with OSX. What happens if you remove all inline annotations in cbits and reinstall?

rnhmjoj commented 10 years ago

@valderman I removed inline in the functions of ubi.c. It compiled and now works just fine. Do you think it is an apple-gcc problem?

rnhmjoj commented 8 years ago

This exact error showed up again. This time with GHC 7.10.3 on NixOS.

ghc: symbol lookup error: undefined symbol: mk_config_tweak