`

Linux操作问题解答

 
阅读更多

1. configure: error : C++ preprocessor "/lib/cpp" fails sanity check

    See 'config.log' for more details

 

http://www.linuxsense.org/archives/121.html    问题解决方案



 

2. Linux复制命令 linux怎么复制文件夹



 

 

3. vmware workstation 8 download 下载地址    http://370135415.blog.51cto.com/952425/664664

4.   Linux中在没有gcc编译器的情况下如何安装gcc



 

5.  linux 如何挂起进程



 

 

 



 

 

8.  编译heartbeat及其他文件时,出现Werror 问题



 

只需在相应的文件夹下,例如buildtools中,将makefile中 -Werror 替换成空格即可

http://www.360doc.com/content/12/0114/00/834950_179273467.shtml

9.  

"-Werror "产生的教训

案例:

在准备重新做squid-3.0.STABLE16squid-3.0.STABLE16配置 make 时出现以下错误使make中断

       g++ -DHAVE_CONFIG_H -DDEFAULT_CONFIG_FILE=\"/usr/local/squid/etc/squid.conf\" -I. -I../include -I. -I.                -I../include -I../include -I../lib/libTrie/include    -Werror -Wall -Wpointer-arith -Wwrite-strings -Wcomments                 -g -O2 -MT client_side.o -MD -MP -MF $depbase.Tpo -c -o client_side.o client_side.cc &&\
        mv -f $depbase.Tpo $depbase.Po
cc1plus: warnings being treated as errors
client_side.cc: In function 'int connKeepReadingIncompleteRequest(RefCount<ConnStateData>&)':
client_side.cc:2144: error: comparison between signed and unsigned integer expressions
make[3]: *** [client_side.o] Error 1
make[3]: Leaving directory `/root/squid-3.0.STABLE16/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/root/squid-3.0.STABLE16/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/root/squid-3.0.STABLE16/src'
make: *** [all-recursive] Error 1

经过多次检查确实编译环境没有问题,依赖也没有问题,问题就出在"cc1plus: warnings being treated as errors" gcc里如果加上 -Werror 来严格检查编译环境使用它能够使gcc产生告警也认为是错误.   faint. 就在这里 .当时没有仔细看错误输出,想当然地认为环境有问题,于是多折腾了半天时间.

解决这个问题也很简单,其实错误输出时都已有提示:

1, 进入 ./src目录 , 备份Makefile

2, 编辑Makefile 用空格替换所有的"-Werror " 后保存退出.

重新make && make install 一路顺畅

 

  • 大小: 118.7 KB
  • 大小: 50.9 KB
  • 大小: 112.4 KB
  • 大小: 64.6 KB
  • 大小: 197.3 KB
  • 大小: 120.9 KB
  • 大小: 228.6 KB
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics