Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

haskellPackages.cachix: Remove profiling override on GHC >=8.8 #90684

Closed

Conversation

roberth
Copy link
Member

@roberth roberth commented Jun 17, 2020

Motivation for this change

Fewer overrides is better.
I noticed this while packaging hercules-ci-agent, which depends on cachix. Without this change, hercules-ci-agent (or any other package that may depend on it) needs to apply the same override, which shouldn't be necessary.

I do see the irony that this is adds LoC but we'll be rid of them when the old GHC are removed at some point :)

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@domenkozar
Copy link
Member

lgtm

@roberth
Copy link
Member Author

roberth commented Jun 17, 2020

Whoops, doesn't seem to work on darwin! Any ideas?

Building library for cachix-0.3.8..
[ 1 of 20] Compiling Cachix.Client.Config.Orphans ( src/Cachix/Client/Config/Orphans.hs, dist/build/Cachix/Client/Config/Orphans.o )
[...]
[11 of 20] Compiling Cachix.Client.Store ( src/Cachix/Client/Store.hs, dist/build/Cachix/Client/Store.o )
ld: warning: ld: warning: /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation, ignoring unexpected dylib file/nix/store/hpid8hp7cqyhgmsq85f0aghrdawmkxpv-libiconv-osx-10.12.6/lib/libiconv.dylib, ignoring unexpected dylib file

ld: warning: /nix/store/hpid8hp7cqyhgmsq85f0aghrdawmkxpv-libiconv-osx-10.12.6/lib/libiconv.dylib, ignoring unexpected dylib file
ld: warning: /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation, ignoring unexpected dylib file
[12 of 20] Compiling Cachix.Client.URI ( src/Cachix/Client/URI.hs, dist/build/Cachix/Client/URI.o )
[...]
[20 of 20] Compiling Cachix.Client    ( src/Cachix/Client.hs, dist/build/Cachix/Client.o )
[ 1 of 20] Compiling Cachix.Client.Config.Orphans ( src/Cachix/Client/Config/Orphans.hs, dist/build/Cachix/Client/Config/Orphans.p_o )
error: invalid argument '-std=c++17' not allowed with 'C'
`clang++' failed in phase `C Compiler'. (Exit code: 1)
builder for '/nix/store/r79y2l4gm64dymng6646ik0sxkibq01m-cachix-0.3.8.drv' failed with exit code 1
error: build of '/nix/store/r79y2l4gm64dymng6646ik0sxkibq01m-cachix-0.3.8.drv' failed

@roberth
Copy link
Member Author

roberth commented Jun 17, 2020

This line needs to have -optcxx for it to work in the new way, or so it seems

https://github.com/cachix/cachix/blob/master/cachix/cachix.cabal#L121

@domenkozar
Copy link
Member

Yes, exactly. I didn't bother with that back then because it wasn't even released.

@peti
Copy link
Member

peti commented Jul 3, 2020

Can you please re-base that PR on a recent version of master and force-push the new version to resolve the merge conflicts?

@roberth
Copy link
Member Author

roberth commented Jul 4, 2020

This cleanup requires a change in cachix. It can be reopened when the time is right.

@roberth roberth closed this Jul 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants