Skip to content

Conversation

@rvl
Copy link
Contributor

@rvl rvl commented Oct 2, 2020

  1. Fix hpc for cross-compiled builds
  2. Add report entries to Hydra build products.

@rvl rvl requested review from angerman and sevanspowell October 2, 2020 02:08
@rvl rvl self-assigned this Oct 2, 2020
rvl added a commit to cardano-foundation/cardano-wallet that referenced this pull request Oct 2, 2020
@rvl rvl force-pushed the rvl/SRE-125/fix-hpc-cross branch from dcdeb64 to 8948fb8 Compare October 2, 2020 02:52
rvl added a commit to cardano-foundation/cardano-wallet that referenced this pull request Oct 2, 2020
Copy link
Collaborator

@angerman angerman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assuming this works, looks legit to me.

})
''
local hpc=${pkgs.buildPackages.haskellPackages.ghc}/bin/hpc
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would this work?

nativeBuildInputs = [(ghc.buildGHC or ghc)];

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fundamental issue I believe is that our cross compilers (and musl is considered on) do not ship hpc, thus while you'd get a valid expression for ghc, you have no guarantee it has hpc?

On the other, hand your suggesting is to always use the buildGHC, which can never realistically be a cross compiler by default. 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not really sure what's the best way to do it.
This way works for me at the moment.
But one issue is that the ghc version could be different to what's used by the project.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rvl right, that's what @hamishmack's change would address. We mostly use the same ghc version to bootstrap the cross compilers. But it might not for regular compiers. Ahh this is frustrating.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK thanks, I have changed it as @hamishmack suggested, and it seems to work.

rvl added a commit to cardano-foundation/cardano-wallet that referenced this pull request Oct 2, 2020
@rvl rvl marked this pull request as draft October 2, 2020 08:21
rvl added a commit to cardano-foundation/cardano-wallet that referenced this pull request Oct 4, 2020
@rvl rvl marked this pull request as ready for review October 6, 2020 03:29
@rvl rvl merged commit b129059 into master Oct 6, 2020
@iohk-bors iohk-bors bot deleted the rvl/SRE-125/fix-hpc-cross branch October 6, 2020 03:30
booniepepper pushed a commit to booniepepper/haskell.nix that referenced this pull request Feb 4, 2022
* Add Hydra build products for test coverage reports (HTML links and zip files)

* Fix hpc on cross builds
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants