What is the difference between gmake and make?

Refer to: http://stackoverflow.com/questions/1194957/what-is-the-difference-between-gmake-and-make

‘gmake’ refers specifically to GNU make. ‘make’ refers to the system’s default make implementation; on most Linux distros this is GNU make, but on other unixes, it could refer to some other implementation of make, such as BSD make, or the make implementations of various commercial unixes.

The language accepted by GNU make is a superset of the one supported by the traditional make utility.

By using ‘gmake’ specifically you can use GNU make extensions without worrying about them being misinterpreted by some other make implementation.

Difference between Cmake, gnu make and manually compiling

Refer to: http://stackoverflow.com/questions/25221869/difference-between-cmake-gnu-make-and-manually-compiling

Cmake is a “project generator”. It doesn’t actually build any object files etc.; what it does is generate the control files for other tools (such as GNU make) which will build object files, etc.

The advantage of using cmake instead of writing the makefile directly is that, using the same cmake input file, cmake can generate project files for all sorts of different build control tools: in addition to makefiles it can generate Xcode (Mac OS X) project files, Microsoft Visual Studio project files, and control files for other tools like Ninja. If you’re writing software that needs to be built on lots of different platforms then cmake is often a good choice.

For your situation, it goes like this: cmake generates a set of makefiles (only). You typically only do this once when you have a clean workspace. Then you run make which uses those makefiles to invoke the compiler as needed, when various files change. The makefiles also have rules to re-run cmake itself if any of the cmake input files change.

Linux下的tar压缩解压缩命令详解

来自:http://www.cnblogs.com/qq78292959/archive/2011/07/06/2099427.html

tar

-c: 建立压缩档案
-x:解压
-t:查看内容
-r:向压缩归档文件末尾追加文件
-u:更新原压缩包中的文件

这五个是独立的命令,压缩解压都要用到其中一个,可以和别的命令连用但只能用其中一个。下面的参数是根据需要在压缩或解压档案时可选的。

-z:有gzip属性的
-j:有bz2属性的
-Z:有compress属性的
-v:显示所有过程
-O:将文件解开到标准输出

下面的参数-f是必须的

-f: 使用档案名字,切记,这个参数是最后一个参数,后面只能接档案名。

# tar -cf all.tar *.jpg
这条命令是将所有.jpg的文件打成一个名为all.tar的包。-c是表示产生新的包,-f指定包的文件名。

# tar -rf all.tar *.gif
这条命令是将所有.gif的文件增加到all.tar的包里面去。-r是表示增加文件的意思。

# tar -uf all.tar logo.gif
这条命令是更新原来tar包all.tar中logo.gif文件,-u是表示更新文件的意思。

# tar -tf all.tar
这条命令是列出all.tar包中所有文件,-t是列出文件的意思

# tar -xf all.tar
这条命令是解出all.tar包中所有文件,-t是解开的意思

压缩

tar -cvf jpg.tar *.jpg //将目录里所有jpg文件打包成tar.jpg

tar -czf jpg.tar.gz *.jpg   //将目录里所有jpg文件打包成jpg.tar后,并且将其用gzip压缩,生成一个gzip压缩过的包,命名为jpg.tar.gz

tar -cjf jpg.tar.bz2 *.jpg //将目录里所有jpg文件打包成jpg.tar后,并且将其用bzip2压缩,生成一个bzip2压缩过的包,命名为jpg.tar.bz2

tar -cZf jpg.tar.Z *.jpg   //将目录里所有jpg文件打包成jpg.tar后,并且将其用compress压缩,生成一个umcompress压缩过的包,命名为jpg.tar.Z

rar a jpg.rar *.jpg //rar格式的压缩,需要先下载rar for linux

zip jpg.zip *.jpg //zip格式的压缩,需要先下载zip for linux

解压

tar -xvf file.tar //解压 tar包

tar -xzvf file.tar.gz //解压tar.gz

tar -xjvf file.tar.bz2   //解压 tar.bz2

tar -xZvf file.tar.Z   //解压tar.Z

unrar e file.rar //解压rar

unzip file.zip //解压zip

总结

1、*.tar 用 tar -xvf 解压

2、*.gz 用 gzip -d或者gunzip 解压

3、*.tar.gz和*.tgz 用 tar -xzf 解压

4、*.bz2 用 bzip2 -d或者用bunzip2 解压

5、*.tar.bz2用tar -xjf 解压

6、*.Z 用 uncompress 解压

7、*.tar.Z 用tar -xZf 解压

8、*.rar 用 unrar e解压

9、*.zip 用 unzip 解压

remove request to s.w.org

Add the following codes at the end of functions.php:
remove_action( ‘wp_head’, ‘print_emoji_detection_script’, 7 );
remove_action( ‘admin_print_scripts’, ‘print_emoji_detection_script’ );
remove_action( ‘wp_print_styles’, ‘print_emoji_styles’ );
remove_action( ‘admin_print_styles’, ‘print_emoji_styles’ );

提醒”libc.so.6: version `GLIBC_2.14′ not found”系统的glibc版本太低

参考:
(1)http://www.cnblogs.com/gw811/p/3676856.html
(2)http://m.oschina.net/blog/262275

【linux】提示”libc.so.6: version `GLIBC_2.14′ not found”,系统的glibc版本太低

0.以下在系统CentOS 6.3 x86_64上操作

1.试图运行程序,提示”libc.so.6: version `GLIBC_2.14′ not found”,原因是系统的glibc版本太低,软件编译时使用了较高版本的glibc引起的:

  1. [ghui@StuOS bin]$ pwd
  2. /var/VMdisks/cross/mingw32/bin
  3. [ghui@StuOS bin]$ ls
  4. lrelease     QtCore4.dll         QtNetwork4.dll      QtSql4.dll     QtXml4.dll
  5. moc          QtDeclarative4.dll  QtOpenGL4.dll       QtSvg4.dll     rcc
  6. phonon4.dll  QtGui4.dll          QtScript4.dll       QtTest4.dll    uic
  7. qmake        QtMultimedia4.dll   QtScriptTools4.dll  QtWebKit4.dll
  8. [ghui@StuOS bin]$ ./qmake
  9. ./qmake: /lib64/libc.so.6: version `GLIBC_2.14′ not found (required by ./qmake)

 

2.查看系统glibc支持的版本:

  1. [ghui@StuOS bin]$ strings /lib64/libc.so.6 |grep GLIBC_
  2. GLIBC_2.2.5
  3. GLIBC_2.2.6
  4. GLIBC_2.3
  5. GLIBC_2.3.2
  6. GLIBC_2.3.3
  7. GLIBC_2.3.4
  8. GLIBC_2.4
  9. GLIBC_2.5
  10. GLIBC_2.6
  11. GLIBC_2.7
  12. GLIBC_2.8
  13. GLIBC_2.9
  14. GLIBC_2.10
  15. GLIBC_2.11
  16. GLIBC_2.12
  17. GLIBC_PRIVATE
  1. [ghui@StuOS bin]$ rpm -qa |grep glibc
  2. glibc-static-2.12-1.80.el6_3.6.x86_64
  3. glibc-headers-2.12-1.80.el6_3.6.x86_64
  4. glibc-common-2.12-1.80.el6_3.6.x86_64
  5. glibc-devel-2.12-1.80.el6_3.6.x86_64
  6. glibc-static-2.12-1.80.el6_3.6.i686
  7. glibc-devel-2.12-1.80.el6_3.6.i686
  8. glibc-2.12-1.80.el6_3.6.i686
  9. glibc-2.12-1.80.el6_3.6.x86_64

 

3.可以看到最高只支持2.12版本,所以考虑编译解决这个问题:

a. 到http://www.gnu.org/software/libc/下载最新版本,我这里下载了glibc-2.14.tar.xz 这个版本,解压到任意目录准备编译

b.这里解压到/var/VMdisks/glibc-2.14/

  1. [ghui@StuOS bin]$ cd /var/VMdisks/glibc-2.14/
  2. [ghui@StuOS glibc-2.14]$ pwd
  3. /var/VMdisks/glibc-2.14
  4. [ghui@StuOS glibc-2.14]$ ls
  5. abilist            config.h.in           intl           README.libm
  6. abi-tags           config.log            io             resolv
  7. aclocal.m4         config.make.in        libc-abis      resource
  8. aout               configure             libidn         rt
  9. argp               configure.in          libio          Rules
  10. assert             conform               LICENSES       scripts
  11. autom4te.cache     CONFORMANCE           locale         setjmp
  12. bits               COPYING               localedata     shadow
  13. BUGS               COPYING.LIB           login          shlib-versions
  14. build              cppflags-iterator.mk  mach           signal
  15. CANCEL-FCT-WAIVE   crypt                 Makeconfig     socket
  16. CANCEL-FILE-WAIVE  csu                   Makefile       soft-fp
  17. catgets            ctype                 Makefile.in    stdio-common
  18. ChangeLog          debug                 Makerules      stdlib
  19. ChangeLog.1        dirent                malloc         streams
  20. ChangeLog.10       dlfcn                 manual         string
  21. ChangeLog.11       elf                   math           sunrpc
  22. ChangeLog.12       extra-lib.mk          misc           sysdeps
  23. ChangeLog.13       extra-modules.mk      NAMESPACE      sysvipc
  24. ChangeLog.14       FAQ                   NEWS           termios
  25. ChangeLog.15       FAQ.in                nis            test-skeleton.c
  26. ChangeLog.16       gmon                  NOTES          time
  27. ChangeLog.17       gnulib                nptl           timezone
  28. ChangeLog.2        grp                   nptl_db        tls.make.c
  29. ChangeLog.3        gshadow               nscd           version.h
  30. ChangeLog.4        hesiod                nss            Versions.def
  31. ChangeLog.5        hurd                  o-iterator.mk  wcsmbs
  32. ChangeLog.6        iconv                 po             wctype
  33. ChangeLog.7        iconvdata             posix          WUR-REPORT
  34. ChangeLog.8        include               PROJECTS
  35. ChangeLog.9        inet                  pwd
  36. conf               INSTALL               README

c.在glibc源码目录建立构建目录,并cd进入构建目录

  1. [ghui@StuOS glibc-2.14]$ mkdir build
  1. [ghui@StuOS glibc-2.14]$ cd build

d.运行configure配置,make && sudo  make install

  1. [ghui@StuOS build]$ ../configure –prefix=/opt/glibc-2.14
  2. [ghui@StuOS build]$ make -j4
  3. [ghui@StuOS build]$ sudo make install
  4. [sudo] password for ghui:

4.临时修改环境变量

  1. [ghui@StuOS bin]$ export LD_LIBRARY_PATH=/opt/glibc-2.14/lib:$LD_LIBRARY_PATH
  1. [ghui@StuOS glibc-2.14]$ cd /var/VMdisks/cross/mingw32/bin/

 

  1. [ghui@StuOS bin]$ ./qmake
  2. Usage: ./qmake [mode] [options] [files]
  3. QMake has two modes, one mode for generating project files based on
  4. some heuristics, and the other for generating makefiles. Normally you
  5. shouldn’t need to specify a mode, as makefile generation is the default
  6. mode for qmake, but you may use this to test qmake on an existing project

 

此时运行正常,问题解决。