fixing target conversion to string#12914
Conversation
alalazo
left a comment
There was a problem hiding this comment.
LGTM if the check are changed in the form:
if spec.target.family == 'x86_64':
....|
Ok I changed according to the above comments. |
alalazo
left a comment
There was a problem hiding this comment.
Using the == operator is needed to check that a microarchitecture is equal to another. The __contains__ semantic is instead of looking for features in the given microarchitecture. See the suggestions given in the first reviews.
Co-Authored-By: Massimiliano Culpo <[email protected]>
Co-Authored-By: Massimiliano Culpo <[email protected]>
Co-Authored-By: Massimiliano Culpo <[email protected]>
Co-Authored-By: Massimiliano Culpo <[email protected]>
Co-Authored-By: Massimiliano Culpo <[email protected]>
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
The required changes have been implemented
Since spack#3206, 'spec.architecture.target' returned the microarchitecture target rather than the architecture family. This causes QT 4 to fail to build because it's expecting something like 'x86_64' rather than 'broadwell'. See spack#12914 Erorr message: ``` ==> [2019-09-26-09:37:33.834286] './configure' '-prefix' '/rnsdhpc/code/spack/opt/spack/clang/qt/aguusfi' '-v' '-opensource' '-no-opengl' '-release' '-confirm-license' '-optimized-qmake' '-no-pch' '-no-freetype' '-no-openssl' '-no-sql-db2' '-no-sql-ibase' '-no-sql-oci' '-no-sql-tds' '-no-sql-mysql' '-no-sql-odbc' '-no-sql-psql' '-no-sql-sqlite' '-no-sql-sqlite2' '-shared' '-no-openvg' '-no-nis' '-nomake' 'examples' '-nomake' 'tools' '-no-dbus' '-no-framework' '-fast' '-no-declarative-debug' '-no-gtkstyle' '-no-webkit' '-no-phonon' '-arch' 'broadwell' '-nomake' 'demos' '-cocoa' '-platform' 'unsupported/macx-clang-libc++' '-sdk' '/var/folders/gy/mrg1ffts2h945qj9k29s1l1dvvmbqb/T/s3j/spack-stage/xcode-select/clang/10.0.1-apple/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk' Determining system architecture... (Darwin:18.7.0:x86_64) 'macosx' is supported System architecture: 'macosx' Unknown architecture: "broadwell". Supported architectures: x86[i386] ppc x86_64 ppc64 arm armv6 armv7 ```
Since spack#3206, 'spec.architecture.target' returned the microarchitecture target rather than the architecture family. This causes QT 4 to fail to build because it's expecting something like 'x86_64' rather than 'broadwell'. See spack#12914 Erorr message: ``` ==> [2019-09-26-09:37:33.834286] './configure' '-prefix' '/rnsdhpc/code/spack/opt/spack/clang/qt/aguusfi' '-v' '-opensource' '-no-opengl' '-release' '-confirm-license' '-optimized-qmake' '-no-pch' '-no-freetype' '-no-openssl' '-no-sql-db2' '-no-sql-ibase' '-no-sql-oci' '-no-sql-tds' '-no-sql-mysql' '-no-sql-odbc' '-no-sql-psql' '-no-sql-sqlite' '-no-sql-sqlite2' '-shared' '-no-openvg' '-no-nis' '-nomake' 'examples' '-nomake' 'tools' '-no-dbus' '-no-framework' '-fast' '-no-declarative-debug' '-no-gtkstyle' '-no-webkit' '-no-phonon' '-arch' 'broadwell' '-nomake' 'demos' '-cocoa' '-platform' 'unsupported/macx-clang-libc++' '-sdk' '/var/folders/gy/mrg1ffts2h945qj9k29s1l1dvvmbqb/T/s3j/spack-stage/xcode-select/clang/10.0.1-apple/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk' Determining system architecture... (Darwin:18.7.0:x86_64) 'macosx' is supported System architecture: 'macosx' Unknown architecture: "broadwell". Supported architectures: x86[i386] ppc x86_64 ppc64 arm armv6 armv7 ```
|
Edit: for the record, the side-effect issue reported below will be addressed by #12958 Since this merge, when trying to install mesa, I'm now seeing: Here's the traceback: Here's the spec: |
|
@odoublewen Working on a fix right now. |
|
FYI: mesa install error is resolved for me. |
* llvm: fixed issues with syntax and formatting * use spec.architecture.target.family * use spec.target instead of spec.architecture.target * mesa: use == instead of __contains__
* llvm: fixed issues with syntax and formatting * use spec.architecture.target.family * use spec.target instead of spec.architecture.target * mesa: use == instead of __contains__
Fixes #12931.
I suppose the recent introduction of a Target object broke a number of packages that assumed
spec.architecture.targetto be a string. Here is a fix for the llvm and mesa packages.