[MPlayer-cygwin] Mplayer compile errors

Joey Parrish joey at nicewarrior.org
Thu Nov 10 23:17:44 CET 2005


On Thu, Nov 10, 2005 at 08:59:33PM -0000, Chris Connolly wrote:
> Many thanks for your help (thanks to Corey Hickey too) - you were both
> correct. I've now got past this hurdle but after running make have
> encountered the following error.  Any ideas on this one?

> /usr/bin/lib/libxvidcore.a(plugin_2pass1.obj):plugin_2pass1.c:(.text+0x215):
> und
> efined reference to `__errno'
> collect2: ld returned 1 exit status
> make: *** [mencoder.exe] Error 1

I've seen this.  The issue is that MinGW and Cygwin have different
implementations of errno.  If xvid is built against one and MPlayer
against the other, then the two will fail to link.

Xvid will detect cygwin and build against the mingw runtime.

The cheap answer is simply to recompile xvid and remove the errno
reference.  For example, change this:

 DPRINTF(XVID_DEBUG_RC, "Error closing stats file (%s)", strerror(errno));

to this:

 DPRINTF(XVID_DEBUG_RC, "Error closing stats file");

Another solution would be to define a function somewhere in MPlayer
sources like so:

int * _errno() { static int x = 0; return &x; }

This would satisfy the errno signature that xvid is expecting to get
from MinGW.  Of course, MPlayer devs would likely never take this "fix"
into CVS.

So really, if it's easier to recompile XVID, patch that.  If it's easier
to recompile MPlayer, patch that.

--Joey

-- 
"Ours is not to question why, 'cause if we did,
  our heads would explode." --Megan




More information about the MPlayer-cygwin mailing list