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

circular dependencies #2

Open
alex-kozinov opened this issue Mar 8, 2020 · 11 comments
Open

circular dependencies #2

alex-kozinov opened this issue Mar 8, 2020 · 11 comments
Assignees

Comments

@alex-kozinov
Copy link

alex-kozinov commented Mar 8, 2020

Hi! Thank you for this prefixes, but I've faced with error, while running docker build --network host -f Dockerfile -t gentoo_emerge_xenial . :

(sys-libs/libcap-2.33:0/0::gentoo, ebuild scheduled for merge) depends on
 (sys-libs/pam-1.3.1_p20200128:0/0::gentoo, ebuild scheduled for merge) (buildtime)
  (sys-libs/libcap-2.33:0/0::gentoo, ebuild scheduled for merge) (buildtime)

It might be possible to break this cycle
by applying any of the following changes:
- sys-libs/pam-1.3.1_p20200128 (Change USE: -filecaps)
- sys-libs/libcap-2.33 (Change USE: -pam)

Note that this change can be reverted, once the package has been installed.
Hmmmm, I was already afraid of this to happen.  Running
  /tmp/gentoo/bin/bash ./bootstrap-prefix.sh "/tmp/gentoo" stage3
somewhere failed :(  Details might be found in the build log:
  (no build logs found?!?)

How can i fix this or maybe avoid?(:

@mcaniot mcaniot self-assigned this Mar 9, 2020
@awesomebytes
Copy link

I reported this bug upstream: https://bugs.gentoo.org/712020

@alex-kozinov Meanwhile you could use some of the pre-compiled releases from my projects.

The most useful one for you is probably to use an image from the project: https://github.com/awesomebytes/ros_overlay_on_gentoo_prefix or https://github.com/awesomebytes/ros_overlay_on_gentoo_prefix_32b

You could make a new Dockerfile that starts with:

FROM awesomebytes/roogp_ros_kinetic_ros_base

(Note that a successful Melodic image for 64b hasn't build fully yet... I've added that today to the buildfarm.)

Or if you want 32b:

# For Kinetic
FROM awesomebytes/roogp_32b_ros_kinetic_ros_base
# Or for Melodic
FROM awesomebytes/roogp_32b_ros_melodic_ros_base

And after that you can add the stuff from this repo, which is probably:
These lines: https://github.com/softbankrobotics-research/sbre_robot_ros_gentoo_prefix/blob/ros_kinetic/gentoo_emerge/Dockerfile#L61-L66
And these lines: https://github.com/softbankrobotics-research/sbre_robot_ros_gentoo_prefix/blob/ros_kinetic/ros_base/Dockerfile#L80-L122

And build your image.

Good luck.

@awesomebytes
Copy link

You can find some ready-to-use already built images here: https://github.com/awesomebytes/sbre_robot_ros_gentoo_prefix/releases They come from this discussion: #4

@alex-kozinov
Copy link
Author

Thank you for your help! I've been trying to run ROS on NaoV6 for almost six months. And your work is really helpful!

@awesomebytes
Copy link

You are welcome. I do think the project lacks documentation. Let me know how you go. What are you planning to run the Nao?

@alex-kozinov
Copy link
Author

i am from young SPL team in Robocup
So we decided to build our framework on ROS. Sixth Nao version is more powerful so why not?(:
Can I use this release to naoqi 2.8.5?
https://github.com/awesomebytes/sbre_robot_ros_gentoo_prefix/releases/tag/release%2F2020-03-12T01at45plus00at00?

@awesomebytes
Copy link

Hey @alex-kozinov I believe you Nao V6 has a 64b OS, so I think you can use any of the 64b releases (the ones that the files mention amd64 instead of x86).

So, indeed you should be able to use:
For Kinetic: https://github.com/awesomebytes/sbre_robot_ros_gentoo_prefix/releases/tag/release%2F2020-03-12T01at45plus00at00
For Melodic: https://github.com/awesomebytes/sbre_robot_ros_gentoo_prefix/releases/tag/release%2F2020-03-12T01at52plus00at00

I don't know the internals of naoqi 2.8.5 (I have never worked with a Nao V6 neither I work for SoftBank Robotics) but as far as I know it should work. Note that when you enter the prefixed shell using ./startprefix your PATH (and PYTHONPATH) will change to only include the Prefix environment. So if you want to use, from that shell, any binary/library from the robot itself, you'll need to add to your PATH (or/and PYTHONPATH) the corresponding PATHs.

I did run into hiccups with the Pepper robot trying to use the PyNaoqi APIs. I remember the socket library crashing. And my solution was to just "install" in the robot the library as I would do it in a computer by downloading their .tar.gz and extracting it and adding it to the PYTHONPATH in the ~/.bash_profile. But I don't know if you'll run into the same issue. (Also, in reality, there is no 32bits library available for download so in Pepper I needed to create my own from the robot one, a bit of a workaround on a workaround).

@awesomebytes
Copy link

I just checked the NaoV6 .tar.gz image of the filesystem (robot-settings-2.8.6.23-linux64.tar.gz) and I believe you may run in the same issue I did. Give it a try, but if anything crashes in Python, just do the installing thing of pynaoqi-python2.7-2.8.6.23-linux64-20191127_152327.tar.gz. Let me know how it goes, as that step could be automated here :)

Also, as a note, you want to install any Python libraries by doing pip install --user so it installs in ~/.local/lib/python2.7 and nothing conflicts with the NaoV6 system.

@alex-kozinov
Copy link
Author

alex-kozinov commented May 10, 2020

Hi!
I've just came up to the robot again and tried to upload latest release of sbre_robot_ros_gentoo_prefix:
https://github.com/awesomebytes/sbre_robot_ros_gentoo_prefix/releases/tag/release%2F2020-05-09T12at07plus00at00

Then I uploaded it into the robot. Run this command:

./gentoo/startprefix
source /tmp/gentoo/opt/ros/melodic/setup.bash 
export CATKIN_PREFIX_PATH=/tmp/gentoo/opt/ros/

And the following error appeared:

Traceback (most recent call last):
  File "/tmp/gentoo/opt/ros/melodic/lib64/python2.7/site-packages/roslaunch/__init__.py", line 330, in main
    p.start()
  File "/tmp/gentoo/opt/ros/melodic/lib64/python2.7/site-packages/roslaunch/parent.py", line 300, in start
    self.runner.launch()
  File "/tmp/gentoo/opt/ros/melodic/lib64/python2.7/site-packages/roslaunch/launch.py", line 662, in launch
    self._setup()
  File "/tmp/gentoo/opt/ros/melodic/lib64/python2.7/site-packages/roslaunch/launch.py", line 637, in _setup
    launched = self._launch_master()
  File "/tmp/gentoo/opt/ros/melodic/lib64/python2.7/site-packages/roslaunch/launch.py", line 400, in _launch_master
    validate_master_launch(m, self.is_core, self.is_rostest)
  File "/tmp/gentoo/opt/ros/melodic/lib64/python2.7/site-packages/roslaunch/launch.py", line 83, in validate_master_launch
    if not rosgraph.network.is_local_address(m.get_host()):
  File "/tmp/gentoo/opt/ros/melodic/lib64/python2.7/site-packages/rosgraph/network.py", line 170, in is_local_address
    local_addresses = ['localhost'] + get_local_addresses()
  File "/tmp/gentoo/opt/ros/melodic/lib64/python2.7/site-packages/rosgraph/network.py", line 212, in get_local_addresses
    import netifaces
ImportError: No module named netifaces

I know, that you don't work with Nao, but maybe you can suggest some solution (:

@awesomebytes
Copy link

Hey @alex-kozinov I'd just try:

pip install --user netifaces

@alex-kozinov
Copy link
Author

alex-kozinov commented May 10, 2020

Heh, thanks. It works!
I had such error:

Traceback (most recent call last):
  File "/usr/bin/pip2", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/tmp/gentoo/usr/lib64/python2.7/site-packages/pkg_resources/__init__.py", line 3251, in <module>
    @_call_aside
  File "/tmp/gentoo/usr/lib64/python2.7/site-packages/pkg_resources/__init__.py", line 3235, in _call_aside
    f(*args, **kwargs)
  File "/tmp/gentoo/usr/lib64/python2.7/site-packages/pkg_resources/__init__.py", line 3264, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/tmp/gentoo/usr/lib64/python2.7/site-packages/pkg_resources/__init__.py", line 583, in _build_master
    ws.require(__requires__)
  File "/tmp/gentoo/usr/lib64/python2.7/site-packages/pkg_resources/__init__.py", line 900, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/tmp/gentoo/usr/lib64/python2.7/site-packages/pkg_resources/__init__.py", line 786, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'pip==8.1.1' distribution was not found and is required by the application

Then I fixed it by installing pip with command:

easy_install pip

@awesomebytes
Copy link

If that worked, great! But, did you do:

easy_install --user pip

Or without --user? On a Nao is less relevant as you actually have root permissions, but as in general will be installing everything in user-space (i.e. in /home/nao) maybe you want to take into consideration using the --user option.

Otherwise I could recommend (which will install it in the Gentoo Prefix system, afterwards, every library should still go with pip install --user):

emerge dev-python/pip && pip install --user argparse

And there is even another way (which I haven't tested but should work): https://pip.pypa.io/en/stable/installing/

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

3 participants