2

I'm trying to compile libvpx on MinGW, using ./configure --target=x86-win32-gcc --enable-static-msvcrt --prefix=/MinGW and I get this error:

[STRIP] libgtest.a < libgtest_g.a
/bin/sh: /mingw/bin/strip: Bad file number
make[1]: *** [libgtest.a] Error 126
make: *** [.DEFAULT] Error 2

Any ideas how to fix this? I have tried both the latest libvpx on git and the 1.2.0 release of it, both give me this error.

Olga
  • 186
  • 3
  • 15
  • Are you performing this MinGW build on a Linux box or using MSYS or Cygwin (or something else) on Windows? If it's on Windows, many reports indicate that "Bad file number" sometimes results from permissions problems. If that doesn't pan out, then something like `procmon` from SysInternals might help you zero in on the problem. – Michael Burr Nov 20 '13 at 01:24
  • I'm using MSYS on Windows. How do I fix permissions? – Olga Nov 20 '13 at 01:29
  • You can look at the ACL (access control list) for a file or directory by looking at the security properties of the file or directory in Explorer. The `cacls` command can do this at the command line if you prefer. You can use the `attrib` command to see if a file has a read-only attribute on it (in which case a program trying to write to the file might act as if it had a permissions problem). – Michael Burr Nov 20 '13 at 02:04
  • Note also that the strip command in the makefile log looks wrong. `strip` doesn't take input from `stdin` so the `< libgtest_g.a` looks suspect to me. – Michael Burr Nov 20 '13 at 02:10
  • 1
    I tried fixing permission and I still get the error. What can I do about the makefile? – Olga Nov 20 '13 at 03:21

2 Answers2

3

With libvpx 1.3 on win32, none of the existing answers helped on win32 (--disable-unit-tests does help on macosx). With this patch: libvpx-makefile.diff I can get past the strip problem (page in japanese: compilation and installation of libvpx (v1.0.0 or later)). Another solution for this is documented here: Building libvpx in MinGW. But then I got stuck on strtok_s linking errors which I've solved by inlining this public domain version

Community
  • 1
  • 1
totaam
  • 1,306
  • 14
  • 25
2

Disabling unit tests by passing '--disable-unit-tests' to configure should get you through the compilation. Tested with libvpx-1.2.0.

hoopsman
  • 21
  • 3
  • Another error which pops up during libyuv compilation (after the main library has been compiled) can be fixed by following the options described here : http://code.google.com/p/webm/issues/detail?id=571 – hoopsman Jan 03 '14 at 15:23