Skip to content

error: identifier "_Atomic" is undefined #111539

@AgilentGCMS

Description

@AgilentGCMS

Bug report

Bug description:

I am trying to compile python using intel C/C++ compilers on a computing cluster for speed benefits. It fails with error: identifier "_Atomic" is undefined. Specifically, the following compile line fails (among others):

$ icpc -c -fno-strict-aliasing -Wsign-compare -Wunreachable-code -DNDEBUG -g  -O3 -Wall -fPIC -O3 -qopenmp -parallel -fomit-frame-pointer -g -m64 -xHost -prec-div -prec-sqrt -diag-disable=10441   -std=c11 -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration -fvisibility=hidden -fp-model strict -prof-gen -I./Include/internal  -I. -I./Include    -DPy_BUILD_CORE -o Programs/_testembed.o ./Programs/_testembed.c
In file included from /gpfsm/dulocal15/sles15/intel/oneapi/2021/compiler/2023.2.1/linux/bin/intel64/../../compiler/include/icc/stdatomic.h(74),
                 from ./Include/internal/pycore_atomic.h(15),
                 from ./Include/internal/pycore_runtime.h(11),
                 from ./Programs/_testembed.c(11):
/usr/lib64/gcc/x86_64-suse-linux/7/include/stdatomic.h(40): error: identifier "_Atomic" is undefined
  typedef _Atomic _Bool atomic_bool;

which then triggers several other errors. I've found several online discussions about _Atomic being undefined, but I haven't found a solution. Is this fixable? I would love to compile python with intel compilers, because other code compiled with icc/icpc on this particular system is significantly faster than gcc-compiled code.

CPython versions tested on:

3.11

Operating systems tested on:

Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    buildThe build process and cross-buildtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions