Using gcc versions

Rupert Wood me@rupey.net
Mon Feb 25 09:57:00 GMT 2002


Ray wrote:

> Both installs claim, during installation, that gcc 2.96, which is
> installed by default in Mandrake Linux 8.1, miscompiles.  Gabucino,
> author of MPlayer, says gcc 3.0.1 also miscompiles.

This is most likely a strict-aliasing problem. I'm not 100% on the
issue, but as I understand it, it is arguably the source code at fault -
the latest C or C++ standard lists a set of assumptions that optimising
compilers are allowed to make about the use of unions and/or pointers,
and presumably the MPlayer source violates these assumptions.

You could try adding '-fno-strict-aliasing' to MPlayer's build CFLAGS.

> I have installed gcc 3.0.3 according to instructions found
> in the tarballs but every time I run ./configure in the MPlayer
> directory it continues to recognize only gcc 2.96.

Make sure the target path you installed gcc 3.0.3 occurs before the path
to gcc 2.96; by default, I'd expect these to be /usr/local/bin and
/usr/bin respectively. Alternatively, you can explicitly set environment
variable CC to point to the version 3.0.3 gcc (and CCC to g++ if
necessary).

Rup.



More information about the Gcc-help mailing list