-
Notifications
You must be signed in to change notification settings - Fork 696
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
Added cxx-options
and cxx-sources
build info fields for separate compilation of C and C++ source files.
#4810
Conversation
…nd correctly link to both.
It looks like the I'm not sure how to replicate the failure. I did the following:
@23Skidoo Is there a different way Travis/appveyor is invoking the test suite? |
Does the procedure described in https://github.com/haskell/cabal/tree/master/cabal-testsuite#how-to-run work for you? |
Also you can try just running |
@23Skidoo, the process described in https://github.com/haskell/cabal/tree/master/cabal-testsuite#how-to-run isn't working for me. I'm having issues with the instruction "Step 1: Build I tried:
I tried:
I tried:
So I'm not sure how to replicate the defect. I can keep changing things I suspect are the issue and pushing changes until Travis & AppVeyor confirm that I fixed the defect. I'm optimistic that my last commit may have fixed it. |
@23Skidoo, @ezyang I think AppVeyor failed with no fault from my pull request. It says it can't install |
Restarted the AppVeyor build. |
@23Skidoo, @ezyang, @phadej is there a place in the cabal repository that provides a detailed description of each field that can be specified in a |
I have tried to compile an executable that imports a library using Cxx-Sources.
The trick for me so far was to use the g++ linker:
But others may want a different C++ linker. |
When compiling the C++ sources I get a warning about an inappropriate
It seems to be a problem of how GHC calls gcc. At least, Cabal does not mention the |
The "right way" to link to
(This is generally better since Cabal expects to list libraries for GHC in certain situations, like using the linker and/or GHCi) |
Extra-libraries works for me on Linux. I have heard, though, that Extra-libs alone fails on MacOS X. Can someone check? |
I can give https://github.com/recursion-ninja/tcm-memo a test on macOS tomorrow, lest I forget. But that one uses stdc++ in the extra-libs as well. |
If it fails, maybe we can fix it ;-) |
@angerman, I tested the @thoughtpolice, the build info field @amigalemming, Hopefully the |
Apart from
this built with Seems to work as well:
|
@angerman The |
@angerman Thanks for pointing out the fragile build error. I have added a proper lower version bound to the @amigalemming Glad to hear that the |
This is currently broken with: /usr/include/c++/5/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options. I thought this was fixed by haskell/cabal#4810 (which is in Cabal 2.2), but it might be broken because this: haskell/cabal#5315 (which is in is in Cabal 2.4, which isn't yet in LTS).
Added
cxx-options
andcxx-sources
build info fields for separate compilation of C an C++ source files. This resolves issue #3700. If my memory is correct there were some related issues that this should solve incabal
and also instack
. I'll spend a bit of time trying to hunt the issues down and reference them here.I tested the functionality against the following package:
Here's the requisite checklist:
[ci skip]
is used to avoid triggering the build bots.I think I probably need to update the documentation somewhere, but I'm not sure where it's located or how to go about that. Would appreciate a bit of help @ezyang.