However, when LDFLAGS is not empty, for instance, run LDFLAGS="-L/path/to/foo" conda-build /path/to/example/recipe, the output is
LDFLAGS=-Lpath/to/foo
I am not sure if this is a bug or not but the result of building a conda recipe from an environment that defines LDFLAGS will be different from the result of the build the recipe where LDFLAGS is not defined. And it's not obvious to figure it out when there are some build issues because of this.
Possible options to resolve this issue:
When LDFLAGS is defined, conda-build should prepend its flags to LDFLAGS.
When LDFLAGS is defined, conda-build should warn that it will use LDFLAGS as it is without adding its flags to LDFLAGS.
When LDFLAGS is defined, raise an exception.
When LDFLAGS is defined, issue a warning that LDFLAGS in an environment will be ignored.
All the above applies also for environment variables CFLAGS, CXXFLAGS, etc.
Issue:
Consider an example conda recipe with the following
build.sh
script:When running
LDFLAGS= conda-build /path/to/example/recipe
, the output will beHowever, when
LDFLAGS
is not empty, for instance, runLDFLAGS="-L/path/to/foo" conda-build /path/to/example/recipe
, the output isI am not sure if this is a bug or not but the result of building a conda recipe from an environment that defines
LDFLAGS
will be different from the result of the build the recipe whereLDFLAGS
is not defined. And it's not obvious to figure it out when there are some build issues because of this.Possible options to resolve this issue:
LDFLAGS
is defined, conda-build should prepend its flags toLDFLAGS
.LDFLAGS
is defined, conda-build should warn that it will useLDFLAGS
as it is without adding its flags toLDFLAGS
.LDFLAGS
is defined, raise an exception.LDFLAGS
is defined, issue a warning thatLDFLAGS
in an environment will be ignored.All the above applies also for environment variables
CFLAGS
,CXXFLAGS
, etc.