Xpra: Ticket #767: Link error when linking extensions

When linking extensions the needed order of the libraries was not preserved. E.g. when linking csc_swscale/colorspace_converter.so "-lavutil -lswscale" was passed to the linker, resulting in undefined symbols as swscale uses functions from avutil. Correct would have been in this case "-lswscale -lavutil".

The attached patch against xpra-0.14.14 should fix it. It preserves the order pkg-config listed the libraries.



Thu, 25 Dec 2014 05:48:01 GMT - floemker: attachment set


Thu, 25 Dec 2014 09:02:23 GMT - Antoine Martin: status changed; resolution set

Applied in r8278. Thanks!

Out of curiosity: which distro gave you those linking problems?


Thu, 25 Dec 2014 16:11:56 GMT - floemker:

That was Ubuntu 10.04 with gcc 4.4.3, python 2.6.5, and a manually installed Cython 0.21.1. But that are probably not the most important points.

Most important is probably, that ffmpeg (snapshot from 2014-11-17) was as well a custom install with default options. That installs only the static libraries of ffmpeg. pkg-config gives for this installation the correct "-lswscale -lavutil -lrt -lm", but setup.py reversed it.

Then, during linking the linker could not find the symbols from avutil which where used in swscale and left these unresolved. But, as avutil was linked statically, during runtime resolving these symbols was as well not possible, resulting in an unresolved symbol failure at runtime.


Sat, 23 Jan 2021 05:05:21 GMT - migration script:

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