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 ...
随机推荐
- LeetCode GrayCode
class Solution { public: vector<int> grayCode(int n) { vector<int> res; res.push_back(); ...
- PoPo数据可视化周刊第4期
PoPo数据可视化 聚焦于Web数据可视化与可视化交互领域,发现可视化领域有意思的内容.不想错过可视化领域的精彩内容, 就快快关注我们吧 :) 微信号:popodv_com 由于国庆节的原因,累计 ...
- border实现三角形的原理
前言:网上最普遍的实现三角形的方法,就是通过控制border来实现,那为什么可以呢? 原理 我们先来看看border的表现形式. #box{ width:100px; height:100px; ba ...
- LeetCode赛题----Find Left Most Element
问题描述 Given a binary tree, find the left most element in the last row of the tree. Example 1: Input: ...
- 解决servlet在web.xml中的路径跳转问题
<?xml version="1.0" encoding="UTF-8"?> <web-app version="3.0" ...
- vs2015新建web应用程序空模板和添加webapi的模板生成文件的比较
文件名为全红色的,是使用webapi模板生成的新文件夹或文件
- xml php 解析
JSON作为数据交换可以说已经成为了一种事实上的标准,但是前几年和它对应的xml虽然说用的越来越少,但是我感觉还是有他可以应用的地方. json更偏重于程序员来使用和解读,而xml则更适合用户来使用和 ...
- JAXB实现java对象与xml之间转换
JAXB简介: 1.JAXB能够使用Jackson对JAXB注解的支持实现(jackson-module-jaxb-annotations),既方便生成XML,也方便生成JSON,这样一来可以更好的标 ...
- January 12 2017 Week 2 Thursday
Although it rains, throw not away your watering pot. 纵然天下雨,休把水壶丢. Don't throw away your watering pot ...
- Redis 拒绝连接
1.本地防火墙是否关闭 2.服务器的防火墙是否关闭 检查方法: service iptables status 查看防火墙状态 service iptables s ...