Running a single binary on different versions of fedora

Hello,

I am trying to port my game RiotBall (uses SDL) to linux. It compiles
and runs well, but I have a strange problem.

I have two pcs, pc1 is celeron with fedora core 1 installed, pc2 is an
athlon xp with fedora core 3 installed.

If I try to run the binary compiled on pc1 on pc2, I get the following
error:

*** glibc detected *** double free or corruption: 0x08e33fe0 ***
Aborted

And the program is aborted. If I compile the game on pc2, however, it
runs just fine. And of course, the binary compiled on pc2 does not run
on pc1 because it demands different version of glibc.

The executables run well on the pc on which they are compiled.

pc1 has SDL 1.2.5 and pc2 has SDL 1.2.7. They
have different versions of gcc. pc1 -> 3.3.2, pc2 -> 3.4.2

What I want to do is to compile a single executable that will run on all
versions of fedora (1 to 3 and maybe newer ones too).

Any suggestions on what is going wrong? A better way to do this? I
could compile a static binary, but I think the problem above will
probably not go away.

Thanks for any help.
Best Regards,
Pallav Nawani----------------------------------------------------------------
This message was sent using NWebmail, BSNL’s Webmail Program

pallavnawani at sancharnet.in wrote:

Hello,

I am trying to port my game RiotBall (uses SDL) to linux. It compiles
and runs well, but I have a strange problem.

I have two pcs, pc1 is celeron with fedora core 1 installed, pc2 is an
athlon xp with fedora core 3 installed.

If I try to run the binary compiled on pc1 on pc2, I get the following
error:

*** glibc detected *** double free or corruption: 0x08e33fe0 ***
Aborted

And the program is aborted. If I compile the game on pc2, however, it
runs just fine. And of course, the binary compiled on pc2 does not run
on pc1 because it demands different version of glibc.

The executables run well on the pc on which they are compiled.

pc1 has SDL 1.2.5 and pc2 has SDL 1.2.7. They
have different versions of gcc. pc1 -> 3.3.2, pc2 -> 3.4.2

What I want to do is to compile a single executable that will run on all
versions of fedora (1 to 3 and maybe newer ones too).

Any suggestions on what is going wrong? A better way to do this? I
could compile a static binary, but I think the problem above will
probably not go away.

No, because it’s probably a bug in your code.
Recent linux distributions include a small memcheck tool in the
mallocing routines (which is good if you ask me) and this tool found a bug.

I advise using a real memory checker (valgrind is the best you can get)
and fix your code.

Stephane

Quoting Stephane Marchesin <stephane.marchesin at wanadoo.fr>:

pallavnawani at sancharnet.in wrote:

Hello,

If I try to run the binary compiled on pc1 on pc2, I get the following
error:

*** glibc detected *** double free or corruption: 0x08e33fe0 ***
Aborted

And the program is aborted. If I compile the game on pc2, however, it
runs just fine. And of course, the binary compiled on pc2 does not run
on pc1 because it demands different version of glibc.

The executables run well on the pc on which they are compiled.

Any suggestions on what is going wrong? A better way to do this? I
could compile a static binary, but I think the problem above will
probably not go away.

No, because it’s probably a bug in your code.
Recent linux distributions include a small memcheck tool in the
mallocing routines (which is good if you ask me) and this tool found a bug.

I advise using a real memory checker (valgrind is the best you can get)
and fix your code.

Stephane

Well, that possibility certainly exists. But then why does the binary compiled
on fc3 run without problems, while the binary compiled with fc1 gives the above
problem on fc3? Both of them should be aborted with the same message, should
they not?

I’ll try with valgrind, as you suggested. I had earlier tried memprof, but my
program refuses to run when memprof spawns it :frowning:

Best,
Pallav----------------------------------------------------------------
This message was sent using NWebmail, BSNL’s Webmail Program

Hi,

You are freeing memory somewhere twice. Since it’s on linux try dumping
a core file and then using gdb to see where it crashes exactly. That
should help a lot.

Here’s how if you don’t know.

ulimit -c
./yourprogram

When it crashes it will dump a core file in the folder.
then run:

gdb yourprogram core.11341 (should look something like that)

Once in gdb use the “up” and “down” commands to see the area where the
code crashes.

Also, if you used gcc to compile your programs make sure the -g option
is included.

A little debugging advice. :)On Tue, 2005-01-04 at 23:18 +0530, pallavnawani at sancharnet.in wrote:

Hello,

I am trying to port my game RiotBall (uses SDL) to linux. It compiles
and runs well, but I have a strange problem.

I have two pcs, pc1 is celeron with fedora core 1 installed, pc2 is an
athlon xp with fedora core 3 installed.

If I try to run the binary compiled on pc1 on pc2, I get the following
error:

*** glibc detected *** double free or corruption: 0x08e33fe0 ***
Aborted

And the program is aborted. If I compile the game on pc2, however, it
runs just fine. And of course, the binary compiled on pc2 does not run
on pc1 because it demands different version of glibc.

The executables run well on the pc on which they are compiled.

pc1 has SDL 1.2.5 and pc2 has SDL 1.2.7. They
have different versions of gcc. pc1 -> 3.3.2, pc2 -> 3.4.2

What I want to do is to compile a single executable that will run on all
versions of fedora (1 to 3 and maybe newer ones too).

Any suggestions on what is going wrong? A better way to do this? I
could compile a static binary, but I think the problem above will
probably not go away.

Thanks for any help.
Best Regards,
Pallav Nawani


This message was sent using NWebmail, BSNL’s Webmail Program


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

John Josef
Wyled
Crazed Monkeys Inc www.crazedmonkeys.com