Skip to content

Cleaning the environment breaks on some systems.#813

Closed
citibeth wants to merge 1 commit intospack:developfrom
citibeth:160420-StopCleaningEnvironment
Closed

Cleaning the environment breaks on some systems.#813
citibeth wants to merge 1 commit intospack:developfrom
citibeth:160420-StopCleaningEnvironment

Conversation

@citibeth
Copy link
Copy Markdown
Member

Clearing LD_LIBRARY_PATH seemed like a good idea at the time. BUT... some systems require it. The backstory:

I'm working on a supercomputer where they've provided a bunch of packages, including GCC. "module load gcc" sets LD_LIBRARY_PATH, and the compiler doesn't work without it. I need to use the compiler provided by the module in question, since I don't have a big enough quota to have Spack build GCC for me. Therefore... in order to get Spack to work, I have to do "module load gcc" in my environment, and then make sure that Spack does NOT muck with LD_LIBRARY_PATH. Yes, LD_LIBRARY_PATH is evil, but I have to make a deal with the devil here.

It's true that Spack can be polluted by stuff in the user's environment. But just deleting it can cause problems too. I think we should either:
a) Advise users to be careful of what's in their env when they build with Spack
b) Create .spack/environment.yaml, where we can set up the environment that will be used by Spack. Or some other similar mechanism.

@tgamblin tgamblin closed this Apr 20, 2016
@tgamblin
Copy link
Copy Markdown
Member

We have support upcoming for module-loaded compilers -- it's in #561 which is getting merged real soon now™. I have also thought about grabbing a minimal set of LD_LIBRARY_PATHs when the compiler is added, and setting them (like the module support would) in the cc wrapper.

That said, I think it would be ok if you want to add this as an option, because we don't have a workaround for it right now. I am not a fan of this because, essentially, it means I have to do this:

module load gcc/4.9.3
spack install foo%[email protected]

But this is probably an error and may explode in even weirder ways:

module load gcc/4.9.3
spack install foo%[email protected]

So I don't want the default to be not clearing LD_LIBRARY_PATH -- there are too many horrible things that could go wrong. An option seems like a good stopgap though... seem reasonable?

e.g.:

spack install --dirty foo

@citibeth
Copy link
Copy Markdown
Member Author

We have support upcoming for module-loaded compilers -- it's in #561
#561 which is getting merged real
soon now™. I have also thought about grabbing a minimal set of
LD_LIBRARY_PATHs when the compiler is added, and setting them (like the
module support would) in the cc wrapper.

Wow, that's a monster of a PR. I'll wait till it comes through, and verify
that it solves my problem.

That said, I think it would be ok if you want to add this as an option,
because we don't have a workaround for it right now. I am not a fan of this
because, essentially, it means I have to do this:

module load gcc/4.9.3
spack install foo%[email protected]

But this is probably an error and may explode in even weirder ways:

module load gcc/4.9.3
spack install foo%[email protected]

So I don't want the default to be not clearing LD_LIBRARY_PATH -- there
are too many horrible things that could go wrong. An option seems like a
good stopgap though... seem reasonable?

The stopgap is I commented out three lines and now things work for me at
this time. That leaves me essentially in the state you describe above.

Clearly, depending on modules to load compilers without support for that
will prevent more than one compiler from being used. But most (some) of us
only really care about building with one compiler anyway.

-- Elizabeth

olupton pushed a commit to olupton/spack that referenced this pull request Feb 7, 2022
* SONATA reports integration with CoreNeuron and Neurodamus
* Created new package libsonatareports
* Using latest coreneuron
* Prepare for release of sonata reports in neurodamus-core
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.

2 participants