Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stack build doesn't include MinGW bin folder where some DLLs reside (like http-client package) #3126

Closed
varosi opened this issue Apr 14, 2017 · 3 comments

Comments

@varosi
Copy link

@varosi varosi commented Apr 14, 2017

General summary/comments (optional)

Steps to reproduce

  1. Clone http-client package from Hackage under Windows
  2. Using Stack's MinGW64 run: pacman -S mingw-w64-x86_64-openssl
  3. Run command stack build.

Expected

Expected to find eay32.dll which is installed using Stack's MingGW64.

Actual

stack build -v output

...
--extra-include-dirs=C:\Users\MyUser\AppData\Local\Programs\stack\x86_64-windows\msys2-20150512\mingw64\include --extra-lib-dirs=C:\Users\MyUser\AppData\Local\Programs\stack\x86_64-windows\msys2-20150512\mingw64\lib
...

There is no \bin folder included in extra-lib-dirs. And it cannot find OpenSSL libraries which are compiled and deployed by MinGW64 into \bin folder. When I add:

extra-lib-dirs:
- C:\Users\MyUser\AppData\Local\Programs\stack\x86_64-windows\msys2-20150512\mingw64\bin

to .yaml file - it finds it. But I think that it'll be useful if this folder is added automatically by Stack. So every library built with Stack's MinGW to be accessible for Haskell projects built with Stack.

Stack version

Version 1.4.0, Git revision e714f1dd3fade19496d91bd6a017e435a96a6bcd x86_64 hpack-0.17.0

Method of installation

  • Official binary, downloaded from stackage.org or fpcomplete's package repository
@mgsloan
Copy link
Contributor

@mgsloan mgsloan commented Apr 23, 2017

I'm surprised that mingw would put dlls in bin and not lib (though I am not very experienced with mingw). A quick search turned up this old page on mingw: http://www.mingw.org/wiki/HOWTO_Specify_the_Location_of_Libraries_for_use_with_MinGW - and bin isn't among the library search paths.

I'm certainly in favor of streamlining such things, but I'm puzzled why it's necessary. Seems like it shouldn't cause much harm, though, so if it helps some cases I'm in favor of adding it. Here's where it would be added: https://github.com/commercialhaskell/stack/blob/master/src/Stack/Setup/Installed.hs#L134

@mgsloan mgsloan added this to the P2: Should milestone Apr 23, 2017
@varosi
Copy link
Author

@varosi varosi commented Apr 24, 2017

Thanks for the guidance! I'll find some time to fix it soon.

@varosi
Copy link
Author

@varosi varosi commented May 29, 2017

Fixed

@varosi varosi closed this May 29, 2017
mgsloan added a commit that referenced this issue Jun 11, 2017
#3126 Use MinGW bin folder for dynamic libraries searching
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.