Note: the latest version (2.7.5) of stack on Windows was compiled using GHC 8.10.4, which did not have the new native WinIO manager. This error is produced with manually compiled stack, using the source from this GitHub repo, at commit 13ba67a (yesterday). I followed the procedure in the GitHub CI file to compile the executable, namely a release.hs check followed by release.hs build.
General summary/comments (optional)
Steps to reproduce
- Install above-mentioned manually compiled stack.
cd into any stack project.
- Set environment variable
GHCRTS=--io-manager=native.
- Run command
stack build.
- stack reports the following error:
Encountered error while migrating Pantry database:
\\.\NUL: hDuplicateTo: illegal operation (handles are incompatible)
Please report this on https://github.com/commercialhaskell/stack/issues
As a workaround you may delete Pantry database in C:\sr\pantry\pantry.sqlite3 triggering its recreation.
where C:\sr is my STACK_ROOT.
- Remove
$STACK_ROOT/pantry/pantry.sqlite3 as instructed, and rerun stack build.
- Same error reported.
Note: No error if we unset the GHCRTS environment variable.
Expected
No error.
Actual
Error reported, and the build process did not start.
If you suspect that a Stack command misbehaved, please include the output of
that command in --verbose mode:
Version manual-build, Git revision 13ba67aee29189338b9e6c07cfaeb58fd12ff2d9 RELEASE-CANDIDATE x86_64 hpack-0.35.0
2022-09-04 13:53:02.806765: [debug] Checking for project config at: path\to\stack.yaml
2022-09-04 13:53:02.806765: [debug] Loading project config file stack.yaml
2022-09-04 13:53:02.806765: [error] Encountered error while migrating Pantry database:
\\.\NUL: hDuplicateTo: illegal operation (handles are incompatible)
Please report this on https://github.com/commercialhaskell/stack/issues
As a workaround you may delete Pantry database in C:\sr\pantry\pantry.sqlite3 triggering its recreation.
Stack version
As explained above, a manual build. Work tree unchanged (therefore using almost the same environment as CI builds).
stack --version
Version manual-build, Git revision 13ba67aee29189338b9e6c07cfaeb58fd12ff2d9 RELEASE-CANDIDATE x86_64 hpack-0.35.0
Method of installation
Other: manual build as explained above. I can provide the executable if needed.
Note: the latest version (2.7.5) of stack on Windows was compiled using GHC 8.10.4, which did not have the new native WinIO manager. This error is produced with manually compiled stack, using the source from this GitHub repo, at commit 13ba67a (yesterday). I followed the procedure in the GitHub CI file to compile the executable, namely a
release.hs checkfollowed byrelease.hs build.General summary/comments (optional)
Steps to reproduce
cdinto any stack project.GHCRTS=--io-manager=native.stack build.C:\sris mySTACK_ROOT.$STACK_ROOT/pantry/pantry.sqlite3as instructed, and rerunstack build.Note: No error if we unset the
GHCRTSenvironment variable.Expected
No error.
Actual
Error reported, and the build process did not start.
If you suspect that a Stack command misbehaved, please include the output of
that command in
--verbosemode:Stack version
As explained above, a manual build. Work tree unchanged (therefore using almost the same environment as CI builds).
Method of installation
Other: manual build as explained above. I can provide the executable if needed.