Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

国产化麒麟v10系统源码安装 make报错 #54755

Closed
LangJiHuangSha opened this issue Jun 19, 2023 · 6 comments
Closed

国产化麒麟v10系统源码安装 make报错 #54755

LangJiHuangSha opened this issue Jun 19, 2023 · 6 comments
Assignees
Labels
status/new-issue 新建 type/build 编译/安装问题

Comments

@LangJiHuangSha
Copy link

问题描述 Issue Description

命令:make TARGET=ARMV8 -j$(nproc)

gcc版本:

Using built-in specs.
COLLECT_GCC=/usr/local/gcc-8.2.0/bin/gcc
COLLECT_LTO_WRAPPER=/usr/local/gcc-8.2.0/libexec/gcc/aarch64-unknown-linux-gnu/8.2.0/lto-wrapper
Target: aarch64-unknown-linux-gnu
Configured with: ./configure --prefix=/usr/local/gcc-8.2.0 --with-mpfr=./mpfr-4.0.2 --with-mpc=/usr/local/mpc --with-gmp=/usr/local/gmp --with-isl=./isl-0.18 --enable-bootstrap --enable-languages=c,c++ --disable-multilib
Thread model: posix
gcc version 8.2.0 (GCC)

cmake版本

cmake version 3.16.8

CMake suite maintained and supported by Kitware (kitware.com/cmake).

paddle版本

develop 分支最新

系统信息

root@c2f8fe00ee40:/# uname -a
Linux c2f8fe00ee40 5.10.0-20-amd64 #1 SMP Debian 5.10.158-2 (2022-12-13) aarch64 aarch64 aarch64 GNU/Linux
root@c2f8fe00ee40:/# cat /proc/version
Linux version 5.10.0-20-amd64 (debian-kernel@lists.debian.org) (gcc-10 (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2) #1 SMP Debian 5.10.158-2 (2022-12-13)
root@c2f8fe00ee40:/#
root@c2f8fe00ee40:/# python -V
Python 3.8.9

报错

[ 96%] Built target eager_legacy_op_function_generator
Scanning dependencies of target eager_legacy_op_function_generator_cmd
[ 96%] copy_if_different /data/mapping/aarch64/Paddle/paddle/fluid/pybind/eager_legacy_op_function.cc.tmp to /data/mapping/aarch64/Paddle/paddle/fluid/pybind/eager_legacy_op_function.cc
/data/mapping/aarch64/Paddle/build/paddle/fluid/pybind/eager_legacy_op_function_generator: /usr/lib/aarch64-linux-gnu/libstdc++.so.6: version CXXABI_1.3.11' not found (required by /data/mapping/aarch64/Paddle/build/paddle/fluid/pybind/eager_legacy_op_function_generator) /data/mapping/aarch64/Paddle/build/paddle/fluid/pybind/eager_legacy_op_function_generator: /usr/lib/aarch64-linux-gnu/libstdc++.so.6: version GLIBCXX_3.4.22' not found (required by /data/mapping/aarch64/Paddle/build/paddle/fluid/pybind/eager_legacy_op_function_generator)
paddle/fluid/pybind/CMakeFiles/eager_legacy_op_function_generator_cmd.dir/build.make:63: recipe for target '../paddle/fluid/pybind/eager_legacy_op_function.cc' failed
make[2]: *** [../paddle/fluid/pybind/eager_legacy_op_function.cc] Error 1
CMakeFiles/Makefile2:75041: recipe for target 'paddle/fluid/pybind/CMakeFiles/eager_legacy_op_function_generator_cmd.dir/all' failed
make[1]: *** [paddle/fluid/pybind/CMakeFiles/eager_legacy_op_function_generator_cmd.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....

版本&环境信息 Version & Environment Information

paddle :还未安装 源码:develop分支
paddle with cuda :无(cpu版本)
clang 、gcc version 8.2.0
cmake version 3.16.8
cpu型号:Intel Xeon Processor (Skylake)(docker容器中,跨架构运行,x86跑armdocker容器)

@qili93
Copy link
Contributor

qili93 commented Jun 19, 2023

您的系统环境貌似有点奇怪,你的CPU是Intel的CPU,但是为什么 uname -a 会同时显示 amd64 和 aarch64 ?

image

怀疑可能是您这里在X86的机器上运行了一个 aarch64 的 docker 镜像的容器导致的。几个需要修改或者检查的地方

  1. 查看你的docker镜像,得是和你的机器架构一致的,比如 Intel CPU 架构就使用 X86 的镜像,可以试试看 registry.baidubce.com/device/paddle-cpu:kylinv10-x86_64-gcc82 这个镜像
  2. 检查你的CMAKE命令,参考如下命令,在X86环境下这里的 WITH_ARM 得是关掉的
cmake .. -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
         -DPY_VERSION=3.7 -DPYTHON_EXECUTABLE=`which python3` \
         -DWITH_TESTING=OFF -DON_INFER=ON -DWITH_CUSTOM_DEVICE=ON \
         -DWITH_DISTRIBUTE=ON -DWITH_ARM=OFF
  1. 检查你的MAKE命令,不要添加 “TARGET=ARMV8” 这个是针对 aarch64 环境的编译选项,直接跑如下命令即可
make -j8

@LangJiHuangSha
Copy link
Author

您的系统环境貌似有点奇怪,你的CPU是Intel的CPU,但是为什么 uname -a 会同时显示 amd64 和 aarch64 ?

image

怀疑可能是您这里在X86的机器上运行了一个 aarch64 的 docker 镜像的容器导致的。几个需要修改或者检查的地方

  1. 查看你的docker镜像,得是和你的机器架构一致的,比如 Intel CPU 架构就使用 X86 的镜像,可以试试看 registry.baidubce.com/device/paddle-cpu:kylinv10-x86_64-gcc82 这个镜像
  2. 检查你的CMAKE命令,参考如下命令,在X86环境下这里的 WITH_ARM 得是关掉的
cmake .. -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
         -DPY_VERSION=3.7 -DPYTHON_EXECUTABLE=`which python3` \
         -DWITH_TESTING=OFF -DON_INFER=ON -DWITH_CUSTOM_DEVICE=ON \
         -DWITH_DISTRIBUTE=ON -DWITH_ARM=OFF
  1. 检查你的MAKE命令,不要添加 “TARGET=ARMV8” 这个是针对 aarch64 环境的编译选项,直接跑如下命令即可
make -j8

由于我没有arm64的机器,所以我是在x86的机子上通过qemu跑的aarch64的docker镜像
才会出现这种情况
https://user-images.githubusercontent.com/16605440/246816861-b8aa5d41-e02e-46ba-bfab-71b146684a8d.png
我的目的是用当前基础镜像制作一个能够在aarch64上跑的docker镜像

@LangJiHuangSha
Copy link
Author

您的系统环境貌似有点奇怪,你的CPU是Intel的CPU,但是为什么 uname -a 会同时显示 amd64 和 aarch64 ?
image
怀疑可能是您这里在X86的机器上运行了一个 aarch64 的 docker 镜像的容器导致的。几个需要修改或者检查的地方

  1. 查看你的docker镜像,得是和你的机器架构一致的,比如 Intel CPU 架构就使用 X86 的镜像,可以试试看 registry.baidubce.com/device/paddle-cpu:kylinv10-x86_64-gcc82 这个镜像
  2. 检查你的CMAKE命令,参考如下命令,在X86环境下这里的 WITH_ARM 得是关掉的
cmake .. -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
         -DPY_VERSION=3.7 -DPYTHON_EXECUTABLE=`which python3` \
         -DWITH_TESTING=OFF -DON_INFER=ON -DWITH_CUSTOM_DEVICE=ON \
         -DWITH_DISTRIBUTE=ON -DWITH_ARM=OFF
  1. 检查你的MAKE命令,不要添加 “TARGET=ARMV8” 这个是针对 aarch64 环境的编译选项,直接跑如下命令即可
make -j8

由于我没有arm64的机器,所以我是在x86的机子上通过qemu跑的aarch64的docker镜像 才会出现这种情况
image

我的目的是用当前基础镜像制作一个能够在aarch64上跑的docker镜像

@qili93
Copy link
Contributor

qili93 commented Jun 20, 2023

目前Paddle在aarch64环境下的 nightly build 都是运行正常的,您这里如果想要一个能够在aarch64上跑的docker镜像,可以使用 registry.baidubce.com/device/paddle-cpu:kylinv10-aarch64-gcc82 这个镜像,这个是公开镜像直接使用docker pull拉取即可。

@Gladiator566
Copy link

目前Paddle在aarch64环境下的 nightly build 都是运行正常的,您这里如果想要一个能够在aarch64上跑的docker镜像,可以使用 registry.baidubce.com/device/paddle-cpu:kylinv10-aarch64-gcc82 这个镜像,这个是公开镜像直接使用docker pull拉取即可。

请问如何使用这个镜像来运行paddlenlp呢?docker pull下来之后要如何操作呢?谢谢! @qili93

@paddle-bot paddle-bot bot closed this as completed Jul 9, 2024
Copy link

paddle-bot bot commented Jul 9, 2024

Since you haven't replied for more than a year, we have closed this issue/pr.
If the problem is not solved or there is a follow-up one, please reopen it at any time and we will continue to follow up.
由于您超过一年未回复,我们将关闭这个issue/pr。
若问题未解决或有后续问题,请随时重新打开,我们会继续跟进。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/new-issue 新建 type/build 编译/安装问题
Projects
None yet
Development

No branches or pull requests

4 participants