Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug with Intel compilers -- Meson 1.5.0 #13401

Closed
amontoison opened this issue Jul 10, 2024 · 4 comments · Fixed by #13455
Closed

Bug with Intel compilers -- Meson 1.5.0 #13401

amontoison opened this issue Jul 10, 2024 · 4 comments · Fixed by #13455
Milestone

Comments

@amontoison
Copy link

amontoison commented Jul 10, 2024

I have the following error when I try to compile the package GALAHAD with Intel compilers:

  File "/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/mesonbuild/mesonmain.py", line 188, in run
    return options.run_func(options)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/mesonbuild/msetup.py", line 364, in run
    app.generate()
  File "/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/mesonbuild/msetup.py", line 187, in generate
    return self._generate(env, capture, vslite_ctx)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/mesonbuild/msetup.py", line 252, in _generate
    captured_compile_args = intr.backend.generate(capture, vslite_ctx)
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/mesonbuild/backend/ninjabackend.py", line 648, in generate
    self.generate_target(t)
  File "/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/mesonbuild/backend/ninjabackend.py", line 1048, in generate_target
    o, s = self.generate_single_compile(target, src, False, [],
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/mesonbuild/backend/ninjabackend.py", line 2974, in generate_single_compile
    commands += self._generate_single_compile_target_args(target, compiler)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/mesonbuild/backend/ninjabackend.py", line 2870, in _generate_single_compile_target_args
    commands = self.generate_basic_compiler_args(target, compiler)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/mesonbuild/backend/backends.py", line 1007, in generate_basic_compiler_args
    commands += compiler.get_option_compile_args(copt_proxy)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/mesonbuild/compilers/cpp.py", line 698, in get_option_compile_args
    args.append('-std=' + remap_cpp03.get(std.value, std))
                                          ^^^^^^^^^
AttributeError: 'str' object has no attribute 'value'
The Meson build system
Version: 1.5.0
Source dir: /home/runner/work/GALAHAD/GALAHAD
Build dir: /home/runner/work/GALAHAD/GALAHAD/builddir
Build type: native build
Project name: GALAHAD
Project version: 5.0.0
Fortran compiler for the host machine: ifort (intel 2021.10.0 "ifort (IFORT) 2021.10.0 20230609")
Fortran linker for the host machine: ifort ld.bfd 2.38
C compiler for the host machine: icc (intel 2021.10.0 "icc (ICC) 2021.10.0 20230609")
C linker for the host machine: icc ld.bfd 2.38
C++ compiler for the host machine: icpc (intel 2021.10.0 "icpc (ICC) 2021.10.0 20230609")
C++ linker for the host machine: icpc ld.bfd 2.38
Host machine cpu family: x86_64
Host machine cpu: x86_64
Program ifort found: YES (/opt/intel/oneapi/compiler/2023.2.0/linux/bin/intel64/ifort)
Program python3 found: YES (/opt/hostedtoolcache/Python/3.12.4/x64/bin/python)
Library  found: NO
Library  found: NO
Library hsl_subset found: YES
Library cutest_single found: YES
Library cutest_double found: YES
Library wsmp found: NO
Library pardiso found: NO
Library spmf found: NO
Library pastixf found: NO
Library smumps found: NO
Library dmumps found: NO
Library ampl found: NO
Library hwloc found: NO
Library m found: YES
mpiifort found: NO
Run-time dependency MPI for fortran found: NO (tried config-tool and system)
Has header "hwloc.h" : NO 
src/lapack/meson.build:4: WARNING: building our own BLAS v3.9.1; consider providing an optimized BLAS library
src/lapack/meson.build:9: WARNING: building our own LAPACK v3.9.1; consider providing an optimized LAPACK library
Found pkg-config: YES (/bin/pkg-config) 1.8.0
Run-time dependency python found: YES 3.12
Build targets in project: 783

GALAHAD 5.0.0

  User defined options
    buildtype               : debug
    default_library         : shared
    prefix                  : /home/runner/work/GALAHAD/GALAHAD/galahad
    c_link_args             : 
    c_std                   : c99
    cpp_std                 : c++11
    fortran_link_args       : 
    examples                : true
    int64                   : false
    libblas                 : 
    libblas_path            : /home/runner/work/GALAHAD/GALAHAD/../deps/lib
    libcutest_double        : cutest_double
    libcutest_double_modules: ../CUTEst/modules
    libcutest_double_path   : /home/runner/work/GALAHAD/GALAHAD/../CUTEst/lib
    libcutest_single        : cutest_single
    libcutest_single_modules: ../CUTEst/modules
    libcutest_single_path   : /home/runner/work/GALAHAD/GALAHAD/../CUTEst/lib
    libdmumps               : dmumps
    libhsl                  : hsl_subset
    libhsl_modules          : ../deps/modules
    libhsl_path             : /home/runner/work/GALAHAD/GALAHAD/../deps/lib
    liblapack               : 
    liblapack_path          : /home/runner/work/GALAHAD/GALAHAD/../deps/lib
    libmumps_path           : /home/runner/work/GALAHAD/GALAHAD/../deps/lib
    libsmumps               : smumps
    pythoniface             : true
    ssids                   : false
    tests                   : true

Found ninja-1.11.1.git.kitware.jobserver-1 at /opt/hostedtoolcache/Python/3.12.4/x64/bin/ninja

ERROR: Unhandled python exception

    This is a Meson bug and should be reported!

system parameters

  • Plain native build
  • windows-latest and ubuntu-latest of GitHub Actions.
  • Python 3.12.0
  • Meson 1.5.0
@amontoison amontoison changed the title Bug with Meson 1.5.0 Bug with Intel compilers -- Meson 1.5.0 Jul 10, 2024
@thesamesam
Copy link
Collaborator

Did older versions work? I have a feeling they did.

@thesamesam thesamesam added this to the 1.5.1 milestone Jul 12, 2024
@dcbaker
Copy link
Member

dcbaker commented Jul 12, 2024

I suspect this got broken in the option refactoring work that's been going on

@amontoison
Copy link
Author

amontoison commented Jul 12, 2024

Yes, it worked with previous versions of Meson.
We observed this bug with CI because we install it using pip install meson and it downloads the most recent version.

eli-schwartz added a commit to eli-schwartz/meson that referenced this issue Jul 21, 2024
Fallout from the OptionStore refactor, and specifically commit
9a6fcd4. The `std` object was migrated
from having an option itself, to having the value fetched and saved
directly. In most cases, this also meant avoiding `.value`, but in a
couple cases this refactor went overlooked, and crashed at runtime.

Only affects Elbrus and Intel C++ compilers, seemingly.

Fixes mesonbuild#13401
@eli-schwartz
Copy link
Member

Can you try the PR I just posted?

eli-schwartz added a commit to eli-schwartz/meson that referenced this issue Jul 21, 2024
Fallout from the OptionStore refactor, and specifically commit
9a6fcd4. The `std` object was migrated
from having an option itself, to having the value fetched and saved
directly. In most cases, this also meant avoiding `.value`, but in a
couple cases this refactor went overlooked, and crashed at runtime.

Only affects Elbrus and Intel C++ compilers, seemingly.

Fixes mesonbuild#13401
jpakkane pushed a commit that referenced this issue Jul 21, 2024
Fallout from the OptionStore refactor, and specifically commit
9a6fcd4. The `std` object was migrated
from having an option itself, to having the value fetched and saved
directly. In most cases, this also meant avoiding `.value`, but in a
couple cases this refactor went overlooked, and crashed at runtime.

Only affects Elbrus and Intel C++ compilers, seemingly.

Fixes #13401
eli-schwartz added a commit that referenced this issue Jul 25, 2024
Fallout from the OptionStore refactor, and specifically commit
9a6fcd4. The `std` object was migrated
from having an option itself, to having the value fetched and saved
directly. In most cases, this also meant avoiding `.value`, but in a
couple cases this refactor went overlooked, and crashed at runtime.

Only affects Elbrus and Intel C++ compilers, seemingly.

Fixes #13401

(cherry picked from commit bc56a2c)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants