Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

grpcio build fails while installing in coral dev board #251

Closed
bhachauk opened this issue Dec 9, 2020 · 13 comments
Closed

grpcio build fails while installing in coral dev board #251

bhachauk opened this issue Dec 9, 2020 · 13 comments
Assignees
Labels
api: pubsub Issues related to the googleapis/python-pubsub API. type: question Request for information or clarification. Not an issue.

Comments

@bhachauk
Copy link

bhachauk commented Dec 9, 2020

Environment details

  • OS type and version:
$ cat /etc/os-release
PRETTY_NAME="Mendel GNU/Linux 5 (Eagle)"
NAME="Mendel GNU/Linux"
ID=mendel
ID_LIKE=debian
HOME_URL="https://coral.ai/"
SUPPORT_URL="https://coral.ai/"
BUG_REPORT_URL="https://coral.ai/"
VERSION_CODENAME="eagle"
  • Python version: 3.7.3
  • pip version: 20.3.1
  • google-cloud-pubsub version: 2.1.0 (not yet installed.. trying to)

Steps to reproduce

  1. Using Coral Dev board : https://coral.ai/docs/dev-board/get-started
  2. pip install --upgrade --no-cache google-cloud-pubsub

Stack trace


Collecting google-cloud-pubsub
  Downloading google_cloud_pubsub-2.2.0-py2.py3-none-any.whl (179 kB)
     |████████████████████████████████| 179 kB 1.3 MB/s 
Requirement already satisfied: google-api-core[grpc]<2.0.0dev,>=1.22.2 in /home/mendel/.virtualenvs/cv/lib/python3.7/site-packages (from google-cloud-pubsub) (1.23.0)
Requirement already satisfied: libcst>=0.3.10 in /home/mendel/.virtualenvs/cv/lib/python3.7/site-packages (from google-cloud-pubsub) (0.3.15)
Requirement already satisfied: proto-plus>=1.7.1 in /home/mendel/.virtualenvs/cv/lib/python3.7/site-packages (from google-cloud-pubsub) (1.13.0)
Requirement already satisfied: requests<3.0.0dev,>=2.18.0 in /home/mendel/.virtualenvs/cv/lib/python3.7/site-packages (from google-api-core[grpc]<2.0.0dev,>=1.22.2->google-cloud-pubsub) (2.25.0)
Requirement already satisfied: setuptools>=34.0.0 in /home/mendel/.virtualenvs/cv/lib/python3.7/site-packages (from google-api-core[grpc]<2.0.0dev,>=1.22.2->google-cloud-pubsub) (49.6.0)
Requirement already satisfied: pytz in /home/mendel/.virtualenvs/cv/lib/python3.7/site-packages (from google-api-core[grpc]<2.0.0dev,>=1.22.2->google-cloud-pubsub) (2020.4)
Requirement already satisfied: six>=1.13.0 in /home/mendel/.virtualenvs/cv/lib/python3.7/site-packages (from google-api-core[grpc]<2.0.0dev,>=1.22.2->google-cloud-pubsub) (1.15.0)
Requirement already satisfied: googleapis-common-protos<2.0dev,>=1.6.0 in /home/mendel/.virtualenvs/cv/lib/python3.7/site-packages (from google-api-core[grpc]<2.0.0dev,>=1.22.2->google-cloud-pubsub) (1.52.0)
Requirement already satisfied: google-auth<2.0dev,>=1.21.1 in /home/mendel/.virtualenvs/cv/lib/python3.7/site-packages (from google-api-core[grpc]<2.0.0dev,>=1.22.2->google-cloud-pubsub) (1.23.0)
Requirement already satisfied: protobuf>=3.12.0 in /home/mendel/.virtualenvs/cv/lib/python3.7/site-packages (from google-api-core[grpc]<2.0.0dev,>=1.22.2->google-cloud-pubsub) (3.14.0)
Requirement already satisfied: requests<3.0.0dev,>=2.18.0 in /home/mendel/.virtualenvs/cv/lib/python3.7/site-packages (from google-api-core[grpc]<2.0.0dev,>=1.22.2->google-cloud-pubsub) (2.25.0)
Requirement already satisfied: setuptools>=34.0.0 in /home/mendel/.virtualenvs/cv/lib/python3.7/site-packages (from google-api-core[grpc]<2.0.0dev,>=1.22.2->google-cloud-pubsub) (49.6.0)
Requirement already satisfied: pytz in /home/mendel/.virtualenvs/cv/lib/python3.7/site-packages (from google-api-core[grpc]<2.0.0dev,>=1.22.2->google-cloud-pubsub) (2020.4)
Requirement already satisfied: six>=1.13.0 in /home/mendel/.virtualenvs/cv/lib/python3.7/site-packages (from google-api-core[grpc]<2.0.0dev,>=1.22.2->google-cloud-pubsub) (1.15.0)
Requirement already satisfied: googleapis-common-protos<2.0dev,>=1.6.0 in /home/mendel/.virtualenvs/cv/lib/python3.7/site-packages (from google-api-core[grpc]<2.0.0dev,>=1.22.2->google-cloud-pubsub) (1.52.0)
Requirement already satisfied: google-auth<2.0dev,>=1.21.1 in /home/mendel/.virtualenvs/cv/lib/python3.7/site-packages (from google-api-core[grpc]<2.0.0dev,>=1.22.2->google-cloud-pubsub) (1.23.0)
Requirement already satisfied: protobuf>=3.12.0 in /home/mendel/.virtualenvs/cv/lib/python3.7/site-packages (from google-api-core[grpc]<2.0.0dev,>=1.22.2->google-cloud-pubsub) (3.14.0)
Requirement already satisfied: setuptools>=34.0.0 in /home/mendel/.virtualenvs/cv/lib/python3.7/site-packages (from google-api-core[grpc]<2.0.0dev,>=1.22.2->google-cloud-pubsub) (49.6.0)
Requirement already satisfied: cachetools<5.0,>=2.0.0 in /home/mendel/.virtualenvs/cv/lib/python3.7/site-packages (from google-auth<2.0dev,>=1.21.1->google-api-core[grpc]<2.0.0dev,>=1.22.2->google-cloud-pubsub) (4.1.1)
Requirement already satisfied: pyasn1-modules>=0.2.1 in /home/mendel/.virtualenvs/cv/lib/python3.7/site-packages (from google-auth<2.0dev,>=1.21.1->google-api-core[grpc]<2.0.0dev,>=1.22.2->google-cloud-pubsub) (0.2.8)
Requirement already satisfied: six>=1.13.0 in /home/mendel/.virtualenvs/cv/lib/python3.7/site-packages (from google-api-core[grpc]<2.0.0dev,>=1.22.2->google-cloud-pubsub) (1.15.0)
Requirement already satisfied: rsa<5,>=3.1.4 in /home/mendel/.virtualenvs/cv/lib/python3.7/site-packages (from google-auth<2.0dev,>=1.21.1->google-api-core[grpc]<2.0.0dev,>=1.22.2->google-cloud-pubsub) (4.6)
Requirement already satisfied: protobuf>=3.12.0 in /home/mendel/.virtualenvs/cv/lib/python3.7/site-packages (from google-api-core[grpc]<2.0.0dev,>=1.22.2->google-cloud-pubsub) (3.14.0)
Collecting grpc-google-iam-v1<0.13dev,>=0.12.3
  Downloading grpc-google-iam-v1-0.12.3.tar.gz (13 kB)
Requirement already satisfied: googleapis-common-protos[grpc]<2.0.0dev,>=1.5.2 in /home/mendel/.virtualenvs/cv/lib/python3.7/site-packages (from grpc-google-iam-v1<0.13dev,>=0.12.3->google-cloud-pubsub) (1.52.0)
Requirement already satisfied: protobuf>=3.12.0 in /home/mendel/.virtualenvs/cv/lib/python3.7/site-packages (from google-api-core[grpc]<2.0.0dev,>=1.22.2->google-cloud-pubsub) (3.14.0)
Collecting grpcio<2.0dev,>=1.29.0
  Downloading grpcio-1.34.0.tar.gz (21.0 MB)
     |████████████████████████████████| 21.0 MB 3.0 MB/s 
Requirement already satisfied: six>=1.13.0 in /home/mendel/.virtualenvs/cv/lib/python3.7/site-packages (from google-api-core[grpc]<2.0.0dev,>=1.22.2->google-cloud-pubsub) (1.15.0)
Requirement already satisfied: typing-inspect>=0.4.0 in /home/mendel/.virtualenvs/cv/lib/python3.7/site-packages (from libcst>=0.3.10->google-cloud-pubsub) (0.6.0)
Requirement already satisfied: typing-extensions>=3.7.4.2 in /home/mendel/.virtualenvs/cv/lib/python3.7/site-packages (from libcst>=0.3.10->google-cloud-pubsub) (3.7.4.3)
Requirement already satisfied: pyyaml>=5.2 in /home/mendel/.virtualenvs/cv/lib/python3.7/site-packages (from libcst>=0.3.10->google-cloud-pubsub) (5.3.1)
Requirement already satisfied: protobuf>=3.12.0 in /home/mendel/.virtualenvs/cv/lib/python3.7/site-packages (from google-api-core[grpc]<2.0.0dev,>=1.22.2->google-cloud-pubsub) (3.14.0)
Requirement already satisfied: six>=1.13.0 in /home/mendel/.virtualenvs/cv/lib/python3.7/site-packages (from google-api-core[grpc]<2.0.0dev,>=1.22.2->google-cloud-pubsub) (1.15.0)
Requirement already satisfied: pyasn1<0.5.0,>=0.4.6 in /home/mendel/.virtualenvs/cv/lib/python3.7/site-packages (from pyasn1-modules>=0.2.1->google-auth<2.0dev,>=1.21.1->google-api-core[grpc]<2.0.0dev,>=1.22.2->google-cloud-pubsub) (0.4.8)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in /home/mendel/.virtualenvs/cv/lib/python3.7/site-packages (from requests<3.0.0dev,>=2.18.0->google-api-core[grpc]<2.0.0dev,>=1.22.2->google-cloud-pubsub) (1.26.2)
Requirement already satisfied: idna<3,>=2.5 in /home/mendel/.virtualenvs/cv/lib/python3.7/site-packages (from requests<3.0.0dev,>=2.18.0->google-api-core[grpc]<2.0.0dev,>=1.22.2->google-cloud-pubsub) (2.10)
Requirement already satisfied: certifi>=2017.4.17 in /home/mendel/.virtualenvs/cv/lib/python3.7/site-packages (from requests<3.0.0dev,>=2.18.0->google-api-core[grpc]<2.0.0dev,>=1.22.2->google-cloud-pubsub) (2020.12.5)
Requirement already satisfied: chardet<4,>=3.0.2 in /home/mendel/.virtualenvs/cv/lib/python3.7/site-packages (from requests<3.0.0dev,>=2.18.0->google-api-core[grpc]<2.0.0dev,>=1.22.2->google-cloud-pubsub) (3.0.4)
Requirement already satisfied: pyasn1<0.5.0,>=0.4.6 in /home/mendel/.virtualenvs/cv/lib/python3.7/site-packages (from pyasn1-modules>=0.2.1->google-auth<2.0dev,>=1.21.1->google-api-core[grpc]<2.0.0dev,>=1.22.2->google-cloud-pubsub) (0.4.8)
Requirement already satisfied: mypy-extensions>=0.3.0 in /home/mendel/.virtualenvs/cv/lib/python3.7/site-packages (from typing-inspect>=0.4.0->libcst>=0.3.10->google-cloud-pubsub) (0.4.3)
Requirement already satisfied: typing-extensions>=3.7.4.2 in /home/mendel/.virtualenvs/cv/lib/python3.7/site-packages (from libcst>=0.3.10->google-cloud-pubsub) (3.7.4.3)
Building wheels for collected packages: grpc-google-iam-v1, grpcio
  Building wheel for grpc-google-iam-v1 (setup.py) ... done
  Created wheel for grpc-google-iam-v1: filename=grpc_google_iam_v1-0.12.3-py3-none-any.whl size=18501 sha256=3d680cc10426102f5642d2e0b5ae9d641b5e43931a28092f2e36ca4b885183ce
  Stored in directory: /tmp/pip-ephem-wheel-cache-qyo_e82n/wheels/b9/ee/67/2e444183030cb8d31ce8b34cee34a7afdbd3ba5959ea846380
  Building wheel for grpcio (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /home/mendel/.virtualenvs/cv/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-_s_lg1kx/grpcio_b6a2e5aada6c4dd48e9313537b1d3658/setup.py'"'"'; __file__='"'"'/tmp/pip-install-_s_lg1kx/grpcio_b6a2e5aada6c4dd48e9313537b1d3658/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-tbs2kbmj
       cwd: /tmp/pip-install-_s_lg1kx/grpcio_b6a2e5aada6c4dd48e9313537b1d3658/
  Complete output (1256 lines):
  ASM Builds for BoringSSL currently not supported on: linux-aarch64
  Found cython-generated files...
  running bdist_wheel
  running build
  running build_py
  running build_project_metadata
  creating python_build
  creating python_build/lib.linux-aarch64-3.7
  creating python_build/lib.linux-aarch64-3.7/grpc
  copying src/python/grpcio/grpc/_utilities.py -> python_build/lib.linux-aarch64-3.7/grpc
  copying src/python/grpcio/grpc/_channel.py -> python_build/lib.linux-aarch64-3.7/grpc
  copying src/python/grpcio/grpc/_runtime_protos.py -> python_build/lib.linux-aarch64-3.7/grpc
  copying src/python/grpcio/grpc/_compression.py -> python_build/lib.linux-aarch64-3.7/grpc
  copying src/python/grpcio/grpc/_plugin_wrapping.py -> python_build/lib.linux-aarch64-3.7/grpc
  copying src/python/grpcio/grpc/_simple_stubs.py -> python_build/lib.linux-aarch64-3.7/grpc

----------------------------
Lot of lines.. there..! :(
...................................
  During handling of the above exception, another exception occurred:
  
  Traceback (most recent call last):
    File "/tmp/pip-install-_s_lg1kx/grpcio_b6a2e5aada6c4dd48e9313537b1d3658/src/python/grpcio/commands.py", line 267, in build_extensions
      build_ext.build_ext.build_extensions(self)
    File "/usr/lib/python3.7/distutils/command/build_ext.py", line 449, in build_extensions
      self._build_extensions_serial()
    File "/usr/lib/python3.7/distutils/command/build_ext.py", line 474, in _build_extensions_serial
      self.build_extension(ext)
    File "/home/mendel/.virtualenvs/cv/lib/python3.7/site-packages/setuptools/command/build_ext.py", line 208, in build_extension
      _build_ext.build_extension(self, ext)
    File "/usr/lib/python3.7/distutils/command/build_ext.py", line 534, in build_extension
      depends=ext.depends)
    File "/tmp/pip-install-_s_lg1kx/grpcio_b6a2e5aada6c4dd48e9313537b1d3658/src/python/grpcio/_parallel_compile_patch.py", line 59, in _parallel_compile
      _compile_single_file, objects)
    File "/usr/lib/python3.7/multiprocessing/pool.py", line 268, in map
      return self._map_async(func, iterable, mapstar, chunksize).get()
    File "/usr/lib/python3.7/multiprocessing/pool.py", line 657, in get
      raise self._value
    File "/usr/lib/python3.7/multiprocessing/pool.py", line 121, in worker
      result = (True, func(*args, **kwds))
    File "/usr/lib/python3.7/multiprocessing/pool.py", line 44, in mapstar
      return list(map(*args))
    File "/tmp/pip-install-_s_lg1kx/grpcio_b6a2e5aada6c4dd48e9313537b1d3658/src/python/grpcio/_parallel_compile_patch.py", line 54, in _compile_single_file
      self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
    File "/usr/lib/python3.7/distutils/unixccompiler.py", line 120, in _compile
      raise CompileError(msg)
  distutils.errors.CompileError: command 'aarch64-linux-gnu-gcc' failed with exit status 1
  
  ----------------------------------------
  ERROR: Failed building wheel for grpcio
  Running setup.py clean for grpcio
Successfully built grpc-google-iam-v1
Failed to build grpcio

Note

I am really worried about this line even i don't know what it is...!

ASM Builds for BoringSSL currently not supported on: linux-aarch64

Thanks!

@product-auto-label product-auto-label bot added the api: pubsub Issues related to the googleapis/python-pubsub API. label Dec 9, 2020
@HemangChothani
Copy link
Contributor

@Bhanuchander210 Please install sudo apt-get install python3-dev and then try to install grpcio again.

@bhachauk
Copy link
Author

bhachauk commented Dec 9, 2020

@HemangChothani I have already installed.

python3-dev is already the newest version (3.7.3-1)

@HemangChothani
Copy link
Contributor

@Bhanuchander210 Ok, then try install these libraries manually
sudo apt-get install build-essential libssl-dev libffi-dev libxml2-dev libxslt1-dev zlib1g-dev

@bhachauk
Copy link
Author

bhachauk commented Dec 9, 2020

@HemangChothani i am not lucky... still got the same error..! after few minutes of build process...

  Building wheel for grpcio (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /home/mendel/.virtualenvs/cv/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-iy_nxqh9/grpcio_45689577c870488badb5eb0850cab298/setup.py'"'"'; __file__='"'"'/tmp/pip-install-iy_nxqh9/grpcio_45689577c870488badb5eb0850cab298/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-oym18jez
       cwd: /tmp/pip-install-iy_nxqh9/grpcio_45689577c870488badb5eb0850cab298/
  Complete output (2639 lines):
  ASM Builds for BoringSSL currently not supported on: linux-aarch64

@HemangChothani
Copy link
Contributor

@Bhanuchander210 Hard luck.
Try to upgrade pip sudo -H pip3 install --upgrade pip and try to install in fresh environment.

@bhachauk
Copy link
Author

bhachauk commented Dec 9, 2020

@HemangChothani
I just want to make sure this point:

  • Is it really possible to install google-cloud-pubsub in Coral dev board ?

@bhachauk
Copy link
Author

bhachauk commented Dec 9, 2020

@HemangChothani
Getting same error even after running the command : sudo -H pip3 install --upgrade pip
now pip upgraded to version : 20.3.1

@HemangChothani
Copy link
Contributor

HemangChothani commented Dec 9, 2020

* Is it really possible to install  **google-cloud-pubsub** in **Coral dev board** ?

I doubt, as found coral dev board use aarch64, I found the similar issue in the grpc repo related to that, you can verify here

As it's related to grpc , for better resolution open this issue into grpc repo

@yoshi-automation yoshi-automation added the triage me I really want to be triaged. label Dec 9, 2020
@HemangChothani HemangChothani added type: question Request for information or clarification. Not an issue. and removed triage me I really want to be triaged. labels Dec 10, 2020
@bhachauk
Copy link
Author

bhachauk commented Dec 10, 2020

For those who looking for the same :
I found that, there is a possible way to publish a message to pub sub using IoT Core.

Please suggest / correct me if any thing better than this..

@bhachauk
Copy link
Author

Finally build : grpcio-1.29.0-cp37-cp37m-linux_aarch64.whl (lower version)... got hint from below link.

@HemangChothani
Copy link
Contributor

@Bhanuchander210 Can i close this issue?

@bhachauk
Copy link
Author

@HemangChothani sure

@bhachauk
Copy link
Author

grpc/grpc#24958

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: pubsub Issues related to the googleapis/python-pubsub API. type: question Request for information or clarification. Not an issue.
Projects
None yet
Development

No branches or pull requests

3 participants