-
-
Notifications
You must be signed in to change notification settings - Fork 43
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
include_directories
is ignored in conda environment
#106
Comments
I encountered this issue too. I think it is the cmake binary itself that is causing the problem. I can compile/install as I expect for a range of versions of cmake but for a conda distributed cmake binaries I can trigger this failure for header include directories. This error occurs inside and outside of the conda build environment. More specifically I observe this for cmake version 3.14.0 on the default channel and for the conda-forge channel 3.13.4 >= broken < 3.17.0. Currently fixes include:
It looks like you can't set the channel within the yaml file but you can build with something along the lines of EDIT: I do not know the intended behavior so calling it "broken" may be a misnomer |
Install fails with certain cmake versions: conda-forge/cmake-feedstock#106
I think that this issue is similar to #129, but related to implicit include directories. If I print
But if I try to check the actual default include directories of the compiler, I get:
This means that any call to |
Is this still an issue? |
Yes, I think I've just ran into the same problem in a personal project and googling a bit (I didn't test the example though). |
@ntorresalberto do you have a minimal reproducer that you can share? 🙂 |
I apologize for the delay and for the bad info. |
I found a similar behavior with cmake 3.20 in a conda environment. On my makefile I had
and I was getting a "boost/program_options.hpp" not found even after a |
I had the same error as @willian-m using cmake 2.24 in a conda environment: Boost wasn't found despite doing
A simple
solved it for me. Apparantly cmake checks if the include directory exists in |
Going to close this issue. Please open a new one with the required information and a minimal reproducer. |
You have a reproducible example in my original post, no? |
@Midnighter, would you be able to give a minimal reproducer instead of the complex reproducer you have here? |
I'll try. Plenty of other things on my plate now so it will take me a bit. |
Still same issue here with cmake 3.24.1. |
Issue:
I'm trying to build a Python package that uses cmake, pybind11, GLPK, and SUNDIALS. Within the linked repository you can see that I can build a ubuntu based Docker image just fine. However, when I try to do the same within a conda environment compilation fails because the include directories are not added correctly to the compilation commands.
Steps to reproduce:
I have created an isolated conda environment with:
which uses
.condarc
and
environment.yml
Once you run the Docker image, activate the environment with
conda activate /home/dunamis/.dfba
, then download the packagecurl -O https://gitlab.com/davidtourigny/dynamic-fba/-/archive/master/dynamic-fba-master.tar.gz
. Extract the source and check compiler arguments:You should see that only
-I/home/dunamis/.dfba/include/python3.7m
is in the compiler arguments. If you edit theCMakeLists.txt
file and change theinclude_directories
command toadd_compile_options("-I${GLPK_INCLUDE_DIR}")
this is added and the package compiles correctly.Do you have any idea what could cause these different behaviours?
Environment (
conda list
):Details about
conda
and system (conda info
):The text was updated successfully, but these errors were encountered: