jsk-ros-pkg / jsk_robot

jsk-ros-pkg/jsk_robot
https://github.com/jsk-ros-pkg/jsk_robot
73 stars 97 forks source link

[WIP] [unitree/cross] Fix unitree system build #1793

Closed tkmtnt7000 closed 1 year ago

tkmtnt7000 commented 1 year ago

Currently, unitree system build (build_ros1_dependencies.sh and build_ros1.sh) fails at several points.

This PR includes

But, this PR do not fix the following issue

command 'aarch64-linux-gnu-gcc' failed with exit status 1


File "build/bdist.linux-aarch64/egg/zope/interface/tests/test_advice.py", line 117
class Meta(type, metaclass=Metameta):
^
SyntaxError: invalid syntax

File "build/bdist.linux-aarch64/egg/zope/interface/adapter.py", line 336
yield from cls._allKeys(v, i - 1, new_parent_k)
^
SyntaxError: invalid syntax

File "build/bdist.linux-aarch64/egg/zope/interface/registry.py", line 294
yield from self.utilities.lookupAll((), interface)
^
SyntaxError: invalid syntax

creating /opt/jsk/System/ros1_dependencies/lib/python2.7/site-packages/zope.interface-6.1a2-py2.7-linux-aarch64.egg
Extracting zope.interface-6.1a2-py2.7-linux-aarch64.egg to /opt/jsk/System/ros1_dependencies/lib/python2.7/site-packages
File "/opt/jsk/System/ros1_dependencies/lib/python2.7/site-packages/zope.interface-6.1a2-py2.7-linux-aarch64.egg/zope/interface/adapter.py", line 336
yield from cls._allKeys(v, i - 1, new_parent_k)
^
SyntaxError: invalid syntax

File "/opt/jsk/System/ros1_dependencies/lib/python2.7/site-packages/zope.interface-6.1a2-py2.7-linux-aarch64.egg/zope/interface/registry.py", line 294
yield from self.utilities.lookupAll((), interface)
^
SyntaxError: invalid syntax

File "/opt/jsk/System/ros1_dependencies/lib/python2.7/site-packages/zope.interface-6.1a2-py2.7-linux-aarch64.egg/zope/interface/tests/test_advice.py", line 117
class Meta(type, metaclass=Metameta):
^
SyntaxError: invalid syntax

Adding zope.interface 6.1a2 to easy-install.pth file

Installed /opt/jsk/System/ros1_dependencies/lib/python2.7/site-packages/zope.interface-6.1a2-py2.7-linux-aarch64.egg
Searching for constantly>=15.1
Reading https://pypi.python.org/simple/constantly/
Downloading https://files.pythonhosted.org/packages/b9/65/48c1909d0c0aeae6c10213340ce682db01b48ea900a7d9fce7a7910ff318/constantly-15.1.0-py2.py3-none-any.whl#sha256=dd2fa9d6b1a51a83f0d7dd76293d734046aa176e384bf6e33b7e44880eb37c5d
Best match: constantly 15.1.0
Processing constantly-15.1.0-py2.py3-none-any.whl
Installing constantly-15.1.0-py2.py3-none-any.whl to /opt/jsk/System/ros1_dependencies/lib/python2.7/site-packages
Adding constantly 15.1.0 to easy-install.pth file

Installed /opt/jsk/System/ros1_dependencies/lib/python2.7/site-packages/constantly-15.1.0-py2.7.egg
Searching for Automat>=0.3.0
Reading https://pypi.python.org/simple/Automat/
Downloading https://files.pythonhosted.org/packages/29/90/64aabce6c1b820395452cc5472b8f11cd98320f40941795b8069aef4e0e0/Automat-22.10.0-py2.py3-none-any.whl#sha256=c3164f8742b9dc440f3682482d32aaff7bb53f71740dd018533f9de286b64180
Best match: Automat 22.10.0
Processing Automat-22.10.0-py2.py3-none-any.whl
Installing Automat-22.10.0-py2.py3-none-any.whl to /opt/jsk/System/ros1_dependencies/lib/python2.7/site-packages
writing requirements to /opt/jsk/System/ros1_dependencies/lib/python2.7/site-packages/Automat-22.10.0-py2.7.egg/EGG-INFO/requires.txt
Adding Automat 22.10.0 to easy-install.pth file
Installing automat-visualize script to /opt/jsk/System/ros1_dependencies/bin

Installed /opt/jsk/System/ros1_dependencies/lib/python2.7/site-packages/Automat-22.10.0-py2.7.egg
Searching for attrs>=19.2.0
Reading https://pypi.python.org/simple/attrs/
Downloading https://files.pythonhosted.org/packages/97/90/81f95d5f705be17872843536b1868f351805acf6971251ff07c1b8334dbb/attrs-23.1.0.tar.gz#sha256=6279836d581513a26f1bf235f9acd333bc9115683f14f7e8fae46c98fc50e015
Best match: attrs 23.1.0
Processing attrs-23.1.0.tar.gz
error: Couldn't find a setup script in /tmp/easy_install-_r9Nfn/attrs-23.1.0.tar.gz



I installed `attrs<23.0` manually and then tried to install `python-twisted`, but almost same error occurs. I think easy_install cannnot find `attrs<23.0.` in local.
k-okada commented 1 year ago

Can you find the version of zope.interface installed on the working unitree robot?

◉ Kei Okada

2023年4月26日(水) 13:01 Naoto Tsukamoto @.***>:

Currently, unitree system build (build_ros1_dependencies.sh and build_ros1.sh) fails to some point.

This PR includes

But, this PR cannot fix the following issue

  • Unable to install python-twisted in build_ros1_dependencies.sh because of the following error.

Installed /opt/jsk/System/ros1_dependencies/lib/python2.7/site-packages/Twisted-17.9.0-py2.7-linux-aarch64.egg Processing dependencies for Twisted==17.9.0 Searching for zope.interface>=3.6.0 Reading https://pypi.python.org/simple/zope.interface/ Downloading https://files.pythonhosted.org/packages/1f/ef/cae21b6295cb2960429f463e6e99daf3623a0c4ced7242a809a0c94c9605/zope.interface-6.1a2.tar.gz#sha256=167ea1a5c28aad2fa7fb0ca8761229bf54766ab6e696c80e592ee8c936ab1776 Best match: zope.interface 6.1a2 Processing zope.interface-6.1a2.tar.gz Writing /tmp/easy_install-ur5jc9/zope.interface-6.1a2/setup.cfg Running zope.interface-6.1a2/setup.py -q bdist_egg --dist-dir /tmp/easy_install-ur5jc9/zope.interface-6.1a2/egg-dist-tmp-3dtby3 warning: no files found matching '*.txt' under directory 'docs' src/zope/interface/_zope_interface_coptimizations.c:765:5: error: unknown type name ‘Py_hash_t’ Py_hash_t _v_cached_hash; ^~~~~ src/zope/interface/_zope_interface_coptimizations.c:907:8: error: unknown type name ‘Py_hash_t’ static Py_hash_t ^~~~~


WARNING:

    An optional code optimization (C extension) could not be compiled.

    Optimizations for this package will not be available!

command 'aarch64-linux-gnu-gcc' failed with exit status 1


File "build/bdist.linux-aarch64/egg/zope/interface/tests/test_advice.py", line 117 class Meta(type, metaclass=Metameta): ^ SyntaxError: invalid syntax

File "build/bdist.linux-aarch64/egg/zope/interface/adapter.py", line 336 yield from cls._allKeys(v, i - 1, new_parent_k) ^ SyntaxError: invalid syntax

File "build/bdist.linux-aarch64/egg/zope/interface/registry.py", line 294 yield from self.utilities.lookupAll((), interface) ^ SyntaxError: invalid syntax

creating /opt/jsk/System/ros1_dependencies/lib/python2.7/site-packages/zope.interface-6.1a2-py2.7-linux-aarch64.egg Extracting zope.interface-6.1a2-py2.7-linux-aarch64.egg to /opt/jsk/System/ros1_dependencies/lib/python2.7/site-packages File "/opt/jsk/System/ros1_dependencies/lib/python2.7/site-packages/zope.interface-6.1a2-py2.7-linux-aarch64.egg/zope/interface/adapter.py", line 336 yield from cls._allKeys(v, i - 1, new_parent_k) ^ SyntaxError: invalid syntax

File "/opt/jsk/System/ros1_dependencies/lib/python2.7/site-packages/zope.interface-6.1a2-py2.7-linux-aarch64.egg/zope/interface/registry.py", line 294 yield from self.utilities.lookupAll((), interface) ^ SyntaxError: invalid syntax

File "/opt/jsk/System/ros1_dependencies/lib/python2.7/site-packages/zope.interface-6.1a2-py2.7-linux-aarch64.egg/zope/interface/tests/test_advice.py", line 117 class Meta(type, metaclass=Metameta): ^ SyntaxError: invalid syntax

Adding zope.interface 6.1a2 to easy-install.pth file

Installed /opt/jsk/System/ros1_dependencies/lib/python2.7/site-packages/zope.interface-6.1a2-py2.7-linux-aarch64.egg Searching for constantly>=15.1 Reading https://pypi.python.org/simple/constantly/ Downloading https://files.pythonhosted.org/packages/b9/65/48c1909d0c0aeae6c10213340ce682db01b48ea900a7d9fce7a7910ff318/constantly-15.1.0-py2.py3-none-any.whl#sha256=dd2fa9d6b1a51a83f0d7dd76293d734046aa176e384bf6e33b7e44880eb37c5d Best match: constantly 15.1.0 Processing constantly-15.1.0-py2.py3-none-any.whl Installing constantly-15.1.0-py2.py3-none-any.whl to /opt/jsk/System/ros1_dependencies/lib/python2.7/site-packages Adding constantly 15.1.0 to easy-install.pth file

Installed /opt/jsk/System/ros1_dependencies/lib/python2.7/site-packages/constantly-15.1.0-py2.7.egg Searching for Automat>=0.3.0 Reading https://pypi.python.org/simple/Automat/ Downloading https://files.pythonhosted.org/packages/29/90/64aabce6c1b820395452cc5472b8f11cd98320f40941795b8069aef4e0e0/Automat-22.10.0-py2.py3-none-any.whl#sha256=c3164f8742b9dc440f3682482d32aaff7bb53f71740dd018533f9de286b64180 Best match: Automat 22.10.0 Processing Automat-22.10.0-py2.py3-none-any.whl Installing Automat-22.10.0-py2.py3-none-any.whl to /opt/jsk/System/ros1_dependencies/lib/python2.7/site-packages writing requirements to /opt/jsk/System/ros1_dependencies/lib/python2.7/site-packages/Automat-22.10.0-py2.7.egg/EGG-INFO/requires.txt Adding Automat 22.10.0 to easy-install.pth file Installing automat-visualize script to /opt/jsk/System/ros1_dependencies/bin

Installed /opt/jsk/System/ros1_dependencies/lib/python2.7/site-packages/Automat-22.10.0-py2.7.egg Searching for attrs>=19.2.0 Reading https://pypi.python.org/simple/attrs/ Downloading https://files.pythonhosted.org/packages/97/90/81f95d5f705be17872843536b1868f351805acf6971251ff07c1b8334dbb/attrs-23.1.0.tar.gz#sha256=6279836d581513a26f1bf235f9acd333bc9115683f14f7e8fae46c98fc50e015 Best match: attrs 23.1.0 Processing attrs-23.1.0.tar.gz error: Couldn't find a setup script in /tmp/easy_install-_r9Nfn/attrs-23.1.0.tar.gz


You can view, comment on, or merge this pull request online at:

https://github.com/jsk-ros-pkg/jsk_robot/pull/1793 Commit Summary

File Changes

(6 files https://github.com/jsk-ros-pkg/jsk_robot/pull/1793/files)

Patch Links:

— Reply to this email directly, view it on GitHub https://github.com/jsk-ros-pkg/jsk_robot/pull/1793, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADYNXEFUOUWZBQDREFXUC3XDCM2LANCNFSM6AAAAAAXL3IDCY . You are receiving this because you are subscribed to this thread.Message ID: @.***>

tkmtnt7000 commented 1 year ago

It seems that zope.interface==4.3.2 is installed manually by ros1_dependencies_build_scripts

tkmtnt7000 commented 1 year ago

Memo:

Twisted==17.9.0's requirements https://github.com/twisted/twisted/blob/667758e33d808ba730ccbdaa5741b64c2fe15399/src/twisted/python/_setup.py#L223-L232

Python libraries in arm64v8_System (昨年までビルドに成功していたもの)

tsukamoto@tsukamoto-desktop-ryzen ~/ros/unitree_ws/src/jsk-ros-pkg/jsk_robot/jsk_unitree_robot/cross/arm64v8_System/ros1_dependencies/lib/python2.7/site-packages (PR-fix-unitree-system-build *%=) 
$ ls
Automat-20.2.0-py2.7.egg                constantly-15.1.0-py2.7.egg  incremental-16.10.1-py2.7.egg          sip.pyi          tornado-4.5.3-py2.7-linux-aarch64.egg
PyAudio-0.2.11-py2.7-linux-aarch64.egg  cv2.so                       lcm                                    sip.so           trollius-2.0.1-py2.7.egg
Twisted-17.9.0-py2.7-linux-aarch64.egg  easy-install.pth             mailutils                              sipconfig.py     txaio-2.8.1-py2.7.egg
attrs-22.1.0-py2.7.egg                  future-0.15.2-py2.7.egg      pymongo-3.6.1-py2.7-linux-aarch64.egg  sipdistutils.py  websocket_client-0.44.0-py2.7.egg
autobahn-17.10.1-py2.7.egg              futures-3.2.0-py2.7.egg      setuptools.pth                         site.py          zope.interface-4.3.2-py2.7-linux-aarch64.egg
backports_abc-0.5-py2.7.egg             futures-3.3.0-py2.7.egg      singledispatch-3.4.0.3-py2.7.egg       site.pyc         zope.interface-5.5.0.dev0-py2.7.egg

成功していないものの途中経過

user@2aee8519342c:/opt/jsk/System/ros1_dependencies/lib/python2.7/site-packages$ ls
autobahn-17.10.1-py2.7.egg   future-0.15.2-py2.7.egg        PyAudio-0.2.11-py2.7-linux-aarch64.egg  sip.pyi                                Twisted-17.9.0-py2.7-linux-aarch64.egg
Automat-22.10.0-py2.7.egg    futures-3.2.0-py2.7.egg        pymongo-3.6.1-py2.7-linux-aarch64.egg   sip.so                                 txaio-2.8.1-py2.7.egg
backports_abc-0.5-py2.7.egg  futures-3.4.0-py2.7.egg        setuptools.pth                          site.py                                websocket_client-0.44.0-py2.7.egg
constantly-15.1.0-py2.7.egg  incremental-16.10.1-py2.7.egg  singledispatch-3.4.0.3-py2.7.egg        site.pyc                               zope.interface-4.3.2-py2.7-linux-aarch64.egg
cv2.so                       lcm                            sipconfig.py                            tornado-4.5.3-py2.7-linux-aarch64.egg  zope.interface-6.1a2-py2.7-linux-aarch64.egg
easy-install.pth             mailutils                      sipdistutils.py                         trollius-2.0.1-py2.7.egg
tkmtnt7000 commented 1 year ago

Thank you very much for reviewing. Sorry for late reply.

good try, but I think it is too hard to keep update with latest python modules. Since we had able to run the system before, we try to install the software version of that time.

I agree. When I worked my way through the process of trying to keep update with the latest python version, I found it much more difficult, too.

tkmtnt7000 commented 1 year ago

Moved to #1794