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

有没有大佬在arm环境下安装部署成功的,我现在cmake编译不过,请求帮助 #2661

Closed
melinetssamant opened this issue May 21, 2024 · 15 comments
Labels
📒 Documentation Improvements or additions to documentation

Comments

@melinetssamant
Copy link

Describe the problem that you experienced

[root@bcrj-hwkp build]# cmake ..
-- The CXX compiler identification is unknown
-- Check for working CXX compiler: /usr/bin/gcc
-- Check for working CXX compiler: /usr/bin/gcc -- broken
CMake Error at /usr/share/cmake/Modules/CMakeTestCXXCompiler.cmake:53 (message):
The C++ compiler

"/usr/bin/gcc"

is not able to compile a simple test program.

It fails with the following output:

Change Dir: /root/setup/pika-3.5.4/build/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/gmake cmTC_b163a/fast && /usr/bin/gmake -f CMakeFiles/cmTC_b163a.dir/build.make CMakeFiles/cmTC_b163a.dir/build
gmake[1]: Entering directory '/root/setup/pika-3.5.4/build/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_b163a.dir/testCXXCompiler.cxx.o
/usr/bin/gcc     -o CMakeFiles/cmTC_b163a.dir/testCXXCompiler.cxx.o -c /root/setup/pika-3.5.4/build/CMakeFiles/CMakeTmp/testCXXCompiler.cxx
gcc: error trying to exec 'cc1plus': execvp: No such file or directory
gmake[1]: *** [CMakeFiles/cmTC_b163a.dir/build.make:66: CMakeFiles/cmTC_b163a.dir/testCXXCompiler.cxx.o] Error 1
gmake[1]: Leaving directory '/root/setup/pika-3.5.4/build/CMakeFiles/CMakeTmp'
gmake: *** [Makefile:121: cmTC_b163a/fast] Error 2

CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:9 (project)

-- Configuring incomplete, errors occurred!
编译器没指定,我手工指定了还是不行。

Enter the URL of the topic with the problem

No response

Describe what you were looking for in the documentation

No response

Describe the actions that led you to experience the problem

No response

Describe what you want to experience that would fix the problem

No response

Add a screenshot if that helps illustrate the problem

No response

If this problem caused an exception or error, please paste it here

No response

If the problem is browser-specific, please specify the device, OS, browser, and version

No response

Provide any additional information here in as much as detail as you can

No response

@melinetssamant melinetssamant added the 📒 Documentation Improvements or additions to documentation label May 21, 2024
@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


Title: Is there anyone who has successfully installed and deployed it in the arm environment? I can’t compile it with cmake now, please help.

@cheniujh
Copy link
Collaborator

cheniujh commented May 21, 2024

1 maybe you can try clang++, or simply reinstall all the package related with compiling(just let gpt4 write an sh for you to reinstall your compiling env)
2 try to directly use ./build.sh for compiling if manual-running of cmake and make command dosen't work

@melinetssamant
Copy link
Author

[root@bcrj-hwkp pika-3.5.4]# ./build.sh

  • C_RED='\033[31m'
  • C_GREEN='\033[32m'
  • C_END='\033[0m'
  • CMAKE_MIN_VERSION=3.18
  • TAR_MIN_VERSION=1.26
  • BUILD_DIR=output
  • CLEAN_BUILD=false
  • ARGS=()
  • '[' '!' -f /proc/cpuinfo ']'
    ++ cat /proc/cpuinfo
    ++ grep processor
    ++ wc -l
  • CPU_CORE=2
  • '[' 2 -eq 0 ']'
  • echo 'cpu core 2'
    cpu core 2
  • [[ false = \t\r\u\e ]]
  • [[ '' = \c\l\e\a\n ]]
  • [[ '' = \c\o\d\i\s ]]
  • source ./utils/Get_OS_Version.sh
    ++ Get_Dist_Name
    ++ '[' '!' -f /etc/issue ']'
    ++ grep -Eqii CentOS /etc/issue
    ++ grep -Eq CentOS /etc/openEuler-release /etc/os-release /etc/system-release
    ++ grep -Eqi 'Red Hat Enterprise Linux Server' /etc/issue
    ++ grep -Eq 'Red Hat Enterprise Linux Server' /etc/openEuler-release /etc/os-release /etc/system-release
    ++ grep -Eqi Aliyun /etc/issue
    ++ grep -Eq Aliyun /etc/openEuler-release /etc/os-release /etc/system-release
    ++ grep -Eqi Fedora /etc/issue
    ++ grep -Eq Fedora /etc/openEuler-release /etc/os-release /etc/system-release
    ++ grep -Eqi Debian /etc/issue
    ++ grep -Eq Debian /etc/openEuler-release /etc/os-release /etc/system-release
    ++ grep -Eqi Ubuntu /etc/issue
    ++ grep -Eq Ubuntu /etc/openEuler-release /etc/os-release /etc/system-release
    ++ grep -Eqi Raspbian /etc/issue
    ++ grep -Eq Raspbian /etc/openEuler-release /etc/os-release /etc/system-release
    ++ DISTRO=unknow
    ++ PM=unknow
    ++ echo unknow
    unknow
  • check_program autoconf
  • type autoconf
  • echo -e 'not find \033[32m autoconf \033[0m on localhost'
    not find autoconf on localhost
  • return 1
  • echo -e 'not find \033[32m autoconf \033[0m on localhost, now do install'
    not find autoconf on localhost, now do install
  • install_package autoconf
  • '[' unknow == unknow ']'
  • echo -e '\033[31m unknow package manager, please install autoconf \033[0m'
    unknow package manager, please install autoconf
  • exit 1

用build.sh 安装好像说autoconf没有安装,如何安装他

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


[root@bcrj-hwkp pika-3.5.4]# ./build.sh

  • C_RED='\033[31m'
  • C_GREEN='\033[32m'
  • C_END='\033[0m'
  • CMAKE_MIN_VERSION=3.18
  • TAR_MIN_VERSION=1.26
  • BUILD_DIR=output
  • CLEAN_BUILD=false
  • ARGS=()
  • '[' '!' -f /proc/cpuinfo ']'
    ++ cat /proc/cpuinfo
    ++ grep processor
    ++ wc -l
  • CPU_CORE=2
  • '[' 2 -eq 0 ']'
  • echo 'cpu core 2'
    cpu core 2
  • [[ false = \t\r\u\e ]]
  • [[ '' = \c\l\e\a\n ]]
  • [[ '' = \c\o\d\i\s ]]
  • source ./utils/Get_OS_Version.sh
    ++ Get_Dist_Name
    ++ '[' '!' -f /etc/issue ']'
    ++ grep -Eqii CentOS /etc/issue
    ++ grep -Eq CentOS /etc/openEuler-release /etc/os-release /etc/system-release
    ++ grep -Eqi 'Red Hat Enterprise Linux Server' /etc/issue
    ++ grep -Eq 'Red Hat Enterprise Linux Server' /etc/openEuler-release /etc/os-release /etc/system-release
    ++ grep -Eqi Aliyun /etc/issue
    ++ grep -Eq Aliyun /etc/openEuler-release /etc/os-release /etc/system-release
    ++ grep -Eqi Fedora /etc/issue
    ++ grep -Eq Fedora /etc/openEuler-release /etc/os-release /etc/system-release
    ++ grep -Eqi Debian /etc/issue
    ++ grep -Eq Debian /etc/openEuler-release /etc/os-release /etc/system-release
    ++ grep -Eqi Ubuntu /etc/issue
    ++ grep -Eq Ubuntu /etc/openEuler-release /etc/os-release /etc/system-release
    ++ grep -Eqi Raspbian /etc/issue
    ++ grep -Eq Raspbian /etc/openEuler-release /etc/os-release /etc/system-release
    ++ DISTRO=unknow
    ++ PM=unknow
    ++ echo unknow
    unknow
  • check_program autoconf
  • type autoconf
  • echo -e 'not find \033[32m autoconf \033[0m on localhost'
    not find autoconf on localhost
  • return 1
  • echo -e 'not find \033[32m autoconf \033[0m on localhost, now do install'
    not find autoconf on localhost, now do install
  • install_package autoconf
  • '[' unknow == unknow ']'
  • echo -e '\033[31m unknow package manager, please install autoconf \033[0m'
    unknow package manager, please install autoconf
  • exit 1

用build.sh 安装好像说autoconf没有安装,如何安装他

@melinetssamant
Copy link
Author

[root@bcrj-hwkp build]# make
[ 1%] Performing build step for 'gtest'
CMake Error at /opt/pika/buildtrees/Stamp/gtest/gtest-build-RELEASE.cmake:49 (message):
Command failed: 2

'make' '-j2'

See also

/opt/pika/buildtrees/Stamp/gtest/gtest-build-*.log

make[2]: *** [CMakeFiles/gtest.dir/build.make:95: /opt/pika/buildtrees/Stamp/gtest/gtest-build] Error 1
make[1]: *** [CMakeFiles/Makefile2:373: CMakeFiles/gtest.dir/all] Error 2
make: *** [Makefile:101: all] Error 2

cmake编译已经通过,但是make的时候报错,参数不对,去掉-j2参数,还是报错,就报‘make’, 错误,希望有人指点一下

@melinetssamant
Copy link
Author

查看日志显示如下:
In file included from /opt/pika/buildtrees/Source/gtest/googletest/include/gtest/internal/gtest-port.h:731:0,
from /opt/pika/buildtrees/Source/gtest/googletest/include/gtest/gtest-message.h:55,
from /opt/pika/buildtrees/Source/gtest/googletest/include/gtest/gtest-assertion-result.h:46,
from /opt/pika/buildtrees/Source/gtest/googletest/include/gtest/gtest.h:59,
from /opt/pika/buildtrees/Source/gtest/googletest/src/gtest-all.cc:38:
/usr/include/c++/7.3.0/condition_variable: In member function ‘std::cv_status std::condition_variable::__wait_until_impl(std::unique_lockstd::mutex&, const std::chrono::time_point<std::chrono::_V2::steady_clock, _Duration>&)’:
/usr/include/c++/7.3.0/condition_variable:193:2: error: there are no arguments to ‘pthread_cond_clockwait’ that depend on a template parameter, so a declaration of ‘pthread_cond_clockwait’ must be available [-fpermissive]
pthread_cond_clockwait(&_M_cond, __lock.mutex()->native_handle(),
^~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/7.3.0/condition_variable:193:2: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
make[5]: *** [googletest/CMakeFiles/gtest.dir/build.make:76: googletest/CMakeFiles/gtest.dir/src/gtest-all.cc.o] Error 1
make[4]: *** [CMakeFiles/Makefile2:172: googletest/CMakeFiles/gtest.dir/all] Error 2
make[3]: *** [Makefile:146: all] Error 2
怎么感觉是gcc版本的问题,我的gcc版本是7.3,我看cmake文档里显示7.0以上就可以,难道是我gcc版本太低的原因吗?

@QlQlqiqi
Copy link
Contributor

试试gcc11.4.0

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


Try gcc11.4.0

@AlexStocks
Copy link
Collaborator

查看日志显示如下: In file included from /opt/pika/buildtrees/Source/gtest/googletest/include/gtest/internal/gtest-port.h:731:0, from /opt/pika/buildtrees/Source/gtest/googletest/include/gtest/gtest-message.h:55, from /opt/pika/buildtrees/Source/gtest/googletest/include/gtest/gtest-assertion-result.h:46, from /opt/pika/buildtrees/Source/gtest/googletest/include/gtest/gtest.h:59, from /opt/pika/buildtrees/Source/gtest/googletest/src/gtest-all.cc:38: /usr/include/c++/7.3.0/condition_variable: In member function ‘std::cv_status std::condition_variable::__wait_until_impl(std::unique_lockstd::mutex&, const std::chrono::time_point<std::chrono::_V2::steady_clock, _Duration>&)’: /usr/include/c++/7.3.0/condition_variable:193:2: error: there are no arguments to ‘pthread_cond_clockwait’ that depend on a template parameter, so a declaration of ‘pthread_cond_clockwait’ must be available [-fpermissive] pthread_cond_clockwait(&_M_cond, __lock.mutex()->native_handle(), ^~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/7.3.0/condition_variable:193:2: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated) make[5]: *** [googletest/CMakeFiles/gtest.dir/build.make:76: googletest/CMakeFiles/gtest.dir/src/gtest-all.cc.o] Error 1 make[4]: *** [CMakeFiles/Makefile2:172: googletest/CMakeFiles/gtest.dir/all] Error 2 make[3]: *** [Makefile:146: all] Error 2 怎么感觉是 gcc 版本的问题,我的 gcc 版本是 7.3,我看 cmake 文档里显示 7.0 以上就可以,难道是我 gcc 版本太低的原因吗?

Pika 现在使用了 C++17,对 gcc 版本确实有要求

@melinetssamant
Copy link
Author

更新gcc到最新到14.1了,编译还是报错
[root@bcrj-hwkp build]# make
[ 1%] Performing build step for 'gtest'
CMake Error at /opt/pika/buildtrees/Stamp/gtest/gtest-build-RELEASE.cmake:49 (message):
Command failed: 2

'make' '-j2'

See also

/opt/pika/buildtrees/Stamp/gtest/gtest-build-*.log

make[2]: *** [CMakeFiles/gtest.dir/build.make:95: /opt/pika/buildtrees/Stamp/gtest/gtest-build] Error 1
make[1]: *** [CMakeFiles/Makefile2:373: CMakeFiles/gtest.dir/all] Error 2
make: *** [Makefile:101: all] Error 2
[root@bcrj-hwkp build]# gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/aarch64-unknown-linux-gnu/14.1.0/lto-wrapper
Target: aarch64-unknown-linux-gnu
Configured with: ../configure -enable-checking=release -enable-languages=c,c++ -disable-multilib
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 14.1.0 (GCC)
[root@bcrj-hwkp build]# ^C

@melinetssamant
Copy link
Author

重新cmake只有,再make报错已经到5%的位置,但是报错内容怎么和之前的一样,但是项目不是同一个了,请大佬们指点
[root@bcrj-hwkp build]# make
[ 1%] Performing build step for 'gtest'
-- gtest build command succeeded. See also /opt/pika/buildtrees/Stamp/gtest/gtest-build-.log
[ 1%] Performing install step for 'gtest'
-- gtest install command succeeded. See also /opt/pika/buildtrees/Stamp/gtest/gtest-install-
.log
[ 1%] Completed 'gtest'
[ 2%] Built target gtest
[ 3%] Performing build step for 'gflags'
-- gflags build command succeeded. See also /opt/pika/buildtrees/Stamp/gflags/gflags-build-.log
[ 5%] Performing install step for 'gflags'
-- gflags install command succeeded. See also /opt/pika/buildtrees/Stamp/gflags/gflags-install-
.log
[ 5%] Completed 'gflags'
[ 5%] Built target gflags
[ 6%] Performing build step for 'unwind'
CMake Error at /opt/pika/buildtrees/Stamp/unwind/unwind-build-RELEASE.cmake:49 (message):
Command failed: 2

'make' '-j2'

See also

/opt/pika/buildtrees/Stamp/unwind/unwind-build-*.log

make[2]: *** [CMakeFiles/unwind.dir/build.make:86: /opt/pika/buildtrees/Stamp/unwind/unwind-build] Error 1
make[1]: *** [CMakeFiles/Makefile2:425: CMakeFiles/unwind.dir/all] Error 2
make: *** [Makefile:101: all] Error 2
[root@bcrj-hwkp build]# gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/aarch64-unknown-linux-gnu/14.1.0/lto-wrapper
Target: aarch64-unknown-linux-gnu
Configured with: ../configure -enable-checking=release -enable-languages=c,c++ -disable-multilib
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 14.1.0 (GCC)
[root@bcrj-hwkp build]#

@baerwang
Copy link
Collaborator

baerwang commented Jun 3, 2024

https://github.com/OpenAtomFoundation/pika/blob/unstable/.github/workflows/pika.yml

按照对应的系统进行action对应每个操作

@937988621
Copy link

请问你最后在arm环境上编译成功了吗?

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


Did you finally compile successfully in the arm environment?

@soulteary
Copy link

There is nothing wrong with ARMv64. Basically, it’s all the way to Next, with no issues.

ARMv64 没啥问题。基本一路 Next,没啥卡点。

Posts:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📒 Documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

9 participants