[Haskell-cafe] ghc/cabal problems - mystery?
Marian Jancar
marian.jancar at gmx.com
Wed Dec 30 19:01:48 UTC 2020
I think you are hitting on
https://docs.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation
On 12/30/20 6:28 PM, Gregory Guthrie wrote:
> I reported several odd and inconsistent results that I can't understand, and after some further trials, a few more data points, but still confused.
>
> A directory of files, cabal build runs fine, then trying to execute; I get three different results;
>
> Linking D:\CS\Courses\long path\All Solutions\dist-newstyle\build\x86_64-windows\ghc-8.10.1\apl-0.0.1\build\apl\apl.exe ...
> Seems fine.
>
> Then; from that same shell (PS) in the same directory -
> From cabal run: Fails
> PS D:\CS\Courses\long path\All Solutions> cabal run
> Up to date
> D:\CS\Courses\long path\All Solutions\dist-newstyle\build\x86_64-windows\ghc-8.10.1\apl-0.0.1\build\apl\apl: createProcess: invalid argument (Invalid argument)
>
> From using the explicit path: Fails
> PS D:\CS\Courses\long path\All Solutions> dist-newstyle\build\x86_64-windows\ghc-8.10.1\apl-0.0.1\build\apl\apl.exe
> Program 'apl.exe' failed to run: The application has failed to start because its side-by-side configuration
> is incorrect. Please see the application event log or use the command-line sxstrace.exe tool for more
> detailAt line:1 char:1
> + dist-newstyle\build\x86_64-windows\ghc-8.10.1\apl-0.0.1\build\apl\apl ...
> + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~.
> At line:1 char:1
> + dist-newstyle\build\x86_64-windows\ghc-8.10.1\apl-0.0.1\build\apl\apl ...
> + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> + CategoryInfo : ResourceUnavailable: (:) [], ApplicationFailedException
> + FullyQualifiedErrorId : NativeCommandFailed
>
> From going to the dist folder: runs fine.
> PS D:\CS\Courses\long path\All Solutions> cd dist-newstyle\build\x86_64-windows\ghc-8.10.1\apl-0.0.1\build\apl
> PS D:\CS\Courses\long path\All Solutions\dist-newstyle\build\x86_64-windows\ghc-8.10.1\apl-0.0.1\build\apl> apl.exe
> "APL: Examples and labs"
>
> I get a few other errors & results sometimes; copy the full directory to somewhere else, "cabal clean",
> And it won't build, "no target specified", even though the entire folder is identical.
>
> Again; every time just copying the entire directory, no editing of any files, just running cabal as above.
> Any hints or ideas why I am getting these issues & errors?
>
> GHC 8.10.2
> Cabal 3.2.0.0
> (Windows 10)
> ------------------------------------------------------------------------
> PS: One more...
> I (again) copied the entire directory to another place and retested, in that case "cabal run" did run, but gave results from a different file in the directory (multiple tests there, only one run from Main.hs, same .cabal file), and can run it by explicit path or "cabal run".
>
> All results should be "DSem_imp", one is from a different file, "DSem_impc" ??
> Certainly looks like they should all be running the same apl.exe. ??
>
> Output""
> PS G:\Testing\All Solutions> cabal clean
> PS G:\Testing\All Solutions> cabal run
> Resolving dependencies...
> Build profile: -w ghc-8.10.2 -O1
> In order, the following will be built (use -v for more details):
> - apl-0.0.1 (exe:apl) (first run)
> Configuring apl-0.0.1...
> Preprocessing executable 'apl' for apl-0.0.1..
> Building executable 'apl' for apl-0.0.1..
> ...
> Linking G:\Testing\All Solutions\dist-newstyle\build\x86_64-windows\ghc-8.10.2\apl-0.0.1\build\apl\apl.exe ...
> "APL: Examples and labs"
> "======================"
> "------ APL:: DSem_imp"
>
> PS G:\Testing\All Solutions> dist-newstyle\build\x86_64-windows\ghc-8.10.2\apl-0.0.1\build\apl\apl.exe
> "APL: Examples and labs"
> "======================"
> "------ APL:: DSem_imp"
>
> PS G:\Testing\All Solutions> cd dist-newstyle\build\x86_64-windows\ghc-8.10.2\apl-0.0.1\build\apl
> PS G:\Testing\All Solutions\dist-newstyle\build\x86_64-windows\ghc-8.10.2\apl-0.0.1\build\apl> ls
> Directory: G:\Testing\All Solutions\dist-newstyle\build\x86_64-windows\ghc-8.10.2\apl-0.0.1\build\apl
> Mode LastWriteTime Length Name
> ---- ------------- ------ ----
> d----- 12/30/2020 12:18 PM apl-tmp
> d----- 12/30/2020 12:17 PM autogen
> -a---- 12/30/2020 12:18 PM 11230184 apl.exe
> PS G:\Testing\All Solutions\dist-newstyle\build\x86_64-windows\ghc-8.10.2\apl-0.0.1\build\apl> apl.exe
> "APL: Examples and labs"
> "======================"
> "------ APL:: DSem_impc"
>
>
>
> Gregory Guthrie
> Maharishi International University
> ----------------------------------------------------------------
>
> _______________________________________________
> Haskell-Cafe mailing list
> To (un)subscribe, modify options or view archives go to:
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
> Only members subscribed via the mailman list are allowed to post.
>
More information about the Haskell-Cafe
mailing list