安装tslib时遇到的问题error: call to ‘__open_missing_mode’ declared with attribute
来源:互联网 发布:东莞百度seo排名优化 编辑:程序博客网 时间:2024/05/21 17:13
在按照Ubuntu下 lpp0900320123的嵌入式Qt开发环境的搭建 中的方法步骤安装安装触摸屏校验工具tslib时遇到两个问题:
1.粘贴复制网页上的命令#./configure --prefix=/usr/local/tslib --host=arm-linux ac_cv_func_malloc_0_nonnull=yes到中断执行时报错。解决办法将命令中所有的空格删掉,在回复。
2.执行完上面命令后,继续执行make,发现报了两个错误:
In function ‘open’,
inlined from ‘main’ at ts_calibrate.c:227:
/usr/include/bits/fcntl2.h:51: error: call to ‘__open_missing_mode’ declared with attribute error: open with O_CREAT in second argument needs 3 arguments
In function ‘open’,
inlined from ‘main’ at ts_calibrate.c:229:
/usr/include/bits/fcntl2.h:51: error: call to ‘__open_missing_mode’ declared with attribute error: open with O_CREAT in second argument needs 3 arguments
make[2]: *** [ts_calibrate.o] Error 1
make[2]: Leaving directory `/opt/tslib/tests'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/opt/tslib'
make: *** [all] Error 2
从上面make: *** [all] Error 2可知总共出现了两个错误。细看都是在ts_calibrate.c中,且都是open with O_CREAT in second argument needs 3 arguments的错误。所以,可以去对应文件中看看。具体解决方案是百度出来的(链接:https://zhidao.baidu.com/question/397186338.html),如下:
gcc 新版本编译器对语法检查严格,在源文件 ./tests/ts_calibrate.c 中// 源文件 // if ((calfile = getenv("TSLIB_CALIBFILE")) != NULL) { // cal_fd = open (calfile, O_CREAT | O_RDWR); // } else { // cal_fd = open ("/etc/pointercal", O_CREAT | O_RDWR); // } // 需要更改成如下形式 if ((calfile = getenv("TSLIB_CALIBFILE")) != NULL) { cal_fd = open (calfile, O_CREAT | O_RDWR, 0777); } else { cal_fd = open ("/etc/pointercal", O_CREAT | O_RDWR, 0777); }保存后重新编译即可。
另附一参考文章:http://blog.csdn.net/u013485792/article/details/51073064。
这个bug一直有,红帽论坛有讨论,链接:https://bugzilla.redhat.com/show_bug.cgi?id=330971。
- 安装tslib时遇到的问题error: call to ‘__open_missing_mode’ declared with attribute
- error: call to '__open_missing_mode' declared with attribute error:
- gcc:call to '__open_missing_mode' declared with attribute error
- gcc:call to '__open_missing_mode' declared with attribute error
- compile tslib1.4,----error: call to ‘__open_missing_mode’ declared with attribute error
- linux下qt中 调用open函数 出现call to '__open_missing_mode' declared with attribute error。。解决
- linux下qt中 调用open函数 出现call to '__open_missing_mode' declared with attribute error。。解决
- error: call to '__creat_missing_mode' declared with attribute error
- android下编摄像头的hal下代码时的错误error: call to '__property_get_too_small_error' declared with attribute error
- 编译android4.4 报错error: call to '__property_get_too_small_error' declared with attribute 的处理
- Android源码编译时遇到的问题:error:reference 'counts' cannot be declared 'mutable'
- 安装mongodb遇到的问题 ERROR: child process failed, exited with error number 100 总结
- Arduino ide 1.6.9 遇到的问题 error: 'TKD2' was not declared in this scope
- s2sh整合遇到的问题Error creating bean with name
- OpenGL ES开发中遇到call to OpenGL ES API with no current context (logged once per thread) 问题原因
- PHP Fatal error: Uncaught Error: Call to undefined function xml_parser_create() 引发的问题
- 关于Tslib编译可能遇到的问题总结
- tslib移植全过程,可能遇到的所有问题,错误
- 轻院1070:小汽车的位置
- 简单认识钢琴五线谱
- hadoop 伪分布式搭建
- 基于H.264的RTP打包原理和FU-A分片实例分析
- 双目视觉
- 安装tslib时遇到的问题error: call to ‘__open_missing_mode’ declared with attribute
- XML1(Xpath有點暈,單獨搞一章)
- WangYi
- vb.net 教程 20-3 控制Ie浏览器 2
- PAT乙级1063. 计算谱半径(20)
- New Year and North Pole
- mini-MBA学习总结二:新媒体营销
- Ubuntu 下eclipse 按alt+/没有起作用解决办法
- C++四种强制转换 static_cast , dynamic_cast , const_cast , reinterpret_cast