Skip to content

Fix issue preventing setup-env.sh to be sourced#38895

Merged
alalazo merged 1 commit intospack:developfrom
RMeli:fix-cray
Jul 14, 2023
Merged

Fix issue preventing setup-env.sh to be sourced#38895
alalazo merged 1 commit intospack:developfrom
RMeli:fix-cray

Conversation

@RMeli
Copy link
Copy Markdown
Member

@RMeli RMeli commented Jul 14, 2023

PR #38718 introduced an issue preventing to source setup-env.sh on Cray systems. This PR revert only one change, but since sed was used in #38718 there might be similar issues elsewhere.

#38718 (comment)


$ . spack-daint/share/spack/setup-env.sh
Traceback (most recent call last):
  File "/users/rmeli/spack-daint/lib/spack/llnl/util/lang.py", line 191, in _memoized_function
    return func.cache[key]
KeyError: ()

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/users/rmeli/spack-daint/bin/spack", line 52, in <module>
    sys.exit(main())
  File "/users/rmeli/spack-daint/lib/spack/spack_installable/main.py", line 35, in main
    import spack.main  # noqa: E402
  File "/users/rmeli/spack-daint/lib/spack/spack/main.py", line 34, in <module>
    import spack.cmd
  File "/users/rmeli/spack-daint/lib/spack/spack/cmd/__init__.py", line 21, in <module>
    import spack.environment as ev
  File "/users/rmeli/spack-daint/lib/spack/spack/environment/__init__.py", line 339, in <module>
    from .environment import (
  File "/users/rmeli/spack-daint/lib/spack/spack/environment/environment.py", line 42, in <module>
    import spack.user_environment as uenv
  File "/users/rmeli/spack-daint/lib/spack/spack/user_environment.py", line 8, in <module>
    import spack.build_environment
  File "/users/rmeli/spack-daint/lib/spack/spack/build_environment.py", line 52, in <module>
    import spack.build_systems.cmake
  File "/users/rmeli/spack-daint/lib/spack/spack/build_systems/cmake.py", line 18, in <module>
    import spack.package_base
  File "/users/rmeli/spack-daint/lib/spack/spack/package_base.py", line 56, in <module>
    from spack.filesystem_view import YamlFilesystemView
  File "/users/rmeli/spack-daint/lib/spack/spack/filesystem_view.py", line 36, in <module>
    import spack.relocate
  File "/users/rmeli/spack-daint/lib/spack/spack/relocate.py", line 30, in <module>
    is_macos = str(spack.platforms.real_host()) == "darwin"
  File "/users/rmeli/spack-daint/lib/spack/llnl/util/lang.py", line 193, in _memoized_function
    ret = func(*args, **kwargs)
  File "/users/rmeli/spack-daint/lib/spack/spack/platforms/_functions.py", line 26, in _host
    return platform_cls()
  File "/users/rmeli/spack-daint/lib/spack/spack/platforms/cray.py", line 84, in __init__
    back_distro = CrayBackend()
  File "/users/rmeli/spack-daint/lib/spack/spack/operating_systems/cray_backend.py", line 89, in __init__
    super().__init__(name, version)
TypeError: __init__() takes 1 positional argument but 3 were given

@spackbot-app spackbot-app bot added architecture core PR affects Spack core functionality labels Jul 14, 2023
@alalazo alalazo enabled auto-merge (squash) July 14, 2023 08:56
@alalazo alalazo added the bugfix Something wasn't working, here's a fix label Jul 14, 2023
@alalazo alalazo self-assigned this Jul 14, 2023
@alalazo alalazo merged commit 244dfb3 into spack:develop Jul 14, 2023
@RMeli RMeli deleted the fix-cray branch July 14, 2023 10:46
tbhaxor pushed a commit to tbhaxor/spack that referenced this pull request Jul 25, 2023
AlexanderRichert-NOAA pushed a commit to AlexanderRichert-NOAA/spack that referenced this pull request Aug 1, 2023
mpokorny pushed a commit to mpokorny/spack that referenced this pull request Sep 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

architecture bugfix Something wasn't working, here's a fix core PR affects Spack core functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants