xpra icon
Bug tracker and wiki

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#767 closed defect (fixed)

Link error when linking extensions

Reported by: floemker Owned by: Antoine Martin
Priority: major Milestone:
Component: core Version: trunk
Keywords: Cc:

Description

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.

Attachments (1)

xpra-0.14.14.patch (583 bytes) - added by floemker 6 years ago.

Download all attachments as: .zip

Change History (3)

Changed 6 years ago by floemker

Attachment: xpra-0.14.14.patch added

comment:1 Changed 6 years ago by Antoine Martin

Resolution: fixed
Status: newclosed

Applied in r8278. Thanks!

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

comment:2 Changed 6 years ago by 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.

Note: See TracTickets for help on using tickets.