Skip to content

Add dtrace variant to glib (RH7)#6968

Closed
luigi-calori wants to merge 1 commit intospack:developfrom
RemoteConnectionManager:pr/fix/glib_dtrace_pythonhome
Closed

Add dtrace variant to glib (RH7)#6968
luigi-calori wants to merge 1 commit intospack:developfrom
RemoteConnectionManager:pr/fix/glib_dtrace_pythonhome

Conversation

@luigi-calori
Copy link
Copy Markdown
Contributor

fix issue #6965 building glib on a system with dtrace installed (RH7)
The issue seem related to PYTHONHOME env var set on python dependent packages that
( on RH7 ) seem to prevent usage of system python scripts that, like dtrace are installed with sbang to
system python
It is a kind of workaround, would probably be better to provide a spack installation of dtrace

@nazavode
Copy link
Copy Markdown
Contributor

@luigi-calori tried this PR and it seems to work as expected, a simple sync with upstream is all you need to trigger Travis to run again (it was broken at the time of this PR).

@alalazo
Copy link
Copy Markdown
Member

alalazo commented Feb 1, 2018

Can anybody check if this is also solved by #7157 ?

version('2.42.1', '89c4119e50e767d3532158605ee9121a')

variant('libmount', default=False, description='Build with libmount support')
variant('dtrace', default=True, description='Build with dtrace support')
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since glib+dtrace will fail if dtrace is present on the system, I think this should be disabled by default and enabled only when really needed. @alalazo @luigi-calori any thoughts?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have no idea of what dtrace is used for.
I have tried to stick as much as possible with previous behavior.
As it seems that dtrace is on by default, in glib, I set the default variant accordingly.
I' m currently trying to see if #7157 can be a substitute of this PR

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I can see dtrace starts with:

#!/usr/bin/python
# vim: et sta sts=4 sw=4 ts=8
...

At install time, if dtrace is present, we could put in path a "fake" dtrace that does:

#!/usr/env bash
python /usr/bin/dtrace

so that the python used is consistent with what is in PYTHONHOME. Otherwise I think #7157 can't do much for a script that hardcodes which interpreter to use.

Copy link
Copy Markdown
Contributor

@nazavode nazavode Feb 1, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@luigi-calori I generally agree with this:

I have tried to stick as much as possible with previous behavior.

...but in this case, default means broken by deafult :)

@alalazo Just like @luigi-calori I have no idea about what does dtrace support mean in glib. We can try this dtrace monkeypatching or leave it disabled (with some warning when +dtrace maybe), no preference at this point.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can confirm that , unfortunately, #7157 does not fix #6965
In this PR I have undefined PYTHONHOME var ( hopefully only at build time) as
build_env.unset('PYTHONHOME')
It seems that is this setting that harm any system python script that explicitly point to system python.
Could it make sense?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that the problem of setting PYTHONHOME to spack installed python ( happens when depending on python) can affect any package that rely on any python script that point
explicitly to system python
I have no idea why this variable is used but, in this particular case, where a build rely on a system provided python script, it seem to fix the issue.
It could happen with another script apart from dtrace, so disabling d

@luigi-calori luigi-calori force-pushed the pr/fix/glib_dtrace_pythonhome branch from 16926de to c3341e1 Compare March 5, 2018 11:30
alalazo added a commit to epfl-scitas/spack that referenced this pull request Mar 15, 2018
alalazo added a commit to epfl-scitas/spack that referenced this pull request Mar 15, 2018
alalazo added a commit to epfl-scitas/spack that referenced this pull request Mar 15, 2018
alalazo added a commit that referenced this pull request Mar 19, 2018
ch741 pushed a commit to ch741/spack that referenced this pull request Apr 20, 2018
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 this pull request may close these issues.

4 participants