Bazel in cros_sdk |
||||||||||
Issue descriptionPort the upstream Gentoo package for Bazel which will be needed for building deps and tools for the Chrome OS ML service (including TensorFlow). As of bazel-0.10.1 there are issues when building Bazel from source using clang (fails to link, missing std lib++ calls). The first step will be to use the cros_use_gcc workaround to build Bazel using gcc instead of clang, and then follow-up with the relevant upstream fixes to Bazel to allow compiling and linking with clang.
,
Mar 9 2018
there's no need to restrict this bug. we strongly prefer to not restrict anything unless there's a very compelling reason.
,
Mar 9 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/overlays/portage-stable/+/60f7537e1873fa4600de5aea85cef8bd577a7648 commit 60f7537e1873fa4600de5aea85cef8bd577a7648 Author: Ken Turner <kennetht@chromium.org> Date: Fri Mar 09 10:35:15 2018 bazel: upgraded package to upstream Upgraded dev-util/bazel to version 0.10.1 on amd64 BUG= chromium:820295 TEST=sudo emerge bazel # with patch in CL:955704 Change-Id: Ia1ebf6220ca01b5b7b5e505266d9ca1030136998 Reviewed-on: https://chromium-review.googlesource.com/940842 Commit-Ready: Ken Turner <kennetht@chromium.org> Tested-by: Ken Turner <kennetht@chromium.org> Reviewed-by: Manoj Gupta <manojgupta@chromium.org> Reviewed-by: Mike Frysinger <vapier@chromium.org> [add] https://crrev.com/60f7537e1873fa4600de5aea85cef8bd577a7648/metadata/md5-cache/dev-util/bazel-0.10.1 [add] https://crrev.com/60f7537e1873fa4600de5aea85cef8bd577a7648/dev-util/bazel/metadata.xml [add] https://crrev.com/60f7537e1873fa4600de5aea85cef8bd577a7648/dev-util/bazel/bazel-0.10.1.ebuild [add] https://crrev.com/60f7537e1873fa4600de5aea85cef8bd577a7648/dev-util/bazel/Manifest
,
Mar 9 2018
,
Mar 10 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/66c2c197f76d5a2bbc368a687633393e11ec5851 commit 66c2c197f76d5a2bbc368a687633393e11ec5851 Author: Ken Turner <kennetht@chromium.org> Date: Sat Mar 10 01:39:26 2018 dev-util/bazel: Use gcc to workaround clang errors. Apply the cros_use_gcc workaround when building Bazel from source to bypass clang linker errors. Once these have been fixed upstream in Bazel, this workaround can be removed. BUG= chromium:820295 TEST=sudo emerge bazel CQ-DEPEND=CL:940842 Change-Id: I11839de7f0b7046d0a8d5c8c8f06a65fd6935f65 Reviewed-on: https://chromium-review.googlesource.com/955704 Commit-Ready: Ken Turner <kennetht@chromium.org> Tested-by: Ken Turner <kennetht@chromium.org> Reviewed-by: Manoj Gupta <manojgupta@chromium.org> Reviewed-by: Mike Frysinger <vapier@chromium.org> [add] https://crrev.com/66c2c197f76d5a2bbc368a687633393e11ec5851/chromeos/config/env/dev-util/bazel
,
Mar 12 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/94d05d8316efa851e5404e2f282fcd9ef17376d2 commit 94d05d8316efa851e5404e2f282fcd9ef17376d2 Author: Ken Turner <kennetht@chromium.org> Date: Mon Mar 12 09:45:20 2018 target-chromium-os-sdk: Add dev-util/bazel Bazel will be initially used to build TensorFlow and its deps, for use by the machine learning service. BUG= chromium:820295 TEST=sudo emerge target-chromium-os-sdk Change-Id: Ic93750d55760a83ab25441e77ba0abb559931afb Reviewed-on: https://chromium-review.googlesource.com/956793 Commit-Ready: Ken Turner <kennetht@chromium.org> Tested-by: Ken Turner <kennetht@chromium.org> Reviewed-by: Mike Frysinger <vapier@chromium.org> [modify] https://crrev.com/94d05d8316efa851e5404e2f282fcd9ef17376d2/virtual/target-chromium-os-sdk/target-chromium-os-sdk-1.ebuild [rename] https://crrev.com/94d05d8316efa851e5404e2f282fcd9ef17376d2/virtual/target-chromium-os-sdk/target-chromium-os-sdk-1-r103.ebuild
,
Mar 12 2018
My understanding is that bazel also requires a CROSSTOOL file that tells it about the toolchains that are available for different architectures: https://github.com/bazelbuild/bazel/wiki/About-the-CROSSTOOL The default CROSSTOOL that comes with bazel just stubs out the ARM compilers and hardcodes gcc as the x86_64 compiler: https://github.com/bazelbuild/bazel/blob/master/tools/cpp/CROSSTOOL We'll need to have a bazel eclass that generates a proper CROSSTOOL file out of the environment before bazel builds will work properly. See the gentoo_toolchain.cmake file in the cmake-utils eclass for an example of how we do this for cmake.
,
Mar 12 2018
,
Mar 12 2018
Thanks Chirantan, I'll take a look a this next.
,
Apr 17 2018
Assigning to Michael as he is pushing ahead with this.
,
Apr 18 2018
,
Apr 24 2018
,
Apr 25 2018
removing component chromeos-toolchain. this is not a toolchain issue.
,
May 9 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/overlays/portage-stable/+/5789851ef118d077adc8d2b04f2a6a143138de87 commit 5789851ef118d077adc8d2b04f2a6a143138de87 Author: Michael Martis <martis@chromium.org> Date: Wed May 09 04:15:46 2018 bazel: bumped version to 0.13.0. Taken from https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b611b77bf34fe62440d3f2eb7815a2bed42f9d46 Flags supported in this version will be needed to compile other packages (e.g. TensorFlow). BUG= chromium:820295 TEST=sudo emerge bazel Change-Id: I68f65fa0c8798a53e5ff7cb99bd88c86ec144a6b Reviewed-on: https://chromium-review.googlesource.com/1049188 Commit-Ready: Michael Martis <martis@chromium.org> Tested-by: Michael Martis <martis@chromium.org> Reviewed-by: Mike Frysinger <vapier@chromium.org> [rename] https://crrev.com/5789851ef118d077adc8d2b04f2a6a143138de87/dev-util/bazel/bazel-0.13.0.ebuild [rename] https://crrev.com/5789851ef118d077adc8d2b04f2a6a143138de87/metadata/md5-cache/dev-util/bazel-0.13.0 [modify] https://crrev.com/5789851ef118d077adc8d2b04f2a6a143138de87/dev-util/bazel/Manifest
,
Jun 26 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/overlays/portage-stable/+/9bd22afb95978bcc4e55334481022eb6175ba55d commit 9bd22afb95978bcc4e55334481022eb6175ba55d Author: Michael Martis <martis@chromium.org> Date: Tue Jun 26 09:55:41 2018 dev-util/bazel: Uprev ebuild to 0.14.1 Pick from Gentoo portage as of commit 59832c2ae8b20635e3ae3f34ce426bedbda0205a. BUG= chromium:820295 TEST=sudo emerge bazel Change-Id: I2f3da6ee9fe89d758bda3f3e84dec752a2cf511d Reviewed-on: https://chromium-review.googlesource.com/1107018 Commit-Ready: Michael Martis <martis@chromium.org> Tested-by: Michael Martis <martis@chromium.org> Reviewed-by: Tomasz Figa <tfiga@chromium.org> [add] https://crrev.com/9bd22afb95978bcc4e55334481022eb6175ba55d/dev-util/bazel/bazel-0.14.1.ebuild [delete] https://crrev.com/0ca5efec50128b1f291a27dbac5a64fd302248f5/dev-util/bazel/bazel-0.13.0.ebuild [modify] https://crrev.com/9bd22afb95978bcc4e55334481022eb6175ba55d/dev-util/bazel/Manifest
,
Jul 11
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/0651e00817e330a8f621c56710d7f74613e4d663 commit 0651e00817e330a8f621c56710d7f74613e4d663 Author: Michael Martis <martis@chromium.org> Date: Wed Jul 11 19:13:25 2018 eclass: Added some missing functionality to toolchain-funcs. Added: - A "compiler type" function for the build environment. - Build- and host-environment "get" functions for the C/C++ preprocessor binary, dwarf package builder and test coverage program. - A build-environment "get" function for the object dumper. Each of these is heavily based off existing functions in the eclass and are used in the latter CL of this chain. BUG= chromium:820295 TEST=used later in the chain Change-Id: I47d18956847896c504064df2a0757bee31d26831 Reviewed-on: https://chromium-review.googlesource.com/1116215 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: Michael Martis <martis@chromium.org> Reviewed-by: Ben Chan <benchan@chromium.org> [modify] https://crrev.com/0651e00817e330a8f621c56710d7f74613e4d663/eclass/toolchain-funcs.eclass
,
Jul 16
,
Jul 17
,
Aug 30
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/a4bcb740991defaf37a552c402ff610eddd9005d commit a4bcb740991defaf37a552c402ff610eddd9005d Author: Michael Martis <martis@chromium.org> Date: Thu Aug 30 08:28:12 2018 sci-libs/tensorflow: Improve cross-compilation. This CL adds support for the Bazel --cpu flag, which enables per- project configuration based on build and host CPU type. BUG= chromium:820295 TEST=`USE="minimal" emerge-kevin tensorflow` Change-Id: I749080c4d7ca763192a549efaf7d9f6c04a1a7f7 Reviewed-on: https://chromium-review.googlesource.com/1186209 Commit-Ready: Michael Martis <martis@chromium.org> Tested-by: Michael Martis <martis@chromium.org> Reviewed-by: Mike Frysinger <vapier@chromium.org> [rename] https://crrev.com/a4bcb740991defaf37a552c402ff610eddd9005d/sci-libs/tensorflow/tensorflow-1.9.0_rc1-r3.ebuild [modify] https://crrev.com/a4bcb740991defaf37a552c402ff610eddd9005d/sci-libs/tensorflow/tensorflow-1.9.0_rc1.ebuild [modify] https://crrev.com/a4bcb740991defaf37a552c402ff610eddd9005d/sci-libs/tensorflow/files/tensorflow-1.9.0_rc1-CROSSTOOL.tpl [modify] https://crrev.com/a4bcb740991defaf37a552c402ff610eddd9005d/sci-libs/tensorflow/files/tensorflow-1.9.0_rc1-BUILD.tpl
,
Sep 14
|
||||||||||
►
Sign in to add a comment |
||||||||||
Comment 1 by kennetht@chromium.org
, Mar 9 2018