Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 491466 - =www-client/chromium-32.0.1700.14 bails out with "Unrecognized HOST_OS: Linux" during configuration of bundled ffmpeg
Summary: =www-client/chromium-32.0.1700.14 bails out with "Unrecognized HOST_OS: Linux...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Chromium Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-17 08:25 UTC by Vasco Gervasi
Modified: 2014-01-04 09:56 UTC (History)
0 users

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


Attachments
example fix (build_ffmpeg.sh.patch,458 bytes, patch)
2013-11-17 10:35 UTC, megabaks
Details | Diff
ffmpeg_arm_config.patch (ffmpeg_arm_config.patch,1.56 KB, patch)
2013-11-18 17:13 UTC, Mikhail Kurinnoi
Details | Diff
ffmpeg_arm_config.patch (ffmpeg_arm_config.patch,1.45 KB, patch)
2013-11-18 21:45 UTC, Mikhail Kurinnoi
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Vasco Gervasi 2013-11-17 08:25:18 UTC
Updating chromium gives me this error:

>>> Emerging (2 of 3) www-client/chromium-32.0.1700.14
 * chromium-32.0.1700.14.tar.xz SHA256 SHA512 WHIRLPOOL size ;-) ...                                                                                                             [ ok ]
 * Determining the location of the kernel source code
 * Found kernel source directory:
 *     /usr/src/linux
 * Found kernel object directory:
 *     /lib/modules/3.12.0/build
 * Found sources for kernel version:
 *     3.12.0
 * Checking for suitable kernel configuration options...                                                                                                                         [ ok ]
 * bindist disabled: Resulting binaries may not be legal to re-distribute.
>>> Unpacking source...
>>> Unpacking chromium-32.0.1700.14.tar.xz to /media/Test/portagehd/portage/www-client/chromium-32.0.1700.14/work
>>> Source unpacked in /media/Test/portagehd/portage/www-client/chromium-32.0.1700.14/work
>>> Preparing source in /media/Test/portagehd/portage/www-client/chromium-32.0.1700.14/work/chromium-32.0.1700.14 ...
 * Applying chromium-system-jinja-r2.patch ...                                                                                                                                   [ ok ]
 * Applying chromium-blink-crash-r0.patch ...                                                                                                                                    [ ok ]
>>> Source prepared.
>>> Configuring source in /media/Test/portagehd/portage/www-client/chromium-32.0.1700.14/work/chromium-32.0.1700.14 ...
 * strip-flags: CFLAGS: changed '-march=native -O2 -pipe -fomit-frame-pointer' to '-march=native -O2 -pipe'
 * strip-flags: CXXFLAGS: changed '-march=native -O2 -pipe -fomit-frame-pointer' to '-march=native -O2 -pipe'
 * Configuring bundled ffmpeg...
Unrecognized HOST_OS: Linux
Patches welcome!
 * ERROR: www-client/chromium-32.0.1700.14::gentoo failed (configure phase):
 *   (no error message)
 * 
 * Call stack:
 *     ebuild.sh, line  93:  Called src_configure
 *   environment, line 4957:  Called die
 * The specific snippet of code:
 *       chromium/scripts/build_ffmpeg.sh linux ${target_arch} `pwd` config-only || die;
 * 
 * If you need support, post the output of `emerge --info '=www-client/chromium-32.0.1700.14::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=www-client/chromium-32.0.1700.14::gentoo'`.
 * The complete build log is located at '/media/Test/portagehd/portage/www-client/chromium-32.0.1700.14/temp/build.log'.
 * The ebuild environment file is located at '/media/Test/portagehd/portage/www-client/chromium-32.0.1700.14/temp/environment'.
 * Working directory: '/media/Test/portagehd/portage/www-client/chromium-32.0.1700.14/work/chromium-32.0.1700.14/third_party/ffmpeg'
 * S: '/media/Test/portagehd/portage/www-client/chromium-32.0.1700.14/work/chromium-32.0.1700.14'


Thanks
Comment 1 megabaks 2013-11-17 10:25:59 UTC
chromium/scripts/build_ffmpeg.sh:
------------
case $(uname -sm) in
  Linux\ i386)
    HOST_OS=linux
    HOST_ARCH=ia32
    JOBS=$(grep processor /proc/cpuinfo | wc -l)
    ;;
  Linux\ x86_64)
    HOST_OS=linux
    HOST_ARCH=x64
    JOBS=$(grep processor /proc/cpuinfo | wc -l)
    ;;
  Darwin\ i386)
    HOST_OS=mac
    HOST_ARCH=ia32
    JOBS=$(sysctl -n hw.ncpu)
    ;;
  Darwin\ x86_64)
    HOST_OS=mac
    HOST_ARCH=x64
    JOBS=$(sysctl -n hw.ncpu)
    ;;
  MINGW*)
    HOST_OS=win
    HOST_ARCH=ia32
    JOBS=$NUMBER_OF_PROCESSORS
    ;;
  *)
    echo "Unrecognized HOST_OS: $(uname)"
    echo "Patches welcome!"
    exit 1
    ;;
esac
-----------------------------------
need fix
Comment 2 megabaks 2013-11-17 10:35:12 UTC
Created attachment 363394 [details, diff]
example fix
Comment 3 Vasco Gervasi 2013-11-17 15:58:22 UTC
Thanks that worked for me
Comment 4 Mike Gilbert gentoo-dev 2013-11-17 17:40:44 UTC
+  17 Nov 2013; Mike Gilbert <floppym@gentoo.org>
+  +files/chromium-build_ffmpeg-r0.patch, chromium-32.0.1700.14.ebuild,
+  chromium-33.0.1707.0.ebuild:
+  Fix detection of x86 HOST_OS when configuring ffmpeg, bug 491466. Thanks to
+  megabaks for the the solution.


Leaving this bug open until it makes it upstream.

phajdan.jr: If that's something you can easily take care of, please do. If you would prefer that I submit it myself, that's fine too.
Comment 5 Mikhail Kurinnoi 2013-11-18 10:41:45 UTC
Have same issue on ARM with www-client/chromium-32.0.1700.14 (www-client/chromium-32.0.1700.6 compiled fine). Is the any way to extend this patch for ARM too?
Comment 6 Mike Gilbert gentoo-dev 2013-11-18 16:47:52 UTC
Hmm... the HOST_ARCH variable doesn't seem to be used in the script at all. We could probably remove that detection altogether, which would resolve the problem on ARM.
Comment 7 Mikhail Kurinnoi 2013-11-18 17:13:05 UTC
Created attachment 363498 [details, diff]
ffmpeg_arm_config.patch

Here is the basic patch to make ffmpeg part configured proper on ARM.

1) Added "neon" cpu feature detection. I think, this part should be changed in order to use www-client/chromium package "neon" USE flag. Also, please note, for ARM we need override TARGET_ARCH (TARGET_ARCH is "arm" all the time, don't matter have use "neon" cpu feature or package USE flag. Probably, some chromium issue?).
2) All cross-compilation staff will be used only if host is not ARM.
3) I also think, that all "add_flag_common" lines with "--extra-cflags=" should be moved to cross-compilation stuff (under if-fi). We have all we need in make.conf file already.

I am testing this patch now with user-patch feature. All ffmpeg related code compiled just fine, but I need about 12 more hours to compiled chromium on my ARM box to be 100% sure.

I would be appreciated if some one could help me with patch corrections and testing, to make new chromium versions work on ARM in proper way. :-)
Comment 8 Mike Gilbert gentoo-dev 2013-11-18 18:16:36 UTC
You definitely do not want to set TARGET_ARCH based on uname or /proc/cpunifo. That gets passed in from the ebuild via the second command line parameter ($2).
Comment 9 Mikhail Kurinnoi 2013-11-18 18:26:55 UTC
Mike, sure, TARGET_ARCH should be passed via the second command line parameter ($2), but looks like now we have "arm" passed as second command line parameter all the time (with or without "neon" USE flag). I have tested this on my ARM box.
Comment 10 Mikhail Kurinnoi 2013-11-18 21:45:06 UTC
Created attachment 363536 [details, diff]
ffmpeg_arm_config.patch

Looks like we need minor ebuild correction, for chromium-32.0.1700.14.ebuild it's  403 line:

chromium/scripts/build_ffmpeg.sh linux ${target_arch} "${PWD}" config-only || die

should be improved for ARM, so, we will have proper "arm-neon" TARGET_ARCH instead of "arm" in case of "neon" USE flag.
Comment 11 Mikhail Kurinnoi 2013-11-19 08:00:00 UTC
I have successfully emerged www-client/chromium-32.0.1700.14 on my ARM box with ffmpeg patch, with "neon" USE flag and "arm-neon" passed to build_ffmpeg.sh script via second command line parameter.
Comment 12 Mike Gilbert gentoo-dev 2013-11-19 14:32:50 UTC
That's looking pretty good, thanks.
Comment 13 Mike Gilbert gentoo-dev 2013-11-22 01:08:41 UTC
Ok, added that to the patch.
Comment 14 Paweł Hajdan, Jr. (RETIRED) gentoo-dev 2014-01-04 09:56:40 UTC
This seems to be fixed. Thank you for the patches.