0
$\begingroup$

Rosanswers logo

I’m aware that Debian is tier 3, and it’s not officially supported. I’m getting the following error when trying building from source Eloquent Release Patch 2 in Debian Stretch(9):

  • Operating System: Debian Stretch(9)
  • Installation type: From source
  • Version or commit hash: ros2-eloquent Patch Release 2
  • DDS implementation: Fast-RTPS

error:

~/ros2_eloquent$ colcon build --event-handlers console_direct+ --packages-select tracetools_trace
Starting >>> tracetools_trace
Traceback (most recent call last):trace - 0.2s]
  File "<string>", line 1, in <module>
  File "/usr/lib/python3.5/distutils/core.py", line 216, in run_setup
    exec(f.read(), g, l)
  File "<string>", line 35
    f'trace = {package_name}.trace:main',
                                       ^
SyntaxError: invalid syntax
Traceback (most recent call last):             
  File "/usr/lib/python3/dist-packages/colcon_core/executor/__init__.py", line 91, in __call__
    rc = await self.task(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/colcon_core/task/__init__.py", line 93, in __call__
    return await task_method(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/colcon_ros/task/ament_python/build.py", line 51, in build
    setup_py_data = get_setup_data(self.context.pkg, env)
  File "/usr/lib/python3/dist-packages/colcon_core/task/python/__init__.py", line 20, in get_setup_data
    return dict(pkg.metadata[key](env))
  File "/usr/lib/python3/dist-packages/colcon_ros/package_identification/ros.py", line 130, in getter
    desc.path / 'setup.py', env=env)
  File "/usr/lib/python3/dist-packages/colcon_python_setup_py/package_identification/python_setup_py.py", line 242, in get_setup_information
    setup_py, env=env)
  File "/usr/lib/python3/dist-packages/colcon_python_setup_py/package_identification/python_setup_py.py", line 283, in _get_setup_information
    cwd=os.path.abspath(str(setup_py.parent)), check=True, env=env)
  File "/usr/lib/python3.5/subprocess.py", line 398, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['/usr/bin/python3', '-c', "import sys;from setuptools.extern.packaging.specifiers import SpecifierSet;from distutils.core import run_setup;dist = run_setup(    'setup.py', script_args=('--dry-run',), stop_after='config');skip_keys = ('cmdclass', 'distclass', 'ext_modules', 'metadata');data = {    key: value for key, value in dist.__dict__.items()     if (        not key.startswith('_') and         not callable(value) and         key not in skip_keys and         key not in dist.display_option_names    )};data['metadata'] = {    k: v for k, v in dist.metadata.__dict__.items()     if k not in ('license_files', 'provides_extras')};sys.stdout.buffer.write(repr(data).encode('utf-8'))"]' returned non-zero exit status 1
--- stderr: tracetools_trace
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/colcon_core/executor/__init__.py", line 91, in __call__
    rc = await self.task(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/colcon_core/task/__init__.py", line 93, in __call__
    return await task_method(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/colcon_ros/task/ament_python/build.py", line 51, in build
    setup_py_data = get_setup_data(self.context.pkg, env)
  File "/usr/lib/python3/dist-packages/colcon_core/task/python/__init__.py", line 20, in get_setup_data
    return dict(pkg.metadata[key](env))
  File "/usr/lib/python3/dist-packages/colcon_ros/package_identification/ros.py", line 130, in getter
    desc.path / 'setup.py', env=env)
  File "/usr/lib/python3/dist-packages/colcon_python_setup_py/package_identification/python_setup_py.py", line 242, in get_setup_information
    setup_py, env=env)
  File "/usr/lib/python3/dist-packages/colcon_python_setup_py/package_identification/python_setup_py.py", line 283, in _get_setup_information
    cwd=os.path.abspath(str(setup_py.parent)), check=True, env=env)
  File "/usr/lib/python3.5/subprocess.py", line 398, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['/usr/bin/python3', '-c', "import sys;from setuptools.extern.packaging.specifiers import SpecifierSet;from distutils.core import run_setup;dist = run_setup(    'setup.py', script_args=('--dry-run',), stop_after='config');skip_keys = ('cmdclass', 'distclass', 'ext_modules', 'metadata');data = {    key: value for key, value in dist.__dict__.items()     if (        not key.startswith('_') and         not callable(value) and         key not in skip_keys and         key not in dist.display_option_names    )};data['metadata'] = {    k: v for k, v in dist.metadata.__dict__.items()     if k not in ('license_files', 'provides_extras')};sys.stdout.buffer.write(repr(data).encode('utf-8'))"]' returned non-zero exit status 1
---
Failed   <<< tracetools_trace [0.28s, exited with code 1]

Summary: 0 packages finished [1.55s]
  1 package failed: tracetools_trace
  1 package had stderr output: tracetools_trace
Command '['/usr/bin/python3', '-c', "import sys;from setuptools.extern.packaging.specifiers import SpecifierSet;from distutils.core import run_setup;dist = run_setup(    'setup.py', script_args=('--dry-run',), stop_after='config');skip_keys = ('cmdclass', 'distclass', 'ext_modules', 'metadata');data = {    key: value for key, value in dist.__dict__.items()     if (        not key.startswith('_') and         not callable(value) and         key not in skip_keys and         key not in dist.display_option_names    )};data['metadata'] = {    k: v for k, v in dist.metadata.__dict__.items()     if k not in ('license_files', 'provides_extras')};sys.stdout.buffer.write(repr(data).encode('utf-8'))"]' returned non-zero exit status 1

Originally posted by andrestoga on ROS Answers with karma: 188 on 2021-02-07

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

I’m aware that Debian is tier 3, and it’s not officially supported. I’m getting the following error when trying building from source Eloquent Release Patch 2 in Debian Stretch(9)

Note: Eloquent officially only supports Debian Buster (10). See REP 2000.

That's not related to in which tier Debian is, it just means Eloquent uses dependencies at versions only available in Buster and newer.

  File "<string>", line 35
    f'trace = {package_name}.trace:main',

this is a Python 3 f-string, which is only really supported starting with Python 3.6.

Afaict, Debian Stretch comes with Python 3.5, which is not compatible.

I believe ros2/ros1_bridge#305 is a similar issue.

You could perhaps try using a venv or other way to get a newer version of Python 3 on your Stretch target.


Edit: apparently, for f-strings specifically, there is the future_fstrings package (F String Invalid Syntax in Python 3.5) which could allow you to work around this.

However, it's possible/likely there are other parts of Eloquent which also assume/have only been tested with >=3.6, so that may not be enough to get things to work reliably.


Originally posted by gvdhoorn with karma: 86574 on 2021-02-08

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by andrestoga on 2021-02-08:
Yeah, there are some discrepancies with the REP 2000 and this where it says that supports Debian Stretch (9) as a tier 3 platform for Eloquent... Thanks for the tips though!

Comment by gvdhoorn on 2021-02-08:
I would suggest to report that and/or submit a PR to fix the docs.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.