Skip to content

AttributeError: 'Target' object has no attribute 'lower' #12931

@paulbry

Description

@paulbry

When installing llvm I've run into a Spack error AttributeError: 'Target' object has no attribute 'lower'. There are a few other packages that also use Target.lower() but I haven't tried installing those yet.

Steps to reproduce the issue

$ spack install llvm
...

Error Message

==> Building llvm [CMakePackage]
==> Executing phase: 'cmake'
==> Error: AttributeError: 'Target' object has no attribute 'lower'

/var/tmp/spack/var/spack/repos/builtin/packages/llvm/package.py:686, in cmake_args:
        683                # hence the test to see if the version starts with "flang".
        684                targets.append('CppBackend')
        685
  >>    686            if 'x86' in spec.architecture.target.lower():
        687                targets.append('X86')
        688            elif 'arm' in spec.architecture.target.lower():
        689                targets.append('ARM')

Information on your system

Only tried a single system at this moment:

$ git rev-parse HEAD
6cd5edacca8e4cacbcaf104b3c241097fc83568f
$ uname -a
Linux p901 4.14.0-115.8.1.el7a.ppc64le #1 SMP Wed Jun 5 15:02:21 UTC 2019 ppc64le ppc64le ppc64le GNU/Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions