linuxffmpeglibvpx

Undefined reference when building libvpx


I am trying to build libvpx as a static library, to be later used in an FFmpeg build and I am having trouble. The version of libvpx I am using is 1.6.0.

Here's my config: ./configure --prefix=/home/test/Dev/build-x64/libvpx/ --enable-static --disable-shared --target=x86_64-linux-gcc

And during make, there are lots of errors being dumped on screen:

[LD] test_libvpx
test/add_noise_test.cc.o: In function `(anonymous namespace)::gtest_CAddNoiseTest_EvalGenerator_()':
add_noise_test.cc:(.text+0x342): undefined reference to `vpx_plane_add_noise_c'
test/add_noise_test.cc.o: In function `(anonymous namespace)::gtest_SSE2AddNoiseTest_EvalGenerator_()':
add_noise_test.cc:(.text+0x492): undefined reference to `vpx_plane_add_noise_sse2'
test/add_noise_test.cc.o: In function `(anonymous namespace)::AddNoiseTest_CheckCvsAssembly_Test::TestBody()':
add_noise_test.cc:(.text+0x2437): undefined reference to `vpx_setup_noise'
add_noise_test.cc:(.text+0x2448): undefined reference to `vpx_calloc'
add_noise_test.cc:(.text+0x245a): undefined reference to `vpx_calloc'
add_noise_test.cc:(.text+0x2779): undefined reference to `vpx_plane_add_noise_c'
add_noise_test.cc:(.text+0x2934): undefined reference to `vpx_free'
add_noise_test.cc:(.text+0x293c): undefined reference to `vpx_free'
(...and a lot more.)

Recognising that the error started with tests, I tried disabling unit test: ./configure --prefix=/home/test/Dev/build-x64/libvpx/ --enable-static --disable-shared --target=x86_64-linux-gcc --disable-unit-tests

And got this instead: (...lots of lines...) [CC] examples/resize_util.c.o [LD] examples/resize_util examples/resize_util.c.o: In function main': resize_util.c:(.text.startup+0x1e8): undefined reference tovp9_resize_frame420' collect2: error: ld returned 1 exit status make[1]: * [examples/resize_util] Error 1 make: * [.DEFAULT] Error 2

I have libogg 1.3.1 and libvorbis 1.3.2 on my computer. (Not sure if they're used at all.)

I'm stumped, and I would really appreciate some guidance here.


Solution

  • Some files from earlier builds are still present (libs-armv7-linux-gcc.mk), despite having called make clean earlier.

    I decided to give it one last shot, by starting over in a new directory and it worked. The files from earlier build might be interfering somehow. I should have used make distclean instead.