I have been trying to upgrade the resolver used in stack.yaml to make the package compatible to our compiler condrust, which requires lts-21.4. However, it seems the project cannot be built with a newer resolver as is.
Expected Behavior
The library builds using resolver: lts-21.4.
Actual Behavior
The build errors after generating the dialect files with a "duplicate modules in library" message, see below.
Steps to Reproduce the Problem
Change resolver to lts-21.4
Run stack build
mlir-hs> configure (lib)
Generating /net/home/felix/research/ohua/mlir-hs/src/MLIR/AST/Dialect/Generated/Func.hs
Generating /net/home/felix/research/ohua/mlir-hs/src/MLIR/AST/Dialect/Generated/Arith.hs
Generating /net/home/felix/research/ohua/mlir-hs/src/MLIR/AST/Dialect/Generated/ControlFlow.hs
Generating /net/home/felix/research/ohua/mlir-hs/src/MLIR/AST/Dialect/Generated/Vector.hs
Generating /net/home/felix/research/ohua/mlir-hs/src/MLIR/AST/Dialect/Generated/Shape.hs
Generating /net/home/felix/research/ohua/mlir-hs/src/MLIR/AST/Dialect/Generated/LLVM.hs
Generating /net/home/felix/research/ohua/mlir-hs/src/MLIR/AST/Dialect/Generated/Linalg.hs
Generating /net/home/felix/research/ohua/mlir-hs/src/MLIR/AST/Dialect/Generated/LinalgStructured.hs
Generating /net/home/felix/research/ohua/mlir-hs/src/MLIR/AST/Dialect/Generated/Tensor.hs
Generating /net/home/felix/research/ohua/mlir-hs/src/MLIR/AST/Dialect/Generated/X86Vector.hs
Generating /net/home/felix/research/ohua/mlir-hs/test/MLIR/AST/Dialect/Generated/FuncSpec.hs
Generating /net/home/felix/research/ohua/mlir-hs/test/MLIR/AST/Dialect/Generated/ArithSpec.hs
Generating /net/home/felix/research/ohua/mlir-hs/test/MLIR/AST/Dialect/Generated/ControlFlowSpec.hs
Generating /net/home/felix/research/ohua/mlir-hs/test/MLIR/AST/Dialect/Generated/VectorSpec.hs
Generating /net/home/felix/research/ohua/mlir-hs/test/MLIR/AST/Dialect/Generated/ShapeSpec.hs
Generating /net/home/felix/research/ohua/mlir-hs/test/MLIR/AST/Dialect/Generated/LLVMSpec.hs
Generating /net/home/felix/research/ohua/mlir-hs/test/MLIR/AST/Dialect/Generated/LinalgSpec.hs
Generating /net/home/felix/research/ohua/mlir-hs/test/MLIR/AST/Dialect/Generated/TensorSpec.hs
Generating /net/home/felix/research/ohua/mlir-hs/test/MLIR/AST/Dialect/Generated/X86VectorSpec.hs
Configuring mlir-hs-0.1.0.0...
Error: setup: Duplicate modules in library: MLIR.AST.Dialect.Generated.Arith,
MLIR.AST.Dialect.Generated.ControlFlow, MLIR.AST.Dialect.Generated.Func,
MLIR.AST.Dialect.Generated.LLVM, MLIR.AST.Dialect.Generated.Linalg,
MLIR.AST.Dialect.Generated.LinalgStructured, MLIR.AST.Dialect.Generated.Shape,
MLIR.AST.Dialect.Generated.Tensor, MLIR.AST.Dialect.Generated.Vector,
MLIR.AST.Dialect.Generated.X86Vector
Error: [S-7282]
Stack failed to execute the build plan.
While executing the build plan, Stack encountered the error:
[S-7011]
While building package mlir-hs-0.1.0.0 (scroll up to its section to see the error) using:
/net/home/felix/research/ohua/mlir-hs/.stack-work/dist/x86_64-linux/ghc-9.4.5/setup/setup --verbose=1 --builddir=.stack-work/dist/x86_64-linux/ghc-9.4.5 configure --with-ghc=/net/home/felix/.ghcup/ghc/9.4.5/bin/ghc --with-ghc-pkg=/net/home/felix/.ghcup/ghc/9.4.5/bin/ghc-pkg-9.4.5 --user --package-db=clear --package-db=global --package-db=/net/home/felix/.stack/snapshots/x86_64-linux/51223828149bf030574c78ea067a6a2187d0b2c35465af9df2bf098281aae605/9.4.5/pkgdb --package-db=/net/home/felix/research/ohua/mlir-hs/.stack-work/install/x86_64-linux/51223828149bf030574c78ea067a6a2187d0b2c35465af9df2bf098281aae605/9.4.5/pkgdb --libdir=/net/home/felix/research/ohua/mlir-hs/.stack-work/install/x86_64-linux/51223828149bf030574c78ea067a6a2187d0b2c35465af9df2bf098281aae605/9.4.5/lib --bindir=/net/home/felix/research/ohua/mlir-hs/.stack-work/install/x86_64-linux/51223828149bf030574c78ea067a6a2187d0b2c35465af9df2bf098281aae605/9.4.5/bin --datadir=/net/home/felix/research/ohua/mlir-hs/.stack-work/install/x86_64-linux/51223828149bf030574c78ea067a6a2187d0b2c35465af9df2bf098281aae605/9.4.5/share --libexecdir=/net/home/felix/research/ohua/mlir-hs/.stack-work/install/x86_64-linux/51223828149bf030574c78ea067a6a2187d0b2c35465af9df2bf098281aae605/9.4.5/libexec --sysconfdir=/net/home/felix/research/ohua/mlir-hs/.stack-work/install/x86_64-linux/51223828149bf030574c78ea067a6a2187d0b2c35465af9df2bf098281aae605/9.4.5/etc --docdir=/net/home/felix/research/ohua/mlir-hs/.stack-work/install/x86_64-linux/51223828149bf030574c78ea067a6a2187d0b2c35465af9df2bf098281aae605/9.4.5/doc/mlir-hs-0.1.0.0 --htmldir=/net/home/felix/research/ohua/mlir-hs/.stack-work/install/x86_64-linux/51223828149bf030574c78ea067a6a2187d0b2c35465af9df2bf098281aae605/9.4.5/doc/mlir-hs-0.1.0.0 --haddockdir=/net/home/felix/research/ohua/mlir-hs/.stack-work/install/x86_64-linux/51223828149bf030574c78ea067a6a2187d0b2c35465af9df2bf098281aae605/9.4.5/doc/mlir-hs-0.1.0.0 --dependency=Cabal=Cabal-3.8.1.0 --dependency=array=array-0.5.4.0 --dependency=base=base-4.17.1.0 --dependency=bytestring=bytestring-0.11.4.0 --dependency=containers=containers-0.6.7 --dependency=directory=directory-1.3.7.1 --dependency=filepath=filepath-1.4.2.2 --dependency=inline-c=inline-c-0.9.1.8-6ytyEClVF8W6jgJzMlCopY --dependency=lens=lens-5.2.2-6P2dgWTizWZ2PJrZAOlDWZ --dependency=mtl=mtl-2.2.2 --dependency=raw-strings-qq=raw-strings-qq-1.1-6XGgDNlzmZj9aCZuoblYuD --dependency=transformers=transformers-0.5.6.2 --exact-configuration --ghc-option=-fhide-source-paths
Process exited with code: ExitFailure 1
I have been trying to upgrade the
resolver
used instack.yaml
to make the package compatible to our compilercondrust
, which requireslts-21.4
. However, it seems the project cannot be built with a newer resolver as is.Expected Behavior
The library builds using
resolver: lts-21.4
.Actual Behavior
The build errors after generating the dialect files with a "duplicate modules in library" message, see below.
Steps to Reproduce the Problem
resolver
tolts-21.4
stack build