1

I'm building a Haskell 7.10 project that depends on tdsodbc.dll, using stack v1.7.1 on Windows, everything 64-bit. I have tdsodbc.dll in the lib folder of the project, and extra-lib-dirs: lib and extra-libraries: tdsodbc in the .cabal.

But when I compile, I get Missing C library: tdsodbc when stack runs cabal configure. I've tried putting extra-lib-dirs: [lib] in stack.yaml, and I can see from that configure command that it has put --extra-lib-dirs=C:\Users\Kevin\src\theproject\lib on the cabal configure command line, but still complains about it missing.

Now the weird part: If I remove ekg from the build-deps of the project (and remove the relevant imports etc.), the project builds just fine! I still have to copy the dll into .stack-work/dist/… to make it run, but why would ekg in build-deps stop cabal from being able to configure it?

I've tried the trick from Cannot get cabal to find the mpi library for haskell-mpi on Windows with putting c/Users/Kevin/src/theproject/lib in LIBRARY_PATH (there's no .a file to mv in my case, and no .h's), but that didn't help me. Only removing ekg has helped me so far. What could be causing this? The "solution" seems completely irrelevant to the problem :(


EDIT: I tried using plain Haskell Platform 7.10.3 (from https://www.haskell.org/platform/prior.html ), and that configured and built just fine. So the problem is just when cabal configure is called from stack.

sclv
  • 38,665
  • 7
  • 99
  • 204
unhammer
  • 4,306
  • 2
  • 39
  • 52

0 Answers0