Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 661888 - media-libs/libaom-1.0.0 reports its version as '0.1.0'
Summary: media-libs/libaom-1.0.0 reports its version as '0.1.0'
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords: PullRequest
: 671148 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-07-23 14:50 UTC by gerion
Modified: 2018-11-15 00:55 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log.gz (build.log.gz,2.15 KB, application/gzip)
2018-07-23 14:51 UTC, gerion
Details
emergeinfo.gz (emergeinfo.gz,4.20 KB, application/gzip)
2018-07-23 14:51 UTC, gerion
Details
fix-version.patch (fix-version.patch,403 bytes, patch)
2018-09-20 23:31 UTC, gerion
Details | Diff
fix-version.patch (fix-version.patch,480 bytes, patch)
2018-09-20 23:53 UTC, gerion
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description gerion 2018-07-23 14:50:00 UTC
Compiling ffmpeg leads to this error:
ERROR: aom >= 1.0.0 not found using pkg-config

media-libs/libaom-1.0.0 is installed.
See the attached logs for gentoo specific information.
Further investigation leads to this on the libaom side:
```
% pkg-config --print-provides aom
aom = 0.1.0
% cat test.c
#include <stdio.h>
#include <aom/aom_codec.h>

int main() {
        int v = aom_codec_version();
        printf("%d,%d,%d\n", AOM_VERSION_MAJOR(v), AOM_VERSION_MINOR(v), AOM_VERSION_PATCH(v));
}
% gcc -laom -lm -lpthread test.c -o test-aom
% ./test-aom 
0,1,0
```
FFmpeg configure defines this line:
```
enabled libaom            && require_pkg_config libaom "aom >= 1.0.0" aom/aom_codec.h aom_codec_version
```
I'm not sure, where the bug is.
Comment 1 gerion 2018-07-23 14:51:15 UTC
Created attachment 540584 [details]
build.log.gz

build log of ffmpeg
Comment 2 gerion 2018-07-23 14:51:52 UTC
Created attachment 540586 [details]
emergeinfo.gz

emerge --info
Comment 3 gerion 2018-09-20 23:30:20 UTC
The problem is definitely on the libaom side. I will adjust the title.

I searched a bit more in the aom source code. The version is set per cmake with build/cmake/version.cmake. This script first tries to extract the version out of the git tags. This would work, because the git tree is correctly tagged. However, in the source archive used by the libaom ebuild is no git tree, so it extracts as second step the version with another script (build/cmake/version.pl) out of the CHANGELOG file. This file is incorrect within the 1.0.0 release (see here: https://aomedia.googlesource.com/aom/+/v1.0.0/CHANGELOG). So the wrong v0.1.0 version is extracted and used.

I tried to fix it. One way seems to be to create an own "config/aom_version.h" file. This would be taken by cmake. Far more easy (but kind of dirty) is the following patch.
Comment 4 gerion 2018-09-20 23:31:00 UTC
Created attachment 547445 [details, diff]
fix-version.patch
Comment 5 gerion 2018-09-20 23:53:54 UTC
Created attachment 547447 [details, diff]
fix-version.patch

Old patch does not apply. This one is tested to work.
Comment 6 Larry the Git Cow gentoo-dev 2018-11-13 12:58:05 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f4ae71c66bef6fbe2101a2bfbe38dae120dbb8df

commit f4ae71c66bef6fbe2101a2bfbe38dae120dbb8df
Author:     Craig Andrews <candrews@gentoo.org>
AuthorDate: 2018-11-12 03:10:43 +0000
Commit:     Craig Andrews <candrews@gentoo.org>
CommitDate: 2018-11-13 12:57:46 +0000

    media-libs/libaom: Correctly report version as 1.0.0
    
    Closes: https://bugs.gentoo.org/670550
    Closes: https://bugs.gentoo.org/661888
    Package-Manager: Portage-2.3.51, Repoman-2.3.12
    Signed-off-by: Craig Andrews <candrews@gentoo.org>

 media-libs/libaom/files/libaom-1.0.0-version.patch | 10 +++
 media-libs/libaom/libaom-1.0.0-r1.ebuild           | 88 ++++++++++++++++++++++
 2 files changed, 98 insertions(+)
Comment 7 Arfrever Frehtes Taifersar Arahesis 2018-11-15 00:55:33 UTC
*** Bug 671148 has been marked as a duplicate of this bug. ***