support/dependencies: add check for c++ multilib
authorGaël PORTAY <gael.portay@savoirfairelinux.com>
Mon, 5 Feb 2018 21:57:08 +0000 (16:57 -0500)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Tue, 6 Feb 2018 16:21:09 +0000 (17:21 +0100)
Some packages build C++ 32bits host-tools and need the g++-multilib to
be installed on the build machine. As example, qt5webengine builds a C++
host-tool when target is 32bits.

Add the check for g++-multilib to the dependencies script; and update
the Dockerfile to install g++-multilib package.

Signed-off-by: Gaël PORTAY <gael.portay@savoirfairelinux.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
support/dependencies/dependencies.sh
support/docker/Dockerfile

index a195c62c8ccea091eb593996def3c3804f5a2b10..1804e8550811ab1a54e2b6d9af2dcfd7d20e04ab 100755 (executable)
@@ -249,6 +249,14 @@ if grep -q ^BR2_HOSTARCH_NEEDS_IA32_COMPILER=y $BR2_CONFIG ; then
                echo "For other distributions, refer to their documentation."
                exit 1
        fi
+
+       if ! echo "int main(void) {}" | g++ -m32 -x c++ - -o /dev/null 2>/dev/null; then
+               echo
+               echo "Your Buildroot configuration needs a compiler capable of building 32 bits binaries."
+               echo "If you're running a Debian/Ubuntu distribution, install the g++-multilib package."
+               echo "For other distributions, refer to their documentation."
+               exit 1
+       fi
 fi
 
 # Check that the Perl installation is complete enough for Buildroot.
index 474e073c613c77243e9a8ed7ee2afef659140239..ce3fdd9cc22614cedce07852cbe572ac452c674c 100644 (file)
@@ -22,7 +22,7 @@ COPY apt-sources.list /etc/apt/sources.list
 RUN dpkg --add-architecture i386 && \
     apt-get update -y && \
     apt-get install -y --no-install-recommends \
-        build-essential cmake libc6:i386 gcc-multilib \
+        build-essential cmake libc6:i386 g++-multilib \
         bc ca-certificates file locales rsync \
         cvs bzr git mercurial subversion wget \
         cpio unzip \