Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 569146 - media-libs/libvpx fails to build with non-english locale - CONFIG_POSTPROC and other preprocessor macros missing
Summary: media-libs/libvpx fails to build with non-english locale - CONFIG_POSTPROC an...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2015-12-22 10:30 UTC by Mart Raudsepp
Modified: 2017-01-17 04:34 UTC (History)
3 users (show)

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


Attachments
build.log (build.log,267.56 KB, application/octet-stream)
2015-12-22 10:32 UTC, Mart Raudsepp
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mart Raudsepp gentoo-dev 2015-12-22 10:30:24 UTC
All versions (at least 1.4 and 1.5) of libvpx fail to build when locale isn't en_US.UTF8 or similar, because it creates vpx_config.asm with a dumb method like:

$(BUILD_PFX)vpx_config.asm: $(BUILD_PFX)vpx_config.h
        @echo "    [CREATE] $@"
        @egrep "#define [A-Z0-9_]+ [01]" $< \
            | awk '{print $$2 " equ " $$3}' > $@

This leaves out all definitions that don't have every letter between A-Z under current locale. For example with et_EE.UTF8 that includes every definition that includes any of the letters T, U, V, W, X, Y and X, including CONFIG_POSTPROC and CONFIG_VP9_POSTPROC, so the first error it hits later on is

yasm -f elf64 -I./ -I"/tmp/portage/media-libs/libvpx-1.5.0/work/libvpx-1.5.0"/ -o vpx_ports/emms.asm.o /tmp/portage/media-libs/libvpx-1.5.0/work/libvpx-1.5.0/vpx_ports/emms.asm
/tmp/portage/media-libs/libvpx-1.5.0/work/libvpx-1.5.0/vpx_ports/x86_abi_support.asm:398: error: undefined symbol `CONFIG_POSTPROC' in preprocessor
/tmp/portage/media-libs/libvpx-1.5.0/work/libvpx-1.5.0/vpx_ports/x86_abi_support.asm:398: error: undefined symbol `CONFIG_VP9_POSTPROC' in preprocessor

I believe EAPI6 forces an english default locale, but this needs fixing by forcing an appropriate locale manually until EAPI6 porting is done to this package.
Upstream should be smarter as well, as it will fail outside EAPI6 for manual builds as well on such localized systems.
Comment 1 Mart Raudsepp gentoo-dev 2015-12-22 10:32:34 UTC
Created attachment 420200 [details]
build.log

To reproduce, run LANG=et_EE.utf8 emerge -1va libvpx
et_EE.utf8 must be in /etc/locale.gen or no filtering done in there (if changes done there, of course need to rerun locale-gen)
Comment 2 Leho Kraav (:macmaN @lkraav) 2016-02-18 16:23:54 UTC
Confirmed, this is indeed the problem and "LC_ALL=C emerge" fixes it.
Comment 3 Mart Raudsepp gentoo-dev 2016-09-23 08:02:45 UTC
Still broken... please port to EAPI-6 or pass LC_COLLATE or LC_ALL where appropriate...
Comment 4 Mike Gilbert gentoo-dev 2016-09-23 16:27:52 UTC
commit acbdb2218f946d8114130f209aecdeb7c627e942
Author: Mike Gilbert <floppym@gentoo.org>
Date:   Fri Sep 23 12:25:51 2016 -0400

    media-libs/libvpx: port to EAPI 6

    Package-Manager: portage-2.3.0_p43

 .../files/libvpx-1.3.0-sparc-configure.patch       |  4 +-
 media-libs/libvpx/libvpx-1.6.0-r1.ebuild           | 49 +++++++++-------------
 2 files changed, 22 insertions(+), 31 deletions(-)
Comment 5 Mart Raudsepp gentoo-dev 2017-01-17 01:04:41 UTC
Still broken on stable after a year and a month :(
Comment 6 Mike Gilbert gentoo-dev 2017-01-17 04:34:09 UTC
https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=087293eab25d360c90785c14e4701b2add653d5f

commit 087293eab25d360c90785c14e4701b2add653d5f
Author: Mike Gilbert <floppym@gentoo.org>
Date:   Mon Jan 16 23:33:23 2017 -0500

    media-libs/libvpx: set LC_COLLATE=C
    
    Bug: https://bugs.gentoo.org/569146
    Package-Manager: Portage-2.3.3_p32, Repoman-2.3.1_p25

 media-libs/libvpx/libvpx-1.3.0.ebuild | 5 ++++-
 media-libs/libvpx/libvpx-1.4.0.ebuild | 5 ++++-
 media-libs/libvpx/libvpx-1.5.0.ebuild | 5 ++++-
 3 files changed, 12 insertions(+), 3 deletions(-)