老板带的本科生要做cuda编程。。。

我裂开了,现在本科生都这么秀了?都会cuda编程了?我pytorch还没用明白呢

结果说ninja用不了。。。服务器上没有。。。

用不了你装啊!

不敢。。。

软件都不敢装,你还想做cuda编程??

声音这么小,还敢开军舰??

结果

好家伙,直接把老板搬出来了,工具人竟是我自己。。。

装ninja之前,需要先装re2c

参考 CentOS 7 安装 re2c 和 ninja

git clone https://github.com/skvadrik/re2c.git re2c
cd re2c
mkdir -p m4
./autogen.sh && ./configure --prefix=/usr && make

结果出现

configure.ac:18: installing 'build-aux/compile'
configure.ac:3: installing 'build-aux/install-sh'
configure.ac:3: installing 'build-aux/missing'
Makefile.am:458: error: Libtool library used but 'LIBTOOL' is undefined
Makefile.am:458:   The usual way to define 'LIBTOOL' is to add 'LT_INIT'
Makefile.am:458:   to 'configure.ac' and run 'aclocal' and 'autoconf' again.
Makefile.am:458:   If 'LT_INIT' is in 'configure.ac', make sure
Makefile.am:458:   its definition is in aclocal's search path.
Makefile.am: installing 'build-aux/depcomp'
parallel-tests: installing 'build-aux/test-driver'
autoreconf: automake failed with exit status: 1

所以。。。大概是LIBTOOL有问题

先装一下libtool

sudo apt-get install libtool

再次执行

./autogen.sh && ./configure --prefix=/usr && make

这次正常了(这段可以不看)

正删除 aclocal.m4
正删除 config.h.in
正删除 configure
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'build-aux'.
libtoolize: copying file 'build-aux/ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: copying file 'm4/libtool.m4'
libtoolize: copying file 'm4/ltoptions.m4'
libtoolize: copying file 'm4/ltsugar.m4'
libtoolize: copying file 'm4/ltversion.m4'
libtoolize: copying file 'm4/lt~obsolete.m4'
configure.ac:177: installing 'build-aux/config.guess'
configure.ac:177: installing 'build-aux/config.sub'
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking for bison... no
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking whether gcc understands -c and -o together... (cached) yes
checking dependency style of gcc... (cached) gcc3
checking whether we are using the GNU C++ compiler... (cached) yes
checking whether g++ accepts -g... (cached) yes
checking dependency style of g++... (cached) gcc3
checking C++ compiler flag -std=c++98... yes
checking C++ compiler flag -W... yes
checking C++ compiler flag -Wall... yes
checking C++ compiler flag -Wextra... yes
checking C++ compiler flag -Weffc++... yes
checking C++ compiler flag -pedantic... yes
checking C++ compiler flag -Wformat=2... yes
checking C++ compiler flag -Wredundant-decls... yes
checking C++ compiler flag -Wsuggest-attribute=format... yes
checking C++ compiler flag -Wconversion... yes
checking C++ compiler flag -Wsign-conversion... yes
checking C++ compiler flag -Werror=return-type... yes
checking C++ compiler flag -O2... yes
checking C++ compiler flag -Weverything... no
checking for stdint.h... (cached) yes
checking for sys/types.h... (cached) yes
checking for sys/stat.h... (cached) yes
checking for fcntl.h... yes
checking for unistd.h... (cached) yes
checking for io.h... no
checking size of char... 1
checking size of short... 2
checking size of int... 4
checking size of long... 8
checking size of long long... 8
checking size of __int64... 0
checking size of void *... 8
checking size of 0l... 8
checking size of 0ll... 8
checking size of 0i8... 0
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /bin/dd
checking how to truncate binary pipes... /bin/dd bs=4096 count=1
checking for mt... mt
checking if mt is a manifest tool... no
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for shl_load... no
checking for shl_load in -ldld... no
checking for dlopen... no
checking for dlopen in -ldl... yes
checking whether a program can dlopen itself... yes
checking whether a statically linked program can dlopen itself... no
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating benchmarks/submatch_nfa/Makefile
config.status: creating benchmarks/submatch_dfa_aot/Makefile
config.status: creating benchmarks/submatch_dfa_jit/Makefile
config.status: creating doc/manpage.rst
config.status: creating doc/help.rst
config.status: creating run_tests.sh
config.status: creating benchmarks/submatch_dfa_aot/run.py
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commandsGEN      src/msg/help.ccGEN      src/parse/parser.ccGEN      src/parse/lex.cc
Reconfigure with --enable-lexers to regenerate src/parse/lex.ccGEN      src/msg/ver_to_vernum.cc
Reconfigure with --enable-lexers to regenerate src/msg/ver_to_vernum.ccGEN      src/parse/lex_conf.cc
Reconfigure with --enable-lexers to regenerate src/parse/lex_conf.ccGEN      src/options/parse_opts.cc
Reconfigure with --enable-lexers to regenerate src/options/parse_opts.cc
make  all-recursive
make[1]: 进入目录“/home/wangshuoyuan/re2c”
Making all in .
make[2]: 进入目录“/home/wangshuoyuan/re2c”CXX      src/main.oCXX      src/codegen/code_goto.oCXX      src/codegen/combine.oCXX      src/codegen/gen_bitmaps.oCXX      src/codegen/gen_delayed.oCXX      src/codegen/gen_dfa.oCXX      src/codegen/gen_goto.oCXX      src/codegen/gen_program.oCXX      src/codegen/gen_state.oCXX      src/codegen/helpers.oCXX      src/codegen/render.oCXX      src/options/opt.oCXX      src/nfa/estimate_size.oCXX      src/nfa/re_to_nfa.oCXX      src/adfa/adfa.oCXX      src/adfa/prepare.oCXX      src/debug/dump_adfa.oCXX      src/debug/dump_cfg.oCXX      src/debug/dump_dfa.oCXX      src/debug/dump_dfa_tree.oCXX      src/debug/dump_interf.oCXX      src/debug/dump_nfa.oCXX      src/cfg/cfg.oCXX      src/cfg/compact.oCXX      src/cfg/dce.oCXX      src/cfg/freeze.oCXX      src/cfg/interfere.oCXX      src/cfg/liveanal.oCXX      src/cfg/normalize.oCXX      src/cfg/optimize.oCXX      src/cfg/rename.oCXX      src/cfg/varalloc.oCXX      src/dfa/closure.oCXX      src/dfa/dead_rules.oCXX      src/dfa/determinization.oCXX      src/dfa/fallback_tags.oCXX      src/dfa/fillpoints.oCXX      src/dfa/find_state.oCXX      src/dfa/minimization.oCXX      src/dfa/stacmd.oCXX      src/dfa/tagver_table.oCXX      src/dfa/tcmd.oCXX      src/encoding/ebcdic/ebcdic_regexp.oCXX      src/encoding/enc.oCXX      src/encoding/range_suffix.oCXX      src/encoding/utf8/utf8_regexp.oCXX      src/encoding/utf8/utf8.oCXX      src/encoding/utf16/utf16_regexp.oCXX      src/encoding/utf16/utf16.oCXX      src/msg/msg.oCXX      src/msg/warn.oCXX      src/regexp/ast_to_re.oCXX      src/regexp/default_tags.oCXX      src/regexp/fixed_tags.oCXX      src/regexp/nullable.oCXX      src/regexp/rule.oCXX      src/regexp/split_charset.oCXX      src/regexp/tag.oCXX      src/compile.oCXX      src/skeleton/control_flow.oCXX      src/skeleton/generate_code.oCXX      src/skeleton/generate_data.oCXX      src/skeleton/maxpath.oCXX      src/skeleton/skeleton.oCXX      src/parse/ast.oCXX      src/parse/input.oCXX      src/parse/normalize.oCXX      src/parse/scanner.oCXX      src/parse/unescape.oCXX      src/parse/validate.oCXX      src/util/get_dir.oCXX      src/util/s_to_n32_unsafe.oCXX      src/util/temp_file.oCXX      src/util/range.oCXX      src/msg/help.oCXX      src/parse/lex.oCXX      src/parse/parser.oCXX      src/msg/ver_to_vernum.oCXX      src/parse/lex_conf.oCXX      src/options/parse_opts.oCXXLD    re2cCXX      src/re2go-main.oCXX      src/codegen/re2go-code_goto.oCXX      src/codegen/re2go-combine.oCXX      src/codegen/re2go-gen_bitmaps.oCXX      src/codegen/re2go-gen_delayed.oCXX      src/codegen/re2go-gen_dfa.oCXX      src/codegen/re2go-gen_goto.oCXX      src/codegen/re2go-gen_program.oCXX      src/codegen/re2go-gen_state.oCXX      src/codegen/re2go-helpers.oCXX      src/codegen/re2go-render.oCXX      src/options/re2go-opt.oCXX      src/nfa/re2go-estimate_size.oCXX      src/nfa/re2go-re_to_nfa.oCXX      src/adfa/re2go-adfa.oCXX      src/adfa/re2go-prepare.oCXX      src/debug/re2go-dump_adfa.oCXX      src/debug/re2go-dump_cfg.oCXX      src/debug/re2go-dump_dfa.oCXX      src/debug/re2go-dump_dfa_tree.oCXX      src/debug/re2go-dump_interf.oCXX      src/debug/re2go-dump_nfa.oCXX      src/cfg/re2go-cfg.oCXX      src/cfg/re2go-compact.oCXX      src/cfg/re2go-dce.oCXX      src/cfg/re2go-freeze.oCXX      src/cfg/re2go-interfere.oCXX      src/cfg/re2go-liveanal.oCXX      src/cfg/re2go-normalize.oCXX      src/cfg/re2go-optimize.oCXX      src/cfg/re2go-rename.oCXX      src/cfg/re2go-varalloc.oCXX      src/dfa/re2go-closure.oCXX      src/dfa/re2go-dead_rules.oCXX      src/dfa/re2go-determinization.oCXX      src/dfa/re2go-fallback_tags.oCXX      src/dfa/re2go-fillpoints.oCXX      src/dfa/re2go-find_state.oCXX      src/dfa/re2go-minimization.oCXX      src/dfa/re2go-stacmd.oCXX      src/dfa/re2go-tagver_table.oCXX      src/dfa/re2go-tcmd.oCXX      src/encoding/ebcdic/re2go-ebcdic_regexp.oCXX      src/encoding/re2go-enc.oCXX      src/encoding/re2go-range_suffix.oCXX      src/encoding/utf8/re2go-utf8_regexp.oCXX      src/encoding/utf8/re2go-utf8.oCXX      src/encoding/utf16/re2go-utf16_regexp.oCXX      src/encoding/utf16/re2go-utf16.oCXX      src/msg/re2go-msg.oCXX      src/msg/re2go-warn.oCXX      src/regexp/re2go-ast_to_re.oCXX      src/regexp/re2go-default_tags.oCXX      src/regexp/re2go-fixed_tags.oCXX      src/regexp/re2go-nullable.oCXX      src/regexp/re2go-rule.oCXX      src/regexp/re2go-split_charset.oCXX      src/regexp/re2go-tag.oCXX      src/re2go-compile.oCXX      src/skeleton/re2go-control_flow.oCXX      src/skeleton/re2go-generate_code.oCXX      src/skeleton/re2go-generate_data.oCXX      src/skeleton/re2go-maxpath.oCXX      src/skeleton/re2go-skeleton.oCXX      src/parse/re2go-ast.oCXX      src/parse/re2go-input.oCXX      src/parse/re2go-normalize.oCXX      src/parse/re2go-scanner.oCXX      src/parse/re2go-unescape.oCXX      src/parse/re2go-validate.oCXX      src/util/re2go-get_dir.oCXX      src/util/re2go-s_to_n32_unsafe.oCXX      src/util/re2go-temp_file.oCXX      src/util/re2go-range.oCXX      src/msg/re2go-help.oCXX      src/parse/re2go-lex.oCXX      src/parse/re2go-parser.oCXX      src/msg/re2go-ver_to_vernum.oCXX      src/parse/re2go-lex_conf.oCXX      src/options/re2go-parse_opts.oCXXLD    re2goGEN      doc/re2c.1GEN      doc/re2go.1
Reconfigure with --enable-docs to rebuild docs
make[2]: 离开目录“/home/wangshuoyuan/re2c”
make[1]: 离开目录“/home/wangshuoyuan/re2c”

接下来

sudo make install

安装结束后检查一下

re2c -v

显示

re2c 2.1.1

好的,re2c就安装成功了

官方安装文档:http://re2c.org/install/install.html

接下来是ninja

参考 使用 Ninja 代替 make

git clone git://github.com/ninja-build/ninja.git && cd ninja
./configure.py --bootstrap

显示

bootstrapping ninja...
wrote build.ninja.
bootstrap complete.  rebuilding...
[31/31] LINK ninja

上述命令会在当前目录下生成一个叫 ninja (Windows 下是 ninja.exe)的可执行文件,然后我们把这个文件拷到系统目录(比如 /usr/bin)就完成安装了。

将ninja文件复制到/usr/bin/

cp ninja /usr/bin/

输入

ninja --version

显示

1.10.2

安装成功了

安装过程中还参考了 Linux 18.04 非root 安装re2c和ninja

Ubuntu安装re2c和ninja相关推荐

  1. Ubuntu安装MongoDB

    https://jingyan.baidu.com/article/e5c39bf5f5ddd539d76033a9.html Ubuntu安装MongoDB4.0: https://www.jian ...

  2. ubuntu安装OpenCV详细教程(建议收藏)

    记录一篇"如何安装ubuntu下C++接口的opencv"的文章.由于转载格式有问题,直接贴个链接:ubuntu安装opencv的正确方法 注意:本人根据此博客安装遇到的问题:2. ...

  3. Linux/ubuntu 安装 redis 4.0报错解决:redis-server.service: Can't open PID file /var/run/redis/redis-server.

    此文首发于我的个人博客:Linux/ubuntu 安装 redis 4.0报错解决:redis-server.service: Can't open PID file /var/run/redis/r ...

  4. debian,ubuntu 安装mongodb 允许外网访问,修改端口,设置用户和密码

    使用apt安装mongodb: apt update && apt install mongodb 查看运行状态: systemctl status mongodb.service 结 ...

  5. ubuntu安装KVM

    ubuntu安装KVM 现在官网下载ubuntu镜像,桌面版或者服务端都可,这里以桌面端为例. 安装之前确保磁盘有足够大的空间(这很重要) 安装KVM sudo apt install qemu-kv ...

  6. 解决Ubuntu安装依赖问题

    解决Ubuntu安装依赖问题 解决Ubuntu安装依赖问题 最主要问题,修改的国内镜像源可能不是对应的ubuntu版本,大部人直接找了个镜像源就复制到source.list里面了,其实需要对应版本的, ...

  7. Ubuntu安装Ceres库-安装依赖时报错:E:无法定位软件包 libcxsparse3.1.2_朱国鑫的博客-CSDN博客

    Ubuntu安装Ceres库-安装依赖时报错:E:无法定位软件包 libcxsparse3.1.2_朱国鑫的博客-CSDN博客

  8. ubuntu 安装Pangolin 过程_余辉亮的学习笔记的博客-CSDN博客_pangolin安装

    ubuntu 安装Pangolin 过程_余辉亮的学习笔记的博客-CSDN博客_pangolin安装

  9. Ubuntu安装、使用postgresql数据库

    Ubuntu安装.使用postgresql数据库 $ sudo apt-get install postgresql  (端口为5432) $ sudo apt-get install postgre ...

最新文章

  1. Java之父接受Evrone专访:您需要的软件可靠性越高,静态类型语言的帮助就越大...
  2. 20162304 实验三
  3. ptmalloc内存分配释放
  4. 记忆化搜索 codevs 2241 排序二叉树
  5. F - 你这是第一次让我看到落泪了呢 POJ - 3661Running 区间DP
  6. HyperLogLog 算法原理及其在 Redis 中的实现
  7. linux线程同步互斥说法,linux线程间的同步与互斥知识点总结
  8. 面向对象实现ATM功能
  9. UVA11192 Group Reverse【水题】
  10. 【原创】技术员 Win10 PE 网络版启动工具 V6.2 兼容UEFI双启动
  11. C28x DSP程序加载与运行
  12. 数仓OLAP(一)--即席查询 Kylin
  13. 最全的阿里面试经验(一)
  14. flex局部的知识总结
  15. 1789: 高精度A+B
  16. matlab密度特征,关于用MATLAB应用程序估算风险中性密度的性能分析和介绍
  17. Ubuntu安装Matlab其Simulink没有菜单栏的解决方案(转载可用)
  18. 使用路缘石成型机一次施工作业成型
  19. 怎么搞的,从今天早上起,水木清华BBS就上不去了,郁闷中:(
  20. 基于粒子(Points)模拟雨雪天气效果

热门文章

  1. 加勒比海盗5——死无对证
  2. [论文阅读] (20)USENIXSec21 DeepReflect:通过二进制重构发现恶意行为(恶意代码ROI分析经典)
  3. Three.js学习五——让模型沿着轨迹移动
  4. IDEA注释模板设置【非常实用】
  5. GTASA圣安地列斯大量高清贴图包导致游戏崩溃闪退的解决办法
  6. a ^ 3 = b ^ 3 + c ^ 3 + d ^ 3
  7. 1.VB_求解圆的体积
  8. 2023年经济危机要来了,如何度过这个难关?
  9. SDL开发笔记(三):使用SDL渲染窗口颜色和图片
  10. CSS生成关闭叉叉图标