Undefined reference to x265_10bit::x265_api_get in static build
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
x265 (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Ubuntu: Docker image 'ubuntu:latest', 18.04 LTS (Bionic Beaver) + Update on 2018-06-20
Package: libx265-dev 2.6-3 100
Expected
========
Building a executable that staticly links with 'libavformat.a' and 'libx265.a'.
Happened
========
Linker errors:
"
/usr/lib/
(.text+0x1a23): undefined reference to `x265_10bit:
(.text+0x1a33): undefined reference to `x265_12bit:
/usr/lib/
(.text+0x2653): undefined reference to `x265_12bit:
(.text+0x2663): undefined reference to `x265_10bit:
"
Reason
======
The VideoLan upstream 'libx265.a' constains the 8bit 'libx265_main.a', the 10bit 'linc265_main10.a' and the 12bit 'libx265_main12.a', when build with the 'build/
The Ubuntu/Debian 'libx265.a' from the 'libx265-dev' package only consists of (what VideoLan upstream calls) the 8bit 'libx265_main.a'. I.e. it is missing all 'x265_10bit::*' and 'x265_12bit::*' symbols, while still referencing them.
[Cheked by doing a 'nm -s' on the 'libx265.a' from the 'libx265-dev' package and the one build from source with 'build/
Recommendation
==============
Fix the 'debian/rules' so the 'libx265.a' is build the same way as the VideoLan upstream 'build/
Workaround
==========
Build the 'libx265.a' from source using 'build/
Note
====
Could not retrieve the release of Ubuntu
- via 'lsb_release -rd' ("lsb_release: not found"), nor
- via 'System -> About Ubuntu' (no GUI installed).
Used good old 'cat /etc/os-release' instead.
This bug was fixed in the package x265 - 2.8-4
---------------
x265 (2.8-4) unstable; urgency=medium
* debian/rules: Fix generation of combined static libraries. (LP: #1777875)
-- Sebastian Ramacher <email address hidden> Sun, 24 Jun 2018 13:35:38 +0200