Closed dannypike closed 2 years ago
something has selected a very old version of implicitcad to install. this version doesn't work with your (newer) ghc.
I'd work on determining WHY your system is looking at that old of a version. maybe one of the libraries we use is only available in an 'old' version on windows?
Many thanks for the speedy response.
Unfortunately, my total experience of using Haskell is in trying to get this working, so I'm not sure that I have the skills for verifying and fixing the build structure (I'm a C++/C# user). It seems like I should just wait for someone who knows what they're doing in cabal etc. to come across this problem and fix it.
Some GHC9 issues were fixed as ecosystem progressed so this might work now. Mind re-trying the build using a clone of the repository and running cabal build
inside its root?
@sorki Thank you.
Should I be cloning the latest GitHub versions of Haskell, too? I can't remember how I installed it last time, but it doesn't appear to be from GitHub (I can usually tell that from the path to the exe on my PC).
I have cabal version 3.4.0.0 and ghc version 9.0.1 at the moment.
Should I be cloning the latest GitHub versions of Haskell, too? I can't remember how I installed it last time, but it doesn't appear to be from GitHub (I can usually tell that from the path to the exe on my PC).
I have cabal version 3.4.0.0 and ghc version 9.0.1 at the moment.
No need to - this combination is quite close to what we now test ImplicitCAD with (Cabal 3.4 and GHC9.0.2) so it should be good.
OK. In that case, I'm afraid the build still does not work:
D:\work\github.forks\Haskell-Things>git clone https://github.com/Haskell-Things/ImplicitCAD.git
Cloning into 'ImplicitCAD'...
remote: Enumerating objects: 12341, done.
remote: Counting objects: 100% (562/562), done.
remote: Compressing objects: 100% (352/352), done.
Receiving objects: 100% (12341/12341), 5.46 MiB | 4.00 MiB/s, done.d 11779
Resolving deltas: 100% (7518/7518), done.
D:\work\github.forks\Haskell-Things>cd ImplicitCAD
D:\work\github.forks\Haskell-Things\ImplicitCAD>cabal build
Warning: The package list for 'hackage.haskell.org' is 211 days old.
Run 'cabal update' to get the latest list of available packages.
Resolving dependencies...
Build profile: -w ghc-9.0.1 -O1
In order, the following will be built (use -v for more details):
- StateVar-1.2.2 (lib) (requires download & build)
- base-orphans-0.8.5 (lib) (requires download & build)
- binary-orphans-1.0.1 (lib) (requires download & build)
- blaze-builder-0.4.2.1 (lib) (requires build)
- byteorder-1.0.4 (lib:byteorder) (requires build)
- call-stack-0.4.0 (lib) (requires download & build)
- cereal-0.5.8.1 (lib) (requires download & build)
- clock-0.8.2 (lib) (requires download & build)
- colour-2.3.6 (lib) (requires build)
- hashable-1.3.3.0 (lib) (requires build)
- hspec-discover-2.8.3 (lib) (requires download & build)
- indexed-traversable-0.1.1 (lib) (requires download & build)
- integer-logarithms-1.0.3.1 (lib) (requires download & build)
- mintty-0.1.2 (lib) (requires build)
- parallel-3.2.2.0 (lib) (requires build)
- primitive-0.7.2.0 (lib) (requires build)
- reflection-2.1.6 (lib) (requires download & build)
- semigroups-0.19.2 (lib) (requires download & build)
- setenv-0.1.1.3 (lib) (requires download & build)
- show-combinators-0.2.0.0 (lib) (requires download & build)
- splitmix-0.1.0.3 (lib) (requires download & build)
- tagged-0.8.6.1 (lib) (requires download & build)
- th-abstraction-0.4.3.0 (lib) (requires download & build)
- transformers-compat-0.7 (lib) (requires build)
- void-0.7.3 (lib) (requires download & build)
- zlib-0.6.2.3 (lib) (requires build)
- contravariant-1.5.5 (lib) (requires download & build)
- blaze-markup-0.8.2.8 (lib) (requires build)
- storable-endian-0.2.6 (lib:storable-endian) (requires build)
- HUnit-1.6.2.0 (lib) (requires download & build)
- unordered-containers-0.2.14.0 (lib) (requires build)
- ansi-terminal-0.11 (lib) (requires build)
- vector-0.12.3.0 (lib) (requires build)
- scientific-0.3.7.0 (lib) (requires download & build)
- random-1.2.0 (lib) (requires download & build)
- distributive-0.6.2.1 (lib) (requires download & build)
- transformers-base-0.4.6 (lib) (requires download & build)
- blaze-svg-0.3.6.1 (lib) (requires build)
- hspec-expectations-0.8.2 (lib) (requires download & build)
- ansi-wl-pprint-0.6.9 (lib) (requires build)
- indexed-traversable-instances-0.1 (lib) (requires download & build)
- JuicyPixels-3.3.5 (lib) (requires build)
- bytes-0.17.1 (lib) (requires download & build)
- tf-random-0.5 (lib) (requires download & build)
- QuickCheck-2.14.2 (lib) (requires download & build)
- comonad-5.0.8 (lib) (requires download & build)
- optparse-applicative-0.16.1.0 (lib) (requires build)
- quickcheck-io-0.2.0 (lib) (requires download & build)
- bifunctors-5.5.11 (lib) (requires download & build)
- hspec-core-2.8.3 (lib) (requires download & build)
- semigroupoids-5.3.5 (lib) (requires download & build)
- profunctors-5.6.2 (lib) (requires download & build)
- assoc-1.0.2 (lib) (requires download & build)
- hspec-2.8.3 (lib) (requires download & build)
- invariant-0.5.4 (lib) (requires download & build)
- free-5.1.7 (lib) (requires download & build)
- these-1.1.1.1 (lib) (requires download & build)
- adjunctions-4.4 (lib) (requires download & build)
- strict-0.4.0.1 (lib) (requires download & build)
- kan-extensions-5.2.3 (lib) (requires download & build)
- lens-5.0.1 (lib) (requires download & build)
- linear-1.21.6 (lib) (requires download & build)
- implicit-0.3.0.1 (lib) (first run)
- implicit-0.3.0.1 (exe:extopenscad) (first run)
- implicit-0.3.0.1 (exe:docgen) (first run)
Downloading base-orphans-0.8.5
Starting byteorder-1.0.4 (all, legacy fallback)
Starting blaze-builder-0.4.2.1 (lib)
Downloaded base-orphans-0.8.5
Downloading clock-0.8.2
Starting base-orphans-0.8.5 (lib)
Downloaded clock-0.8.2
Downloading call-stack-0.4.0
Starting clock-0.8.2 (lib)
Starting colour-2.3.6 (lib)
Downloaded call-stack-0.4.0
Downloading semigroups-0.19.2
Starting call-stack-0.4.0 (lib)
Downloaded semigroups-0.19.2
Downloading setenv-0.1.1.3
Downloaded setenv-0.1.1.3
Downloading show-combinators-0.2.0.0
Building blaze-builder-0.4.2.1 (lib)
Building base-orphans-0.8.5 (lib)
Downloaded show-combinators-0.2.0.0
Downloading void-0.7.3
Building clock-0.8.2 (lib)
Downloaded void-0.7.3
Downloading binary-orphans-1.0.1
Building call-stack-0.4.0 (lib)
Building colour-2.3.6 (lib)
Downloaded binary-orphans-1.0.1
Downloading cereal-0.5.8.1
Starting binary-orphans-1.0.1 (lib)
Downloaded cereal-0.5.8.1
Downloading reflection-2.1.6
Starting cereal-0.5.8.1 (lib)
Downloaded reflection-2.1.6
Downloading th-abstraction-0.4.3.0
Installing call-stack-0.4.0 (lib)
Downloaded th-abstraction-0.4.3.0
Downloading splitmix-0.1.0.3
Downloaded splitmix-0.1.0.3
Downloading random-1.2.0
Installing base-orphans-0.8.5 (lib)
Downloaded random-1.2.0
Downloading tagged-0.8.6.1
Completed call-stack-0.4.0 (lib)
Completed base-orphans-0.8.5 (lib)
Downloaded tagged-0.8.6.1
Downloading distributive-0.6.2.1
Downloaded distributive-0.6.2.1
Downloading indexed-traversable-0.1.1
Building binary-orphans-1.0.1 (lib)
Downloaded indexed-traversable-0.1.1
Downloading comonad-5.0.8
Building cereal-0.5.8.1 (lib)
Downloaded comonad-5.0.8
Downloading bifunctors-5.5.11
Installing binary-orphans-1.0.1 (lib)
Downloaded bifunctors-5.5.11
Downloading assoc-1.0.2
Completed binary-orphans-1.0.1 (lib)
Downloaded assoc-1.0.2
Downloading integer-logarithms-1.0.3.1
Downloaded integer-logarithms-1.0.3.1
Downloading transformers-base-0.4.6
Downloaded transformers-base-0.4.6
Downloading these-1.1.1.1
Downloaded these-1.1.1.1
Downloading indexed-traversable-instances-0.1
Downloaded indexed-traversable-instances-0.1
Downloading scientific-0.3.7.0
Downloaded scientific-0.3.7.0
Downloading strict-0.4.0.1
Installing blaze-builder-0.4.2.1 (lib)
Downloaded strict-0.4.0.1
Installing colour-2.3.6 (lib)
Downloading bytes-0.17.1
Completed blaze-builder-0.4.2.1 (lib)
Completed colour-2.3.6 (lib)
Downloaded bytes-0.17.1
Downloading hspec-discover-2.8.3
Downloaded hspec-discover-2.8.3
Downloading tf-random-0.5
Installing clock-0.8.2 (lib)
Downloaded tf-random-0.5
Downloading StateVar-1.2.2
Downloaded StateVar-1.2.2
Downloading contravariant-1.5.5
Starting StateVar-1.2.2 (lib)
Completed clock-0.8.2 (lib)
Downloaded contravariant-1.5.5
Downloading profunctors-5.6.2
Downloaded profunctors-5.6.2
Downloading semigroupoids-5.3.5
Downloaded semigroupoids-5.3.5
Downloading free-5.1.7
Downloaded free-5.1.7
Downloading adjunctions-4.4
Downloaded adjunctions-4.4
Downloading invariant-0.5.4
Building StateVar-1.2.2 (lib)
Downloaded invariant-0.5.4
Downloading kan-extensions-5.2.3
Installing StateVar-1.2.2 (lib)
Downloaded kan-extensions-5.2.3
Downloading lens-5.0.1
Completed StateVar-1.2.2 (lib)
Downloaded lens-5.0.1
Downloading linear-1.21.6
Downloaded linear-1.21.6
Downloading QuickCheck-2.14.2
Downloaded QuickCheck-2.14.2
Downloading HUnit-1.6.2.0
Downloaded HUnit-1.6.2.0
Downloading hspec-expectations-0.8.2
Downloaded hspec-expectations-0.8.2
Downloading quickcheck-io-0.2.0
Downloaded quickcheck-io-0.2.0
Downloading hspec-core-2.8.3
Downloaded hspec-core-2.8.3
Downloading hspec-2.8.3
Installing cereal-0.5.8.1 (lib)
Completed cereal-0.5.8.1 (lib)
Failed to build byteorder-1.0.4. The failure occurred during the configure
step.
Build log (
D:\Users\peter\AppData\Roaming\cabal\logs\ghc-9.0.1\byteorder-1.0.4-6cc448b2d867a6e8100445a166d24e8e674aaadb.log
):
Configuring byteorder-1.0.4...
D:\Users\peter\AppData\Local\Temp\ghc7869.o.tmp: renameFile:renamePath:MoveFileEx "\\\\?\\D:\\Users\\peter\\AppData\\Local\\Temp\\ghc7869.o.tmp" Just "\\\\?\\D:\\Users\\peter\\AppData\\Local\\Temp\\ghc7869.o": does not exist (The system cannot find the file specified.)
cabal.exe: Failed to build byteorder-1.0.4 (which is required by
exe:extopenscad from implicit-0.3.0.1 and exe:docgen from implicit-0.3.0.1).
See the build log above for details.
D:\work\github.forks\Haskell-Things\ImplicitCAD>
and that log file contains this:
Configuring byteorder-1.0.4...
D:\Users\peter\AppData\Local\Temp\ghc7869.o.tmp: renameFile:renamePath:MoveFileEx "\\\\?\\D:\\Users\\peter\\AppData\\Local\\Temp\\ghc7869.o.tmp" Just "\\\\?\\D:\\Users\\peter\\AppData\\Local\\Temp\\ghc7869.o": does not exist (The system cannot find the file specified.)
There is a file called: D:\Users\peter\AppData\Local\Temp\ghc7869.tmp
, so is there a pathname-construction issue in cabal when working in Windows?
Thanks, interesting, this looks like an issue with byteorder
having troubles with handling paths on Windows.
byteorder
is indirectly pulled in by storable-endian
package and it looks like we use only a small part of it which might be fixable so we don't depend on these two.
Digging deeper it is actually caused by byteorder
- the hint I found in your logs is legacy fallback
which as explained in https://stackoverflow.com/questions/68173444/what-does-legacy-fallback-mean-when-cabal-is-building-packages , specifically The cabal-version is less than 1.8
where byteorder
uses Cabal-Version: >= 1.6
.
So we either need to get rid of the package itself or bump its cabal version. I will try to contact the maintainer since the package seems to be used widely.
Have you had a response from the maintainer of byteorder
?
Is there a ticket that I can track?
I found a way around in #411.
If anyone stumbles on this what helped was limiting parallelism to single core as the errors are caused by some sort of race-condition in Cabal - i.e. use cabal build -j1
.
I just tried setting this up on a Windows PC and it doesn't build:
I had a problem with the Haskell installation. This PC has not seen Haskell before and, after completing the installation steps for Windows, running "GHC" from a command prompt didn't work. I had to search the drive to see where the Chocolatey install had put "ghc.exe" and add that directory to the PATH manually. So, maybe there's something else that I haven't done / failed to get set?
The install instructions for Windows don't seem to mention the need for any special configuration other than running Chocolatey to install cabal, stack and haskell-dev.