4

I'm trying to build a shared library, and I get the following error:

libavformat.so: version node not found for symbol av_dup_packet@LIBAVFORMAT_52

ld: failed to set dynamic section sizes: Bad value

Does anybody knows what this error means? Host is i586-linux target is arm-linux

Edit: Resolved, see comments

3
  • 1
    Please post the parameters of gcc that you use for both compiling and linking. Jun 28, 2010 at 14:44
  • I got rid of the error - it was specific to the library, caused by a inlined assemby.symver directive
    – ognian
    Jun 28, 2010 at 14:54
  • 2
    you could post the solution here as an answer Jun 28, 2010 at 14:55

4 Answers 4

3

It was caused by an inline assembly directive .symver. My solution was to manually modify the generated config.h to disable version nodes symbols.

Check out internal.h lines 214-223

0
2

I ran into this error when building libsctp into a custom build environment.

Symbol Versioning is explained here and a linker script may be used to control it. In my case I was able to pull in the existing version linker script by adding to the target-specific LDFLAGS makefile variable:

$(LIB_PATH)/libsctp.so: LDFLAGS += \
    -Xlinker --version-script=$(MODULE_PATH)/src/lib/Versions.map
1

Oh, the function was moved in April 2009 from libavformat/util.c to a new file in libavcodec/avpacket.c. The comment in internal.h states explicitly:

If a function is moved from one library to another, a wrapper must be retained in the original location to preserve binary compatibility.

But it is impossible to retain binary compatibility when a function is moved between libraries.

Note that this bug was reported in Chromium project more than a year ago.

By the way, there is no need to edit config.h manually: you can run ./configure --disable-symver.

1
  • 1
    Actually, in the version of FFmpeg I'm using in this revision (r25864 from December 2010), the --disable-symver option does not exist, so the manual edit is necessary. I'm excited to hear about the configure option, though! I'll use that when we switch to newer FFmpeg or Libav. Dec 6, 2011 at 21:52
0

It took someone else to point this out to me, so I thought I might as well put it on here so others like me can understand ognian's answer:

This translates to editing config.h after you run ./configure and making the SYMVER-related entries are set to 0. Like so:

#define HAVE_SYMVER 0
#define HAVE_SYMVER_GNU_ASM 0
#define HAVE_SYMVER_ASM_LABEL 0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.