在 GitHub 操作上构建 CPython 失败。(输出大量错误消息)

问题描述 投票:0回答:1

我想为 nogil 构建一个 conda 包(CPython 的概念验证实现,支持多线程,无需全局解释器锁 (GIL)。)

这是我的 github 操作:https://github.com/ovo-Tim/nogil-recipe/actions/runs/7679362846/job/20930181670

在我的电脑上构建没有任何问题。但我不知道当我在 github action 上构建时出了什么问题。 它输出大量错误消息,例如:

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       | ^~~~~~~~~~~~~~

这个问题困扰我很久了。非常感谢。

完整日志构建日志

gcc cmake build anaconda cpython
1个回答
0
投票

我不知道为什么,但是如果将命令修改为:

就可以了
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
© www.soinside.com 2019 - 2024. All rights reserved.