Giter VIP home page Giter VIP logo

bazel-feedstock's Introduction

About bazel-feedstock

Feedstock license: BSD-3-Clause

Home: https://bazel.build/

Package license: Apache-2.0

Summary: a fast, scalable, multi-language and extensible build system

Development: https://github.com/bazelbuild/bazel

Current build status

Azure
VariantStatus
linux_64 variant
linux_aarch64 variant
osx_64 variant
osx_arm64 variant
win_64 variant

Current release info

Name Downloads Version Platforms
Conda Recipe Conda Downloads Conda Version Conda Platforms

Installing bazel

Installing bazel from the conda-forge channel can be achieved by adding conda-forge to your channels with:

conda config --add channels conda-forge
conda config --set channel_priority strict

Once the conda-forge channel has been enabled, bazel can be installed with conda:

conda install bazel

or with mamba:

mamba install bazel

It is possible to list all of the versions of bazel available on your platform with conda:

conda search bazel --channel conda-forge

or with mamba:

mamba search bazel --channel conda-forge

Alternatively, mamba repoquery may provide more information:

# Search all versions available on your platform:
mamba repoquery search bazel --channel conda-forge

# List packages depending on `bazel`:
mamba repoquery whoneeds bazel --channel conda-forge

# List dependencies of `bazel`:
mamba repoquery depends bazel --channel conda-forge

About conda-forge

Powered by NumFOCUS

conda-forge is a community-led conda channel of installable packages. In order to provide high-quality builds, the process has been automated into the conda-forge GitHub organization. The conda-forge organization contains one repository for each of the installable packages. Such a repository is known as a feedstock.

A feedstock is made up of a conda recipe (the instructions on what and how to build the package) and the necessary configurations for automatic building using freely available continuous integration services. Thanks to the awesome service provided by Azure, GitHub, CircleCI, AppVeyor, Drone, and TravisCI it is possible to build and upload installable packages to the conda-forge anaconda.org channel for Linux, Windows and OSX respectively.

To manage the continuous integration and simplify feedstock maintenance conda-smithy has been developed. Using the conda-forge.yml within this repository, it is possible to re-render all of this feedstock's supporting files (e.g. the CI configuration files) with conda smithy rerender.

For more information please check the conda-forge documentation.

Terminology

feedstock - the conda recipe (raw material), supporting scripts and CI configuration.

conda-smithy - the tool which helps orchestrate the feedstock. Its primary use is in the construction of the CI .yml files and simplify the management of many feedstocks.

conda-forge - the place where the feedstock and smithy live and work to produce the finished article (built conda distributions)

Updating bazel-feedstock

If you would like to improve the bazel recipe or build a new package version, please fork this repository and submit a PR. Upon submission, your changes will be run on the appropriate platforms to give the reviewer an opportunity to confirm that the changes result in a successful build. Once merged, the recipe will be re-built and uploaded automatically to the conda-forge channel, whereupon the built conda packages will be available for everybody to install and use from the conda-forge channel. Note that all branches in the conda-forge/bazel-feedstock are immediately built and any created packages are uploaded, so PRs should be based on branches in forks and branches in the main repository should only be used to build distinct package versions.

In order to produce a uniquely identifiable distribution:

  • If the version of a package is not being increased, please add or increase the build/number.
  • If the version of a package is being increased, please remember to return the build/number back to 0.

Feedstock Maintainers

bazel-feedstock's People

Contributors

abhi18av avatar adrianchia avatar beckermr avatar bgruening avatar chapmanb avatar conda-forge-admin avatar conda-forge-curator[bot] avatar constinit avatar github-actions[bot] avatar h-vetinari avatar hmaarrfk avatar jakirkham avatar jjhelmus avatar jschueller avatar nehaljwani avatar njzjz avatar ocefpaf avatar regro-cf-autotick-bot avatar rluria14 avatar traversaro avatar xhochy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bazel-feedstock's Issues

Migrate to new compiler syntax

Looks like this is using C++ code in the bazel binary. Would be good to add the new compiler syntax here and rebuild.

Bazel run on Linux fails as libgrpc++_unsecure.so.1 is not found

Issue:

I just installed bazel in a vanilla environment on Linux (host: Ubuntu 20.04), and it is failing with error:

(drake) traversaro@IITICUBLAP102:~$ bazel
bazel: error while loading shared libraries: libgrpc++_unsecure.so.1: cannot open shared object file: No such file or directory

Checking the binary with ldd reveals that other libraries may be missing:

(drake) traversaro@IITICUBLAP102:~$ ldd `which bazel`
        linux-vdso.so.1 (0x00007f4f92228000)
        librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f4f9212d000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f4f92127000)
        libgrpc++_unsecure.so.1 => not found
        libgpr.so.15 => not found
        libprotobuf.so.26 => not found
        libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f4f91f44000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f4f91f21000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f4f91f06000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f4f91d14000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f4f9222a000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f4f91bc5000)

Environment (conda list):
$ conda list
# packages in environment at /home/traversaro/miniforge3/envs/drake:
#
# Name                    Version                   Build  Channel
_libgcc_mutex             0.1                 conda_forge    conda-forge
_openmp_mutex             4.5                       1_gnu    conda-forge
abseil-cpp                20200923.3           h9c3ff4c_0    conda-forge
bazel                     4.0.0                h04ac689_3    conda-forge
binutils                  2.35.1               hdd6e379_2    conda-forge
binutils_impl_linux-64    2.35.1               h193b22a_2    conda-forge
binutils_linux-64         2.35                h67ddf6f_30    conda-forge
c-ares                    1.17.1               h7f98852_1    conda-forge
c-compiler                1.1.3                h7f98852_0    conda-forge
ca-certificates           2020.12.5            ha878542_0    conda-forge
compilers                 1.1.3                ha770c72_0    conda-forge
cxx-compiler              1.1.3                h4bd325d_0    conda-forge
fortran-compiler          1.1.3                h1990efc_0    conda-forge
gcc_impl_linux-64         9.3.0               h70c0ae5_18    conda-forge
gcc_linux-64              9.3.0               hf25ea35_30    conda-forge
gfortran_impl_linux-64    9.3.0               hc4a2995_18    conda-forge
gfortran_linux-64         9.3.0               hdc58fab_30    conda-forge
grpc-cpp                  1.36.4               h7919d58_0    conda-forge
gxx_impl_linux-64         9.3.0               hd87eabc_18    conda-forge
gxx_linux-64              9.3.0               h3fbe746_30    conda-forge
kernel-headers_linux-64   2.6.32              h77966d4_13    conda-forge
ld_impl_linux-64          2.35.1               hea4e1c9_2    conda-forge
libgcc-devel_linux-64     9.3.0               h7864c58_18    conda-forge
libgcc-ng                 9.3.0               h2828fa1_18    conda-forge
libgfortran-ng            9.3.0               hff62375_18    conda-forge
libgfortran5              9.3.0               hff62375_18    conda-forge
libgomp                   9.3.0               h2828fa1_18    conda-forge
libprotobuf               3.15.6               h780b84a_0    conda-forge
libstdcxx-devel_linux-64  9.3.0               hb016644_18    conda-forge
libstdcxx-ng              9.3.0               h6de172a_18    conda-forge
openjdk                   10.0.2            h14c3975_1015    conda-forge
openssl                   1.1.1k               h7f98852_0    conda-forge
re2                       2020.11.01           h58526e2_0    conda-forge
sysroot_linux-64          2.12                h77966d4_13    conda-forge
zlib                      1.2.11            h516909a_1010    conda-forge

Details about conda and system ( conda info ):
$ conda info
(drake) traversaro@IITICUBLAP102:~$ conda info

     active environment : drake
    active env location : /home/traversaro/miniforge3/envs/drake
            shell level : 1
       user config file : /home/traversaro/.condarc
 populated config files : /home/traversaro/miniforge3/.condarc
                          /home/traversaro/.condarc
          conda version : 4.9.2
    conda-build version : 3.21.4
         python version : 3.8.8.final.0
       virtual packages : __glibc=2.31=0
                          __unix=0=0
                          __archspec=1=x86_64
       base environment : /home/traversaro/miniforge3  (writable)
           channel URLs : https://conda.anaconda.org/conda-forge/linux-64
                          https://conda.anaconda.org/conda-forge/noarch
          package cache : /home/traversaro/miniforge3/pkgs
                          /home/traversaro/.conda/pkgs
       envs directories : /home/traversaro/miniforge3/envs
                          /home/traversaro/.conda/envs
               platform : linux-64
             user-agent : conda/4.9.2 requests/2.25.1 CPython/3.8.8 Linux/4.19.104-microsoft-standard ubuntu/20.04.2 glibc/2.31
                UID:GID : 1000:1000
             netrc file : None
           offline mode : False

bazel 5.x

Solution to issue cannot be found in the documentation.

  • I checked the documentation.

Issue

It seems we need 5.x to be rebuilt for pinnings

conda-forge/jaxlib-feedstock#164

Installed packages

n/a

Environment info

n/a

missing '--version' command line option

Issue:
After installing bazel, I expected bazel --version to work. It does not. The version I download from https://github.com/bazelbuild/bazel/releases/tag/4.2.2 does support bazel --version.


Environment (conda list):

$ conda list
# packages in environment at /opt/conda/miniconda3/envs/ray_dev:
#
# Name                    Version                   Build  Channel
_libgcc_mutex             0.1                 conda_forge    conda-forge
_openmp_mutex             4.5                       1_gnu    conda-forge
abseil-cpp                20210324.2           h9c3ff4c_0    conda-forge
attrs                     21.2.0                   pypi_0    pypi
bazel                     4.2.2                h35090ff_0    conda-forge
c-ares                    1.18.1               h7f98852_0    conda-forge
ca-certificates           2021.10.8            ha878542_0    conda-forge
click                     8.0.3                    pypi_0    pypi
deprecated                1.2.13                   pypi_0    pypi
filelock                  3.4.0                    pypi_0    pypi
grpc-cpp                  1.42.0               hc3c75de_0    conda-forge
grpcio                    1.42.0                   pypi_0    pypi
icu                       69.1                 h9c3ff4c_0    conda-forge
jsonschema                4.2.1                    pypi_0    pypi
ld_impl_linux-64          2.36.1               hea4e1c9_2    conda-forge
libffi                    3.4.2                h7f98852_5    conda-forge
libgcc-ng                 11.2.0              h1d223b6_11    conda-forge
libgomp                   11.2.0              h1d223b6_11    conda-forge
libprotobuf               3.18.1               h780b84a_0    conda-forge
libstdcxx-ng              11.2.0              he4da1e4_11    conda-forge
libuv                     1.42.0               h7f98852_0    conda-forge
libzlib                   1.2.11            h36c2ea0_1013    conda-forge
msgpack                   1.0.3                    pypi_0    pypi
ncurses                   6.2                  h58526e2_4    conda-forge
nodejs                    17.1.0               hb5e7134_1    conda-forge
numpy                     1.21.4                   pypi_0    pypi
openjdk                   10.0.2            h14c3975_1015    conda-forge
openssl                   3.0.0                h7f98852_2    conda-forge
pip                       21.3.1             pyhd8ed1ab_0    conda-forge
protobuf                  3.19.1                   pypi_0    pypi
pyrsistent                0.18.0                   pypi_0    pypi
python                    3.9.7           hf930737_3_cpython    conda-forge
python_abi                3.9                      2_cp39    conda-forge
pyyaml                    6.0                      pypi_0    pypi
ray                       2.0.0.dev0                dev_0    <develop>
re2                       2021.11.01           h9c3ff4c_0    conda-forge
readline                  8.1                  h46c0cb4_0    conda-forge
redis                     4.0.2                    pypi_0    pypi
setuptools                59.4.0           py39hf3d152e_0    conda-forge
six                       1.16.0                   pypi_0    pypi
sqlite                    3.37.0               h9cd32fc_0    conda-forge
tk                        8.6.11               h27826a3_1    conda-forge
tzdata                    2021e                he74cb21_0    conda-forge
wheel                     0.37.0             pyhd8ed1ab_1    conda-forge
wrapt                     1.13.3                   pypi_0    pypi
xz                        5.2.5                h516909a_1    conda-forge
zlib                      1.2.11            h36c2ea0_1013    conda-forge


Details about conda and system ( conda info ):
$ conda info

     active environment : ray_dev
    active env location : /opt/conda/miniconda3/envs/ray_dev
            shell level : 1
       user config file : /home/matti/.condarc
 populated config files : /home/matti/.condarc
          conda version : 4.11.0
    conda-build version : 3.19.1
         python version : 3.7.6.final.0
       virtual packages : __linux=5.4.0=0
                          __glibc=2.31=0
                          __unix=0=0
                          __archspec=1=x86_64
       base environment : /opt/conda/miniconda3  (writable)
      conda av data dir : /opt/conda/miniconda3/etc/conda
  conda av metadata url : None
           channel URLs : https://conda.anaconda.org/anaconda-cloud/linux-64
                          https://conda.anaconda.org/anaconda-cloud/noarch
                          https://conda.anaconda.org/conda-forge/linux-64
                          https://conda.anaconda.org/conda-forge/noarch
                          https://repo.anaconda.com/pkgs/main/linux-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/linux-64
                          https://repo.anaconda.com/pkgs/r/noarch
          package cache : /opt/conda/miniconda3/pkgs
                          /home/matti/.conda/pkgs
       envs directories : /opt/conda/miniconda3/envs
                          /home/matti/.conda/envs
               platform : linux-64
             user-agent : conda/4.11.0 requests/2.23.0 CPython/3.7.6 Linux/5.4.0-91-generic ubuntu/20.04.3 glibc/2.31
                UID:GID : 1000:1000
             netrc file : None
           offline mode : False

Do we really need branches for BOTH 4.2.1 & 4.2.x?

I would have guessed the differences between 4.2.1 & 4.2.2 should be miniscule, but @xhochy seemed to think it necessary to add 4.2.1 04b5cd5 despite 4.2.x already being present then.

Since we have to rebuild this continuously (abseil & grpc, but also for jdk, see #136), maintaining both branches is IMO quite some effort compared to just patching out a hard requirement on 4.2.1 in a consuming feedstock and replacing it with 4.2.2.

Or what am I missing @conda-forge/bazel?

Example toolchain configuration for conda-forge compilers

I was wondering if any of the bazel recipe maintainers have used bazel-3 with conda-forge's compilers. I don't have any experience with bazel, but I think it would require setting up a custom C++ toolchain.

I notice that the tensorflow feedstock uses a custom clang toolchain, but that was written for a fairly old version of bazel. I tried using it with bazel 3, and ran into an error.

Anyway, if anyone knows what files are required for using gxx_linux-64 and clangxx_osx-64 in a bazel project, they would be a great addition to this feedstock, either as examples here in the feedstock source, or maybe even shipped in the built package. (I dunno, somewhere in ${PREFIX}/share maybe?)

Retire 4.2.x branch

The 4.2.x branch hasn't received an update since last November, and unmerged migrations are piling up. Apparently this isn't causing big problems for anyone, further indicating that 4.2.x is not in use anymore.

Based on a quick code search, nobody is using 4.2.x on up-to-date feedstocks anymore.

I propose to remove it from the abi_migration_branches. Any objections?

@conda-forge/bazel
@conda-forge/jaxlib
@conda-forge/ray-packages
@conda-forge/tensorflow

Branch of feedstock for 3.1?

I'm trying to revive the tensorflow feedstock and push it to 2.4.0, and the build requires a very specific version, which happens to be 3.1.0

Currently, I'm following the approach of rebuilding bazel itself during the build of tensorflow, but this:

  • wastes time (which is relevant because the build is hitting the 6h mark)
  • fails on osx
  • and is hard with windows

For this reason, I'd be happy if someone from @conda-forge/bazel could create a branch 3.1.x, and I'd be happy to try raising a PR against that.

Syntax errors in bazel-feedstock/recipe/0004-zipper-from-conda-package.patch

Solution to issue cannot be found in the documentation.

  • I checked the documentation.

Issue

When I run a build that requires zipper, I get errors like:

ERROR: /.../share/bazel/e995319552096be3cf407df7f1ec2bca/external/bazel_tools/tools/zip/BUILD:11:1: indentation error
ERROR: /.../share/bazel/e995319552096be3cf407df7f1ec2bca/external/bazel_tools/tools/zip/BUILD:14:2: Trailing comma is allowed only in parenthesized tuples.
ERROR: /.../share/bazel/e995319552096be3cf407df7f1ec2bca/external/bazel_tools/tools/zip/BUILD:14:3: syntax error at 'outdent': expected expression
ERROR: /.../share/bazel/e995319552096be3cf407df7f1ec2bca/external/bazel_tools/tools/jdk/BUILD:422:10: every rule of type py_binary implicitly depends upon the target '@bazel_tools//tools/zip:zipper', but this target could not be found because of: no such target '@bazel_tools//tools/zip:zipper': target 'zipper' not declared in package 'tools/zip' defined by /.../share/bazel/e995319552096be3cf407df7f1ec2bca/external/bazel_tools/tools/zip/BUILD

The underlying problem is this patch: https://github.com/conda-forge/bazel-feedstock/blob/92df208304035ceacf7024bcccea8351781479ea/recipe/0004-zipper-from-conda-package.patch

+ filegroup(
+     name = "zipper",
+    srcs = [":zipper-exec"],
+ )

This raises two points:

  1. The precise point: There are syntax errors in the patch that are introducing the errors above. The space in between "+" and "filegroup" is incorrect. Also the indentation of name is one character too deep. Since this is effectively a subdialect of Python, it causes syntax errors as seen above
  2. The broad point: It would be nice to have some kind of CI test suite to ensure that this feedstock for bazel is actually correct.

Installed packages

not relevant

Environment info

not relevant

Does anybody use the features of grpc_java_plugin

Comment:

I have to ask because I feel like this is always a sticking point of rebuilding protobuf.

Does anybody use the features provided by grpc_java_plugin?

Maybe I'm just missing a usecase. I'm genuinely interested in learning.

Incompatibilities with openjdk 17

Solution to issue cannot be found in the documentation.

  • I checked the documentation.

Issue

Some projects rely on old versions of Bazel on purpose (e.g. tensorstore), as specified in their .bazelversion file.

conda-forge has access to openjdk 17 since last week or so, but this openjdk is not compatible with Bazel 5.0 and 5.1 (ref). The solution for those is to pin openjdk to the previous release (11) (source comment).

v5.2 is not affected (ref).

@xhochy - do you think we should issue a repodata patch or is this report enough? Only jaxlib relies on 5.1.1, but they have an upper bound, so they are getting 5.2, I guess.

Installed packages

N/A

Environment info

N/A

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.