[Buildroot] [PATCH v2, 2/4] package/celt051: needs dynamic library

Peter Korsgaard peter at korsgaard.com
Sat Nov 23 13:38:19 UTC 2019


>>>>> "Fabrice" == Fabrice Fontaine <fontaine.fabrice at gmail.com> writes:

 > celt051 can't be built statically with opus as opus embeds its own celt
 > version. So add a dynamic library dependency to celt051 (and not to
 > opus, as celt051 is only used optionally by spice whereas opus is
 > selected by 9 packages)

 > This will fix static build of spice with opus and celt:

 > /home/fabrice/buildroot/output/host/opt/ext-toolchain/bin/../lib/gcc/i686-buildroot-linux-uclibc/7.4.0/../../../../i686-buildroot-linux-uclibc/bin/ld: /home/fabrice/buildroot/output/host/i686-buildroot-linux-uclibc/sysroot/usr/lib/libopus.a(vq.o): in function `renormalise_vector':
 > vq.c:(.text+0x5ee): multiple definition of `renormalise_vector'; /home/fabrice/buildroot/output/host/i686-buildroot-linux-uclibc/sysroot/usr/lib/libcelt051.a(vq.o):vq.c:(.text+0x6e6): first defined here

 > Fixes:
 >  - http://autobuild.buildroot.org/results/96c786f85d35f33508e9c71778043d16b87f72cd

So this is only really an issue for spice, if spice is built statically
and both celt051 and opus are enabled?

If so, then I would prefer to handle it in spice.mk instead,
E.G. blacklist the celt51 + opus + static combination with a sensible
comment, something like:

ifeq ($(BR2_PACKAGE_CELT051),y)

# opus embeds a copy of celt, causing multiple definitions of a number
# of symbols when linked statically together with celt051, so disable
# celt051 support for that combination
ifeq ($(BR2_PACKAGE_OPUS)$(BR2_STATIC_LIBS),yy)
SPICE_CONF_OPTS += --disable-celt051
else
SPICE_CONF_OPTS += --enable-celt051
SPICE_DEPENDENCIES += celt051
endif

else
SPICE_CONF_OPTS += --disable-celt051
endif

Care to send a patch doing something like that? Thanks.

-- 
Bye, Peter Korsgaard


More information about the buildroot mailing list