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
static building of executables fail on Windows 10 #5791
Comments
The linker is telling you it can't find a static version of your |
Yes, I passed it via the environment variable LIBRARY_PATH before
invoking cabal.
I am also puzzled why the same error didn't show up on subsequent
invocations.
On Sun, Dec 16, 2018, at 6:39 PM, Tamar Christina wrote:
C://ProgramData//chocolatey//lib//ghc//tools//ghc-
8.4.3//mingw//bin/ld.exe: cannot find -lsodium collect2.exe: error:
ld returned 1 exit status `gcc.exe' failed in phase `Linker'. (Exit
code: 1)
> The linker is telling you it can't find a static version of your
sodium library. Do you have one? and is it on a path ghc knows about?> — You are receiving this because you authored the thread. Reply to
this email directly, view it on GitHub[1], or mute the thread[2].
--
Ramakrishnan
Links:
1. #5791 (comment)
2. https://github.com/notifications/unsubscribe-auth/AAB4QYTRLF4lnWLTQ8OkABmD3py7VcN6ks5u5kX3gaJpZM4ZPTKu
|
I am happy to run any specific commands or collect more data to help
debug the problem.
…--
Ramakrishnan
|
Due to #5788 you can't currently do this on the commandline, but in your cabal file add
My guess is that your You can also try using
Probably a bug in the recompilation avoidance of GHC. It probably assumed the binary was already created since no input files changed so it never attempted to relink. |
Thanks. I will try this when I get back in front of the windows computer and report back.
In fact I tried this first while I was building dynamically linked executables and it was getting ignored. I grep'ed through the GHC sources and found the
Thanks, I will file a bug against GHC and try to trace through the execution. Seem like a good bug to pick up and try to contribute to the GHC. |
I am using cabal version 2.4.1.0 and am building a project which depends on another package that has a C dependency. I use
LIBRARY_PATH
variable to point to the library. Dynamic linking works and the program runs fine.However, building a static executable using the command line flag
--disable-executable-dynamic
fails. During the first build, it failed this way:Subsequent invocation of the same command yielded a success, though the executable was not created.
Is creation of static binaries supported on Windows? It would be very nice to have it supported as it helps ship binaries to users much easily. Thanks.
The text was updated successfully, but these errors were encountered: