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 ...
随机推荐
- Java内存区域与虚拟机类加载机制
一.Java运行时数据区域 1.程序计数器 “线程私有”的内存,是一个较小的内存空间,它可以看做当前线程所执行的字节码的行号指示器.Java虚拟机规范中唯一一个没有OutOfMemoryError情况 ...
- BZOJ2229: [Zjoi2011]最小割(最小割树)
传送门 最小割树 算法 初始时把所有点放在一个集合 从中任选两个点出来跑原图中的最小割 然后按照 \(s\) 集合与 \(t\) 集合的归属把当前集合划分成两个集合,递归处理 这样一共跑了 \(n − ...
- 用Java开发贪吃蛇游戏
贪吃蛇游戏的设计步骤: Part 1: 设计游戏图纸 画出900*700的白色窗口 在窗口上添加画布 在画布上添加标题 在画布上添加黑色游戏区 Part 2: 放置静态的蛇:一个头.两个身体 加上开始 ...
- Codeforces Round #417 B. Sagheer, the Hausmeister
B. Sagheer, the Hausmeister time limit per test 1 second memory limit per test 256 megabytes Som ...
- 公司网络问题 & Caused by: org.gradle.internal.resource.transport.http.HttpRequestException
问题 公司网络问题,总是无法成功下载库,回到家就可以. Caused by: org.gradle.internal.resource.transport.http.HttpRequestExcept ...
- 在Qt中使用Font Awesome图标
官网: http://fontawesome.io/中文网: http://www.fontawesome.com.cn/GitHub: https://github.com/FortAwesome/ ...
- Hibernate_Validator学习
1. Hibernate Validator介绍 1.1 背景 在任何时候,当你要处理一个应用程序的业务逻辑,数据校验是你必须要考虑和面对的事情.应用程序必须通过某种手段来确保输入进来的数据从 ...
- 【转】OmniGraffle (一)从工具栏开始
原文链接:http://www.jianshu.com/p/52f3ecbe8f2d OmniGraffle的软件布局和大多数图形类软件类似,中间是编辑区,左边是页面和对象组织的管理,右边是参数设置和 ...
- Java多线程学习笔记(一)
一 概述 一个进程只有一个至少会运行一个线程,Java中同样存在这样,在调用main方法的时候,线程又JVM所创建. package link.summer7c.test; public class ...
- c#之委托详解(Delegate)
一.委托的概念 在我们学习委托之前,我们来了解下,什么是委托呢? 官方概念:委托是一种安全地封装方法的类型,它与 C 和 C++ 中的函数指针类似.与 C 中的函数指针不同,委托是面向对象的.类型安全 ...