-
-
Notifications
You must be signed in to change notification settings - Fork 280
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
FAQ: document additional tools required for C/C++ development #2374
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for conda-forge-previews ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
pre-commit.ci autofix |
for more information, see https://pre-commit.ci
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Like the PR idea overall 👍. Just my views here.
docs/user/faq.md
Outdated
Depending on the specific tools that you use for building C/C++ code, you may need some additional tools, for example: | ||
|
||
``` | ||
compilers cmake pkg-config make ninja meson |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
compilers cmake pkg-config make ninja meson | |
c-compiler cxx-compiler pkg-config cmake make ninja |
While I appreciate that using compilers
is a one-stop way to ensure both c-compiler
and cxx-compiler
get added, it feels a bit strange to also suggest that people just install fortran-compiler
even if they may have no need for it. Similarly it seems strange to suggest installing meson
as well.
My views here are all conditioned on a research field that is a bit more conservative about pulling in additional dependencies that are not strictly required, and that I like people to generally understand why they have most of (not going to say all) of the dependencies installed that they do. At the same time, I'm being slightly inconsistent by not complaining about ninja
, but ninja
is awesome and when it can get automatically used that's even better.
So my suggestion here is more along the lines of sticking to the
C/C++ code
part of your additions.
Alternatively/Additionally, I'd suggest mentioning what each of these dependencies brings / why you'd want to install them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree on not installing a fortran compiler, applied your suggestions on 85dbd59 . As a personal opinion, I think that instead is fruitful to have meson
here, as there are huge communities in C/C++ world that consistently use meson
(gnome, mesa, c/c++ bits of numpy&scipy), but let's what is the consensus around this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll defer to you and other reviewers here. I come from a field where in terms of build systems CMake is considered the "new" way of doing things and we're slowly clawing our way out of autotools
+ custom stuff. I only learned that meson
even existed when SciPy started their transition to it as their build system.
Co-authored-by: Matthew Feickert <[email protected]>
@@ -94,6 +94,12 @@ x86_64-apple-darwin13.4.0-clang: No such file or directory | |||
|
|||
are a telltale sign that you are lacking compilers. | |||
|
|||
Depending on the specific tools that you use for building C/C++ code, you may need some additional tools, for example: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Depending on the specific tools that you use for building C/C++ code, you may need some additional tools, for example: | |
The actual orchestration of the various compilation and linking steps is almost always done | |
by some build orchestrator (e.g. `CMake`, `meson`, ...), which will generally require a | |
build system (e.g. `ninja`, `make`), or possibly other supporting tools like `pkg-config`. | |
We package several tools that can be used for building C/C++ code; a selection that covers | |
the most common scenarios would be: |
PR Checklist:
docs/
orcommunity/
, you have added it to the sidebar in the corresponding_sidebar.json
fileWhenever I suggest users to use conda-forge for C/C++ development, I almost always suggest them to install the packages:
while this list is quite an arbitrary choice (for example, most Windows users do not actually need make, and typically only one of cmake or meson is used) I found it useful to have a simple list of packages that users need to install, without having to think too much about it, so I thought it would be useful to have it in the main conda-forge docs.
I think this is particularly useful as sometimes the reason of why you need all this packages are really far from intuitive or obvious. Some examples:
compilers
instead ofcxx-compiler
: A user wants to develop a C++ library with CMake, so intuitively it just installscxx-compiler
andcmake
packages. If it does that, CMake may fail complaining that a C compiler is not found, as CMake always look for a C compiler unlessLANGUAGES CXX
is not explicitly passed to theproject
command invocation. And even if a user setsLANGUAGES CXX
in its root CMakeLists.txt, C language support could still be used in aFind<pkg>
script or in a dependency included (even transitively) viaFetchContent
, so it is difficult to anticipate whenc-compiler
is also require, and when not.cmake pkg-config
instead ofcmake
: manyFind<pkg>.cmake
scripts, either provided by CMake or in third party projects, rely on pkg-config being available for finding projects that install.pc
files. Not havingpkg-config
may result in enigmaticfind_package(...)
failures, especially for not experienced users.I sometimes wonder if it could make sense to a
build-essential
meta-package similar to the similar package available in Debian, but I guess that would be a longer discussion, as a first step just adding some details in the docs seemed the easiest thing to do.I opened this PR just encountered users on Twitter confused by how to do C/C++ dev with conda-forge (see https://x.com/sitraversaro/status/1858085950078746697), and I realized it could be convenient to have this info in conda-forge docs.