Skip to content

Multiple libraries failing with unknownsymbol 'expm1' on mingw32 #2335

Closed
@Anviking

Description

@Anviking

Describe the bug

After bumping dependencies in cardano-wallet we have some haskell libraries failing with unknownsymbol 'expm1' on mingw32.

  • Build system: mingw32 x86_64-linux to windows cross compilation
  • GHC version: 9.6.6
  • Haskell.nix version: 42f73d0

Steps To Reproduce

git clone https://github.com/cardano-foundation/cardano-wallet.git
cd cardano-wallet
git checkout paolino/4993/bump-node-to-10.2.1 
# PR https://github.com/cardano-foundation/cardano-wallet/pull/5031
# current commit: 3060adbe1ee818300b7d1fd0990e39967c1ad9b2
nix build -L -o result/windows .#ci.artifacts.win64.release

Expected behavior

Haskell libraries succeed to build or at least don't fail with error below.

Actual behaviour

error: builder for '/nix/store/i1j4q4dw6vfr1mm5khiyd5fwygy2in0f-parsers-lib-parsers-x86_64-w64-mingw32-0.12.12.drv' failed with exit code 1;
       last 25 log lines:
       > [2 of 8] Compiling Text.Parser.Char ( src/Text/Parser/Char.hs, dist/build/Text/Parser/Char.o )
       > ---> Starting iserv-proxy-interpreter.exe on port 9684
       > To re-use the same wine-prefix and remote-iserv, set the following environment variables:
       > export WINEPREFIX=/build/tmp.wRIjUR3UAs
       > export REMOTE_ISERV=/build/tmp.bh5w61bEsD
       > ---| iserv-proxy-interpreter.exe should have started on 9684
       > 0054:err:systray:initialize_systray Could not create tray window
       > 0090:err:setupapi:SetupDefaultQueueCallbackW copy error 1812 L"@C:\\windows\\system32\\drivers\\wineusb.sys,-1" -> L"C:\\windows\\inf\\wineusb.inf"
       > wine: failed to open L"C:\\windows\\syswow64\\rundll32.exe": c0000135
       > wine: configuration in L"/build" has been updated.
       > Listening on port 9684
       > iserv-proxy-interpreter.exe:|/nix/store/syx93hzdp3w3yvfwblbxajy8q2rsjci8-x86_
       > 64-w64-mingw32-ghc-9.6.6/lib/x86_64-windows-ghc-9.6.6/ghc-prim-0.10.0/HSghc-prim
       > -0.10.0.o:unknownsymbol`expm1'
       > iserv-proxy-interpreter.exe:CouldnotloadObjectCode/nix/store/syx93hzdp3w3y
       > vfwblbxajy8q2rsjci8-x86_64-w64-mingw32-ghc-9.6.6/lib/x86_64-windows-ghc-9.6.6/gh
       > c-prim-0.10.0/HSghc-prim-0.10.0.o.
       >
       >
       > <no location info>: error: unable to load unit `ghc-prim-0.10.0'
       > [3 of 8] Compiling Text.Parser.Expression ( src/Text/Parser/Expression.hs, dist/build/Text/Parser/Expression.o )
       > [4 of 8] Compiling Text.Parser.LookAhead ( src/Text/Parser/LookAhead.hs, dist/build/Text/Parser/LookAhead.o )
       > [5 of 8] Compiling Text.Parser.Permutation ( src/Text/Parser/Permutation.hs, dist/build/Text/Parser/Permutation.o )
       > [6 of 8] Compiling Text.Parser.Token.Highlight ( src/Text/Parser/Token/Highlight.hs, dist/build/Text/Parser/Token/Highlight.o )
       > ---> killing iserv-proxy-interpreter.exe...
       For full logs, run 'nix-store -l /nix/store/i1j4q4dw6vfr1mm5khiyd5fwygy2in0f-parsers-lib-parsers-x86_64-w64-mingw32-0.12.12.drv'.
error: 1 dependencies of derivation '/nix/store/ylhanzyhl5lc1l1p321rfc0sns6sqji0-tree-diff-lib-tree-diff-x86_64-w64-mingw32-0.3.3.drv' failed to build
error: 1 dependencies of derivation '/nix/store/81m6v600aymbk6i501y77sr6ky50qkd5-cardano-ledger-core-lib-testlib-x86_64-w64-mingw32-1.16.0.0.drv' failed to build
error: 1 dependencies of derivation '/nix/store/j3ifzc858sxmwsb17r43cy0d33r63g0i-cardano-api-lib-internal-x86_64-w64-mingw32-10.8.0.0.drv' failed to build
error: 1 dependencies of derivation '/nix/store/69y2vs0w085ys6gk5bxacmwn3hx640hz-cardano-api-lib-cardano-api-x86_64-w64-mingw32-10.8.0.0.drv' failed to build
error (ignored): error: cannot unlink '"/tmp/nix-build-quickcheck-arbitrary-adt-lib-quickcheck-arbitrary-adt-x86_64-w64-mingw32-0.3.1.0.drv-0/build/tmp.2BQQIbLwm2/lib/x86_64-windows-ghc-9.6.6/ghc-9.6.6/GHC"': Directory not empty
error: 1 dependencies of derivation '/nix/store/ysf7zn2mn8xa2pcw8xpz9rql26cldy6z-cardano-wallet-api-lib-cardano-wallet-api-x86_64-w64-mingw32-0.2025.3.4.drv' failed to build
error: 1 dependencies of derivation '/nix/store/ky4vmlih50137y78lj1lryiqqsp1q2a3-cardano-wallet-lib-cardano-wallet-x86_64-w64-mingw32-0.2025.3.4.drv' failed to build
error: 1 dependencies of derivation '/nix/store/1w97l6kcx3sqs6vq42jryvpy2dkn2n7x-cardano-wallet-primitive-lib-cardano-wallet-primitive-x86_64-w64-mingw32-0.2025.3.4.drv' failed to build
error: 1 dependencies of derivation '/nix/store/z34d4ijzl61l4a6hskh4k2p1n7mshsv3-cardano-wallet-application-exe-cardano-wallet-x86_64-w64-mingw32-2025.3.4.drv' failed to build
error: 1 dependencies of derivation '/nix/store/j3ym7aldbz6j0g8v17nsp4yl41rxa50d-cardano-wallet.exe-2025.3.4.drv' failed to build
error (ignored): error: cannot unlink '"/tmp/nix-build-uuid-types-lib-uuid-types-x86_64-w64-mingw32-1.0.6.drv-0/build/tmp.psVXCe0AMM"': Directory not empty
error (ignored): error: cannot unlink '"/tmp/nix-build-strict-lib-strict-x86_64-w64-mingw32-0.5.1.drv-0/build/tmp.3a0hCagr10/lib/x86_64-windows-ghc-9.6.6"': Directory not empty
error: 1 dependencies of derivation '/nix/store/fihsqlfjjjpd41y0jxakjrn7acrgnm5d-cardano-wallet.exe-v2025-03-04-win64.drv' failed to build

Additional context

Bumping selective-0.5 to 0.7.0.1 appears to make it compile, and fail on parsers-0.12.12 instead.

parsers-0.12.12 is the latest one though so can't bump any further.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions