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

Unify stack.yaml and stack-macos.yaml #379

Closed
dan-zheng opened this issue Dec 25, 2020 · 1 comment
Closed

Unify stack.yaml and stack-macos.yaml #379

dan-zheng opened this issue Dec 25, 2020 · 1 comment
Labels
good first issue Good for newcomers

Comments

@dan-zheng
Copy link
Collaborator

Context

stack-macos.yaml is a copy of stack.yaml, with one additional llvm-hs flag at the bottom:

flags:
llvm-hs:
shared-llvm: false

The flag seems necessary to prevent this crash during stack build:

$ stack build
llvm-hs> configure
llvm-hs> [1 of 2] Compiling Main             ( /private/var/folders/m_/6f7q8zfs3n9fr0c_4gy8840m00hc_q/T/stack-faa6f21d644c0b9d/llvm-hs-9.0.1/Setup.hs, /private/var/folders/m_/6f7q8zfs3n9fr0c_4gy8840m00hc_q/T/stack-faa6f21d644c0b9d/llvm-hs-9.0.1/.stack-work/dist/x86_64-osx/Cabal-3.0.1.0/setup/Main.o )
llvm-hs> [2 of 2] Compiling StackSetupShim   ( /Users/danielzheng/.stack/setup-exe-src/setup-shim-mPHDZzAJ.hs, /private/var/folders/m_/6f7q8zfs3n9fr0c_4gy8840m00hc_q/T/stack-faa6f21d644c0b9d/llvm-hs-9.0.1/.stack-work/dist/x86_64-osx/Cabal-3.0.1.0/setup/StackSetupShim.o )
llvm-hs> Linking /private/var/folders/m_/6f7q8zfs3n9fr0c_4gy8840m00hc_q/T/stack-faa6f21d644c0b9d/llvm-hs-9.0.1/.stack-work/dist/x86_64-osx/Cabal-3.0.1.0/setup/setup ...
llvm-hs> setup: '/usr/local/opt/llvm@9/bin/llvm-config' exited with an error:
llvm-hs> llvm-config: error: libLLVM-9.dylib is missing
llvm-hs>
Progress 1/2

Goal

Unifying the two stack.yaml files would be a big win for build simplification and maintainability.

A simple approach would be to add platform-specific configuration to dex.cabal or stack.yaml. HaskTorch friends (@junjihashimoto, @tscholak) shared that Stack does not support platform-specific configuration, but Cabal does appear to support it.

@dan-zheng dan-zheng added enhancement good first issue Good for newcomers and removed help wanted labels Dec 25, 2020
@apaszke
Copy link
Collaborator

apaszke commented Jan 4, 2021

This is already tracked in commercialhaskell/stack#2048 and commercialhaskell/stack#3369. We can't fix that yet.

@apaszke apaszke closed this as completed Jan 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants