libstdc++在ubuntu 64位中崩溃

libstdc++ crashing in ubuntu 64 bit

本文关键字:崩溃 64位 ubuntu libstdc++      更新时间:2023-10-16

我有一些从RHEL6.2系统64位机器编译的GUI库。我的任务是在Ubuntu 64位机器上运行它。。所以我试了一下Ubuntu 12.04.1&Ubuntu 11.04在这两方面我都面临着类似的问题。。

分段故障(堆芯倾倒(*分割故障

回溯:/usr/lib/x86_64-linux-gnu/libstdc++.so.6(_ZNSsC1ERKSs+0xb([0x7f14e2728f2b]

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff5070f2b in std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::string const&) ()
from /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (gdb) bt
#0  0x00007ffff5070f2b in std::basic_string<char, std::char_traits<char>, std::allocator<char> > >::basic_string(std::string const&) ()    from /usr/lib/x86_64-linux-gnu/libstdc++.so.6

我无法将它编译到我的电脑上,因为我无法获得源代码。只有他们给我的图书馆。。谁能帮我解决这个问题吗。。

G++版本g++(Ubuntu/Linaro 4.6.3-1ubuntu5(4.6.3

请帮帮我。。提前感谢//


谢谢你的回复。。

是的,我交叉检查了两个gcc版本

这是我的主机,我可以在这里运行我的应用程序

 gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
    Copyright (C) 2011 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions.  There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

     ls -ld /usr/lib/x86_64-linux-gnu/libstdc++.so.6
    lrwxrwxrwx 1 root root 19 Apr 16  2012 /usr/lib/x86_64-linux-gnu/libstdc++.so.6 -> libstdc++.so.6.0.16

我试图运行但不工作的电脑是

gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

ls -ld  /usr/lib/x86_64-linux-gnu/libstdc++.so.6
lrwxrwxrwx 1 root root 19 Apr 16  2012 /usr/lib/x86_64-linux-gnu/libstdc++.so.6 -> libstdc++.so.6.0.16

两者都是精确的Ubuntu 12.04

我无法确定我的错在哪里。

请帮忙。。

Ubuntu 12.04和11.04都使用比RHEL6.2更新得多的库。检查stdlib的版本。我打赌他们是不同的。

一般来说,你不能只拿起一个二进制文件(一个程序或一个库(,然后在另一个程序上运行。如果你有一个.rpm或.deb包,你会发现应该有版本依赖性。

通过使用ldd,您还可以查看您的库所依赖的其他库。