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

pixi shell not re-activating after an add is executed #326

Closed
2 tasks done
HaoZeke opened this issue Sep 6, 2023 · 3 comments · Fixed by #982
Closed
2 tasks done

pixi shell not re-activating after an add is executed #326

HaoZeke opened this issue Sep 6, 2023 · 3 comments · Fixed by #982
Labels
✨ enhancement Feature request

Comments

@HaoZeke
Copy link
Contributor

HaoZeke commented Sep 6, 2023

Checks

  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest version of pixi, using pixi --version.

Reproducible example

pixi init
pixi shell
pixi add eigen pkg-config
pkg-config --cflags eigen3
Package eigen3 was not found in the pkg-config search path.
Perhaps you should add the directory containing `eigen3.pc'
to the PKG_CONFIG_PATH environment variable
No package 'eigen3' found

This should work. Since it doesn't meson also doesn't pick up pixi installed eigen.

Issue description

To get it to work one must manually set PKG_CONFIG_PATH:

pixi shell
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$CONDA_PREFIX/share/pkgconfig
pkg-config --cflags eigen3
-I/home/<redacted>/.pixi/env/include/eigen3

Expected behavior

PKG_CONFIG_PATH should be set by pixi when pkg-config is part of the environment. That is:

pixi init
pixi shell
pixi add pkg-config eigen
pkg-config --cflags eigen3
-I/home/<redacted>/.pixi/env/include/eigen3
@HaoZeke HaoZeke added the 🐞 bug Something isn't working label Sep 6, 2023
@baszalmstra
Copy link
Contributor

baszalmstra commented Sep 6, 2023

Does this only happen when using pixi? Or does this also happen when you use (micro)mamba/conda?

If this also happens for those programs than most likely the eigen package does not include this information. You would have to check the eigen feedstock.

@HaoZeke
Copy link
Contributor Author

HaoZeke commented Sep 6, 2023

Does this only happen when using pixi? Or does this also happen when you use (micro)mamba/conda?

If this also happens for those programs than most likely the eigen package does not include this information. You would have to check the eigen feedstock.

No it is just a pixi thing, micromamba works.

micromamba create -p $(pwd)/.tmp
micromamba activate -p $(pwd)/.tmp
micromamba install pkg-config eigen
pkg-config --cflags eigen3
-I/<redacted>/.tmp/include/eigen3

@wolfv
Copy link
Member

wolfv commented Sep 7, 2023

I think what happens is that the pixi shell is not re-activated after an installation happened. Maybe we should (in a pixi shell) install a hook so that a reactivation is triggered (we do that actually in micromamba).

@wolfv wolfv changed the title PKG_CONFIG_PATH not set pixi shell not re-activating after an add is executed Sep 7, 2023
@baszalmstra baszalmstra added ✨ enhancement Feature request and removed 🐞 bug Something isn't working labels Sep 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ enhancement Feature request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants