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 ...
随机推荐
- C++ STL:lower_bound与upper_bound实现
lower_bound lower_bound(begin, end, target)用来查找一个已排序的序列中[begin, end)第一个大于等于target的元素index.数组A如下: val ...
- jQuery全能图片滚动插件
插件开发背景 随着前端开发领域越来越受到重视,前端开发也变得越来越火热.各种优秀的前端组件层出不穷.尤其是jQuery插件,很多前端组件都是基于jQuery开开发的. 图片滚动是前端开发中可以说是非常 ...
- JS之 if语句函数 对接事件动作 函数更改css css对接需要换妆的区id或class
if 函数的实现步骤: function +名字() 指定id , 指定开关(display: none or block) if + else 构成逻辑 控制开关 决定在哪里安置一个灯泡, 指定 ...
- GIS平台结构设计
前言: WebGIS由于技术发展和功能定位的原因,一般在进行架构设计的时候更多地考虑是否容易实现.用户交互.数据传输方便.渲染效果等方面,对强GIS的应用考虑得少,所以架构上与桌面的GIS平台很不一样 ...
- RocketMQ读书笔记7——吞吐量优先的场景
[Broker端进行消息过滤] 在Broker端进行消息过滤,可以减少无效消息发送到Consumer,少占用网络宽带从而提高吞吐量. [过滤方式1——通过Tag过滤] [ 关于Tag和Key ] 对一 ...
- spring cloud zuul 配置
参考:http://www.ityouknow.com/springcloud/2017/06/01/gateway-service-zuul.html spring boot版本:2.0.3.REL ...
- xcopy-参数详解
XCOPY——目录复制命令 1.功能:复制指定的目录和目录下的所有文件连同目录结构. 2.类型:外部命令 3.格式:XCOPY [源盘:]〈源路径名〉[目标盘符:][目标路径名][/S][/V][/E ...
- 使用公钥和私钥实现LINUX下免密登录
linux公钥私钥实现无密码登录 首先本地主机生成公约和私钥 # ssh-keygen /生成公钥和私钥 不要更改默认路径,中途不要输入密码,直接两次回车. 2. 将生成 ...
- FDFDF
Linux(Centos)之安装Nginx及注意事项 1.Nginx的简单说明 a. Nginx是一个高性能的HTTP和反向代理服务器,也是一个IMAP/POP3/SMTP服务器,期初开发的目的 ...
- magento2站点迁移
当文件与数据库都迁到新服务器上之后 rm -rf ./var/cache/ rm -rf ./var/generation/ rm -rf ./var/log/ rm -rf ./var/maps/ ...