Code Monkey home page Code Monkey logo

riscv-measurement's People

Contributors

mollybuild avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

riscv-measurement's Issues

LLVM测试篇-交叉编译:clang-13: error: linker command failed with exit code 1 (use -v to see invocation)

按照https://github.com/mollybuild/RISCV-Measurement/blob/master/Build-RISCV-LLVM-and-run-testsuite.md 执行交叉编译的时候,cmake报错:

xj@e2ba8bd04169:~/RISCV/llvm-project0/llvm/projects/test-suite-riscv-build$ cmake -DCMAKE_TOOLCHAIN_FILE=/home/xj/RISCV/llvm-project0/llvm/projects/test-suite-riscv-build/clang_riscv_linux.cmake  -DCMAKE_C_COMPILER="/home/xj/RISCV/llvm-project0/build/bin/clang"  ../test-suite
-- The C compiler identification is Clang 13.0.0
-- The CXX compiler identification is Clang 13.0.0
-- Check for working C compiler: /home/xj/RISCV/llvm-project0/build/bin/clang
-- Check for working C compiler: /home/xj/RISCV/llvm-project0/build/bin/clang -- broken
CMake Error at /usr/share/cmake-3.16/Modules/CMakeTestCCompiler.cmake:60 (message):
  The C compiler

    "/home/xj/RISCV/llvm-project0/build/bin/clang"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: /home/xj/RISCV/llvm-project0/llvm/projects/test-suite-riscv-build/CMakeFiles/CMakeTmp

    Run Build Command(s):/usr/bin/make cmTC_c5958/fast && /usr/bin/make -f CMakeFiles/cmTC_c5958.dir/build.make CMakeFiles/cmTC_c5958.dir/build
    make[1]: Entering directory '/home/xj/RISCV/llvm-project0/llvm/projects/test-suite-riscv-build/CMakeFiles/CMakeTmp'
    Building C object CMakeFiles/cmTC_c5958.dir/testCCompiler.c.o
    /home/xj/RISCV/llvm-project0/build/bin/clang --target=riscv64-unknown-linux-gnu --gcc-toolchain=/home/xj/RISCV/linux/    -o CMakeFiles/cmTC_c5958.dir/testCCompiler.c.o   -c /home/xj/RISCV/llvm-project0/llvm/projects/test-suite-riscv-build/CMakeFiles/CMakeTmp/testCCompiler.c
    Linking C executable cmTC_c5958
    /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_c5958.dir/link.txt --verbose=1
    /home/xj/RISCV/llvm-project0/build/bin/clang --target=riscv64-unknown-linux-gnu --gcc-toolchain=/home/xj/RISCV/linux/    -static  CMakeFiles/cmTC_c5958.dir/testCCompiler.c.o  -o cmTC_c5958
    /home/xj/RISCV/linux/lib/gcc/riscv64-unknown-elf/10.2.0/../../../../riscv64-unknown-elf/bin/ld: warning: -z relro ignored
    /home/xj/RISCV/linux/lib/gcc/riscv64-unknown-elf/10.2.0/../../../../riscv64-unknown-elf/bin/ld: unrecognized option '--hash-style=gnu'
    /home/xj/RISCV/linux/lib/gcc/riscv64-unknown-elf/10.2.0/../../../../riscv64-unknown-elf/bin/ld: use the --help option for usage information
    clang-13: error: linker command failed with exit code 1 (use -v to see invocation)
    make[1]: *** [CMakeFiles/cmTC_c5958.dir/build.make:87: cmTC_c5958] Error 1
    make[1]: Leaving directory '/home/xj/RISCV/llvm-project0/llvm/projects/test-suite-riscv-build/CMakeFiles/CMakeTmp'
    make: *** [Makefile:121: cmTC_c5958/fast] Error 2





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


-- Configuring incomplete, errors occurred!
See also "/home/xj/RISCV/llvm-project0/llvm/projects/test-suite-riscv-build/CMakeFiles/CMakeOutput.log".
See also "/home/xj/RISCV/llvm-project0/llvm/projects/test-suite-riscv-build/CMakeFiles/CMakeError.log".

新手入门(一)执行过程中:遇到的问题&解决办法

新手入门(一)执行过程中:遇到的问题&解决办法

  • cmake版本过低
    由于cmake版本过低,可能会出现的错误有:
    Cakefile:27: *** missing separator.  Stop.

    解决方法:
     方法一: 自行编译新版本的cmake
     【TODO】
     方法二: 下载预编译的最新版本cmake (新手友好)
     通过源码安装想对复杂,通过下载预编译好的版本解压配置环境变量即可。
     第一步:下载
     使用wget命令,下载对应新版本(这以3.20.1为例)
    wget https://github.com/Kitware/CMake/releases/download/v3.20.1/cmake-3.20.1-linux-x86_64.tar.gz
     第二步: 解压
     使用tar命令,解压下载好的预编译安装包
    tar -zxvf cmake-3.20.1-linux-x86_64.tar.gz
     第三步:通过修改~/.bashrc 修改环境变量文件
    vi ~/.bashrc
     在末尾添加环境变量:(请自行将路径修改为本地路径)
     #cmake 3.20.1 Binary distributions Linux x86_64
     export PATH=/home/your/local/path/cmake-3.20.1-linux-x86_64/bin:$PATH
     第四步:更新环境变量
    source ~/.bashrc
     第五步:查看cmake安装的位置是否符合预期&查看当前版本
      查看位置
      which cmake
      查看版本
      cmake --version

给小白的友情补充:(大佬可以跳过)

  1. 什么是cmake?
    CMake是一个跨平台的编译(Build)工具。CMake能够输出各种各样的makefile或者project文件,能测试编译器所支持的C++特性,类似UNIX下的automake。
  2. 什么是makefile?
    makefile定义了一系列的规则来指定,哪些文件需要先编译,哪些文件需要后编译,哪些文件需要重新编译,甚至于进行更复杂的功能操作。
  3. makefile的优点?
    makefile带来的好处就是——“自动化编译”。一旦写好,只需要一个make命令,整个工程完全自动编译,极大的提高了软件开发的效率。make是一个命令工具,是一个解释makefile中指令的命令工具。
  4. 为什么使用makefile?
    对于一个大型软件,其编译、维护是一个复杂而耗时的过程。makefile可以有效地描述这些文件之间的依赖关系以及处理命令,当个别文件改动后仅执行必要的处理,而不必重复整个编译过程,可以大大提高软件开发的效率。
    image
    图片来源: https://lowlevelbits.org/bottom-up-cmake-introduction/
    入门推荐教程:https://blog.csdn.net/xierhacker/article/details/79445339
    参考链接:https://blog.csdn.net/Torres_10/article/details/80371425
         http://blog.sina.com.cn/s/blog_15d0344a30102zgxe.html

SPEC CPU 2006 SW Compiler Version

Hi,
Thank you for sharing.

I have a question regarding the SW Compiler version for SPEC CPU 2006 that I would like to inquire about.
You use GCC 10.x to compile SPEC 2006 benchmarks, but in the SPEC CPU 2006 configuration files (cfg),
I noticed that GCC 4.x versions are specified.
GCC 10.x in CPU2006-GCC.config

  • I would like to understand if using different GCC versions and calculating the final ratio is accurate.
  • Is there any mention in SPEC CPU 2006 regarding the use of different SW compiler versions?

I look forward to your response. Thank you.

QL

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.