Skip to content

Issues building numpy 2.1.1 with classic Intel compilers #27492

@AgilentGCMS

Description

@AgilentGCMS

Describe the issue:

I am trying to compile numpy 2.1.1 from source on a platform with intel ifort/icc/icpc compilers, i.e., not the newer oneapi icx/ifx/icpx compilers. I know this is no longer supported by intel, but I've compiled previous versions of numpy with the older intel compilers before, so I thought I would give it a try. However, the compilation barfs as below. I am pasting a few instances of the error, which occurs on multiple source files. If it's true that numpy 2.1.1 can no longer be compiled with ifort/icc/icpc, then what is the last version of numpy that could be compiled with those?

Reproduce the code example:

CC=icc CXX=icpc FC=ifort F77=ifort CFLAGS='-xHost -fPIC -fp-model=strict' FFLAGS='-xHost -fPIC -fp-model=strict' CXXFLAGS='-xHost -fPIC -fp-model=strict -std=c++17' python -m pip install --no-build-isolation -v . -Cbuild-dir=build -Csetup-args=-Dallow-noblas=false -Csetup-args=-Dblas-order=mkl -Csetup-args=-Dlapack-order=mkl -Csetup-args=-Dblas=mkl-dynamic-lp64-iomp -Csetup-args=-Dlapack=mkl-dynamic-lp64-iomp

Error message:

In file included from ../numpy/_core/src/common/npy_import.h(7),
                   from ../numpy/_core/src/multiarray/common.h(12),
                   from ../numpy/_core/src/multiarray/buffer.c(16):
  ../numpy/_core/src/common/npy_atomic.h(37): error: expression must have pointer-to-struct-or-union type
        return (npy_uint8)atomic_load((const _Atomic(uint8_t)*)obj);
                          ^

  In file included from ../numpy/_core/src/common/npy_import.h(7),
                   from ../numpy/_core/src/multiarray/common.h(12),
                   from ../numpy/_core/src/multiarray/buffer.c(16):
  ../numpy/_core/src/common/npy_atomic.h(52): error: expression must have pointer-to-struct-or-union type
        return atomic_load((const _Atomic(void *)*)obj);
               ^

  In file included from ../numpy/_core/src/common/npy_import.h(7),
                   from ../numpy/_core/src/multiarray/common.h(12),
                   from ../numpy/_core/src/multiarray/buffer.c(16):
  ../numpy/_core/src/common/npy_atomic.h(75): error: expression must have pointer-to-struct-or-union type
        atomic_store((_Atomic(uint8_t)*)obj, value);
        ^

  In file included from ../numpy/_core/src/common/npy_import.h(7),
                   from ../numpy/_core/src/multiarray/common.h(12),
                   from ../numpy/_core/src/multiarray/buffer.c(16):
  ../numpy/_core/src/common/npy_atomic.h(87): error: expression must have pointer-to-struct-or-union type
        atomic_store((_Atomic(void *)*)obj, value);
        ^

Python and NumPy Versions:

Python 3.11.10

Runtime Environment:

No response

Context for the issue:

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    32 - InstallationProblems installing or compiling NumPy

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions