grpc / grpc

The C based gRPC (C++, Python, Ruby, Objective-C, PHP, C#)
https://grpc.io
Apache License 2.0
41.57k stars 10.49k forks source link

Unable to install on my armbian #22700

Open mpahic opened 4 years ago

mpahic commented 4 years ago

What version of gRPC and what language are you using?

grpcio-1.28.1

What operating system (Linux, Windows,...) and version?

Armbian 5.4.31-sunxi VERSION=20.02.1

What runtime / compiler are you using (e.g. python version or version of gcc)

pip 20.0.2 from env/lib/python3.7/site-packages/pip (python 3.7)

What did you do?

I am basically trying to install package firebase-admin, but which is dependant on grpcio, which is unable to install, so I am trying to install the package by itself env/bin/python -m pip install --upgrade grpcio

There was a memory issue, and on stack overflow it advised to increase the swap file so I did that. Now, I no longer see the memory error in the logs, but I am still unable to install grpcio.

What did you expect to see?

Package installation.

What did you see instead?

  collect2: error: ld returned 1 exit status
  Traceback (most recent call last):
    File "/usr/lib/python3.7/distutils/unixccompiler.py", line 215, in link
      self.spawn(linker + ld_args)
    File "/tmp/pip-install-vg1s4py4/grpcio/src/python/grpcio/_spawn_patch.py", l                                                                                                                                                             ine 54, in _commandfile_spawn
      _classic_spawn(self, command)
    File "/usr/lib/python3.7/distutils/ccompiler.py", line 909, in spawn
      spawn(cmd, dry_run=self.dry_run)
    File "/usr/lib/python3.7/distutils/spawn.py", line 36, in spawn
      _spawn_posix(cmd, search_path, dry_run=dry_run)
    File "/usr/lib/python3.7/distutils/spawn.py", line 159, in _spawn_posix
      % (cmd, exit_status))
  distutils.errors.DistutilsExecError: command 'arm-linux-gnueabihf-g++' failed                                                                                                                                                              with exit status 1

  During handling of the above exception, another exception occurred:

  Traceback (most recent call last):
    File "/tmp/pip-install-vg1s4py4/grpcio/src/python/grpcio/commands.py", line                                                                                                                                                              262, 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 _buil                                                                                                                                                             d_extensions_serial
      self.build_extension(ext)
    File "/home/mpahic/env/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 559, in build                                                                                                                                                             _extension
      target_lang=language)
    File "/usr/lib/python3.7/distutils/ccompiler.py", line 717, in link_shared_o                                                                                                                                                             bject
      extra_preargs, extra_postargs, build_temp, target_lang)
    File "/usr/lib/python3.7/distutils/unixccompiler.py", line 217, in link
      raise LinkError(msg)
  distutils.errors.LinkError: command 'arm-linux-gnueabihf-g++' failed with exit                                                                                                                                                              status 1

  During handling of the above exception, another exception occurred:

  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/tmp/pip-install-vg1s4py4/grpcio/setup.py", line 400, in <module>
      cmdclass=COMMAND_CLASS,
    File "/home/mpahic/env/lib/python3.7/site-packages/setuptools/__init__.py",                                                                                                                                                              line 144, in setup
      return distutils.core.setup(**attrs)
    File "/usr/lib/python3.7/distutils/core.py", line 148, in setup
      dist.run_commands()
    File "/usr/lib/python3.7/distutils/dist.py", line 966, in run_commands
      self.run_command(cmd)
    File "/usr/lib/python3.7/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/home/mpahic/env/lib/python3.7/site-packages/wheel/bdist_wheel.py", li                                                                                                                                                             ne 223, in run
      self.run_command('build')
    File "/usr/lib/python3.7/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/usr/lib/python3.7/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/usr/lib/python3.7/distutils/command/build.py", line 135, in run
      self.run_command(cmd_name)
    File "/usr/lib/python3.7/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/usr/lib/python3.7/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/home/mpahic/env/lib/python3.7/site-packages/setuptools/command/build_                                                                                                                                                             ext.py", line 87, in run
      _build_ext.run(self)
    File "/usr/lib/python3.7/distutils/command/build_ext.py", line 340, in run
      self.build_extensions()
    File "/tmp/pip-install-vg1s4py4/grpcio/src/python/grpcio/commands.py", line                                                                                                                                                              265, in build_extensions
      support.diagnose_build_ext_error(self, error, formatted_exception)
    File "/tmp/pip-install-vg1s4py4/grpcio/src/python/grpcio/support.py", line 1                                                                                                                                                             09, in diagnose_build_ext_error
      "backtrace).\n\n{}".format(formatted))
  commands.CommandError:

  We could not diagnose your build failure. If you are unable to proceed, please                                                                                                                                                              file an issue at http://www.github.com/grpc/grpc with `[Python install]` in the                                                                                                                                                              title; please attach the whole log (including everything that may have appeared                                                                                                                                                              above the Python backtrace).

  Traceback (most recent call last):
    File "/usr/lib/python3.7/distutils/unixccompiler.py", line 215, in link
      self.spawn(linker + ld_args)
    File "/tmp/pip-install-vg1s4py4/grpcio/src/python/grpcio/_spawn_patch.py", l                                                                                                                                                             ine 54, in _commandfile_spawn
      _classic_spawn(self, command)
    File "/usr/lib/python3.7/distutils/ccompiler.py", line 909, in spawn
      spawn(cmd, dry_run=self.dry_run)
    File "/usr/lib/python3.7/distutils/spawn.py", line 36, in spawn
      _spawn_posix(cmd, search_path, dry_run=dry_run)
    File "/usr/lib/python3.7/distutils/spawn.py", line 159, in _spawn_posix
      % (cmd, exit_status))
  distutils.errors.DistutilsExecError: command 'arm-linux-gnueabihf-g++' failed                                                                                                                                                              with exit status 1

  During handling of the above exception, another exception occurred:

  Traceback (most recent call last):
    File "/tmp/pip-install-vg1s4py4/grpcio/src/python/grpcio/commands.py", line                                                                                                                                                              262, 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 _buil                                                                                                                                                             d_extensions_serial
      self.build_extension(ext)
    File "/home/mpahic/env/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 559, in build                                                                                                                                                             _extension
      target_lang=language)
    File "/usr/lib/python3.7/distutils/ccompiler.py", line 717, in link_shared_o                                                                                                                                                             bject
      extra_preargs, extra_postargs, build_temp, target_lang)
    File "/usr/lib/python3.7/distutils/unixccompiler.py", line 217, in link
      raise LinkError(msg)
  distutils.errors.LinkError: command 'arm-linux-gnueabihf-g++' failed with exit                                                                                                                                                              status 1

  ----------------------------------------
  ERROR: Failed building wheel for grpcio

Anything else we should know about your project / environment?

All the packages from apt are up to date, also python3, pip and wheel 0.34.2 I removed mayority of the stacktrace due to the reporting tool constraint .

gnossen commented 4 years ago

@mpahic It looks like the relevant linker error is just above where you started the error message in the issue. Could you please add your full error log?

mpahic commented 4 years ago

Here you go: https://gist.github.com/mpahic/d2a10e11563d607d9cf34f5254fb4eea

PyAgni commented 4 years ago

Any updates on this? I'm getting a similar error. My setuptools version in 48.0.0