error: call to '__open_missing_mode' declared with attribute error:
2016-07-21 22:24
591 查看
今天安装gettext-0.17时,make命令出现了下面的错误,后面找了半天的资料才解决,记录一下:
In file included from /usr/include/fcntl.h:289:0,
from ../gnulib-lib/fcntl.h:27,
from write-catalog.c:25:
In function ‘open’,
inlined from ‘msgdomain_list_print’ at write-catalog.c:223:7:
/usr/include/i386-linux-gnu/bits/fcntl2.h:50:4: error: call to ‘__open_missing_mode’ declared with attribute error: open with O_CREAT or O_TMPFILE in second argument needs 3 arguments
__open_missing_mode ();
从报错的字面意思应该可以看出来open with O_CREAT or O_TMPFILE in second argument needs 3 arguments这句话的意思是使用open函数时,当第二个参数用O_CREAT时,表示创建文件,需要使用第三个参数将文件赋予权限。定位到write-catalog.c的223行,果然只使用了两个参数,在后面添加0777:
fd = open (filename, O_WRONLY | O_CREAT,0777);
make正常。。。。
In file included from /usr/include/fcntl.h:289:0,
from ../gnulib-lib/fcntl.h:27,
from write-catalog.c:25:
In function ‘open’,
inlined from ‘msgdomain_list_print’ at write-catalog.c:223:7:
/usr/include/i386-linux-gnu/bits/fcntl2.h:50:4: error: call to ‘__open_missing_mode’ declared with attribute error: open with O_CREAT or O_TMPFILE in second argument needs 3 arguments
__open_missing_mode ();
从报错的字面意思应该可以看出来open with O_CREAT or O_TMPFILE in second argument needs 3 arguments这句话的意思是使用open函数时,当第二个参数用O_CREAT时,表示创建文件,需要使用第三个参数将文件赋予权限。定位到write-catalog.c的223行,果然只使用了两个参数,在后面添加0777:
fd = open (filename, O_WRONLY | O_CREAT,0777);
make正常。。。。
相关文章推荐
- ubuntu 14.04 linux下wifi驱动安装使用的一些笔记
- Linux学习笔记--命令的顺序执行、管道符、通配符、其他特殊符号
- linux命令详解之useradd命令使用方法
- (4)-optXXX方法的使用
- Spark在Linux下集群的搭建
- Tomcat系列之Apache负载均衡请求至Tomcat及DeltaManager的使用
- B2C 电商网站需要怎样的 ERP 系统
- Dropout
- 初窥Linux 之 我最常用的20条命令
- Windows 维护项,让电脑飞
- (转载)Windows 上搭建Apache FtpServer
- CMFCShellTreeCtrl在win7下打开家庭组断言BUG
- linux 进程间通信简介(IPC)
- 企业数据平台仓库架构建设思路
- 在linux下,安装python3.5.2
- LINUX-内核-中断分析-中断向量表(3)-arm
- linux 信号的使用
- linux软件安装:源码(1)
- 设fp已定义,执行语句fp=fopen("file","w");后,以下针对文本文件file操作叙述的选项错误的是:不可以在原有内容后追加写
- log4j.properties 详解与配置步骤