Я строю вещи в многоархивном Ubuntu бионическом контейнере ARM64 .Я использую Конан для управления зависимостями.До сих пор все работает как положено.
По причинам, я хочу переключиться с Python2.7 conan на Python3 conan.Так что вместо
ARG CONAN_VERSION=1.13.1
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
python-pip \
&& pip install wheel \
&& pip install "conan==$CONAN_VERSION" \
&& apt-get remove -y python-pip
я теперь делаю
ARG CONAN_VERSION=1.13.1
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
python3-pip \
&& pip3 install setuptools wheel \
&& pip3 install "conan==$CONAN_VERSION" \
&& apt-get remove -y python3-pip
Однако для меня это сломается:
#12 132.3 Running setup.py install for typed-ast: started
#12 134.1 Running setup.py install for typed-ast: finished with status 'error'
#12 134.1 Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-hxn5kzw2/typed-ast/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-me7t6r8v-record/install-record.txt --single-version-externally-managed --compile:
#12 134.1 running install
#12 134.1 running build
#12 134.1 running build_py
#12 134.1 creating build
#12 134.1 creating build/lib.linux-aarch64-3.6
#12 134.1 creating build/lib.linux-aarch64-3.6/typed_ast
#12 134.1 copying typed_ast/ast3.py -> build/lib.linux-aarch64-3.6/typed_ast
#12 134.1 copying typed_ast/__init__.py -> build/lib.linux-aarch64-3.6/typed_ast
#12 134.1 copying typed_ast/ast27.py -> build/lib.linux-aarch64-3.6/typed_ast
#12 134.1 copying typed_ast/conversions.py -> build/lib.linux-aarch64-3.6/typed_ast
#12 134.1 running build_ext
#12 134.1 building '_ast27' extension
#12 134.1 creating build/temp.linux-aarch64-3.6
#12 134.1 creating build/temp.linux-aarch64-3.6/ast27
#12 134.1 creating build/temp.linux-aarch64-3.6/ast27/Parser
#12 134.1 creating build/temp.linux-aarch64-3.6/ast27/Python
#12 134.1 creating build/temp.linux-aarch64-3.6/ast27/Custom
#12 134.1 aarch64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Iast27/Include -I/usr/include/python3.6m -c ast27/Parser/acceler.c -o build/temp.linux-aarch64-3.6/ast27/Parser/acceler.o
#12 134.1 unable to execute 'aarch64-linux-gnu-gcc': No such file or directory
#12 134.1 error: command 'aarch64-linux-gnu-gcc' failed with exit status 1
Видимо, компиляция считает, что ей нужен кросс-компилятор?!gcc установлен:
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
g++-5 gcc-5 make \
python-dev python-setuptools \
&& rm -rf /var/lib/apt/lists/* \
&& update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 60 --slave /usr/bin/g++ g++ /usr/bin/g++-5
Так что я не совсем понимаю, в чем здесь проблема?
Я пытался принудительно использовать только 'gcc', но это не сработало:
pip3 install --global-option build_ext --global-option --compiler=gcc "conan==$CONAN_VERSION"
#12 41.88 Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-vt3_j53z/typed-ast/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" build_ext --compiler=gcc install --record /tmp/pip-feshlu87-record/install-record.txt --single-version-externally-managed --compile:
#12 41.88 running build_ext
#12 41.88 error: don't know how to compile C/C++ code on platform 'posix' with 'gcc' compiler