Fix g++-multilib conflict between install-build-deps scripts
commit49bb458a54a0e959f91ef612c79fad89e7d65c91
authorjohnme <johnme@chromium.org>
Thu, 27 Nov 2014 15:45:31 +0000 (27 07:45 -0800)
committerCommit bot <commit-bot@chromium.org>
Thu, 27 Nov 2014 15:45:59 +0000 (27 15:45 +0000)
treef13939161e1a0a2426bc659bf2ca0ff3e04ba2e3
parentdd97f2b5ff8cbdab0bb9c0fec87d07f2fe2a3b50
Fix g++-multilib conflict between install-build-deps scripts

Currently install-build-deps-android.sh installs g++-multilib which
conflicts with packages installed by install-build-deps.sh (since
gcc-multilib contains a /usr/include/asm symlink and the crosscompiler
packagers don't want you to accidentally include the wrong
architecture's asm headers).

The g++-multilib package was wrongly commented as being required for
Android SDK; it turns out these requirements have changed, so I
updated the libraries required for the Android SDK based on their docs.

g++-4.8-multilib is however still (likely) needed, alongside
linux-libc-dev:i386, for compiling the V8 snapshot. So I've
consolidated those deps, and the logic for selecting them, under the
--lib32 flag of install-build-deps (to avoid duplicating the code in
both). I updated the `if (trusty) install g++-4.8-multilib` logic so
it chooses the right version of the multilib automatically, rather
than hardcoding the version needed for trusty (which will break in
utopic or beyond).

Finally I removed the `sudo apt-get update` in
install-build-deps-android which is redundant now that we call
install-build-deps which already does that. And I added `sudo dpkg
--add-architecture i386` which seems to have been missing from these
scripts.

BUG=435056

Review URL: https://codereview.chromium.org/740963002

Cr-Commit-Position: refs/heads/master@{#305991}
build/install-build-deps-android.sh
build/install-build-deps.sh