Build CPython failed on GitHub action.(Output tons of error messages)

73 Views Asked by At

I want to build a conda package for nogil (A proof-of-concept implementation of CPython that supports multithreading without the global interpreter lock (GIL).)

Here is my github action: https://github.com/ovo-Tim/nogil-recipe/actions/runs/7679362846/job/20930181670

There is nothing wrong when build on my computer. But I don't know what's wrong when I build on github action. It outputs tons of error messages like:

2024-01-27T20:19:35.1738278Z /usr/share/miniconda3/conda-bld/nogil_1706367303499/work/Modules/unicodename_db.h:21747:47: note: (near initialization for 'phrasebook_offset2')
2024-01-27T20:19:35.1835287Z /usr/share/miniconda3/conda-bld/nogil_1706367303499/work/Modules/unicodename_db.h:21747:54: warning: excess elements in scalar initializer
2024-01-27T20:19:35.1836900Z 21747 |     79252, 79257, 79261, 79266, 79271, 79276, 79282, 79287, 79293, 79299,
2024-01-27T20:19:35.1837615Z       |
2024-01-27T20:39:30.1351309Z /usr/share/miniconda3/conda-bld/nogil_1706367303499/work/Include/exports.h:21:36: error: expected declaration specifiers before '__attribute__'
2024-01-27T20:39:30.1351531Z    21 |         #define Py_EXPORTED_SYMBOL __attribute__ ((visibility ("default")))
2024-01-27T20:39:30.1351642Z       |
2024-01-27T20:40:30.4604993Z /usr/include/x86_64-linux-gnu/bits/mathcalls.h:75:1: error: expected declaration specifiers before '__MATHCALL_VEC'
2024-01-27T20:40:30.4605111Z    75 | __MATHCALL_VEC (tanh,, (_Mdouble_ __x));
2024-01-27T20:40:30.4605193Z       | ^~~~~~~~~~~~~~

This problem has troubled me for a long time. Thanks a lot.

There are complete log and build log

1

There are 1 best solutions below

0
Tim On

I don't know why, but it works if modified the command into:

if [[ ${target_platform} == osx-* ]]; then
    ${SRC_DIR}/configure --build=${BUILD} \
                            --host=${BUILD} \
                            --prefix=${BUILD_PYTHON_PREFIX} \
                            --with-ensurepip=no \
                            --with-tzpath=${PREFIX}/share/zoneinfo \
                            --with-platlibdir=lib && \
else
    ${SRC_DIR}/configure --with-ensurepip=no \
                        --prefix=${BUILD_PYTHON_PREFIX}
fi