[Haskell-cafe] ghc/cabal problems - mystery?
Gregory Guthrie
guthrie at miu.edu
Wed Dec 30 20:13:26 UTC 2020
Thanks - I'll investigate this.
Note, that Cabal adding an additional 7 levels of directory (and ~70 characters) to the path for executables can exacerbate this.
Dr. Gregory Guthrie
Maharishi International University
----------------------------------------------------------------
-----Original Message-----
From: Haskell-Cafe <haskell-cafe-bounces at haskell.org> On Behalf Of Marian Jancar
Sent: Wednesday, December 30, 2020 1:02 PM
To: haskell-cafe at haskell.org
Subject: Re: [Haskell-cafe] ghc/cabal problems - mystery?
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\buil
> d\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\buil
> d\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.
>
_______________________________________________
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