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

fix to pass packages with catkin_virtualenv #3

Open
wants to merge 6 commits into
base: roso-noble
Choose a base branch
from

Conversation

k-okada
Copy link

@k-okada k-okada commented Dec 31, 2024

here is the list of fixes to pass jsk packages.

  • ecc7df2 fix when multiple repository is defined in DEB_REPOSITORY, --extra-repository takes only one url. To use multiple repositories, we need to pass --extra-repository multiple times
    --> support multiple DEB_REPOSITORY options. This fix is not related jsk nor catkin_virtualenv.
          DEB_REPOSITORY: |
            deb [trusted=yes] ${{ env.UPSTREAM }} ./
            deb [trusted=yes] https://raw.githubusercontent.com/k-okada/ros-o-overlay/check_jsk_recognition-jammy-one/repository ./
            deb [trusted=yes] https://raw.githubusercontent.com/k-okada/ros-o-overlay/check_jsk_3rdparty-jammy-one/repository ./
            deb [trusted=yes] https://raw.githubusercontent.com/k-okada/ros-o-overlay/check_roseus-jammy-one/repository ./

https://github.com/k-okada/ros-o-overlay/blob/5d361a9146e8aaad465b9e78762b24163c737027/.github/workflows/build-overlay.yaml#L31-L35

  • 28b8a36 skip dh_strip error to ignore --compress-debug-sections error
    --> Some pip packages download binary files for multiple architecture including win32/macos, and dh_strip command causes error. The reason we do not need this fix in Noetic is that Debian added added --compress-debug-sections option in `objcopy' command from Jammy

  • 7bb7eb3 add ppa:k-okada/python3-catkin-tools for jammy
    --> catkin-tools package is not releasd on jammy. It is very interesting that on Noble, they have catkin-tools package. We could move this deb files to more convinient locations, such as ppa:v-launchpad-jochen-sprickerhof-de/ros ?

  • b3bab5c 'mkdir /sbuild-nonexistent/.ros/log' to resolve ros-o-builder error with catkin_virtual_env
    --> Pip packages uses ROS_LOG_DIR file and we need to create the directory.

  • b3cb377 build.sh : skip dh_shlibdeps, because some pip modules, speech_recognition for example, contains x86/x86_64/win32/mac binaries
    --> same reason as 28b8a36

…ition for example, contains x86/x86_64/win32/mac binaries
@k-okada k-okada changed the title fix to pass packages with catkin_virtualenv [WIP] fix to pass packages with catkin_virtualenv Jan 1, 2025
@k-okada k-okada changed the title [WIP] fix to pass packages with catkin_virtualenv fix to pass packages with catkin_virtualenv Jan 6, 2025
…ith catkin_virtual_env

Fixes following error

'''
  User Environment
  ----------------
  APT_CONFIG=/var/lib/sbuild/apt.conf
  CCACHE_DIR=/build/ccache
  DEB_BUILD_OPTIONS=nocheck
  HOME=/sbuild-nonexistent
  -- Using system site packages
  WARNING: cannot create log directory [/sbuild-nonexistent/.ros/log]. Please set ROS_LOG_DIR to a writable location.
  WARNING: cannot create log directory [/sbuild-nonexistent/.ros/log]. Please set ROS_LOG_DIR to a writable location.
  -- Using virtualenv

    File /usr/lib/python3.10/os.py, line 225, in makedirs
      mkdir(name, mode)
  PermissionError: [Errno 13] Permission denied: '/sbuild-nonexistent'
'''

'''
2024-12-31T08:43:20.9042400Z cd /<<BUILDDIR>>package && /<<BUILDDIR>>package/.obj-x86_64-linux-gnu/catkin_generated/env_cached.sh rosrun catkin_virtualenv venv_lock /<<BUILDDIR>>package/.obj-x86_64-linux-gnu/venv --package-name jsk_rosbag_tools --input-requirements requirements.in --no-overwrite --extra-pip-args \"-qq\ --retries\ 10\ --timeout\ 30\"
2024-12-31T08:43:21.5004764Z WARNING: using legacy resolver is deprecated and will be removed in future versions. The default resolver will be change to 'backtracking' in 7.0.0 version. Specify --resolver=backtracking to silence this warning.
2024-12-31T08:43:21.5438131Z Traceback (most recent call last):
2024-12-31T08:43:21.5438817Z   File "/<<BUILDDIR>>package/.obj-x86_64-linux-gnu/venv/bin/pip-compile", line 8, in <module>
2024-12-31T08:43:21.5439528Z     sys.exit(cli())
2024-12-31T08:43:21.5440754Z   File "/<<BUILDDIR>>package/.obj-x86_64-linux-gnu/venv/lib/python3.10/site-packages/click/core.py", line 1161, in __call__
2024-12-31T08:43:21.5441640Z     return self.main(*args, **kwargs)
2024-12-31T08:43:21.5442201Z   File "/<<BUILDDIR>>package/.obj-x86_64-linux-gnu/venv/lib/python3.10/site-packages/click/core.py", line 1082, in main
2024-12-31T08:43:21.5442691Z     rv = self.invoke(ctx)
2024-12-31T08:43:21.5443449Z   File "/<<BUILDDIR>>package/.obj-x86_64-linux-gnu/venv/lib/python3.10/site-packages/click/core.py", line 1443, in invoke
2024-12-31T08:43:21.5444263Z     return ctx.invoke(self.callback, **ctx.params)
2024-12-31T08:43:21.5445147Z   File "/<<BUILDDIR>>package/.obj-x86_64-linux-gnu/venv/lib/python3.10/site-packages/click/core.py", line 788, in invoke
2024-12-31T08:43:21.5446593Z     return __callback(*args, **kwargs)
2024-12-31T08:43:21.5447434Z   File "/<<BUILDDIR>>package/.obj-x86_64-linux-gnu/venv/lib/python3.10/site-packages/click/decorators.py", line 33, in new_func
2024-12-31T08:43:21.5448137Z     return f(get_current_context(), *args, **kwargs)
2024-12-31T08:43:21.5448989Z   File "/<<BUILDDIR>>package/.obj-x86_64-linux-gnu/venv/lib/python3.10/site-packages/piptools/scripts/compile.py", line 550, in cli
2024-12-31T08:43:21.5449868Z     cache=DependencyCache(cache_dir),
2024-12-31T08:43:21.5450729Z   File "/<<BUILDDIR>>package/.obj-x86_64-linux-gnu/venv/lib/python3.10/site-packages/piptools/cache.py", line 71, in __init__
2024-12-31T08:43:21.5451407Z     os.makedirs(cache_dir, exist_ok=True)
2024-12-31T08:43:21.5451720Z   File "/usr/lib/python3.10/os.py", line 215, in makedirs
2024-12-31T08:43:21.5452020Z     makedirs(head, exist_ok=exist_ok)
2024-12-31T08:43:21.5452309Z   File "/usr/lib/python3.10/os.py", line 225, in makedirs
2024-12-31T08:43:21.5452609Z     mkdir(name, mode)
2024-12-31T08:43:21.5452927Z PermissionError: [Errno 13] Permission denied: '/sbuild-nonexistent/.cache'
'''
…pository takes only one url. To use multiple repositories, we need to pass --extra-repository multiple times
@k-okada
Copy link
Author

k-okada commented Jan 9, 2025

Comment on lines +156 to +158
sed -i '/dh_shlibdeps / s@$@ || echo "Skip dh_shlibdeps error!!!"@' debian/rules
# ignore dh_strip error, from jammy, 'objcopy' added '--compress-debug-sections' and this cause error on 'numpy/core/_multiarray_umath.cpython-310-x86_64-linux-gnu.so has a corrupt string table index - ignoring'
echo -e 'override_dh_strip:\n dh_strip || true\n' |tee -a debian/rules

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tab string was not correctly inserted in my environment

printf 'override_dh_strip:\n\t%s\n' 'dh_strip || true' | tee -a debian/rules

worked in jsk-ros-pkg/jsk_3rdparty#519 case

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

Successfully merging this pull request may close these issues.

2 participants