Mac OSX: failing to initialize VP8 Encoder because of ABI version mismatch

854 views
Skip to first unread message

Mason

unread,
Apr 24, 2012, 10:31:50 AM4/24/12
to WebM Discussion
I am building the latest snapshot (v1.0.0) on Mac OSX 10.7.1 and I
keep getting the "ABI version mismatch" error when my application
tries to initialize the VP8 Encoder. I have no issues using the same
snapshot on Windows or Android, just the Mac platform. Below are my
configure parameters:

../libvpx/configure --as=yasm --disable-examples --enable-realtime-
only

The auto-detected platform is x86_64-darwin-11-gcc. Does anyone have
any ideas what the issue could be? I have purged the directory where
libvpx resides just to be sure there couldn't be any out of date files
hanging around but that, of course, makes no difference.

Thanks,
Mason

Johann Koenig

unread,
Apr 24, 2012, 11:56:02 AM4/24/12
to webm-d...@webmproject.org
On Tue, Apr 24, 2012 at 07:31, Mason <green...@gmail.com> wrote:
> The auto-detected platform is x86_64-darwin-11-gcc. Does anyone have
> any ideas what the issue could be? I have purged the directory where
> libvpx resides just to be sure there couldn't be any out of date files
> hanging around but that, of course, makes no difference.

Have you updated the header files your code is referencing? Did you
ever do a 'make install'? What is VPX_ENCODER_ABI_VERSION?
--
- johann koenig
  google

Mason

unread,
Apr 24, 2012, 3:37:33 PM4/24/12
to WebM Discussion
No, I haven't done a make install. The headers should be updated
because my application includes libvpx via the two directories on my
build machine described below.

WebM/libvpx - libvpx source code
WebM/build_osx - contains my build script and is the location where
the build script is run.

I have cleaned out everything in those directories and yet I still
have the same issue.

As per your request, the #define for VPX_ENCODER_ABI_VERSION is (3 +
VPX_CODEC_ABI_VERSION). Is that what you were looking for or do you
want the actual value?

Thanks,
Mason

On Apr 24, 11:56 am, Johann Koenig <johannkoe...@google.com> wrote:

Johann Koenig

unread,
Apr 24, 2012, 4:56:50 PM4/24/12
to webm-d...@webmproject.org
On Tue, Apr 24, 2012 at 12:37, Mason <green...@gmail.com> wrote:
> As per your request, the #define for VPX_ENCODER_ABI_VERSION is (3 +
> VPX_CODEC_ABI_VERSION). Is that what you were looking for or do you
> want the actual value?

How are you calling the initializer? With the version specified or
with the macro?
#define vpx_codec_enc_init(ctx, iface, cfg, flags) \
vpx_codec_enc_init_ver(ctx, iface, cfg, flags, VPX_ENCODER_ABI_VERSION)

Also, what is the contents of vpx_version.h (it's a generated file)

John Koleszar

unread,
Apr 24, 2012, 6:12:25 PM4/24/12
to webm-d...@webmproject.org
The error refers to the fact that the header files being used by your
application doesn't match the one used to compile the library. They
use different "ABIs." You might try using adding the -save-temps flag
to your compile options to see the path to the vpx_codec.h header
that's being included. If it's the correct one from your tree, then
look to see if there's another copy of the library on your system
somewhere. You can sometimes confirm this by removing the library from
your tree that you think you're linking to and seeing if the link
succeeds. Are you trying to link statically or dynamically?

> --
> You received this message because you are subscribed to the Google Groups "WebM Discussion" group.
> To post to this group, send email to webm-d...@webmproject.org.
> To unsubscribe from this group, send email to webm-discuss...@webmproject.org.
> For more options, visit this group at http://groups.google.com/a/webmproject.org/group/webm-discuss/?hl=en.
>

Mason

unread,
Apr 24, 2012, 8:33:35 PM4/24/12
to WebM Discussion
Johann, I am initializing with the macro. I will post the contents of
vpx_version.h tomorrow but I have already checked the version and it
is v1.0.0.

John, I am linking statically. I have also read of the exact same
issue before, old headers and what not, but I am having this issue
even after purging my root WebM directory tree. I have yet to try the -
save-temps flag, because I am unsure where to use the flag, but I have
looked at the paths included when XCode compiles my VP8Encoder wrapper
and it only includes the two paths I mentioned previously. It may be
important to note that the paths are NOT being included with
recursion.

Thanks,
Mason
> > To post to this group, send email to webm-disc...@webmproject.org.
> > To unsubscribe from this group, send email to webm-discuss+unsubscr...@webmproject.org.

Mason

unread,
Apr 25, 2012, 10:02:20 AM4/25/12
to WebM Discussion
Here are the contens of vpx_version.h

#define VERSION_MAJOR 1
#define VERSION_MINOR 0
#define VERSION_PATCH 0
#define VERSION_EXTRA ""
#define VERSION_PACKED ((VERSION_MAJOR<<16)|(VERSION_MINOR<<8)|
(VERSION_PATCH))
#define VERSION_STRING_NOSP "v1.0.0"
#define VERSION_STRING " v1.0.0"


John, how would I use the -save-temps flag?

On Apr 24, 4:56 pm, Johann Koenig <johannkoe...@google.com> wrote:

John Koleszar

unread,
Apr 25, 2012, 2:04:58 PM4/25/12
to webm-d...@webmproject.org
Sorry, I don't know xcode well enough to walk you through doing it via
the GUI. Basically you need to add that flag to the flags passed to
GCC when compiling the objects that call the codec. This is often
called 'CFLAGS'

Another thing you could try:
$ strings <your-binary> | grep 'WebM Project'

That should show you the version string of the library you're linking
to. Your header files seem to be in order as far as I've seen.
Provided you don't have a copy in any of the system paths like
/usr/include or /usr/local/include, you should be ok.
> --
> You received this message because you are subscribed to the Google Groups "WebM Discussion" group.
> To post to this group, send email to webm-d...@webmproject.org.
> To unsubscribe from this group, send email to webm-discuss...@webmproject.org.

Mason

unread,
Apr 25, 2012, 2:37:54 PM4/25/12
to webm-d...@webmproject.org
This is what results from running strings on the binary.

WebM Project VP8 Encoder v1.0.0
WebM Project VP8 Encoder (Deprecated API) v1.0.0
WebM Project VP8 Decoder v1.0.0
WebM Project VP8 Decoder (Deprecated API) v1.0.0

I am building my library now with the -save-temps cflag. Where and what type of output should I be looking for? 
> To unsubscribe from this group, send email to webm-discuss+unsubscribe@webmproject.org.

John Koleszar

unread,
Apr 25, 2012, 3:11:27 PM4/25/12
to webm-d...@webmproject.org
Just to be extra clear: Make sure you're running this on your binary
that links to libvpx, not libvpx.a itself.

For -save-temps, you want to be looking at the .i file that
corresponds to the .c file you're interested in. So if you have a
main.c that calls libvpx, look at main.i. Look in it for vpx_codec.h,
that'll tell you the path to the file that it read, for example:

# 1 "../libvpx/vpx/vpx_encoder.h" 1
# 33 "../libvpx/vpx/vpx_encoder.h"
# 1 "../libvpx/vpx/vpx_codec.h" 1
# 45 "../libvpx/vpx/vpx_codec.h"

You can also look for the call to vpx_codec_enc_init_ver(), which will
show you the version number your application is using (6 here, for
v1.0.0+):

vpx_codec_enc_init_ver(&stream->encoder, global->codec->iface,
&stream->config.cfg, flags, (3 + (2 + (1))));


This gets checked in vpx_encoder.i:

vpx_codec_err_t vpx_codec_enc_init_ver(vpx_codec_ctx_t *ctx,
vpx_codec_iface_t *iface,
vpx_codec_enc_cfg_t *cfg,
vpx_codec_flags_t flags,
int ver)
{
vpx_codec_err_t res;

if (ver != (3 + (2 + (1))))
res = VPX_CODEC_ABI_MISMATCH;
...

You can step through this in a debugger to see what's happening too.
>> > webm-discuss...@webmproject.org.
>> > For more options, visit this group at
>> > http://groups.google.com/a/webmproject.org/group/webm-discuss/?hl=en.
>> >
>
> --
> You received this message because you are subscribed to the Google Groups
> "WebM Discussion" group.
> To view this discussion on the web visit
> https://groups.google.com/a/webmproject.org/d/msg/webm-discuss/-/WAgBh5pAPDIJ.
>
> To post to this group, send email to webm-d...@webmproject.org.
> To unsubscribe from this group, send email to
> webm-discuss...@webmproject.org.

Mason

unread,
Apr 25, 2012, 5:09:48 PM4/25/12
to webm-d...@webmproject.org
So I searched my executable for the "WebM Project" strings, and it came back with v0.9.6 :(

I still cannot find where the old header is being included from. There are no other vpx_*.h files of any other version in this branch. I will try deleting all other branches on this machine and see if that fixes it. Here, also, are the paths from my wrapper's .ii file.

# 1 "../../WebM/libvpx/vpx/vpx_encoder.h" 1
# 28 "../../WebM/libvpx/vpx/vpx_encoder.h"
# 1 "../../WebM/libvpx/vpx/vpx_codec.h" 1
# 40 "../../WebM/libvpx/vpx/vpx_codec.h"
# 1 "../../WebM/libvpx/vpx/vpx_integer.h" 1
# 16 "../../WebM/libvpx/vpx/vpx_integer.h"
# 17 "../../WebM/libvpx/vpx/vpx_integer.h" 2
# 43 "../../WebM/libvpx/vpx/vpx_integer.h"
# 44 "../../WebM/libvpx/vpx/vpx_integer.h" 2
# 52 "../../WebM/libvpx/vpx/vpx_integer.h" 2
# 46 "../../WebM/libvpx/vpx/vpx_codec.h" 2
# 1 "../../WebM/libvpx/vpx/vpx_image.h" 1
# 17 "../../WebM/libvpx/vpx/vpx_image.h"
# 40 "../../WebM/libvpx/vpx/vpx_image.h"
# 97 "../../WebM/libvpx/vpx/vpx_image.h"
# 126 "../../WebM/libvpx/vpx/vpx_image.h"
# 170 "../../WebM/libvpx/vpx/vpx_image.h"
# 195 "../../WebM/libvpx/vpx/vpx_image.h"
# 216 "../../WebM/libvpx/vpx/vpx_image.h"
# 230 "../../WebM/libvpx/vpx/vpx_image.h"
# 47 "../../WebM/libvpx/vpx/vpx_codec.h" 2
# 81 "../../WebM/libvpx/vpx/vpx_codec.h"
# 111 "../../WebM/libvpx/vpx/vpx_codec.h"
# 121 "../../WebM/libvpx/vpx/vpx_codec.h"
# 145 "../../WebM/libvpx/vpx/vpx_codec.h"
# 158 "../../WebM/libvpx/vpx/vpx_codec.h"
# 167 "../../WebM/libvpx/vpx/vpx_codec.h"
# 193 "../../WebM/libvpx/vpx/vpx_codec.h"
# 227 "../../WebM/libvpx/vpx/vpx_codec.h"
# 249 "../../WebM/libvpx/vpx/vpx_codec.h"
# 258 "../../WebM/libvpx/vpx/vpx_codec.h"
# 267 "../../WebM/libvpx/vpx/vpx_codec.h"
# 277 "../../WebM/libvpx/vpx/vpx_codec.h"
# 290 "../../WebM/libvpx/vpx/vpx_codec.h"
# 303 "../../WebM/libvpx/vpx/vpx_codec.h"
# 316 "../../WebM/libvpx/vpx/vpx_codec.h"
# 336 "../../WebM/libvpx/vpx/vpx_codec.h"
# 346 "../../WebM/libvpx/vpx/vpx_codec.h"
# 373 "../../WebM/libvpx/vpx/vpx_codec.h"
# 476 "../../WebM/libvpx/vpx/vpx_codec.h"
# 517 "../../WebM/libvpx/vpx/vpx_codec.h"
# 543 "../../WebM/libvpx/vpx/vpx_codec.h"
# 34 "../../WebM/libvpx/vpx/vpx_encoder.h" 2
# 84 "../../WebM/libvpx/vpx/vpx_encoder.h"
# 106 "../../WebM/libvpx/vpx/vpx_encoder.h"
# 122 "../../WebM/libvpx/vpx/vpx_encoder.h"
# 140 "../../WebM/libvpx/vpx/vpx_encoder.h"
# 232 "../../WebM/libvpx/vpx/vpx_encoder.h"
# 247 "../../WebM/libvpx/vpx/vpx_encoder.h"
# 257 "../../WebM/libvpx/vpx/vpx_encoder.h"
# 270 "../../WebM/libvpx/vpx/vpx_encoder.h"
# 279 "../../WebM/libvpx/vpx/vpx_encoder.h"
# 290 "../../WebM/libvpx/vpx/vpx_encoder.h"
# 301 "../../WebM/libvpx/vpx/vpx_encoder.h"
# 311 "../../WebM/libvpx/vpx/vpx_encoder.h"
# 326 "../../WebM/libvpx/vpx/vpx_encoder.h"
# 335 "../../WebM/libvpx/vpx/vpx_encoder.h"
# 358 "../../WebM/libvpx/vpx/vpx_encoder.h"
# 381 "../../WebM/libvpx/vpx/vpx_encoder.h"
# 391 "../../WebM/libvpx/vpx/vpx_encoder.h"
# 400 "../../WebM/libvpx/vpx/vpx_encoder.h"
# 409 "../../WebM/libvpx/vpx/vpx_encoder.h"
# 420 "../../WebM/libvpx/vpx/vpx_encoder.h"
# 451 "../../WebM/libvpx/vpx/vpx_encoder.h"
# 462 "../../WebM/libvpx/vpx/vpx_encoder.h"
# 480 "../../WebM/libvpx/vpx/vpx_encoder.h"
# 493 "../../WebM/libvpx/vpx/vpx_encoder.h"
# 510 "../../WebM/libvpx/vpx/vpx_encoder.h"
# 520 "../../WebM/libvpx/vpx/vpx_encoder.h"
# 530 "../../WebM/libvpx/vpx/vpx_encoder.h"
# 546 "../../WebM/libvpx/vpx/vpx_encoder.h"
# 575 "../../WebM/libvpx/vpx/vpx_encoder.h"
# 585 "../../WebM/libvpx/vpx/vpx_encoder.h"
# 595 "../../WebM/libvpx/vpx/vpx_encoder.h"
# 605 "../../WebM/libvpx/vpx/vpx_encoder.h"
# 627 "../../WebM/libvpx/vpx/vpx_encoder.h"
# 636 "../../WebM/libvpx/vpx/vpx_encoder.h"
# 662 "../../WebM/libvpx/vpx/vpx_encoder.h"
# 701 "../../WebM/libvpx/vpx/vpx_encoder.h"
# 738 "../../WebM/libvpx/vpx/vpx_encoder.h"
# 757 "../../WebM/libvpx/vpx/vpx_encoder.h"
# 772 "../../WebM/libvpx/vpx/vpx_encoder.h"
# 817 "../../WebM/libvpx/vpx/vpx_encoder.h"
# 867 "../../WebM/libvpx/vpx/vpx_encoder.h"
# 896 "../../WebM/libvpx/vpx/vpx_encoder.h"
# 912 "../../WebM/libvpx/vpx/vpx_encoder.h"
# 1 "../../WebM/libvpx/vpx/vpx_codec_impl_top.h" 1
# 18 "../../WebM/libvpx/vpx/vpx_codec_impl_top.h"
# 1 "../../WebM/libvpx/vpx/vpx_codec_impl_bottom.h" 1
# 18 "../../WebM/libvpx/vpx/vpx_codec_impl_bottom.h"
# 1 "../../WebM/libvpx/vpx/vpx_codec_impl_top.h" 1
# 18 "../../WebM/libvpx/vpx/vpx_codec_impl_top.h"
# 1 "../../WebM/libvpx/vpx/vpx_codec_impl_bottom.h" 1
# 18 "../../WebM/libvpx/vpx/vpx_codec_impl_bottom.h"
>> > For more options, visit this group at
>> > http://groups.google.com/a/webmproject.org/group/webm-discuss/?hl=en.
>> >
>
> --
> You received this message because you are subscribed to the Google Groups
> "WebM Discussion" group.
> To view this discussion on the web visit
> https://groups.google.com/a/webmproject.org/d/msg/webm-discuss/-/WAgBh5pAPDIJ.
>
> To post to this group, send email to webm-d...@webmproject.org.
> To unsubscribe from this group, send email to

John Koleszar

unread,
Apr 25, 2012, 5:16:19 PM4/25/12
to webm-d...@webmproject.org
I think you want to be looking for an old version of the library, not
the header files. It looks like you're using the 1.0 header files from
your tree, but the linker is pulling in the 0.9.6 version of the
library. Check /usr/lib, /usr/local/lib, the directories you specify
with -L on your linker command, etc.
>> >> > webm-discuss...@webmproject.org.
>> >> > For more options, visit this group at
>> >> > http://groups.google.com/a/webmproject.org/group/webm-discuss/?hl=en.
>> >> >
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups
>> > "WebM Discussion" group.
>> > To view this discussion on the web visit
>> >
>> > https://groups.google.com/a/webmproject.org/d/msg/webm-discuss/-/WAgBh5pAPDIJ.
>> >
>> > To post to this group, send email to webm-d...@webmproject.org.
>> > To unsubscribe from this group, send email to
>> > webm-discuss...@webmproject.org.
>> > For more options, visit this group at
>> > http://groups.google.com/a/webmproject.org/group/webm-discuss/?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups
> "WebM Discussion" group.
> To view this discussion on the web visit
> https://groups.google.com/a/webmproject.org/d/msg/webm-discuss/-/OWIDPu6wVMoJ.
>
> To post to this group, send email to webm-d...@webmproject.org.
> To unsubscribe from this group, send email to
> webm-discuss...@webmproject.org.

Mason

unread,
May 2, 2012, 1:27:14 PM5/2/12
to WebM Discussion
After searching on the machine I found some older versions of libvpx.a
that had been built in other branches. Once I deleted all of these
extra libraries XCode was finally linking the appropriate version. I
have no idea why or how it was linking one of the older versions.
Thanks for your help John and Johann.
> >> On Wed, Apr 25, 2012 at 11:37 AM, Mason <greensa...@gmail.com> wrote:
> >> > This is what results from running strings on the binary.
>
> >> > WebM Project VP8 Encoder v1.0.0
> >> > WebM Project VP8 Encoder (Deprecated API) v1.0.0
> >> > WebM Project VP8 Decoder v1.0.0
> >> > WebM Project VP8 Decoder (Deprecated API) v1.0.0
>
> >> > I am building my library now with the -save-temps cflag. Where and what
> >> > type
> >> > of output should I be looking for?
>
> >> > On Wednesday, April 25, 2012 2:04:58 PM UTC-4, John Koleszar wrote:
>
> >> >> Sorry, I don't know xcode well enough to walk you through doing it via
> >> >> the GUI. Basically you need to add that flag to the flags passed to
> >> >> GCC when compiling the objects that call the codec. This is often
> >> >> called 'CFLAGS'
>
> >> >> Another thing you could try:
> >> >> $ strings <your-binary> | grep 'WebM Project'
>
> >> >> That should show you the version string of the library you're linking
> >> >> to. Your header files seem to be in order as far as I've seen.
> >> >> Provided you don't have a copy in any of the system paths like
> >> >> /usr/include or /usr/local/include, you should be ok.
>
> >> >> > To post to this group, send email to webm-disc...@webmproject.org.
> >> >> > To unsubscribe from this group, send email to
> >> >> > webm-discuss+unsubscr...@webmproject.org.
> >> >> > For more options, visit this group at
> >> >> >http://groups.google.com/a/webmproject.org/group/webm-discuss/?hl=en.
>
> >> > --
> >> > You received this message because you are subscribed to the Google
> >> > Groups
> >> > "WebM Discussion" group.
> >> > To view this discussion on the web visit...
>
> read more »
Reply all
Reply to author
Forward
0 new messages