Skip to content
Snippets Groups Projects
Commit 902ee7c8 authored by Eric Müller's avatar Eric Müller :mountain_bicyclist:
Browse files

Avoid LD_LIBRARY_PATH in pynn-brainscales&hxtorch

We encountered build fails on some HPC sites due to openssl mismatches
between bare-metal tools and spack — especially curl and similar tools
for fetching.
Our build tool, waf, needs to find spack-provided libraries, e.g.
libclang.so, at runtime… so we will only set the environment variable
for this.
parent c57b2425
No related branches found
No related tags found
3 merge requests!250update branch,!245create new experimental release,!243Avoid LD_LIBRARY_PATH in pynn-brainscales&hxtorch
......@@ -2,9 +2,10 @@
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os
from spack import *
from spack.pkg.builtin.boost import Boost
import os
class Hxtorch(WafPackage):
......@@ -128,7 +129,7 @@ class Hxtorch(WafPackage):
env.set('C_INCLUDE_PATH', ':'.join(include))
env.set('CPLUS_INCLUDE_PATH', ':'.join(include))
env.set('LIBRARY_PATH', ':'.join(library))
env.set('LD_LIBRARY_PATH', ':'.join(library))
env.set('WAF_CONFIGURE_LD_LIBRARY_PATH', ':'.join(library))
env.prepend_path('PATH', ':'.join(path))
def setup_run_environment(self, env):
......@@ -164,6 +165,8 @@ class Hxtorch(WafPackage):
args = ['--prefix={0}'.format(self.prefix)]
args += self.configure_args()
env = os.environ
env['LD_LIBRARY_PATH'] = env.get('WAF_CONFIGURE_LD_LIBRARY_PATH')
self.waf('configure', '--build-profile=release', *args)
def build_args(self):
......
......@@ -2,6 +2,8 @@
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os
from spack import *
from spack.pkg.builtin.boost import Boost
......@@ -94,7 +96,7 @@ class PynnBrainscales(WafPackage):
env.set('C_INCLUDE_PATH', ':'.join(include))
env.set('CPLUS_INCLUDE_PATH', ':'.join(include))
env.set('LIBRARY_PATH', ':'.join(library))
env.set('LD_LIBRARY_PATH', ':'.join(library))
env.set('WAF_CONFIGURE_LD_LIBRARY_PATH', ':'.join(library))
env.prepend_path('PATH', ':'.join(path))
def setup_run_environment(self, env):
......@@ -130,6 +132,8 @@ class PynnBrainscales(WafPackage):
args = ['--prefix={0}'.format(self.prefix)]
args += self.configure_args()
env = os.environ
env['LD_LIBRARY_PATH'] = env.get('WAF_CONFIGURE_LD_LIBRARY_PATH')
self.waf('configure', '--build-profile=release', *args)
def build_args(self):
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment