make——命令备份——常见问题解决
##########################################################################
Configure complete! Now proceed with:
- 'make' compile the project
- 'make check' run the project's selftest
- 'make check-<test-name>' run the project's selftest
- 'make install' install the project to /usr/local/czmq
- 'make bindings install enabled language bindings (Python, etc)
Further options are:
- 'make callcheck' run the project's selftest with valgrind to
check for performance leaks
- 'make check-verbose' run the project's selftest in verbose mode
- 'make code' generate code from models in src directory
(requires zproject and zproto)
- 'make debug' run the project's selftest under gdb
- 'make memcheck' run the project's selftest with valgrind to
check for memory leaks
- 'make coverage' generate project's selftest coverage report
expects --with-gcov option for configure
- 'make clang-format-check' check if project sources conform
to style requirements
- 'make clang-format' modify project sources to conform
to style requirements
- 'make clang-format-diff' modify as above and print 'git diff'
localhost:czmq chong$
localhost:czmq chong$
localhost:czmq chong$ ./configure -prefix=/usr/local/czmq
Makefile中的“-I”(大写i),“-L”(大写l),“-l”(小写l) 用gcc编译程序时,可能会用到“-I”(大写i),“-L”(大写l),“-l”(小写l)等参数, “-I”(大写i):表示包含头文件; “-L”(大写l):表示库文件目录; “-l”(小写l):表示链接库文件(包括动态库文件,静态库文件);
问题一、有依赖的情况
./configure --prefix=/root/data/ssan/gateway/libczmq/build --with-libzmq=/root/data/ssan/gateway/libzmq/build
./configure --prefix=/usr/local/Cellar/unixodbc/2.3.9_1 --sysconfdir=/usr/local/etc --enable-static -
问题二、关于手动下载brew无法下载的包
下载xxxxx包后,拷贝至
/Users/chong/Library/Caches/Homebrew/downloads/
再重新执行brew install xxxxx
问题三、初始化配置,找不到依赖的问题
修改configure文件,
checking for zmq_init in -lzmq... no
解决办法:
把 LIBS="-lzmq $LIBS"
改为 LIBS="-L${with_libzmq}/lib -lzmq $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
再执行./configure
其这with_libzmq来自 --with-libzmq=xxxxx输入的目录。
问题四、编译libmicrohttpd-master 时,./bootstrap: line 32: libtoolize: command not found
localhost:libmicrohttpd-master chong$ ./autogen.sh
Installing uncrustify hook and configuration
Running autotools...
aclocal: installing 'm4/po.m4' from '/usr/local/share/aclocal/po.m4'
./bootstrap: line 32: libtoolize: command not found
libtool工具有名字冲突,
localhost:Documents chong$ brew list libtool /usr/local/Cellar/libtool/2.4.6_4/bin/glibtool /usr/local/Cellar/libtool/2.4.6_4/bin/glibtoolize /usr/local/Cellar/libtool/2.4.6_4/include/libltdl/ (3 files) /usr/local/Cellar/libtool/2.4.6_4/include/ltdl.h /usr/local/Cellar/libtool/2.4.6_4/lib/libltdl.7.dylib /usr/local/Cellar/libtool/2.4.6_4/lib/ (2 other files) /usr/local/Cellar/libtool/2.4.6_4/libexec/gnubin/ (2 files) /usr/local/Cellar/libtool/2.4.6_4/libexec/gnuman/ (2 files) /usr/local/Cellar/libtool/2.4.6_4/share/aclocal/ (7 files) /usr/local/Cellar/libtool/2.4.6_4/share/info/ (3 files) /usr/local/Cellar/libtool/2.4.6_4/share/libtool/ (42 files) /usr/local/Cellar/libtool/2.4.6_4/share/man/ (2 files)
可以看到本机的是 glibtoolize 、glibtool,
所以把bootstrap中的libtoolize改成glibtoolize,即可。
参考自:
You may try again installing the tools you want to. If the come with a ./configure
script, re-execute it to let it find glibtoolize
. If this does not work, you may need to set the environment variable LIBTOOL
to the version Homebrew installed:
export LIBTOOL=`which glibtool`
export LIBTOOLIZE=`which glibtoolize`
As a last resort, you may need to set a symbolic link from glibtoolize
to libtoolize
. You can do so via