qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
Cc: Fredrik Noring <noring@nocrew.org>, Fam Zheng <famz@redhat.com>,
	qemu-devel@nongnu.org, Mike Frysinger <vapier@gentoo.org>
Subject: Re: [Qemu-devel] [RFC PATCH 1/2] docker: Add gentoo-mipsr5900el-cross image
Date: Mon, 19 Nov 2018 12:23:12 +0000	[thread overview]
Message-ID: <87wop9i7db.fsf@linaro.org> (raw)
In-Reply-To: <20181118203312.5376-2-f4bug@amsat.org>


Philippe Mathieu-Daudé <f4bug@amsat.org> writes:

> This image is based on Gentoo and the toolchain is built using crossdev.
>
> Recipe from:
>   https://lists.gnu.org/archive/html/qemu-devel/2018-09/msg03944.html
>
> Suggested-by: Fredrik Noring <noring@nocrew.org>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> TODO:
> - Add Fredrik Noring S-o-b in his patches
> - Check patch merged upstream
>
>  tests/docker/Makefile.include                 |   6 +
>  .../gentoo-mipsr5900el-cross.docker           |  39 ++++
>  .../binutils-v2.30-ps2-llsc.patch             |  36 +++
>  .../crossdev.conf                             |   5 +
>  .../gcc-v7.2.0-ps2-llsc.patch                 |  23 ++
>  .../gcc-v7.2.0-ps2.patch                      | 219 ++++++++++++++++++
>  6 files changed, 328 insertions(+)
>  create mode 100644 tests/docker/dockerfiles/gentoo-mipsr5900el-cross.docker
>  create mode 100644 tests/docker/dockerfiles/gentoo-mipsr5900el-cross.docker.d/binutils-v2.30-ps2-llsc.patch
>  create mode 100644 tests/docker/dockerfiles/gentoo-mipsr5900el-cross.docker.d/crossdev.conf
>  create mode 100644 tests/docker/dockerfiles/gentoo-mipsr5900el-cross.docker.d/gcc-v7.2.0-ps2-llsc.patch
>  create mode 100644 tests/docker/dockerfiles/gentoo-mipsr5900el-cross.docker.d/gcc-v7.2.0-ps2.patch
>
> diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
> index 9467e9d088..6ca615206f 100644
> --- a/tests/docker/Makefile.include
> +++ b/tests/docker/Makefile.include
> @@ -119,6 +119,12 @@ docker-image-debian-sparc64-cross: docker-image-debian-sid
>  docker-image-debian-mips64-cross: docker-image-debian-sid
>  docker-image-debian-riscv64-cross: docker-image-debian-sid
>  docker-image-debian-powerpc-cross: docker-image-debian-sid
> +docker-image-gentoo-mipsr5900el-cross: EXTRA_FILES:=$(addprefix \
> +			$(SRC_PATH)/tests/docker/dockerfiles/gentoo-mipsr5900el-cross.docker.d/,\
> +				crossdev.conf \
> +				binutils-v2.30-ps2-llsc.patch \
> +				gcc-v7.2.0-ps2.patch \
> +				gcc-v7.2.0-ps2-llsc.patch)
>  docker-image-travis: NOUSER=1
>
>  # Specialist build images, sometimes very limited tools
> diff --git a/tests/docker/dockerfiles/gentoo-mipsr5900el-cross.docker b/tests/docker/dockerfiles/gentoo-mipsr5900el-cross.docker
> new file mode 100644
> index 0000000000..dbc2eb007b
> --- /dev/null
> +++ b/tests/docker/dockerfiles/gentoo-mipsr5900el-cross.docker
> @@ -0,0 +1,39 @@
> +#
> +# Docker mipsel (r5900) cross-compiler target
> +#
> +# Using multi-stage builds, this image requires docker-17.05.0 or later.
> +# (See: https://github.com/gentoo/gentoo-docker-images)
> +#
> +# SPDX-License-Identifier: GPL-2.0-or-later
> +
> +# name the portage image
> +FROM gentoo/portage:latest as portage

This is going to be a rolling state of portage which may be why it broke.

> +
> +# image is based on stage3-amd64
> +FROM gentoo/stage3-amd64:latest
> +
> +# copy the entire portage volume in
> +COPY --from=portage /usr/portage /usr/portage
> +
> +MAINTAINER Philippe Mathieu-Daudé <f4bug@amsat.org>
> +
> +# continue with image build ...
> +RUN emerge -qv sys-devel/crossdev
> +
> +# set CROSSDEV_OVERLAY to /usr/local/portage-crossdev
> +RUN mkdir -p /usr/local/portage-crossdev/{profiles,metadata} && \
> +    echo 'crossdev' > /usr/local/portage-crossdev/profiles/repo_name && \
> +    echo 'masters = gentoo' > /usr/local/portage-crossdev/metadata/layout.conf && \
> +    chown -R portage:portage /usr/local/portage-crossdev && \
> +    mkdir -p /etc/portage/repos.conf
> +ADD crossdev.conf /etc/portage/repos.conf/crossdev.conf
> +
> +# Fredrik's patches
> +RUN mkdir -p /etc/portage/patches/cross-mipsr5900el-unknown-linux-gnu/{binutils,gcc}
> +ADD binutils-v2.30-ps2-llsc.patch /etc/portage/patches/cross-mipsr5900el-unknown-linux-gnu/binutils
> +ADD gcc-v7.2.0-ps2.patch /etc/portage/patches/cross-mipsr5900el-unknown-linux-gnu/gcc
> +ADD gcc-v7.2.0-ps2-llsc.patch /etc/portage/patches/cross-mipsr5900el-unknown-linux-gnu/gcc
> +
> +RUN crossdev -s3 -t mipsr5900el-unknown-linux-gnu --binutils ">=2.30" --gcc ">=7.2.0"
> +

This fails to build glibc, but doesn't exactly give much info:

   * Log: /var/log/portage/cross-mipsr5900el-unknown-linux-gnu-binutils.log
   * Emerging cross-binutils ...                                            [ ok ]
   * Log: /var/log/portage/cross-mipsr5900el-unknown-linux-gnu-linux-headers-quick.log
   * Emerging cross-linux-headers-quick ...                                 [ ok ]
   * Log: /var/log/portage/cross-mipsr5900el-unknown-linux-gnu-glibc-headers.log
   * Emerging cross-glibc-headers ...

   * error: glibc failed :(
   *
   * If you file a bug, please attach the following logfiles:
   * /var/log/portage/cross-mipsr5900el-unknown-linux-gnu-info.log
   * /var/log/portage/cross-mipsr5900el-unknown-linux-gnu-glibc-headers.log.xz
   * /var/tmp/portage/cross-mipsr5900el-unknown-linux-gnu/glibc*/temp/glibc-config.logs.tar.xz
  The command '/bin/sh -c crossdev -s3 -t mipsr5900el-unknown-linux-gnu --binutils ">=2.30" --gcc ">=7.2.0"' returned a non-zero code: 1

But running in a container I did get:

  >>> Running pre-merge checks for cross-mipsr5900el-unknown-linux-gnu/glibc-2.27-r6
   * Checking general environment sanity.
   * Your //etc/nsswitch.conf is out of date.
   * Please make sure you have 'files' entries for
   * 'passwd:', 'group:' and 'shadow:' databases.
   * For more details see:
   *   https://wiki.gentoo.org/wiki/Project:Toolchain/nsswitch.conf_in_glibc-2.26
   * ERROR: cross-mipsr5900el-unknown-linux-gnu/glibc-2.27-r6::crossdev failed (pretend phase):
   *   nsswitch.conf has no 'files' provider in 'passwd'.
   *
   * Call stack:
   *              ebuild.sh, line 115:  Called pkg_pretend
   *   glibc-2.27-r6.ebuild, line 723:  Called sanity_prechecks
   *   glibc-2.27-r6.ebuild, line 651:  Called die
   * The specific snippet of code:
   *                              die "nsswitch.conf has no 'files' provider in '${entry}'."
   *
   * If you need support, post the output of `emerge --info '=cross-mipsr5900el-unknown-linux-gnu/glibc-2.27-r6::crossdev'`,
   * the complete build log and the output of `emerge -pqv '=cross-mipsr5900el-unknown-linux-gnu/glibc-2.27-r6::crossdev'`.
   * The complete build log is located at '/var/tmp/portage/cross-mipsr5900el-unknown-linux-gnu/glibc-2.27-r6/temp/build.log'.
   * The ebuild environment file is located at '/var/tmp/portage/cross-mipsr5900el-unknown-linux-gnu/glibc-2.27-r6/temp/die.env'.
   * Working directory: '/usr/lib64/python3.4/site-packages'
   * S: '/var/tmp/portage/cross-mipsr5900el-unknown-linux-gnu/glibc-2.27-r6/work/glibc-2.27'
   * Messages for package cross-mipsr5900el-unknown-linux-gnu/glibc-2.27-r6:
   * Your //etc/nsswitch.conf is out of date.
   * Please make sure you have 'files' entries for
   * 'passwd:', 'group:' and 'shadow:' databases.
   * For more details see:
   *   https://wiki.gentoo.org/wiki/Project:Toolchain/nsswitch.conf_in_glibc-2.26
   * ERROR: cross-mipsr5900el-unknown-linux-gnu/glibc-2.27-r6::crossdev failed (pretend phase):
   *   nsswitch.conf has no 'files' provider in 'passwd'.
   *
   * Call stack:
   *              ebuild.sh, line 115:  Called pkg_pretend
   *   glibc-2.27-r6.ebuild, line 723:  Called sanity_prechecks
   *   glibc-2.27-r6.ebuild, line 651:  Called die
   * The specific snippet of code:
   *                              die "nsswitch.conf has no 'files' provider in '${entry}'."

--
Alex Bennée

  parent reply	other threads:[~2018-11-19 12:23 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-18 20:33 [Qemu-devel] [RFC PATCH 0/2] docker: Add gentoo-mipsr5900el-cross image Philippe Mathieu-Daudé
2018-11-18 20:33 ` [Qemu-devel] [RFC PATCH 1/2] " Philippe Mathieu-Daudé
2018-11-19 10:25   ` Philippe Mathieu-Daudé
2018-11-19 12:23   ` Alex Bennée [this message]
2018-11-19 14:11     ` Philippe Mathieu-Daudé
2018-11-19 15:55     ` Fredrik Noring
2018-11-19 13:44   ` Alex Bennée
2018-11-19 15:34   ` Alex Bennée
2018-11-18 20:33 ` [Qemu-devel] [RFC PATCH 2/2] shippable: Add the mipsr5900el linux-user target Philippe Mathieu-Daudé
2018-11-18 21:03 ` [Qemu-devel] [RFC PATCH 0/2] docker: Add gentoo-mipsr5900el-cross image no-reply
2018-11-19 15:29 ` Fredrik Noring
2018-11-19 15:46   ` Maciej W. Rozycki
2018-11-19 16:27     ` Fredrik Noring

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wop9i7db.fsf@linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=f4bug@amsat.org \
    --cc=famz@redhat.com \
    --cc=noring@nocrew.org \
    --cc=qemu-devel@nongnu.org \
    --cc=vapier@gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).