Closed athanclark closed 7 years ago
Which version of libsodium did you use? While I believe you are using 1.0.11, please confirm.
Windows is not my core expertise, but here is what I think happened: You are using the MinGW-compiled libsodium. MinGW supplies an implementation of pthreads, hence pthreads are used instead of the Windows primitives (https://github.com/jedisct1/libsodium/blob/68564326e1e9dc57ef03746f85734232d20ca6fb/src/libsodium/sodium/core.c#L4) When you develop an application using the mingw-libsodium lib, you must link with a suitable pthread implementation, such as the one that comes with MinGW. Alternatively you could switch to the MSVC-compiled libsodium that is also on the download page.
Yes you're exactly correct, sorry - I didn't realize MinGW had a pthread implementation. Thank you for your help!
Hello, I'm trying to invoke some saltine functions at compile time with TemplateHaskell. I've built saltine-0.0.0.4 independently and run
stack test
, and everything works fine, I just need to build and test with a little library path lookup awkwardness:All the tests pass, which gives me a lot of confidence. But for some reason, I'm getting a strange error when trying to run
Crypto.Saltine.Core.Box.newKeypair
with a -XTemplateHaskell splice:The strange thing; GHC says it can't find sodium-0.0.0.4, yet in my
stack.yaml
I have my local build listed:Wouldn't the build fail before getting to my project if it couldn't find the sodium-0.0.0.4 dependency? It's a strange error there, definitely, but the detrimental one for me is the "unknown symbol
pthread_mutex_lock
" error coming from libsodium.a.Is this a common error / debug symbol? I'm no C++ dev or anything, but it sounds like this prebuilt
libsodium.a
includes POSIX symbols or something, when it's intended to build only for Windows. I'm not sure what's going on here.@jedisct1 Do you happen to know what might be wrong here? Shouldn't the Windows builds exclude POSIX debug symbols?