Skip to content
This repository has been archived by the owner on Aug 2, 2020. It is now read-only.

Windows failure: copyFile: invalid argument #562

Closed
snowleopard opened this issue Apr 9, 2018 · 6 comments
Closed

Windows failure: copyFile: invalid argument #562

snowleopard opened this issue Apr 9, 2018 · 6 comments

Comments

@snowleopard
Copy link
Owner

After #561, we can start building GHC on Windows (both on AppVeyor and on my machine), but we quickly hit the following error:

| Run GhcPkg Dependencies Stage0: integer-gmp
C:/Users/nam83/AppData/Local/Programs/stack/x86_64-windows/ghc-8.2.2/bin/ghc-pkg.exe --no-user-package-db field integer-gmp depends
| Run GhcPkg Dependencies Stage0: base
C:/Users/nam83/AppData/Local/Programs/stack/x86_64-windows/ghc-8.2.2/bin/ghc-pkg.exe --no-user-package-db field base depends
| KeyValues oracle: reading '_build/stage0/libraries/ghc-boot-th/.dependencies'...
| Run GhcPkg Dependencies Stage0: array
| Run GhcPkg Dependencies Stage0: filepath
C:/Users/nam83/AppData/Local/Programs/stack/x86_64-windows/ghc-8.2.2/bin/ghc-pkg.exe --no-user-package-db field array depends
C:/Users/nam83/AppData/Local/Programs/stack/x86_64-windows/ghc-8.2.2/bin/ghc-pkg.exe --no-user-package-db field filepath depends
| Windows path mapping: C:/msys/home/nam83/ghc/inplace/mingw/bin/ld.exe => C:/msys/home/nam83/ghc/inplace/mingw/bin/ld.exe
| KeyValues oracle: reading '_build/stage0/libraries/transformers/.dependencies'...
copyFile: invalid argument (The filename, directory name, or volume label syntax is incorrect.)
shakeArgsWith    0.000s    0%
Function shake  13.869s    7%  =
Database read    0.003s    0%
With database    0.002s    0%
Running rules  174.263s   92%  =========================
Total          188.137s  100%
Error when running Shake build system:
* _build/stage1/bin/unlit.exe
* OracleQ (PackageDataFile (Context {stage = Stage1, package = Package {pkgLanguage = Haskell, pkgType = Program, pkgName = "unlit", pkgPath = "utils/unlit"}, way = v}))
* _build/stage1/utils/unlit/setup-config
* _build/stage0/bin/ghc.exe
* OracleQ (PackageDataFile (Context {stage = Stage0, package = Package {pkgLanguage = Haskell, pkgType = Program, pkgName = "ghc-bin", pkgPath = "ghc"}, way = v}))
* _build/stage0/ghc/setup-config
* _build/stage0/lib/package.conf.d/ghc-8.5.conf
* OracleQ (PackageDataFile (Context {stage = Stage0, package = Package {pkgLanguage = Haskell, pkgType = Library, pkgName = "ghc", pkgPath = "compiler"}, way = v}))
* _build/stage0/compiler/setup-config
* _build/stage0/lib/package.conf.d/ghc-boot-th-8.5.conf
ExitFailure 1

See https://ci.appveyor.com/project/snowleopard/hadrian

I don't think I've seen such failure before.

@alpmestan
Copy link
Collaborator

Do you know which call to copyFile is failing?

@snowleopard
Copy link
Owner Author

@alpmestan No, I haven't yet figured out which copyFile is to blame.

@ndmitchell
Copy link
Collaborator

Isn't it one coming from _build/stage0/lib/package.conf.d/ghc-boot-th-8.5.conf - which is what the Shake stack trace says?

@snowleopard
Copy link
Owner Author

@ndmitchell Got it now. The error was coming from Cabal's defaultMainWithHooksNoReadArgs :-S

By the way, for some reason, I'm still getting confused when I see a Shake error trace -- my first reaction is usually "Shall I read it from top to bottom or vice versa?". I don't think there is anything wrong with how trace is printed, it's probably just me.

@snowleopard
Copy link
Owner Author

Fixed, now getting this: #564

@ndmitchell
Copy link
Collaborator

Agreed - I have the same reaction. I think it has to put the exception at the bottom (as it may be unbounded), and therefore it has to be in that order. What format/words do you think would clarify it? "Starting at" and "depends on"?

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

No branches or pull requests

3 participants