f-stack中nginx配置后make出现error: ignoring return value of ‘ftruncate’
问题
Nginx 配置后 make 出现error:
src/os/unix/ngx_process_cycle.c: In function ‘ngx_start_worker_processes’:
src/os/unix/ngx_process_cycle.c:388:5: error: ignoring return value of ‘ftruncate’, declared with attribute warn_unused_result [-Werror=unused-result]
(void) ftruncate(shm_fd, sizeof(sem_t));
^
cc1: all warnings being treated as errors
objs/Makefile:799: recipe for target 'objs/src/os/unix/ngx_process_cycle.o' failed
make[1]: *** [objs/src/os/unix/ngx_process_cycle.o] Error 1
make[1]: Leaving directory '/home/sdn/f-stack/app/nginx-1.11.10'
Makefile:8: recipe for target 'build' failed
make: *** [build] Error 2
环境
The compiling environment is Ubuntu
uname -r:4.13.0-45-generic
cc -v:gcc version 5.4.0
DPDK和F-stack可以成功安装,但是Nginx无法make。
按照原文档的方式配置configure:
# bash ./configure --prefix=/usr/local/nginx_fstack --with-ff_module
# make
- 出现以下error:
src/os/unix/ngx_process_cycle.c: In function ‘ngx_start_worker_processes’:
src/os/unix/ngx_process_cycle.c:388:5: error: ignoring return value of ‘ftruncate’, declared with attribute warn_unused_result [-Werror=unused-result]
(void) ftruncate(shm_fd, sizeof(sem_t));
^
cc1: all warnings being treated as errors
objs/Makefile:799: recipe for target 'objs/src/os/unix/ngx_process_cycle.o' failed
make[1]: *** [objs/src/os/unix/ngx_process_cycle.o] Error 1
make[1]: Leaving directory '/home/sdn/f-stack/app/nginx-1.11.10'
Makefile:8: recipe for target 'build' failed
make: *** [build] Error 2
解决办法
在配置文件的时候,键入:
./configure --prefix=/usr/local/nginx_fstack --with-ff_module --with-cc-opt="-Wno-implicit-fallthrough -Wno-unused-result"
github issues
- 感谢那位工程师的回复!!
f-stack中nginx配置后make出现error: ignoring return value of ‘ftruncate’的更多相关文章
- Windows中Nginx配置nginx.conf不生效解决方法(路径映射)
Windows中Nginx配置nginx.conf不生效解决方法 今天在做Nginx项目的时候,要处理一个路径映射问题, location /evaluate/ { proxy_pass http:/ ...
- tp5中nginx配置
首先tp5的访问目录指向到webroot/public文件夹中. thinkphp的url访问:http://serverName/index.php(或者其它应用入口文件)/模块/控制器/操作/[参 ...
- linux 中 nginx配置
1.nginx中include的使用 在/usr/local/nginx/conf/nginx.conf中可以使用include去加载其他配置文件: 例如:include vhost/*.conf; ...
- nginx 配置后页面访问是报500错
该问题是html文件权限问题. 用jenkins 并远程服务器上传到另一台服务器的html ,在配置好nginx 的location root 绝对位置后还是报错500 手工用root上传时访问正常 ...
- Windows中Nginx配置nginx.conf不生效解决方法
转:https://lucifer.blog.csdn.net/article/details/83860644?utm_medium=distribute.pc_relevant.none-task ...
- nginx 配置后网站图片加载出来一半或者不出来
项目进行nginx反向代理后发现图片和js.css等加载很慢,甚至加载不出来. 然后查看nginx的log,发现错误如下: 2016/06/30 15:31:12 [crit] 29465#0: *1 ...
- centos中samba配置后始终连不上的绝招
奶奶的,按照网上的办法改了/etc/samba/smb.conf配置文件,结果在win7里面死活连不上,后来发现是防火墙的问题. 有两个命令必须要执行: 1.将SELIUNX设置成disabled或者 ...
- nginx配置后只有根目录首页index.php能访问,其他页面404
只有首页面根目录可以访问,其他页面地址都是404 not found.网上找了半天url重定向,url重写都试了无效,要不就是重定向过多,下图为跳坑历程. location / { #if ($htt ...
- nginx停止后再启动出现: [error] open() "/usr/local/nginx/logs/nginx.pid" failed错误的解决方法
为了备份数据 手动停止了服务器的nginx 结果启动时报错 nginx: [error] open() "/usr/local/nginx/logs/nginx.pid" fail ...
随机推荐
- SQL Server 字符串合并
应用场景:多条数据某列数据以某种样式合并成一条数据,例如: 1 1,0 小赵 0012 2,0 小钱 002 ==== ...
- Angular面试题一
一.ng-show/ng-hide 与 ng-if的区别? 第一点区别是, ng-if 在后面表达式为 true 的时候才创建这个 dom 节点, ng-show 是初始时就创建了,用 display ...
- 护航SMB网络安全 应选择新一代防火墙
当前,各种规模的企业都遭遇着日益增多的网络攻击,而其中以中小企业(SMB)为代表的广大群体则更加面临敏感数据.公司资产和知识产权不断暴露在风险中的窘境.为了帮助企业应对这一挑战,新一代防火墙的采购与部 ...
- 修改maven默认的jdk版本
修改maven默认的jdk版本,想改彻底需要在maven的全局配文件(settings.xml)增加以下信息: 在profiles 节点下增加: <profile> <id> ...
- 用java实现从命令行接收多个数字,求和之后输出结果。
用java实现从命令行接收多个数字,求和之后输出结果. 1 设计思想: (1)建立类. (2)输出参数个数. (3)定义int型的num和sum,分别用来存储参数和参数的和. (4)用for循环讲参数 ...
- 利用Java反射实现JavaBean对象相同属性复制并初始化目标对象为空的属性的BeanUtils
有时遇到将数据传输对象转换成JSON串会将属性值为空的属性去掉,利用Java反射实现JavaBean对象数据传输对象的相同属性复制并初始化数据传输对象属性为空的属性,然后转换成JSON串 packag ...
- Xshell启动时显示丢失MSVCP110.dll
重装系统,装完Xshell5启动时,出现丢失MSVCP110.dll文件 这种情况不要相信网上所说的什么下载“MSVCP110.dll”文件或者下载微软的vcredist 2012 这样没用 正确的姿 ...
- 【Oracle】Update方法
1.单表更新 update customers set city_name='山西省太原市' where city_name='山西太原' 2.两表(多表)关联update -- 被修改值由另一个表运 ...
- axure rp8.1 注册码
授权人:University of Science and Technology of China (CLASSROOM)授权密钥:DTXRAnPn1P65Rt0xB4eTQ+4bF5IUF0gu0X ...
- Javascript 中 true 和 false
"" == false // true "0" == false // true "" == "0" //false 以 ...