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

Unable to build libmicroros.a correctly #207

Closed
lishuai-cau opened this issue Oct 4, 2023 · 2 comments
Closed

Unable to build libmicroros.a correctly #207

lishuai-cau opened this issue Oct 4, 2023 · 2 comments

Comments

@lishuai-cau
Copy link

lishuai-cau commented Oct 4, 2023

I use docker and esp idf v4.4 to make micro_ros humble branch, but it build failed.
I use the following steps:

  . $IDF_PATH/export.sh
  pip3 install catkin_pkg lark-parser empy colcon-common-extensions
  idf.py set-target esp32
  idf.py build
The error message displayed is as follows:



Cloning into 'src/ament_cmake'...
Cloning into 'src/Micro-XRCE-DDS-Client'...
Cloning into 'src/ament_lint'...
Cloning into 'src/rmw_microxrcedds'...
Cloning into 'src/ament_package'...
Cloning into 'src/micro-CDR'...
Cloning into 'src/googletest'...
Cloning into 'src/rcl'...
Cloning into 'src/rclc'...
Cloning into 'src/ament_cmake_ros'...
Cloning into 'src/ament_index'...
Cloning into 'src/rcutils'...
Starting >>> ament_package
Starting >>> ament_lint
Starting >>> gtest_vendor
Starting >>> ament_cppcheck
Starting >>> ament_pycodestyle
--- stderr: ament_lint
Traceback (most recent call last):
  File "/opt/esp/python_env/idf4.4_py3.8_env/lib/python3.8/site-packages/colcon_core/executor/__init__.py", line 91, in __call__
    rc = await self.task(*args, **kwargs)
  File "/opt/esp/python_env/idf4.4_py3.8_env/lib/python3.8/site-packages/colcon_core/task/__init__.py", line 93, in __call__
    return await task_method(*args, **kwargs)
  File "/opt/esp/python_env/idf4.4_py3.8_env/lib/python3.8/site-packages/colcon_ros/task/ament_python/build.py", line 51, in build
    setup_py_data = get_setup_data(self.context.pkg, env)
  File "/opt/esp/python_env/idf4.4_py3.8_env/lib/python3.8/site-packages/colcon_core/task/python/__init__.py", line 20, in get_setup_data
    return dict(pkg.metadata[key](env))
  File "/opt/esp/python_env/idf4.4_py3.8_env/lib/python3.8/site-packages/colcon_ros/package_augmentation/ros_ament_python.py", line 57, in getter
    return get_setup_information(
  File "/opt/esp/python_env/idf4.4_py3.8_env/lib/python3.8/site-packages/colcon_python_setup_py/package_identification/python_setup_py.py", line 241, in get_setup_information
    _setup_information_cache[hashable_env] = _get_setup_information(
  File "/opt/esp/python_env/idf4.4_py3.8_env/lib/python3.8/site-packages/colcon_python_setup_py/package_identification/python_setup_py.py", line 293, in _get_setup_information
    return ast.literal_eval(output)
  File "/usr/lib/python3.8/ast.py", line 59, in literal_eval
    node_or_string = parse(node_or_string, mode='eval')
  File "/usr/lib/python3.8/ast.py", line 47, in parse
    return compile(source, filename, mode, flags,
  File "<unknown>", line 1
    {'package_data': {}, 'dist_files': [], 'src_root': None, 'dependency_links': [], 'setup_requires': [], 'eager_resources': None, 'entry_points': {'pytest11': ['ament_lint = ament_lint.pytest_marker']}, 'exclude_package_data': None, 'extras_require': {}, 'include_package_data': None, 'install_requires': ['setuptools'], 'namespace_packages': None, 'packages': ['ament_lint'], 'python_requires': None, 'test_loader': None, 'test_runner': None, 'test_suite': None, 'tests_require': None, 'use_2to3': None, 'zip_safe': True, 'cffi_modules': None, 'verbose': 1, 'dry_run': 0, 'help': 0, 'command_packages': None, 'script_name': 'setup.py', 'script_args': ['--dry-run'], 'command_options': {'install': {}}, 'package_dir': {}, 'py_modules': None, 'libraries': None, 'headers': None, 'ext_package': None, 'include_dirs': None, 'extra_path': None, 'scripts': None, 'data_files': [('share/ament_lint', ['package.xml']), ('share/ament_index/resource_index/packages', ['resource/ament_lint'])], 'password': '', 'command_obj': {}, 'have_run': {}, 'want_user_cfg': True, 'metadata': {'name': 'ament_lint', 'version': '0.12.8', 'author': 'Dirk Thomas', 'author_email': '[email protected]', 'maintainer': 'Michael Jeronimo, Michel Hidalgo', 'maintainer_email': '[email protected], [email protected]', 'url': 'https://github.com/ament/ament_lint', 'license': 'Apache License, Version 2.0', 'description': 'Providing common API for ament linter packages.', 'long_description': 'Providing common API for ament linter packages, e.g. the `linter` marker for\npytest.', 'keywords': ['ROS'], 'platforms': None, 'classifiers': ['Intended Audience :: Developers', 'License :: OSI Approved :: Apache Software License', 'Programming Language :: Python', 'Topic :: Software Development'], 'download_url': 'https://github.com/ament/ament_lint/releases', 'provides': None, 'requires': None, 'obsoletes': None, 'long_description_content_type': None, 'project_urls': {}, 'license_file': None, '_normalized_install_requires': {'setuptools': <Requirement('setuptools')>}, '_normalized_extras_require': {}}}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        ^
SyntaxError: invalid syntax
---
Failed   <<< ament_lint [0.19s, exited with code 1]
--- stderr: ament_cppcheck
Traceback (most recent call last):
  File "/opt/esp/python_env/idf4.4_py3.8_env/lib/python3.8/site-packages/colcon_core/executor/__init__.py", line 91, in __call__
    rc = await self.task(*args, **kwargs)
  File "/opt/esp/python_env/idf4.4_py3.8_env/lib/python3.8/site-packages/colcon_core/task/__init__.py", line 93, in __call__
    return await task_method(*args, **kwargs)
  File "/opt/esp/python_env/idf4.4_py3.8_env/lib/python3.8/site-packages/colcon_ros/task/ament_python/build.py", line 51, in build
    setup_py_data = get_setup_data(self.context.pkg, env)
  File "/opt/esp/python_env/idf4.4_py3.8_env/lib/python3.8/site-packages/colcon_core/task/python/__init__.py", line 20, in get_setup_data
    return dict(pkg.metadata[key](env))
  File "/opt/esp/python_env/idf4.4_py3.8_env/lib/python3.8/site-packages/colcon_ros/package_augmentation/ros_ament_python.py", line 57, in getter
    return get_setup_information(
  File "/opt/esp/python_env/idf4.4_py3.8_env/lib/python3.8/site-packages/colcon_python_setup_py/package_identification/python_setup_py.py", line 241, in get_setup_information
    _setup_information_cache[hashable_env] = _get_setup_information(
  File "/opt/esp/python_env/idf4.4_py3.8_env/lib/python3.8/site-packages/colcon_python_setup_py/package_identification/python_setup_py.py", line 293, in _get_setup_information
    return ast.literal_eval(output)
  File "/usr/lib/python3.8/ast.py", line 59, in literal_eval
    node_or_string = parse(node_or_string, mode='eval')
  File "/usr/lib/python3.8/ast.py", line 47, in parse
    return compile(source, filename, mode, flags,
  File "<unknown>", line 1
    {'package_data': {}, 'dist_files': [], 'src_root': None, 'dependency_links': [], 'setup_requires': [], 'eager_resources': None, 'entry_points': {'console_scripts': ['ament_cppcheck = ament_cppcheck.main:main']}, 'exclude_package_data': None, 'extras_require': {}, 'include_package_data': None, 'install_requires': ['setuptools'], 'namespace_packages': None, 'packages': ['ament_cppcheck'], 'python_requires': None, 'test_loader': None, 'test_runner': None, 'test_suite': None, 'tests_require': ['pytest'], 'use_2to3': None, 'zip_safe': True, 'cffi_modules': None, 'verbose': 1, 'dry_run': 0, 'help': 0, 'command_packages': None, 'script_name': 'setup.py', 'script_args': ['--dry-run'], 'command_options': {'install': {}}, 'package_dir': {}, 'py_modules': None, 'libraries': None, 'headers': None, 'ext_package': None, 'include_dirs': None, 'extra_path': None, 'scripts': None, 'data_files': [('share/ament_cppcheck', ['package.xml']), ('share/ament_index/resource_index/packages', ['resource/ament_cppcheck'])], 'password': '', 'command_obj': {}, 'have_run': {}, 'want_user_cfg': True, 'metadata': {'name': 'ament_cppcheck', 'version': '0.12.8', 'author': 'Dirk Thomas', 'author_email': '[email protected]', 'maintainer': 'Michael Jeronimo, Michel Hidalgo', 'maintainer_email': '[email protected], [email protected]', 'url': 'https://github.com/ament/ament_lint', 'license': 'Apache License, Version 2.0', 'description': 'Static code analysis on C/C++ code using Cppcheck.', 'long_description': 'The ability to perform static code analysis on C/C++ code using Cppcheck\nand generate xUnit test result files.', 'keywords': ['ROS'], 'platforms': None, 'classifiers': ['Intended Audience :: Developers', 'License :: OSI Approved :: Apache Software License', 'Programming Language :: Python', 'Topic :: Software Development'], 'download_url': 'https://github.com/ament/ament_lint/releases', 'provides': None, 'requires': None, 'obsoletes': None, 'long_description_content_type': None, 'project_urls': {}, 'license_file': None, '_normalized_install_requires': {'setuptools': <Requirement('setuptools')>}, '_normalized_extras_require': {}}}
@pablogs9
Copy link
Member

pablogs9 commented Oct 4, 2023

This is a known issue, please check: colcon/colcon-python-setup-py#56

Also:

Pinning setuptools==68.1.2 fixed this issue temporarily but doesn't fix the root cause.

@lishuai-cau
Copy link
Author

Thank you, I used this command and successfully solved my problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants