我有一个文件,使用g ++(4.6.1)在运行osx(雪豹)的macbook pro上编译时没有错误或警告。我刚刚将它上传到我们的linux集群(不是由我运行)并尝试在那里编译(也使用gcc 4.6.1)。这次我和汇编程序有很多奇怪的错误信息。如何解释以下错误?
g++ -I../shared/boost_1_47_0 -std=c++0x -O2 -c ../shared/ft.cpp -o ../shared/ft.o
/tmp/ccEqihNa.s: Assembler messages:
/tmp/ccEqihNa.s:809: Error: unknown pseudo-op: `.cfi_personality'
/tmp/ccEqihNa.s:810: Error: unknown pseudo-op: `.cfi_lsda'
/tmp/ccEqihNa.s:1055: Error: unknown pseudo-op: `.cfi_personality'
/tmp/ccEqihNa.s:1056: Error: unknown pseudo-op: `.cfi_lsda'
:145: Error: unknown pseudo-op: `.cfi_personality'
:146: Error: unknown pseudo-op: `.cfi_lsda'
:248: Error: unknown pseudo-op: `.cfi_personality'
:249: Error: unknown pseudo-op: `.cfi_lsda'
:351: Error: unknown pseudo-op: `.cfi_personality'
:352: Error: unknown pseudo-op: `.cfi_lsda'
:496: Error: unknown pseudo-op: `.cfi_personality'
:497: Error: unknown pseudo-op: `.cfi_lsda'
:988: Error: unknown pseudo-op: `.cfi_personality'
:989: Error: unknown pseudo-op: `.cfi_lsda'
:1488: Error: unknown pseudo-op: `.cfi_personality'
:1489: Error: unknown pseudo-op: `.cfi_lsda'
:2333: Error: unknown pseudo-op: `.cfi_personality'
:2334: Error: unknown pseudo-op: `.cfi_lsda'
:2460: Error: unknown pseudo-op: `.cfi_personality'
:2461: Error: unknown pseudo-op: `.cfi_lsda'
:2899: Error: unknown pseudo-op: `.cfi_personality'
:2900: Error: unknown pseudo-op: `.cfi_lsda'
:3053: Error: unknown pseudo-op: `.cfi_personality'
:3054: Error: unknown pseudo-op: `.cfi_lsda'
:3144: Error: unknown pseudo-op: `.cfi_personality'
:3145: Error: unknown pseudo-op: `.cfi_lsda'
:3205: Error: unknown pseudo-op: `.cfi_personality'
:3206: Error: unknown pseudo-op: `.cfi_lsda'
:3296: Error: unknown pseudo-op: `.cfi_personality'
:3297: Error: unknown pseudo-op: `.cfi_lsda'
:4090: Error: unknown pseudo-op: `.cfi_personality'
:4091: Error: unknown pseudo-op: `.cfi_lsda'
:4921: Error: unknown pseudo-op: `.cfi_personality'
:4922: Error: unknown pseudo-op: `.cfi_lsda'
:5094: Error: unknown pseudo-op: `.cfi_personality'
:5095: Error: unknown pseudo-op: `.cfi_lsda'
:5274: Error: unknown pseudo-op: `.cfi_personality'
:5275: Error: unknown pseudo-op: `.cfi_lsda'
:5365: Error: unknown pseudo-op: `.cfi_personality'
:5366: Error: unknown pseudo-op: `.cfi_lsda'
:5426: Error: unknown pseudo-op: `.cfi_personality'
:5427: Error: unknown pseudo-op: `.cfi_lsda'
:5525: Error: unknown pseudo-op: `.cfi_personality'
:5526: Error: unknown pseudo-op: `.cfi_lsda'
:5744: Error: unknown pseudo-op: `.cfi_personality'
:5745: Error: unknown pseudo-op: `.cfi_lsda'
:5919: Error: unknown pseudo-op: `.cfi_personality'
:5920: Error: unknown pseudo-op: `.cfi_lsda'
:6097: Error: unknown pseudo-op: `.cfi_personality'
:6098: Error: unknown pseudo-op: `.cfi_lsda'
:6209: Error: unknown pseudo-op: `.cfi_personality'
:6210: Error: unknown pseudo-op: `.cfi_lsda'
:6305: Error: unknown pseudo-op: `.cfi_personality'
:6306: Error: unknown pseudo-op: `.cfi_lsda'
:6735: Error: unknown pseudo-op: `.cfi_personality'
:6736: Error: unknown pseudo-op: `.cfi_lsda'
:7082: Error: unknown pseudo-op: `.cfi_personality'
:7083: Error: unknown pseudo-op: `.cfi_lsda'
:7355: Error: unknown pseudo-op: `.cfi_personality'
:7356: Error: unknown pseudo-op: `.cfi_lsda'
:7663: Error: unknown pseudo-op: `.cfi_personality'
:7664: Error: unknown pseudo-op: `.cfi_lsda'
:8139: Error: unknown pseudo-op: `.cfi_personality'
:8140: Error: unknown pseudo-op: `.cfi_lsda'
:8605: Error: unknown pseudo-op: `.cfi_personality'
:8606: Error: unknown pseudo-op: `.cfi_lsda'
:8894: Error: unknown pseudo-op: `.cfi_personality'
:8895: Error: unknown pseudo-op: `.cfi_lsda'
:9224: Error: unknown pseudo-op: `.cfi_personality'
:9225: Error: unknown pseudo-op: `.cfi_lsda'
:9531: Error: unknown pseudo-op: `.cfi_personality'
:9532: Error: unknown pseudo-op: `.cfi_lsda'
:9868: Error: unknown pseudo-op: `.cfi_personality'
:9869: Error: unknown pseudo-op: `.cfi_lsda'
:10313: Error: unknown pseudo-op: `.cfi_personality'
:10314: Error: unknown pseudo-op: `.cfi_lsda'
:10533: Error: unknown pseudo-op: `.cfi_personality'
:10534: Error: unknown pseudo-op: `.cfi_lsda'
:11052: Error: unknown pseudo-op: `.cfi_personality'
:11053: Error: unknown pseudo-op: `.cfi_lsda'
:11324: Error: unknown pseudo-op: `.cfi_personality'
:11325: Error: unknown pseudo-op: `.cfi_lsda'
:13561: Error: unknown pseudo-op: `.cfi_personality'
:13562: Error: unknown pseudo-op: `.cfi_lsda'
:13941: Error: unknown pseudo-op: `.cfi_personality'
:13942: Error: unknown pseudo-op: `.cfi_lsda'
:14340: Error: unknown pseudo-op: `.cfi_personality'
:14341: Error: unknown pseudo-op: `.cfi_lsda'
:14711: Error: unknown pseudo-op: `.cfi_personality'
:14712: Error: unknown pseudo-op: `.cfi_lsda'
:14862: Error: unknown pseudo-op: `.cfi_personality'
:14863: Error: unknown pseudo-op: `.cfi_lsda'
:14963: Error: unknown pseudo-op: `.cfi_personality'
:14964: Error: unknown pseudo-op: `.cfi_lsda'
:15381: Error: unknown pseudo-op: `.cfi_personality'
:15382: Error: unknown pseudo-op: `.cfi_lsda'
:15792: Error: unknown pseudo-op: `.cfi_personality'
:15793: Error: unknown pseudo-op: `.cfi_lsda'
:16293: Error: unknown pseudo-op: `.cfi_personality'
:16294: Error: unknown pseudo-op: `.cfi_lsda'
:16445: Error: unknown pseudo-op: `.cfi_personality'
:16446: Error: unknown pseudo-op: `.cfi_lsda'
:17045: Error: unknown pseudo-op: `.cfi_personality'
:17046: Error: unknown pseudo-op: `.cfi_lsda'
:18020: Error: unknown pseudo-op: `.cfi_personality'
:18021: Error: unknown pseudo-op: `.cfi_lsda'
:18111: Error: unknown pseudo-op: `.cfi_personality'
:18112: Error: unknown pseudo-op: `.cfi_lsda'
:18172: Error: unknown pseudo-op: `.cfi_personality'
:18173: Error: unknown pseudo-op: `.cfi_lsda'
:139: Error: unknown pseudo-op: `.cfi_personality'
:140: Error: unknown pseudo-op: `.cfi_lsda'
:554: Error: unknown pseudo-op: `.cfi_personality'
:555: Error: unknown pseudo-op: `.cfi_lsda'
:654: Error: unknown pseudo-op: `.cfi_personality'
:655: Error: unknown pseudo-op: `.cfi_lsda'
:1344: Error: unknown pseudo-op: `.cfi_personality'
:1345: Error: unknown pseudo-op: `.cfi_lsda'
:1831: Error: unknown pseudo-op: `.cfi_personality'
:1832: Error: unknown pseudo-op: `.cfi_lsda'
:2522: Error: unknown pseudo-op: `.cfi_personality'
:2523: Error: unknown pseudo-op: `.cfi_lsda'
:3061: Error: unknown pseudo-op: `.cfi_personality'
:3062: Error: unknown pseudo-op: `.cfi_lsda'
:3284: Error: unknown pseudo-op: `.cfi_personality'
:3285: Error: unknown pseudo-op: `.cfi_lsda'
:3515: Error: unknown pseudo-op: `.cfi_personality'
:3516: Error: unknown pseudo-op: `.cfi_lsda'
:3745: Error: unknown pseudo-op: `.cfi_personality'
:3746: Error: unknown pseudo-op: `.cfi_lsda'
:3996: Error: unknown pseudo-op: `.cfi_personality'
:3997: Error: unknown pseudo-op: `.cfi_lsda'
:4518: Error: unknown pseudo-op: `.cfi_personality'
:4519: Error: unknown pseudo-op: `.cfi_lsda'
:5489: Error: unknown pseudo-op: `.cfi_personality'
:5490: Error: unknown pseudo-op: `.cfi_lsda'
:6382: Error: unknown pseudo-op: `.cfi_personality'
:6383: Error: unknown pseudo-op: `.cfi_lsda'
:6547: Error: unknown pseudo-op: `.cfi_personality'
:6548: Error: unknown pseudo-op: `.cfi_lsda'
:6651: Error: unknown pseudo-op: `.cfi_personality'
:6652: Error: unknown pseudo-op: `.cfi_lsda'
:6712: Error: unknown pseudo-op: `.cfi_personality'
:6713: Error: unknown pseudo-op: `.cfi_lsda'
:7146: Error: unknown pseudo-op: `.cfi_personality'
:7147: Error: unknown pseudo-op: `.cfi_lsda'
:7367: Error: unknown pseudo-op: `.cfi_personality'
:7368: Error: unknown pseudo-op: `.cfi_lsda'
:7597: Error: unknown pseudo-op: `.cfi_personality'
:7598: Error: unknown pseudo-op: `.cfi_lsda'
:9275: Error: unknown pseudo-op: `.cfi_personality'
:9276: Error: unknown pseudo-op: `.cfi_lsda'
:9562: Error: unknown pseudo-op: `.cfi_personality'
:9563: Error: unknown pseudo-op: `.cfi_lsda'
:10065: Error: unknown pseudo-op: `.cfi_personality'
:10066: Error: unknown pseudo-op: `.cfi_lsda'
:10326: Error: unknown pseudo-op: `.cfi_personality'
:10327: Error: unknown pseudo-op: `.cfi_lsda'
:10534: Error: unknown pseudo-op: `.cfi_personality'
:10535: Error: unknown pseudo-op: `.cfi_lsda'
:11978: Error: unknown pseudo-op: `.cfi_personality'
:11979: Error: unknown pseudo-op: `.cfi_lsda'
:12091: Error: unknown pseudo-op: `.cfi_personality'
:12092: Error: unknown pseudo-op: `.cfi_lsda'
:12936: Error: unknown pseudo-op: `.cfi_personality'
:12937: Error: unknown pseudo-op: `.cfi_lsda'
:14294: Error: unknown pseudo-op: `.cfi_personality'
:14295: Error: unknown pseudo-op: `.cfi_lsda'
:16088: Error: unknown pseudo-op: `.cfi_personality'
:16089: Error: unknown pseudo-op: `.cfi_lsda'
答案 0 :(得分:11)
错误意味着您的汇编程序(可能是/usr/bin/as
,binutils的一部分)太旧了。
添加它们的补丁似乎是this one。不幸的是,binutils NEWS文件没有明确地引用这个添加,但是因为它是在2006年添加的,所以我希望任何最新版本的binutils都可以。
答案 1 :(得分:6)
由于gcc和g ++指向不同版本,我弹出此错误。 对于任何遇到此错误且最近升级了gcc / g ++的人,请检查:
gcc --version
符合这一点:
g++ --version
如果没有,您必须通过
查看链接ls `which g++` -al
和
ls `which gcc` -al
答案 2 :(得分:-1)
非常有帮助这个问题。我在CentOS 6.6(最终版)上使用gcc 4.4.7编写了一个编译大型应用程序的汇编器消息。确切的(或者我认为)环境正在另一个盒子上运行。错误是:"未知的伪操作:`.p2align $ 3' &#34 ;.我检查了/ usr / bin / gcc和/ usr / bin / g ++和/ usr / bin / as的版本,所有框似乎都是等距的。但是经过更仔细的检查,成功的盒子上的gcc是" 4.4.7-18.el6.i686",并且在失败的平台上:" 4.4.7-11.el6.i686&#34 ;。似乎不太可能这么小的版本差异可能很重要 - 但确实如此。由于这两个盒子都是CentOS,我能够直接更新gcc-4.7.7"在包含错误的框中,这带来了22个9个不同的文件,因为它升级了gcc及其所有依赖库。 (我不想完全升级gcc,因为这个想法是为了确保平台之间的精确对齐。" yum update ..."带来了所有4.4.7-18版本,正如它应该做的那样。)我需要重新运行" make",它从失败发生的地方开始,编译运行成功完成。