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

[scarthgap] maximum shebang size exceeded, the maximum size is 128. [shebang-size] on beluga-ros #1220

Open
mark-bchoi opened this issue Sep 24, 2024 · 2 comments

Comments

@mark-bchoi
Copy link

Hi,

I have an issue in building beluga-ros package.

error is

ERROR: beluga-ros-2.0.1-1-r0 do_populate_sysroot: QA Issue: : /work/armv8a-oe4t-linux/beluga-ros/2.0.1-1/sysroot-destdir/opt/ros/humble/lib/beluga_ros/occupancy_grid_to_ndt maximum shebang size exceeded, the maximum size is 128. [shebang-size]
ERROR: beluga-ros-2.0.1-1-r0 do_populate_sysroot: do_populate_sysroot for this recipe installed files with QA issues
ERROR: Logfile of failure stored in: /home/bchoi/nvidia-yocto-bsp/bchoi-build/tmp/work/armv8a-oe4t-linux/beluga-ros/2.0.1-1/temp/log.do_populate_sysroot.1117401
ERROR: Task (/home/bchoi/nvidia-yocto-bsp/layers/meta-ros/meta-ros2-humble/generated-recipes/beluga/beluga-ros_2.0.1-1.bb:do_populate_sysroot) failed with exit code '1'
NOTE: Tasks Summary: Attempted 3595 tasks of which 3591 didn't need to be rerun and 1 failed.

My build branches are

Yocto branch : scarthgap
ROS2 branch : humble

I think it was caused by shebang size in below files.

bchoi@ubuntu-22:~/nvidia-yocto-bsp/bchoi-build/tmp/work/armv8a-oe4t-linux/beluga-ros/2.0.1-1/image$ cat opt/ros/humble/lib/beluga_ros/occupancy_grid_to_ndt
#!/home/bchoi/nvidia-yocto-bsp/bchoi-build/tmp/work/armv8a-oe4t-linux/beluga-ros/2.0.1-1/recipe-sysroot-native/usr/bin/python3-native/python3
# EASY-INSTALL-ENTRY-SCRIPT: 'beluga-ros==2.0.1','console_scripts','occupancy_grid_to_ndt'
import re
import sys

# for compatibility with easy_install; see #2198
__requires__ = 'beluga-ros==2.0.1'

try:
    from importlib.metadata import distribution
except ImportError:
    try:
        from importlib_metadata import distribution
    except ImportError:
        from pkg_resources import load_entry_point


def importlib_load_entry_point(spec, group, name):
    dist_name, _, _ = spec.partition('==')
    matches = (
        entry_point
        for entry_point in distribution(dist_name).entry_points
        if entry_point.group == group and entry_point.name == name
    )
    return next(matches).load()


globals().setdefault('load_entry_point', importlib_load_entry_point)


if __name__ == '__main__':
    sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
    sys.exit(load_entry_point('beluga-ros==2.0.1', 'console_scripts', 'occupancy_grid_to_ndt')())
bchoi@ubuntu-22:~/nvidia-yocto-bsp/bchoi-build/tmp/work/armv8a-oe4t-linux/beluga-ros/2.0.1-1/image$

Perhaps, it can be related with #1215.

If I apply #1215, Can I clear this issue?

BR,
Mark

@jiaxshi
Copy link
Contributor

jiaxshi commented Sep 25, 2024

I think you can add install append to delete the HOST prefix, refer to do_install:append() in meta-ros2/classes/ros_ament_python.bbclass

@mark-bchoi
Copy link
Author

mark-bchoi commented Sep 25, 2024

Hi @jiaxshi

Thanks for reply.
Yes, I added it.

By the way, I think it would not be fundamental solution. there are in many cases added host path to build results in building packages.

WARNING: beluga-ros-2.0.1-1-r0 do_package_qa: QA Issue: File /opt/ros/humble/share/ament_index/resource_index/parent_prefix_path/beluga_ros in package beluga-ros contains reference to TMPDIR [buildpaths]

I hope to find how to fix it fundamentally.

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