xpra icon
Bug tracker and wiki

This bug tracker and wiki are being discontinued
please use https://github.com/Xpra-org/xpra instead.

Opened 9 years ago

Closed 9 years ago

Last modified 17 months ago

#440 closed task (fixed)

upgrade libvpx to 1.2.0 on win32

Reported by: Antoine Martin Owned by: Smo
Priority: major Milestone: 0.11
Component: packaging Version:
Keywords: win32 Cc:


  • The static builds (ie: CentOS) have been updated without too many problems, just removing --enable-onthefly-bitpacking to workaround this build bug.

So we end up with:

./configure --enable-pic --disable-install-docs  --enable-shared \
   --enable-static --enable-vp8 --enable-realtime-only \
  • on OSX we get this build failure in the tests:
        [LD] test_libvpx
    Undefined symbols:
      "_vp8_post_proc_down_and_across_mb_row_c", referenced from:
          _vp8_post_proc_down_and_across_mb_row_c$non_lazy_ptr in pp_filter_test.cc.o
      "_vp8_post_proc_down_and_across_mb_row_sse2", referenced from:
          _vp8_post_proc_down_and_across_mb_row_sse2$non_lazy_ptr in pp_filter_test.cc.o
    ld: symbol(s) not found
    collect2: ld returned 1 exit status
    make[1]: *** [test_libvpx] Error 1
    make: *** [.DEFAULT] Error 2

So we have to add the undocumented --disable-unit_tests:

./configure --libdir=${JHBUILD_PREFIX}/lib --prefix=${JHBUILD_PREFIX} \
    --enable-vp8 --target=x86-darwin8-gcc --disable-install-docs \
    --enable-runtime-cpu-detect --disable-unit_tests --enable-pic

But for win32, the problems are deeper: the build files have been modified and I cannot find the vpxmt and vpxmtd libraries we want to link against. There are no binary downloads either.. Time to fire up Visual Studio :(

Change History (5)

comment:1 Changed 9 years ago by Antoine Martin

Owner: changed from Antoine Martin to Smo

Here's how we upgrade the win32 build (edit: requires r4548 for better backwards build compatibility):

  • untar libvpx-1.2.0 somewhere
  • create a "build" directory next to it
  • from a mingw32 shell:
    cd build
    ../libvpx-1.2.0/configure --target=x86-win32-vs8 \
        --enable-vp8 --enable-realtime-only --enable-runtime-cpu-detect

(make only creates the build files - I couldn't get it to build everything)

  • if not installed already, download yasm for win32 and install it in Visual Studio's VC\bin tool directory (the exe file must be renamed to yasm.exe)
  • fire up Visual Studio 2008 (your mileage may vary with other versions)
  • load the solution which has been created in the build directory: build\vpx.sln
  • change the vpx project's build properties to "Release" (instead of "Debug")
  • rebuild the solution - there should be no errors
  • create the installation directory structure that the xpra build file expects to find:
  • copy the static library vpxmd.lib from build\Win32\Release\ to c:\vpx-1.2\lib\Win32
  • copy all the header files (*.h) from libvpx-1.2.0\vpx\ to C:\vpx-1.2\include

Verify that we can build the vpx codec against the new version and that it loads OK (requires r4547 or later):

  • build the win32 installer
  • install xpra
  • run Encoding_info.exe from xpra's installation directory, you should see:
    * vpx            : 1.2.0

Optional steps for building a DLL. For reference only as we do not use the DLL ourselves:

  • In Visual Studio, change the build from "Static Library (.lib)" to "Dynamic Library (.dll)"
  • Build vpx only (or rebuild the solution and ignore other errors?)
  • the resulting DLL can be found in build\Win32\Release\vpx.dll

Please confirm that this all works and close this ticket.

Last edited 9 years ago by Antoine Martin (previous) (diff)

comment:2 Changed 9 years ago by Smo

Resolution: fixed
Status: newclosed

Followed all the steps and found one error.

When building it looks for the header files in include\vpx so I just had to move them to that directory

Xpra built fine afterwards and ran Encoding_info.exe and got the desired result

Closing ticket

comment:3 Changed 8 years ago by Antoine Martin

Building libvpx-v1.3.0 is hard on win32 and probably not worth the effort right now. It would have been nice if it had been just a matter of adding --enable-vp9... but no.

I had to fix build issues, which I have documented here and ended up using visual studio to build the DLL (pretty much as per the instruction above, but with the extra patches and somehow ended up having to edit the project files by hand to fix some paths - just horrible)

comment:4 Changed 8 years ago by Antoine Martin

I couldn't find it documented anywhere and it is painful to build, so here it is (libvpx 1.3.0 and ffmpeg 2.4.4) from a mingw shell:

  • libvpx:
    cd libvpx-v1.3.0
    ./configure --target=x86-win32-gcc \
        --enable-vp8 --enable-vp9 \
        --enable-realtime-only --enable-runtime-cpu-detect \
    make install

See above for the strip and strtok problem (my answer from stackoverflow).

  • ffmpeg 2.4.4:
    ./configure \
        --enable-swscale --cpu=i686 --enable-runtime-cpudetect \
        --enable-static --enable-shared --enable-gpl --enable-memalign-hack \
        --disable-avdevice --disable-decoders --disable-dxva2 --disable-encoders \
        --enable-decoder=h264 --enable-decoder=vp8 --enable-libvpx \
        --enable-libx264 --disable-devices --disable-muxers --disable-demuxers \
        --disable-postproc --disable-avfilter  --disable-filters --disable-protocols \
        --disable-bsfs --disable-parsers \
    make install
Last edited 7 years ago by Antoine Martin (previous) (diff)

comment:5 Changed 17 months ago by migration script

this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/440

Note: See TracTickets for help on using tickets.