Note that Windows is not a supported platform. You can expect super simple packages like hello to cross-compile but anything more complex likely won’t work.
What’s the tree of pkgs.mingwW64.which? Does it contain pwd.h in its inlcude dir? Why doesn’t eprover’s compiler find the include while compiling? (make the build system output compiler commands and check include paths)
Thank you for your response. Why do you say that “Windows is not a supported platform”? I checked the cross-compilation tutorial at nix.dev, and it lists pkgsCross.mingwW64 in the set of “predefined host platforms” that come with nixpkgs. It includes x86_64-w64-mingw32 in the “common examples of platform configs”. It has a whole section intended to “show off the power of cross compilation in Nix” which compiles a program to two platforms, one of which is x86_64-w64-mingw32 (Windows). It is part of the “[o]fficial documentation for getting things done with Nix”.
As for pwd.h, the issue seems to be with the which package, not with eprover. Running
And in this case, you haven’t even given any hint on which derivation the build failed, nor from which branch/channel you are trying to do the build.
Actually it might be that which should be moved to nativeBuildInputs, I don’t remember (the package is likely to be older than cross-compilation infrastructure…). This specific problem might just disappear then…
Good idea! I moved which from buildInputs to nativeBuildInputs, and the pwd.h error went away.
Now there is a new error coming from eprover’s configure script:
Unknown option --build
It seems the script does not support specifying a build platform. This does not bode well for getting cross-compilation to work. It would seem to require changing not just the Nix eprover package, but eprover itself.
Ohhh. Yeah, not autotools at all. It might be that just passing good CC to make is enough, but not sure… there are enough directories that I cannot exclude build-time execution of a freshly-compiled tool to generate something.