Fix some GHC dependencies on iOS#40393
Conversation
|
@ryantrinkle I left out 47f2e72. @angerman seemed to think it should have worked as it was before. Could you clarify the purpose of that commit? |
|
I also left out 1bb6287. I think it's better to just require people to use |
There was a problem hiding this comment.
Setting LD_LIBRARY_PATH in the generic builder is not a good idea. It's important that all relevant search paths are registered with Cabal because otherwise the generated library config file does not contain them and then libraries will fail to link when they're used by other components, etc.
There was a problem hiding this comment.
What is the right way to register this with Cabal?
There was a problem hiding this comment.
In cc-wrapper. I'll do this once I get home. It will be mass rebuild however.
There was a problem hiding this comment.
Err sorry that would be for the cflags link part. Maybe Cabal has an --extra-framework-dirs?
There was a problem hiding this comment.
Ah but this is the shell env. @peti the env is really screwed up, you know, because the system-haskell division of deps does not take into account propagated dependencies. We drop propagated systems deps (including frameworks) on the floor since ghcWithPackages doesn't reexport them. I like the idea of ghcWithPackages, but it is very incompatible with the bash-heavy cc-wrapper way of doing things. More thought is needed.
There was a problem hiding this comment.
@ElvishJerricco let's try to land #39735 by @kirelagin for this reflex-platform release too.
There was a problem hiding this comment.
@Ericson2314 So you're going to tackle these env issues in a separate PR? Should I remove the env changes from this PR entirely?
There was a problem hiding this comment.
Cabal refers to these dependencies simply as frameworks in its BuildInfo type, therefore I think we should adopt that nomenclature and simply call them framework here, too, rather than darwinFramework.
There was a problem hiding this comment.
We require a testFrameworkDepends argument, too.
There was a problem hiding this comment.
Ditto with benckmarkFrameworkDepends.
7bbacff to
0466a57
Compare
There was a problem hiding this comment.
Pkg-config is up above as a native build input.
There was a problem hiding this comment.
In cc-wrapper. I'll do this once I get home. It will be mass rebuild however.
There was a problem hiding this comment.
Err sorry that would be for the cflags link part. Maybe Cabal has an --extra-framework-dirs?
There was a problem hiding this comment.
This TODO is done on staging.
There was a problem hiding this comment.
@Ericson2314 So I should remove this preConfigure entirely?
There was a problem hiding this comment.
Sadly not, because I can't figure out how to get autoreconf hook to work.
There was a problem hiding this comment.
So then what do you want me to do with this?
There was a problem hiding this comment.
Keep the below part but get rid of the comment so that specific line is unchanged.
There was a problem hiding this comment.
@Ericson2314 I should switch this from stdenv.hostPlatform != stdenv.buildPlatform to something like hostPlatform.isDarwin or something, right?
There was a problem hiding this comment.
You could do hostPlatofrm.isiOS. This is already a Darwin-specific version of libiconv.
|
@Ericson2314 Also, should this PR be pointing at |
|
@ElvishJerricco by the rebuild count I guess staging? We can still base them off a master commit so we can use them without pulling in as much of a rebuild I suppose. |
|
@Ericson2314 what about the |
|
@Ericson2314 ping |
There was a problem hiding this comment.
Why do you add [pkgconfig] here? It's already part of nativeBuildInputs.
There was a problem hiding this comment.
Agreed. I had a comment on that too but GitHub evidently ate it.
|
@ElvishJerricco lets just land the framework changes (maybe on 18.03, too) and then return to the rest of this. |
febf5aa to
5120c8c
Compare
|
@Ericson2314 I've removed all the changes to generic-builder and the comment in libiconv, and I've switched the condition in libiconv to |
|
@ElvishJerricco see 62fd669 on staging, it should be Overall, I wanted to start with the framework depends (outside |
There was a problem hiding this comment.
there is another default-v*.nix that probably needs this too.
|
@Ericson2314 Yes, the With the generic-builder stuff gone, this PR is pretty small. I don't really see anything particularly gross. |
5120c8c to
ccdc91b
Compare
Needs to link with a C compiler, not linker directly
ccdc91b to
4f25cf5
Compare
|
OK will merge. I don't like not being able to run |
Motivation for this change
This fixes a few iOS related packages, particularly with the goal of fixing GHC dependencies. GHC itself does not quite build yet, but its dependencies do.
Things done
build-use-sandboxinnix.confon non-NixOS)nix-shell -p nox --run "nox-review wip"./result/bin/)/cc @ryantrinkle @Ericson2314