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

ctng-compilers-activation-feedstock scripts shouldn't set HOST #151

Open
timsnyder opened this issue May 15, 2019 · 5 comments · May be fixed by #172
Open

ctng-compilers-activation-feedstock scripts shouldn't set HOST #151

timsnyder opened this issue May 15, 2019 · 5 comments · May be fixed by #172

Comments

@timsnyder
Copy link

@msarahan and @mingwandroid, we're starting to use the compilers built by you guys instead of using our own recipe. One really annoying thing that I've noticed is that activating an environment with your activate scripts sets HOST to the value of -dumpmachine. For anyone who works in a multihost environment and has '%m' in their PS1 prompt (at least in zsh), it changes the prompt to have the contents of -dumpmachine.

Is there a reason why you need to use HOST in the environment? Could you use some other variablename?

I guess BASH uses HOSTNAME for this instead, so maybe you guys haven't seen this?

@msarahan
Copy link
Contributor

More discussion at conda/conda#7031

I think we definitely regret that overlap. Unfortunately, it's now used in many recipes. It is not merely a matter of tweaking the compiler activation scripts. I'd like to change it, but we definitely can't undertake the recipe fixes right now.

@timsnyder
Copy link
Author

I definitely understand the cost of fixing something like this. Since I'm not concerned with being able to build your recipes (most of the time), I'll experiment with having an extra activation script that resets HOST back to hostname (or do it in the script all of my teammates use to activate the one conda environment they typically use).

Thanks for the pointer to conda/conda/#7031. Let us know if there's anything we can do to help fix this.

@mingwandroid
Copy link
Contributor

I personally think we could change it, just need to coordinate that with everyone and I think we probably should.

@kenahoo
Copy link

kenahoo commented May 28, 2019

A good start would be to define the new variables, so people can start switching over their recipes as soon as possible as part of a deprecation period for HOST.

@timsnyder
Copy link
Author

timsnyder commented Aug 5, 2019

Sooo. Trying to build strace, I realized how your recipes are using HOST and BUILD to hold the values that you have to pass through to configure --host=$HOST --build=$BUILD in order for autoconf to understand the pseudo-cross nature of the toolchains.

At one point during the early days of conda-build 3, you guys had variables that were set only when CONDA_BUILD was set in the environment. It looks like you've moved away from that and you're setting rpath all the time now (which is what I wanted, thanks).

I was confused. Looking at the gcc activation script instead of binutils, I see what I remembered and we are setting CFLAGS and LDFLAGS differently for CONDA_BUILD.

Could we:

  1. Define the new variables.
  2. Guard the setting of HOST with something like [[ "$CONDA_TOOLCHAIN_SET_HOST" = 1 || "$CONDA_BUILD" = 1 ]]

Having the CONDA_TOOLCHAIN_SET_HOST variable would let any users that have come to depend on this behavior outside of conda-build keep getting the behavior and conda-build could still have the behavior until everyone's recipes are cleaned up.

Also, I've had users ask that we have the behavior of CONDA_BUILD in the gcc activation scripts (i.e. that we have the conda include path and rpath by default. I could get that by setting CONDA_BUILD in our environment but I'd rather have a CONDA_TOOLCHAIN_USE_CONDA_INCLUDE_AND_RPATH variable that targets that specific behavior.

timsnyder added a commit to timsnyder/aggregate that referenced this issue Sep 14, 2019
Define new CONDA_TOOLCHAIN_HOST variable that is set the
way HOST was previously set.

HOST is now set only when CONDA_BUILD or CONDA_ACTIVATION_SET_HOST
is set to 1

fixes AnacondaRecipes#151
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

Successfully merging a pull request may close this issue.

4 participants