ubuntu安装Pluto Compiler,多面体编译器-1

1)

Github上下载 

-rw-rw-r--  1 a a 1900109  7月  4 11:52 pluto-0.13.0.zip
 

解压

cd进去

2)/home/a/src/llvm-project/build是我前面自己源码编译llvm的包

./configure  --with-clang-prefix=/home/a/src/llvm-project/build

3)报错了

checking for stdlib.h... (cached) yes
checking for stdio.h... (cached) yes
checking for assert.h... yes
checking for string.h... (cached) yes
checking for FileCheck... yes
checking for gmp.h... no
configure: error: GMP not found
 

3)安装GMP

4)./autogen.sh 

5)./configure  --with-clang-prefix=/home/a/src/llvm-project/build

又出错了

checking flex version... configure: error: flex not found. Version 2.5.35 or greater is required.
checking for clan/Makefile... no
configure: error: configure in clan/ failed
MD

安装flex

sudo apt-get install flex
 

6)继续报错

checking for texi2pdf... no
checking flex version... 2.6.4. OK
checking bison version... configure: error: bison not found. Version 2.4 or greater is required.
checking for clan/Makefile... no
configure: error: configure in clan/ failed


处理方法:安装bison

sudo apt-get install bison

7)

checking which clang to use... system
checking for llvm-config... yes
checking for main in -lLLVM-21.0.0git... no
checking for clang/Basic/SourceLocation.h... no
configure: error: clang header file not found
checking for pet/Makefile... no
configure: error: configure in pet/ failed

分析:

这个是clang的问题,我用的是

./configure  --with-clang-prefix=/home/a/src/llvm-project/build
确实得用这个

对7)的处理

a@a:~/src/llvm-project/build$ mkdir clang
a@a:~/src/llvm-project/build$ cp ../clang/include/ clang/ -r
 

8)继续./configure  --with-clang-prefix=/home/a/src/llvm-project/build/

config.status: executing version.h commands
 /*-----------------------------------------------*
  *           PLUTO configuration is OK           *
  *-----------------------------------------------*/
Your system is ready to compile PLUTO
Run 'make' next to compile
Then, run 'make test' to check if everything is working correctly
Use polycc (see README)
看起来configure  是OK了

9)确实生成了Makefile

不容易啊

10)

编译

make -j2

好像每个子文件夹下的库都得编译,NXP

11)make报错了

Making all in candl
make[2]: 进入目录“/home/a/src/a2.pluto-all/pluto/candl”
make[2]: *** 没有规则可制作目标“all”。 停止。
make[2]: 离开目录“/home/a/src/a2.pluto-all/pluto/candl”
make[1]: *** [Makefile:520:all-recursive] 错误 1
make[1]: 离开目录“/home/a/src/a2.pluto-all/pluto”
make: *** [Makefile:392:all] 错误 2
 

确实没有Makefile

a@a:~/src/a2.pluto-all/pluto/candl$ ls
aclocal.m4  autoconf    autom4te.cache  candl-config.cmake  CMakeLists.txt  configure     COPYING.LESSER  get_submodules.sh  m4           Makefile.in  piplib  redo.sh  tests
AUTHORS     autogen.sh  build           ChangeLog           config.log      configure.ac  doc             include            Makefile.am  osl          README  source   TODO

12)


a@a:~/src/a2.pluto-all/pluto/candl$ pwd
/home/a/src/a2.pluto-all/pluto/candl
a@a:~/src/a2.pluto-all/pluto/candl$ cmake -B build/

报错:

-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) 
-- Doxygen not found :( API documentation can not be built
-- texi2pdf not found :( Documentation can not be built
CMake Error at CMakeLists.txt:61 (find_package):
  By not providing "Findosl.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "osl", but
  CMake did not find one.

  Could not find a package configuration file provided by "osl" with any of
  the following names:

    oslConfig.cmake
    osl-config.cmake
 

尝试解决:

sudo apt-get install doxygen

13)

-- Found Doxygen: /usr/bin/doxygen (found version "1.9.1") found components: doxygen dot 
-- texi2pdf not found :( Documentation can not be built
CMake Error at CMakeLists.txt:61 (find_package):
  By not providing "Findosl.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "osl", but
  CMake did not find one.

  Could not find a package configuration file provided by "osl" with any of
  the following names:

    oslConfig.cmake
    osl-config.cmake
 

要texi2pdf这JB玩意干嘛?

也是服了

14)解决方法

https://blog.csdn.net/anlongstar/article/details/149118265

15)又JB报错了:

CMake Error at CMakeLists.txt:61 (find_package):
  By not providing "Findosl.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "osl", but
  CMake did not find one.

  Could not find a package configuration file provided by "osl" with any of
  the following names:

    oslConfig.cmake
    osl-config.cmake
 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值