I've tried a seemingly endless amount of ways to stack build
a library referencing secp256k1-haskell
to no avail.
Here's my .cabal
file -
cabal-version: >=1.10
name: testproj
version: 0.1.0.0
license: BSD3
license-file: LICENSE
author: XXXX
maintainer: [email protected]
build-type: Simple
extra-source-files: CHANGELOG.md
library
exposed-modules: Addr
build-depends: base
, secp256k1-haskell
hs-source-dirs: src
default-language: Haskell2010
I'm on a Windows environment, and managed to get a version of libsecp256k1.dll
from a .net
Nuget package. I've tried adding the following lines to my .cabal
file also to no avail -
extra-lib-dirs: lib
extra-libraries: libsecp256k1
Hoping for some help. Thanks - I've spent an ungodly amount of time tonight trying to get this to work.
Here's the build output -
# stack build
secp256k1-haskell> configure
secp256k1-haskell> Configuring secp256k1-haskell-0.5.0...
secp256k1-haskell> Cabal-simple_Z6RU0evB_3.2.1.0_ghc-8.10.4.exe: The pkg-config package
secp256k1-haskell> 'libsecp256k1' is required but it could not be found.
secp256k1-haskell>
Progress 1/2
-- While building package secp256k1-haskell-0.5.0 (scroll up to its section to see the error) using:
C:\sr\setup-exe-cache\x86_64-windows\Cabal-simple_Z6RU0evB_3.2.1.0_ghc-8.10.4.exe --builddir=.stack-work\dist\274b403a configure --user --package-db=clear --package-db=global --package-db=C:\sr\snapshots\cae65304\pkgdb --libdir=C:\sr\snapshots\cae65304\lib --bindir=C:\sr\snapshots\cae65304\bin --datadir=C:\sr\snapshots\cae65304\share --libexecdir=C:\sr\snapshots\cae65304\libexec --sysconfdir=C:\sr\snapshots\cae65304\etc --docdir=C:\sr\snapshots\cae65304\doc\secp256k1-haskell-0.5.0 --htmldir=C:\sr\snapshots\cae65304\doc\secp256k1-haskell-0.5.0 --haddockdir=C:\sr\snapshots\cae65304\doc\secp256k1-haskell-0.5.0 --dependency=QuickCheck=QuickCheck-2.14.2-88oxj61ONgG1QbYzt1cUFu --dependency=base=base-4.14.1.0 --dependency=base16-bytestring=base16-bytestring-0.1.1.7-ATNpmQnyL4kEoV4zknoOaT --dependency=bytestring=bytestring-0.10.12.0 --dependency=cereal=cereal-0.5.8.1-22Ay1xouyZe6jvGIwilboJ --dependency=deepseq=deepseq-1.4.4.0 --dependency=entropy=entropy-0.4.1.6-7IAXxZCKwXr4yX0UquKkIf --dependency=hashable=hashable-1.3.0.0-K3FFBNAmsvaIvBv4Qg15rQ --dependency=string-conversions=string-conversions-0.4.0.1-8DWCo9Xs3pABRiarhAOqbn --dependency=unliftio-core=unliftio-core-0.2.0.1-9GVcmaajsglG88oErAZOTV --extra-include-dirs=C:\Users\difel\AppData\Local\Programs\stack\x86_64-windows\msys2-20200903\mingw64\include --extra-lib-dirs=C:\Users\difel\AppData\Local\Programs\stack\x86_64-windows\msys2-20200903\mingw64\lib --extra-lib-dirs=C:\Users\difel\AppData\Local\Programs\stack\x86_64-windows\msys2-20200903\mingw64\bin --exact-configuration --ghc-option=-fhide-source-paths
Process exited with code: ExitFailure 1
Not quite a fix - but I eventually opted to simply install
libsecp256k1
inWSL2
and develop from within there. Found the environment to be much more user-friendly and easy to setup than trying to opt for development on Windows.