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

stack build --no-copy-bins still invokes copy #1938

Closed
W4RH4WK opened this issue Mar 22, 2016 · 1 comment
Closed

stack build --no-copy-bins still invokes copy #1938

W4RH4WK opened this issue Mar 22, 2016 · 1 comment

Comments

@W4RH4WK
Copy link

W4RH4WK commented Mar 22, 2016

I recently encountered an issue where a shared library ends up without symbols after invoking stack build. At first I thought this was a bug in stack since cabal build did fine. I reported this in #1925, but after further investigating this issue I found out that stack invokes cabal copy after the actual build process.

Cabal's copy command will run strip on a shared library to remove all the symbols. Logically I ran stack with the --no-copy-bins flag to prevent it from running cabal copy.

But this didn't help, looking at the verbose output, copy is still run:

$ stack build --no-copy-bins --verbose --cabal-verbose
        ...
2016-03-22 13:49:58.696840: [debug] Run process: /root/.stack/setup-exe-cache/x86_64-linux/setup-Simple-Cabal-1.22.5.0-ghc-7.10.3 --verbose --builddir=.stack-work/dist/x86_64-linux/Cabal-1.22.5.0 copy @(stack_COhPD0SUWBs7s1VUFLBNcf:System.Process.Read src/System/Process/Read.hs:269:3)
        ...
@mgsloan
Copy link
Contributor

mgsloan commented Mar 22, 2016

Note the docs for --no-copy-bins - Enable/disable copying binaries to the local-bin-path. This does not actually invoke the cabal copy command. Instead, it's literally just copying the executables.

To me it seems broken that cabal would modify the inplace files upon cabal copy... So I suppose there is now a usecase for disabling copy?

I think what we really want is to be able to pass --disable-library-stripping in to cabal configure. See also #1342 #1438 #846

For now, you can try this out by modifying https://github.com/commercialhaskell/stack/blob/master/src/Stack/Types/Build.hs#L607

@mgsloan mgsloan closed this as completed Mar 22, 2016
@mgsloan mgsloan added this to the Support milestone Mar 22, 2016
@borsboom borsboom removed this from the Support milestone Mar 22, 2016
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

No branches or pull requests

3 participants