Undefined reference to x265_10bit::x265_api_get in static build

Bug #1777875 reported by Hacklin
6
This bug affects 1 person
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/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/libx265.a(api.cpp.o): In function `x265_api_get_146':
(.text+0x1a23): undefined reference to `x265_10bit::x265_api_get_146(int)'
(.text+0x1a33): undefined reference to `x265_12bit::x265_api_get_146(int)'
/usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/libx265.a(api.cpp.o): In function `x265_api_query':
(.text+0x2653): undefined reference to `x265_12bit::x265_api_query(int, int, int*)'
(.text+0x2663): undefined reference to `x265_10bit::x265_api_query(int, int, int*)'
"

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/linux/multilib.sh' script.

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/linux/multilib.sh'.]

Recommendation
==============

Fix the 'debian/rules' so the 'libx265.a' is build the same way as the VideoLan upstream 'build/linux/multilib.sh' does it.

Workaround
==========

Build the 'libx265.a' from source using 'build/linux/multilib.sh'.

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.

Tags: unmetdeps
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in x265 (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.