导航:首页 > 源码编译 > 编译a文件lto错误

编译a文件lto错误

发布时间:2022-10-20 07:28:59

① 【新手】为什么又是编译错误会冒出algo.h如图

你写的程序调用了STL库函数中的函数
algo.h就是STL库函数的一个文件

因为你程序调用的可能不正确,所以你点击错误的时候,就会导向到函数定义的地方了
它到这里是表示你调用了该函数然后运行的时候到这个位置出错了
这个一般情况是你调用的时候可能传入的参数有问题,如为null或者非法什么的等等

所以你要检查你的程序的正确性

② centos7编译php5.4.38时出错

1. centos7信息

uname -a

linux dev 3.10.0-327.el7.x86_64 #1 SMP Thu Nov 19 22:10:57 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

2. 运行 ./configure 报错

configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
3. 运行 grep error config.log

cc: error: unrecognized command line option '-V'
cc: fatal error: no input files
cc: error: unrecognized command line option '-qversion'
cc: fatal error: no input files
conftest.c:9:19: fatal error: stdio.h: No such file or directory
configure:4076: error: in `/usr/local/src/php-5.6.19':
configure:4078: error: cannot run C compiled programs.

4. 按照网上说的方法 在configure后面加上了 --host=x86_64 ,报错
configure: error: in `/usr/local/src/php-5.6.19':
configure: error: C preprocessor "/lib/cpp" fails sanity check
5. config.log中错误提示,差好几个头文件

cc: error: unrecognized command line option '-V'
cc: fatal error: no input files
cc: error: unrecognized command line option '-qversion'
cc: fatal error: no input files
conftest.c:9:19: fatal error: stdio.h: No such file or directory
configure:4076: error: in `/usr/local/src/php-5.6.19':
configure:4078: error: cannot run C compiled programs.
[root@dev php-5.6.19]# grep error config.log
cc: error: unrecognized command line option '-V'
cc: fatal error: no input files
cc: error: unrecognized command line option '-qversion'
cc: fatal error: no input files
conftest.c:9:19: fatal error: stdio.h: No such file or directory
conftest.c:9:20: fatal error: stdarg.h: No such file or directory
| These don't provoke an error unfortunately, instead are silently treated
| as 'x'. The following inces an error, until -std is added to get
cc: error: unrecognized command line option '-qlanglvl=extc89'
| These don't provoke an error unfortunately, instead are silently treated
| as 'x'. The following inces an error, until -std is added to get
cc: error: unrecognized command line option '-qlanglvl=ansi'
| These don't provoke an error unfortunately, instead are silently treated
| as 'x'. The following inces an error, until -std is added to get
cc: error: unrecognized command line option '-std'
| These don't provoke an error unfortunately, instead are silently treated
| as 'x'. The following inces an error, until -std is added to get
<command-line>:0:1: error: missing '(' after predicate
conftest.c:9:20: fatal error: stdarg.h: No such file or directory
| These don't provoke an error unfortunately, instead are silently treated
| as 'x'. The following inces an error, until -std is added to get
<command-line>:0:1: error: missing '(' after predicate
conftest.c:9:20: fatal error: stdarg.h: No such file or directory
| These don't provoke an error unfortunately, instead are silently treated
| as 'x'. The following inces an error, until -std is added to get
cc: error: unrecognized command line option '-Xc'
| These don't provoke an error unfortunately, instead are silently treated
| as 'x'. The following inces an error, until -std is added to get
conftest.c:10:21: fatal error: limits.h: No such file or directory
| Syntax error
conftest.c:10:21: fatal error: limits.h: No such file or directory
| Syntax error
conftest.c:12:0: fatal error: assert.h: No such file or directory
| Syntax error
conftest.c:12:0: fatal error: assert.h: No such file or directory
| Syntax error
conftest.c:10:21: fatal error: limits.h: No such file or directory
| Syntax error
conftest.c:10:21: fatal error: limits.h: No such file or directory
| Syntax error
conftest.c:10:21: fatal error: limits.h: No such file or directory
| Syntax error
conftest.c:10:21: fatal error: limits.h: No such file or directory
| Syntax error
configure:4478: error: in `/usr/local/src/php-5.6.19':
configure:4480: error: C preprocessor "/lib/cpp" fails sanity check

6. gcc安装信息

[root@dev php-5.6.19]# rpm -qa | grep glibc
compat-glibc-headers-2.12-4.el7.centos.x86_64
glibc-utils-2.17-106.el7_2.4.x86_64
glibc-common-2.17-106.el7_2.4.x86_64
glibc-devel-2.17-106.el7_2.4.x86_64
glibc-static-2.17-106.el7_2.4.x86_64
glibc-2.17-106.el7_2.4.x86_64
glibc-headers-2.17-106.el7_2.4.x86_64
compat-glibc-2.12-4.el7.centos.x86_64

[root@dev php-5.6.19]# gcc -v
Using built-in specs.

COLLECT_GCC=gcc

COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.8.5/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/cloog-install --enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.8.5 20150623 (Red Hat 4.8.5-4) (GCC)

③ c语言问题 编译显示0错误而运行显示错误

我之前用的vs2012,现在用的vs2013。这个是问题一般是编码格式的问题的。可以调成unicode试试。或者用记事本过滤一下。

④ .a文件是什么VC6.0编译出现错误,怎么在编译的时候把.a文件也加进去

.a文件是GCC编译器用的,VC编译器无法使用。
你要换GCC编译器的话集成开发环境也不能用VC,要换。
Windows下也是可以用GCC的,不过你要确定你拿到的.a不是Linux下生成的
然后这里面名堂就多了我一下子也讲不清于是只能让你自己慢慢去找这方面的资料了。

⑤ mariadb编译安装出现如下错误,要怎么弄

project(TokuDB)
suppress -rdynamic
set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "")
Versions of gcc >= 4.9.0 require special version of 'ar' and 'ranlib' for

link-time optimizations to work properly.

From https://gcc.gnu.org/gcc-4.9/changes.html:

When using a linker plugin, compiling with the -flto option now

generates slim objects files (.o) which only contain intermediate

language representation for LTO. Use -ffat-lto-objects to create

files which contain additionally the object code. To generate

static libraries suitable for LTO processing, use gcc-ar and

gcc-ranlib; to list symbols from a slim object file use

gcc-nm. (Requires that ar, ranlib and nm have been compiled with

plugin support.)

不是4.9.0以上不行,因为tokudb的问题,一般4.8是支持的C++11的,只是不同版本GCC支持C++11特性不同而已

⑥ 用g++编译程序生成名为a的应用程序,使用./a.out不输出,错误显示".不是

我用一个例子来告诉你怎么样在 C++ 里使用C的头文件/函数。

比方说我有一个C的头文件叫 c.h, C的源码文件叫 c.c,内容分别是

c.h:
#ifndef _ASDFD_INCLUDED_
#define _ASDFD_INCLUDED_

#include <stdio.h>

extern int test(int a);

#endif

c.c:
#include "c.h"

int test(int a)
{
printf("A = %d\n", a);
return a*a;
}

⑦ quartus编译出现如下错误

说的不明确,应该是程序有问题

⑧ C# 编译,生成,运行都出错。错误说明:Files的值"a

一般是编译文件里有不可识别的字符串导致的。
关闭 VS,打开有问题的项目(图上看是 AcsCtrUntil 和 WebApi 两个)所在目录,把 obj 和 bin 两个文件夹都删掉,再重新打开项目编译看看。

⑨ IAR编译错误,请高手给看看是怎么回事

这是说明你的代码量超出了你预设的rom大小,一般iar编译程序后会根据一个
xxx.xcl文件把你的代码和数据链接到指定地址,iar的文件夹里面搜搜就能搜到,"-z(code)code=romstart-romend"是说你所有的代码都放置在以romstart为起始地址,romend为终止地址的一段连续的空间内,romstart为0x4000016c,romend为40003fff,貌似是个有16k
flash的arm。上面报错是因为你编译出来的code
size
是0x58b4,已经超过了这个空间,你能做的就是看看能不能缩减代码量。

⑩ 用命令行编译Java时遇到如下错误提示(该错误是在Class文件生成后,执行java命令时出现的)

你的java命令是怎么写的?
一般是:java + class文件名;例如:A.java 编译后生成A.class文件。则命令为:java A
如果这样都不行,可能是你所运行的class文件不在你现在所访问的路径下。应该在cmd环境下进入.class所在的文件目录下,然后运行 java A

阅读全文

与编译a文件lto错误相关的资料

热点内容
简书vue重新编译 浏览:234
香港服务器代理地址 浏览:516
月经不调排卵期计算法 浏览:627
什么app可以做qc 浏览:447
linux命令行编码 浏览:236
什么是adb命令 浏览:85
我的世界花雨庭服务器如何下载 浏览:782
如何去pdf上的水印 浏览:672
萨弗隆服务器什么时候开的 浏览:925
服务器硬盘fru是什么意思 浏览:618
c语言中生成程序后如何执行算法 浏览:794
如何用手机改装服务器 浏览:832
如何div一台服务器 浏览:197
黑天鹅pdf 浏览:58
一个app跟树洞一样叫什么名字 浏览:557
还有什么app类似一触即发 浏览:740
超星压缩视频会压缩成多大的 浏览:575
androidlistview源码分析 浏览:538
垃圾程序员图片大全 浏览:140
妖猫传什么app可以看 浏览:615