Ubuntu安装re2c和ninja
                                                            生活随笔
收集整理的這篇文章主要介紹了
                                Ubuntu安装re2c和ninja
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.                        
                                老板帶的本科生要做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的全部內容,希望文章能夠幫你解決所遇到的問題。
 
                            
                        - 上一篇: 记股诗
- 下一篇: Twincat NC PTP
