[Qt-interest] Segmentation Fault when Program Starts
Karl Ruetz
karl.ruetz at sototech.com
Tue Sep 8 16:16:42 CEST 2009
Hello,
Srdjan Todorovic wrote:
> Hi,
>
> On 08/09/2009, Karl Ruetz <karl.ruetz at sototech.com> wrote:
>
>> # ldd -r QTTest2
>> ldd: exited with unknown exit code (139)
>
> Never seen ldd exit like this, which is weird.
>
> http://andre.stechert.org/urwhatu/2005/06/ldd_ldlinuxso2_.html
> Seems to suggest ldd has a segfault somewhere.
The problem appears to be with the executable itself, not ldd.
>
>> # gdb QTTest3
>> "i386-redhat-linux-gnu"..."/usr/local/tmp/QTTest3": not in executable
>> format: File format not recognized
>
> Is the binary corrupt?
> Is your compiler creating broken C++ executables?
>
> Can you try a simple C++ hello world test program with std::cout ?
I did. If I use the following source code, the executable works:
#include <stdio.h>
int main()
{
fprintf(stderr, "Program running.\n");
return 0;
}
If I use the following source code it does not work:
#include <QDebug>
int main()
{
qDebug("Program running.");
return 0;
}
>
> Are you compiling on a 64 bit machine?
> (https://bugzilla.redhat.com/show_bug.cgi?id=483449)
The development machine is a 32-bit machine.
The end user's machine is a 64-bit machine.
The binary is 32-bit.
# file QTTest2
QTTest2: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for
GNU/Linux 2.6.9, dynamically linked (uses shared libs), for GNU/Linux
2.6.9, not stripped
>
> Hope that helps
> Srdjan
>
>
Thanks,
Karl
More information about the Qt-interest-old
mailing list