Opened 14 years ago

Closed 12 years ago

#452 closed defect (worksforme)

MPlayer can't be compiled with glibc 2.0

Reported by: mikulas@… Owned by: diego@…
Priority: normal Component: build system
Version: HEAD Severity: normal
Keywords: Cc: dominik@…
Blocked By: Blocking:
Reproduced by developer: Analyzed by developer:


This patch fixes compilation of CVS version with glibc 2.0. There are several

  1. configure provides fallback definitions of types int_fast8_t, int_fast16_t,

int_fast32_t for systems that don't have them --- but not for int_fast64_t and
uint_fast64_t. Compilation fails because of it.

  1. IPv6 tests for presence of AF_INET6 but not struct sockaddr_in6. Glibc 2.0

has AF_INET6 but doesn't have sockaddr_in6. Disable IPv6 in such case.

  1. There are many places where PRI?64 macros are used. libavutil/common.h

provides fallback implementation, but it is not included from many files that
require it.

  1. libavformat/movenc.c relies on UINT32_MAX, but this glibc doesn't provide it.

Make a fallback definition to 0xffffffffU.

  1. libavutil/common.h containts definitions for PRIx64, PRId64 etc. for systems

that don't have them, however it lacks definition for PRIX64

  1. JFIF_major_version and JFIF_minor_version is not defined on older libjpegs.

(disabled for now, there should be configure test for it).

Attachments (1)

compile.diff (10.2 KB) - added by mikulas@… 14 years ago.
fix compilation on glibc 2.0

Download all attachments as: .zip

Change History (7)

Changed 14 years ago by mikulas@…

fix compilation on glibc 2.0

comment:1 Changed 14 years ago by mikulas@…

This patch fixes compiling of CVS version on linux system with glibc 2.0

comment:2 Changed 14 years ago by dominik@…

  • Cc dominik@… added

./configure part looks ok at first glance, but the rest is rejected:

+ for PRI?64
+#include "../libavutil/common.h"

This is unacceptable because it breaks when building with --disable-libavcodec.
A better solution would be to provide a some fallback in osdep/, not include
libavutil headers directly.

libavcodec changes should be posted to ffmpeg-devel for review.

Your solution to 6. is unacceptable, too.

comment:3 Changed 14 years ago by diego@…

  • Component changed from core to build system
  • Owner changed from alex@… to diego@…

comment:4 Changed 14 years ago by diego@…

  • Summary changed from Mplayer can't be compiled with glibc 2.0 to MPlayer can't be compiled with glibc 2.0

comment:5 Changed 14 years ago by diego@…

  • Status changed from new to assigned

I have committed the fixes for 1. and 2. The rest needs to be split into small
patches and the libjpeg issue should be handled by configure.

comment:6 Changed 12 years ago by diego@…

  • rep_platform changed from PC (x86 with MMX) to All
  • Resolution set to worksforme
  • Status changed from assigned to closed

No further information or updated patches were provided, parts were fixed. I will resolve this bug as WORKSFORME for lack of a better category.

Note: See TracTickets for help on using tickets.