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

Windows v2-build Error: unsatisfied constraints (The directory is not empty.) #7240

Open
bitc opened this issue Jan 10, 2021 · 5 comments
Open

Comments

@bitc
Copy link

bitc commented Jan 10, 2021

Describe the bug

I did a clean install of

When I ran cabal v2-build, it started running for a while, and then I got the error:

C:\Users\bitc\projects\myproject\dist-newstyle\tmp\src-1777\basement-0.0.11\dist\build: removeDirectoryRecursive:removeContentsRecursive:removePathRecursive:removeContentsRecursive:removePathRecursive:removeContentsRecursive:removePathRecursive:removeContentsRecursive:RemoveDirectory "\\\\?\\C:\\Users\\bitc\\projects\\myproject\\dist-newstyle\\tmp\\src-1777\\basement-0.0.11\\dist\\build": unsatisfied constraints (The directory is not empty.)

The Full log is below.

When I checked the directory, it was actually empty.

When I ran cabal v2-build again, the build resumed, and this time completed successfully.

To Reproduce

I was able to Reproduce! I completely deleted dist-newstyle and my user's cabal directory, and ran again cabal v2-update and cabal v2-build. This time it failed on a different package:

C:\Users\bitc\projects\myproject\dist-newstyle\tmp\src-4000\hashable-1.3.0.0\benchmarks: removeDirectoryRecursive:removeContentsRecursive:removePathRecursive:removeContentsRecursive:removePathRecursive:removeContentsRecursive:RemoveDirectory "\\\\?\\C:\\Users\\bitc\\projects\\myproject\\dist-newstyle\\tmp\\src-4000\\hashable-1.3.0.0\\benchmarks": unsatisfied constraints (The directory is not empty.)

System information

  • Windows 7 Professional
  • cabal 3.2.0.0
  • ghc 8.10.3

This looks similar to #4144 but I am opening a new issue since that one is very old and closed.

Appendix: Full Log

C:\Users\bitc\projects\myproject>cabal v2-build
Resolving dependencies...
Build profile: -w ghc-8.10.3 -O1
In order, the following will be built (use -v for more details):
 - base-compat-0.11.2 (lib) (requires download & build)
 - base-orphans-0.8.4 (lib) (requires download & build)
 - basement-0.0.11 (lib) (requires download & build)
 - blaze-builder-0.4.1.0 (lib) (requires download & build)
 - cereal-0.5.8.1 (lib) (requires download & build)
 - colour-2.3.5 (lib) (requires download & build)
 - conduit-combinators-1.3.0 (lib) (requires download & build)
 - data-default-class-0.1.2.0 (lib:data-default-class) (requires download & build)
 - dlist-1.0 (lib) (requires download & build)
 - filelock-0.1.1.5 (lib) (requires download & build)
 - hashable-1.3.0.0 (lib) (requires download & build)
 - hourglass-0.2.12 (lib) (requires download & build)
 - indexed-traversable-0.1.1 (lib) (requires download & build)
 - integer-logarithms-1.0.3.1 (lib) (requires download & build)
 - lzma-clib-5.2.2 (lib) (requires download & build)
 - mime-types-0.1.0.9 (lib) (requires download & build)
 - mintty-0.1.2 (lib) (requires download & build)
 - network-uri-2.6.3.0 (lib) (requires download & build)
 - parser-combinators-1.2.1 (lib) (requires download & build)
 - primitive-0.7.1.0 (lib) (requires download & build)
 - process-1.6.8.2 (lib:process) (requires download & build)
 - safe-0.3.19 (lib) (requires download & build)
 - selective-0.4.1.1 (lib) (requires download & build)
 - split-0.2.3.4 (lib) (requires download & build)
 - splitmix-0.1.0.3 (lib) (requires download & build)
 - tagged-0.8.6.1 (lib) (requires download & build)
 - tar-0.5.1.1 (lib) (requires download & build)
 - th-abstraction-0.4.2.0 (lib) (requires download & build)
 - transformers-compat-0.6.6 (lib) (requires download & build)
 - unix-compat-0.5.2 (lib:unix-compat) (requires download & build)
 - unliftio-core-0.2.0.1 (lib) (requires download & build)
 - zlib-0.6.2.2 (lib) (requires download & build)
 - base-compat-batteries-0.11.2 (lib) (requires download & build)
 - time-compat-1.9.5 (lib) (requires download & build)
 - memory-0.15.0 (lib) (requires download & build)
 - cookie-0.4.5 (lib) (requires download & build)
 - unordered-containers-0.2.13.0 (lib) (requires download & build)
 - data-fix-0.3.0 (lib) (requires download & build)
 - case-insensitive-1.2.1.0 (lib) (requires download & build)
 - async-2.2.2 (lib) (requires download & build)
 - lzma-0.0.0.3 (lib) (requires download & build)
 - ansi-terminal-0.11 (lib) (requires download & build)
 - vector-0.12.1.2 (lib) (requires download & build)
 - scientific-0.3.6.2 (lib) (requires download & build)
 - hsc2hs-0.68.7 (exe:hsc2hs) (requires download & build)
 - validation-selective-0.1.0.0 (lib) (requires download & build)
 - random-1.2.0 (lib) (requires download & build)
 - distributive-0.6.2.1 (lib) (requires download & build)
 - resourcet-1.2.4.2 (lib) (requires download & build)
 - pem-0.2.4 (lib) (requires download & build)
 - cryptonite-0.27 (lib) (requires download & build)
 - asn1-types-0.3.4 (lib:asn1-types) (requires download & build)
 - http-types-0.12.3 (lib) (requires download & build)
 - typed-process-0.2.6.0 (lib) (requires download & build)
 - ansi-wl-pprint-0.6.9 (lib) (requires download & build)
 - vector-algorithms-0.8.0.4 (lib) (requires download & build)
 - megaparsec-9.0.0 (lib) (requires download & build)
 - attoparsec-0.13.2.4 (lib) (requires download & build)
 - network-3.1.2.1 (lib:network) (requires download & build)
 - uuid-types-1.0.3 (lib) (requires download & build)
 - temporary-1.3 (lib) (requires download & build)
 - comonad-5.0.8 (lib) (requires download & build)
 - asn1-encoding-0.9.6 (lib) (requires download & build)
 - optparse-applicative-0.16.0.0 (lib) (requires download & build)
 - mono-traversable-1.0.15.1 (lib) (requires download & build)
 - versions-3.5.4 (lib) (requires download & build)
 - tomland-1.3.1.0 (lib) (requires download & build)
 - streaming-commons-0.2.2.1 (lib) (requires download & build)
 - socks-0.6.1 (lib) (requires download & build)
 - bifunctors-5.5.9 (lib) (requires download & build)
 - asn1-parse-0.9.5 (lib:asn1-parse) (requires download & build)
 - conduit-1.3.2.1 (lib) (requires download & build)
 - http-client-0.7.3 (lib) (requires download & build)
 - assoc-1.0.2 (lib) (requires download & build)
 - x509-1.7.5 (lib) (requires download & build)
 - lzma-conduit-1.2.1 (lib) (requires download & build)
 - conduit-extra-1.3.5 (lib) (requires download & build)
 - these-1.1.1.1 (lib) (requires download & build)
 - x509-store-1.6.7 (lib) (requires download & build)
 - strict-0.4.0.1 (lib) (requires download & build)
 - x509-validation-1.6.11 (lib) (requires download & build)
 - x509-system-1.6.6 (lib) (requires download & build)
 - aeson-1.5.5.1 (lib) (requires download & build)
 - tls-1.5.4 (lib) (requires download & build)
 - connection-0.3.1 (lib:connection) (requires download & build)
 - http-client-tls-0.3.5.3 (lib) (requires download & build)
 - http-conduit-2.3.7.3 (lib) (requires download & build)
 - myproject-0.0.0.2 (exe:myproject) (first run)
Downloading  lzma-clib-5.2.2
Downloaded   lzma-clib-5.2.2
Downloading  base-compat-0.11.2
Downloaded   base-compat-0.11.2
Downloading  base-compat-batteries-0.11.2
Starting     base-compat-0.11.2 (lib)
Downloaded   base-compat-batteries-0.11.2
Downloading  base-orphans-0.8.4
Building     base-compat-0.11.2 (lib)
Downloaded   base-orphans-0.8.4
Downloading  colour-2.3.5
Starting     base-orphans-0.8.4 (lib)
Downloaded   colour-2.3.5
Downloading  conduit-combinators-1.3.0
Building     base-orphans-0.8.4 (lib)
Downloaded   conduit-combinators-1.3.0
Downloading  data-default-class-0.1.2.0
Downloaded   data-default-class-0.1.2.0
Downloading  parser-combinators-1.2.1
Downloaded   parser-combinators-1.2.1
Downloading  safe-0.3.19
Downloaded   safe-0.3.19
Downloading  split-0.2.3.4
Installing   base-orphans-0.8.4 (lib)
Completed    base-orphans-0.8.4 (lib)
Downloaded   split-0.2.3.4
Downloading  transformers-compat-0.6.6
Downloaded   transformers-compat-0.6.6
Downloading  unliftio-core-0.2.0.1
Downloaded   unliftio-core-0.2.0.1
Downloading  lzma-0.0.0.3
Installing   base-compat-0.11.2 (lib)
Completed    base-compat-0.11.2 (lib)
Downloaded   lzma-0.0.0.3
Downloading  zlib-0.6.2.2
Downloaded   zlib-0.6.2.2
Downloading  cereal-0.5.8.1
Downloaded   cereal-0.5.8.1
Downloading  selective-0.4.1.1
Downloaded   selective-0.4.1.1
Downloading  dlist-1.0
Downloaded   dlist-1.0
Downloading  th-abstraction-0.4.2.0
Downloaded   th-abstraction-0.4.2.0
Downloading  primitive-0.7.1.0
Downloaded   primitive-0.7.1.0
Downloading  splitmix-0.1.0.3
Downloaded   splitmix-0.1.0.3
Downloading  random-1.2.0
Downloaded   random-1.2.0
Downloading  tagged-0.8.6.1
Downloaded   tagged-0.8.6.1
Downloading  distributive-0.6.2.1
Downloaded   distributive-0.6.2.1
Downloading  validation-selective-0.1.0.0
Downloaded   validation-selective-0.1.0.0
Downloading  vector-0.12.1.2
Downloaded   vector-0.12.1.2
Downloading  vector-algorithms-0.8.0.4
Downloaded   vector-algorithms-0.8.0.4
Downloading  indexed-traversable-0.1.1
Downloaded   indexed-traversable-0.1.1
Downloading  comonad-5.0.8
Downloaded   comonad-5.0.8
Downloading  bifunctors-5.5.9
Downloaded   bifunctors-5.5.9
Downloading  assoc-1.0.2
Downloaded   assoc-1.0.2
Downloading  integer-logarithms-1.0.3.1
Downloaded   integer-logarithms-1.0.3.1
Downloading  resourcet-1.2.4.2
Downloaded   resourcet-1.2.4.2
Downloading  blaze-builder-0.4.1.0
Downloaded   blaze-builder-0.4.1.0
Downloading  hashable-1.3.0.0
Starting     blaze-builder-0.4.1.0 (lib)
Downloaded   hashable-1.3.0.0
Downloading  async-2.2.2
Building     blaze-builder-0.4.1.0 (lib)
Downloaded   async-2.2.2
Downloading  case-insensitive-1.2.1.0
Downloaded   case-insensitive-1.2.1.0
Downloading  data-fix-0.3.0
Downloaded   data-fix-0.3.0
Downloading  these-1.1.1.1
Downloaded   these-1.1.1.1
Downloading  unordered-containers-0.2.13.0
Installing   blaze-builder-0.4.1.0 (lib)
Downloaded   unordered-containers-0.2.13.0
Downloading  http-types-0.12.3
Completed    blaze-builder-0.4.1.0 (lib)
Starting     cereal-0.5.8.1 (lib)
Downloaded   http-types-0.12.3
Downloading  mime-types-0.1.0.9
Building     cereal-0.5.8.1 (lib)
Downloaded   mime-types-0.1.0.9
Downloading  mono-traversable-1.0.15.1
Downloaded   mono-traversable-1.0.15.1
Downloading  network-uri-2.6.3.0
Downloaded   network-uri-2.6.3.0
Downloading  scientific-0.3.6.2
Downloaded   scientific-0.3.6.2
Downloading  attoparsec-0.13.2.4
Downloaded   attoparsec-0.13.2.4
Downloading  megaparsec-9.0.0
Downloaded   megaparsec-9.0.0
Downloading  strict-0.4.0.1
Downloaded   strict-0.4.0.1
Downloading  uuid-types-1.0.3
Downloaded   uuid-types-1.0.3
Downloading  versions-3.5.4
Downloaded   versions-3.5.4
Downloading  basement-0.0.11
Installing   cereal-0.5.8.1 (lib)
Completed    cereal-0.5.8.1 (lib)
Starting     colour-2.3.5 (lib)
Downloaded   basement-0.0.11
Downloading  memory-0.15.0
Starting     basement-0.0.11 (lib)
Building     colour-2.3.5 (lib)
Downloaded   memory-0.15.0
Downloading  pem-0.2.4
Building     basement-0.0.11 (lib)
Downloaded   pem-0.2.4
Downloading  cryptonite-0.27
Downloaded   cryptonite-0.27
Downloading  filelock-0.1.1.5
Installing   colour-2.3.5 (lib)
Completed    colour-2.3.5 (lib)
Starting     conduit-combinators-1.3.0 (lib)
Downloaded   filelock-0.1.1.5
Downloading  hourglass-0.2.12
Building     conduit-combinators-1.3.0 (lib)
Downloaded   hourglass-0.2.12
Downloading  asn1-types-0.3.4
Installing   conduit-combinators-1.3.0 (lib)
Completed    conduit-combinators-1.3.0 (lib)
Starting     data-default-class-0.1.2.0 (all, legacy fallback)
Building     data-default-class-0.1.2.0 (all, legacy fallback)
Installing   data-default-class-0.1.2.0 (all, legacy fallback)
Completed    data-default-class-0.1.2.0 (all, legacy fallback)
Starting     dlist-1.0 (lib)
Building     dlist-1.0 (lib)
Downloaded   asn1-types-0.3.4
Downloading  asn1-encoding-0.9.6
Downloaded   asn1-encoding-0.9.6
Downloading  asn1-parse-0.9.5
Installing   dlist-1.0 (lib)
Completed    dlist-1.0 (lib)
Starting     filelock-0.1.1.5 (lib)
Downloaded   asn1-parse-0.9.5
Downloading  x509-1.7.5
Downloaded   x509-1.7.5
Downloading  mintty-0.1.2
Building     filelock-0.1.1.5 (lib)
Downloaded   mintty-0.1.2
Downloading  ansi-terminal-0.11
Installing   filelock-0.1.1.5 (lib)
Completed    filelock-0.1.1.5 (lib)
Starting     hashable-1.3.0.0 (lib)
Building     hashable-1.3.0.0 (lib)
Downloaded   ansi-terminal-0.11
Downloading  ansi-wl-pprint-0.6.9
Downloaded   ansi-wl-pprint-0.6.9
Downloading  cookie-0.4.5
Downloaded   cookie-0.4.5
Downloading  conduit-1.3.2.1
Downloaded   conduit-1.3.2.1
Downloading  lzma-conduit-1.2.1
Installing   hashable-1.3.0.0 (lib)
Completed    hashable-1.3.0.0 (lib)
Starting     hourglass-0.2.12 (lib)
Downloaded   lzma-conduit-1.2.1
Downloading  process-1.6.8.2
Downloaded   process-1.6.8.2
Downloading  hsc2hs-0.68.7
Building     hourglass-0.2.12 (lib)
Downloaded   hsc2hs-0.68.7
Downloading  network-3.1.2.1
Downloaded   network-3.1.2.1
Downloading  socks-0.6.1
Downloaded   socks-0.6.1
Downloading  optparse-applicative-0.16.0.0
Downloaded   optparse-applicative-0.16.0.0
Downloading  typed-process-0.2.6.0
Downloaded   typed-process-0.2.6.0
Downloading  streaming-commons-0.2.2.1
Downloaded   streaming-commons-0.2.2.1
Downloading  conduit-extra-1.3.5
Installing   hourglass-0.2.12 (lib)
Completed    hourglass-0.2.12 (lib)
Starting     indexed-traversable-0.1.1 (lib)
Building     indexed-traversable-0.1.1 (lib)
Downloaded   conduit-extra-1.3.5
Downloading  temporary-1.3
Installing   basement-0.0.11 (lib)
Downloaded   temporary-1.3
Downloading  x509-store-1.6.7
Completed    basement-0.0.11 (lib)
Starting     integer-logarithms-1.0.3.1 (lib)
Downloading  x509-validation-1.6.11
Installing   indexed-traversable-0.1.1 (lib)
Completed    indexed-traversable-0.1.1 (lib)
Downloaded   x509-validation-1.6.11
Downloading  tls-1.5.4
Starting     lzma-clib-5.2.2 (lib)
Building     integer-logarithms-1.0.3.1 (lib)
Building     lzma-clib-5.2.2 (lib)
Installing   integer-logarithms-1.0.3.1 (lib)
Completed    integer-logarithms-1.0.3.1 (lib)
Starting     mime-types-0.1.0.9 (lib)
Downloaded   tls-1.5.4
Downloading  http-client-0.7.3
Building     mime-types-0.1.0.9 (lib)
Downloaded   http-client-0.7.3
Downloading  tar-0.5.1.1
Downloaded   tar-0.5.1.1
Downloading  time-compat-1.9.5
Downloaded   time-compat-1.9.5
Downloading  aeson-1.5.5.1
Downloaded   aeson-1.5.5.1
Downloading  tomland-1.3.1.0
Downloaded   tomland-1.3.1.0
Downloading  unix-compat-0.5.2
Installing   mime-types-0.1.0.9 (lib)
Downloaded   unix-compat-0.5.2
Downloading  x509-system-1.6.6
Completed    mime-types-0.1.0.9 (lib)
Starting     mintty-0.1.2 (lib)
Downloaded   x509-system-1.6.6
Downloading  connection-0.3.1
Downloaded   connection-0.3.1
Downloading  http-client-tls-0.3.5.3
Building     mintty-0.1.2 (lib)
Installing   mintty-0.1.2 (lib)
Downloaded   http-client-tls-0.3.5.3
Downloading  http-conduit-2.3.7.3
Completed    mintty-0.1.2 (lib)
Starting     network-uri-2.6.3.0 (lib)
Downloaded   http-conduit-2.3.7.3
C:\Users\bitc\projects\myproject\dist-newstyle\tmp\src-1777\basement-0.0.11\dist\build: removeDirectoryRecursive:removeContentsRecursive:removePathRecursive:removeContentsRecursive:removePathRecursive:removeContentsRecursive:removePathRecursive:removeContentsRecursive:RemoveDirectory "\\\\?\\C:\\Users\\bitc\\projects\\myproject\\dist-newstyle\\tmp\\src-1777\\basement-0.0.11\\dist\\build": unsatisfied constraints (The directory is not empty.)
@bitc
Copy link
Author

bitc commented Feb 28, 2021

I have a wild guess that this may be fixed by #6536

@jneira
Copy link
Member

jneira commented Mar 1, 2021

Thanks for reporting it, I am experiencing it too. It would be great to confirm that merged pr fixes it, trying cabal-3.4 (or 3.2 with the patch, it needs be built from source)
Btw, are you on windows 7? or is it reproduced in newer versions too?

@sapek
Copy link

sapek commented Apr 20, 2021

I submitted a fix for this some time ago but the maintainer of Win32 package didn't think that was the right place to fix the problem.

@jneira
Copy link
Member

jneira commented Apr 20, 2021

it would be nice to see it merged, did you try to move the patch to directory?

@sjakobi
Copy link
Member

sjakobi commented Nov 17, 2021

I've reported the issue in haskell/directory#129.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants