classification
Title: Compiling Python 3.7.4 with Intel compilers 2019
Type: compile error Stage: resolved
Components: Installation Versions: Python 3.7
process
Status: closed Resolution: duplicate
Dependencies: Superseder: Error build Python with Intel compiler: <stdatomic.h> doesn't provide atomic_uintptr_t
View: 37415
Assigned To: Nosy List: vstinner, xtreak, zyzhang2006
Priority: normal Keywords:

Created on 2019-08-14 18:48 by zyzhang2006, last changed 2019-11-12 21:12 by vstinner. This issue is now closed.

Messages (4)
msg349734 - (view) Author: Zhiyong Zhang (zyzhang2006) Date: 2019-08-14 18:48
Compilation of Python 3.7.4 with Intel icc/2019 failed with the following errors: 

icpc -c -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -g -O0 -Wall -O3 -fp-model strict -fp-model source -xHost -ipo -prec-div -prec-sqrt   -std=c++11 -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Werror=implicit-function-declaration -fp-model strict -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Werror=implicit-function-declaration -fp-model strict  -IObjects -IInclude -IPython -I. -I../Include    -DPy_BUILD_CORE -o Programs/python.o ../Programs/python.c
In file included from ../Include/Python.h(75),
                 from ../Programs/python.c(3):
../Include/pyatomic.h(32): error: identifier "memory_order_relaxed" is undefined
      _Py_memory_order_relaxed = memory_order_relaxed,
                                 ^

In file included from ../Include/Python.h(75),
                 from ../Programs/python.c(3):
../Include/pyatomic.h(33): error: identifier "memory_order_acquire" is undefined
      _Py_memory_order_acquire = memory_order_acquire,
                                 ^

In file included from ../Include/Python.h(75),
                 from ../Programs/python.c(3):
../Include/pyatomic.h(34): error: identifier "memory_order_release" is undefined
      _Py_memory_order_release = memory_order_release,
                                 ^

In file included from ../Include/Python.h(75),
                 from ../Programs/python.c(3):
../Include/pyatomic.h(35): error: identifier "memory_order_acq_rel" is undefined
      _Py_memory_order_acq_rel = memory_order_acq_rel,
                                 ^

In file included from ../Include/Python.h(75),
                 from ../Programs/python.c(3):
../Include/pyatomic.h(36): error: identifier "memory_order_seq_cst" is undefined
      _Py_memory_order_seq_cst = memory_order_seq_cst
                                 ^

In file included from ../Include/Python.h(75),
                 from ../Programs/python.c(3):
../Include/pyatomic.h(40): error: identifier "atomic_uintptr_t" is undefined
      atomic_uintptr_t _value;
      ^

In file included from ../Include/Python.h(75),
                 from ../Programs/python.c(3):
../Include/pyatomic.h(44): error: identifier "atomic_int" is undefined
      atomic_int _value;
      ^
msg349778 - (view) Author: Karthikeyan Singaravelan (xtreak) * (Python committer) Date: 2019-08-14 23:22
Seems related : https://bugs.python.org/issue35473
msg356448 - (view) Author: Karthikeyan Singaravelan (xtreak) * (Python committer) Date: 2019-11-12 12:31
See also issue37415
msg356486 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2019-11-12 21:12
This issue looks like a variant of bpo-37415 which has been fixed in the 3.7 branch by:

New changeset b102e4f05278c1b06130885eba961bd0193733b4 by Miss Skeleton (bot) in branch '3.7':
bpo-37415: Fix stdatomic.h header check for ICC compiler (GH-16717)
https://github.com/python/cpython/commit/b102e4f05278c1b06130885eba961bd0193733b4

You can try the 3.7 branch to get the fix, or apply manually the fix.

Note: The icc compiler is not officially supported.
History
Date User Action Args
2019-11-12 21:12:49vstinnersetsuperseder: Error build Python with Intel compiler: <stdatomic.h> doesn't provide atomic_uintptr_t
resolution: fixed -> duplicate
2019-11-12 21:12:23vstinnersetstatus: open -> closed
resolution: fixed
messages: + msg356486

stage: resolved
2019-11-12 12:31:01xtreaksetnosy: + vstinner
messages: + msg356448
2019-08-14 23:22:43xtreaksetnosy: + xtreak
messages: + msg349778
2019-08-14 18:48:14zyzhang2006create