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

hledger-web fails to run on Windows 7 #1039

Closed
nosoop opened this issue Jun 8, 2019 · 9 comments

Comments

Projects
None yet
2 participants
@nosoop
Copy link

commented Jun 8, 2019

The prebuilt hledger-web Windows binary fails to start on 64-bit Windows 7.

Reproduction steps:

  1. Download the binary distribution from Appveyor via the download page.

  2. Attempt to run hledger-web with the previously mentioned OS. The following error message is displayed:

    hledger-web.exe - Entry Point Not Found

    The procedure entry point _create_locale could not be located in the dynamic link library msvcrt.dll.

The hledger command-line executable works without issue to my knowledge.

My understanding is that it's a problem with the build toolchain, as it seems that similar issues have been raised with MinGW as the cause a few times.

@simonmichael

This comment has been minimized.

Copy link
Owner

commented Jun 9, 2019

Thanks for the report. hledger-web.exe is built on appveyor by .appveyor.yml, a standard stack build. I guess it uses MinGW. Actually it sounds like GHC does, and that is the important one.

Here is recent discussion: kazu-yamamoto/unix-time#51. It's possible that this is the package affecting us (hledger-web depends on yesod depends on fast-logger depends on unix-time.) kazu-yamamoto/unix-time#53 is an unreleased workaround; it's possible that ensuring this version of unix time when building hledger-web will fix the issue. Building with a different version of GHC (with its different MinGW version) might also help.

simonmichael added a commit that referenced this issue Jun 9, 2019

@simonmichael

This comment has been minimized.

Copy link
Owner

commented Jun 9, 2019

@nosoop I've built hledger-web with the latest unix-time, and added it to the download page (backup link: https://ci.appveyor.com/project/simonmichael/hledger/builds/25155517/artifacts). Please let me know if that one works.

simonmichael added a commit that referenced this issue Jun 9, 2019

;site: download: link windows nightly build, mention #1039
Also update known platform issues list.

[ci skip]
@nosoop

This comment has been minimized.

Copy link
Author

commented Jun 10, 2019

Thanks for giving it a look! Unfortunately, same error as before, including the reference to msvcrt.dll,

I'm also attempting to set up a build environment in a Win7 VM with the lts-13.25 nightly-2019-06-10 resolver to see if that compiles a working binary.

@nosoop

This comment has been minimized.

Copy link
Author

commented Jun 10, 2019

Good news; I built commit 9b3fc06 on Win7 using a 32-bit Haskell Stack and nightly-2019-06-10 as the resolver in stack.yaml. hledger-web runs without problems there. nightly-2019-03-09 fails to build with the following error:

No setup information found for ghc-8.6.4 on your platform.
This probably means a GHC bindist has not yet been added for OS key 'windows32'.

If you'd like me to test any other build configurations for this issue, let me know.

@simonmichael

This comment has been minimized.

Copy link
Owner

commented Jun 10, 2019

Thanks! So I guess that's GHC 8.6.5 you're using. Could you try:

  • 64-bit Stack, which is the one we recommend on the download page
  • older GHC, using eg stack-ghc8.4.yaml or stack-ghc8.2.yaml
@simonmichael

This comment has been minimized.

Copy link
Owner

commented Jun 10, 2019

(possibly modifying the stack-ghcX.Y.yaml to use latest unix-time, like in stack.yaml ? Not sure.)

thielema added a commit to thielema/hledger that referenced this issue Jun 10, 2019

thielema added a commit to thielema/hledger that referenced this issue Jun 10, 2019

;site: download: link windows nightly build, mention simonmichael#1039
Also update known platform issues list.

[ci skip]
@nosoop

This comment has been minimized.

Copy link
Author

commented Jun 11, 2019

Builds created with an x64 Stack against the March and June nightlies with the unix-time patch have no compile / startup issues. Without the unix-time patch, both have a link-time failure on unix-time-0.4.5 with unknown symbol _create_locale.

Untouched stack-ghc8.2.yaml and stack-ghc8.4.yaml both build and run without known issues.

@simonmichael

This comment has been minimized.

Copy link
Owner

commented Jun 13, 2019

@nosoop thanks for the testing. I am guessing the problem is with (the MinGW included with) GHC 8.6, and resolved by upgrading to GHC 8.6.5 or by using the patched unix-time (now released as 0.4.6).

I didn't find this in GHC release notes/issues (or elsewhere), but it might be in there. I think it's not widely known, I guess not many people are running yesod-based apps on windows 7.

To resolve it, I'll

  • make sure the windows binaries on download page are built with GHC 8.6.5+ and/or unix-time 0.4.6+
  • mention it on download page, in case a windows 7 user installs it some other way
@simonmichael

This comment has been minimized.

Copy link
Owner

commented Jun 13, 2019

And actually, I think both of those are covered, barring final cleanups, so I think we can close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.