ipa320 / RosTooling

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Docker genration failing on libmagic dependency

aremazeilles opened this issue · comments

Got an error while building the docker image, using: docker build --tag=haros .

#### Running command: "cmake /root/haros/src -DCMAKE_EXPORT_COMPILE_COMMANDS=1 -DCATKIN_DEVEL_PREFIX=/root/haros/devel -DCMAKE_INSTALL_PREFIX=/root/haros/install -G Unix Makefiles" in "/root/haros/build"
####
####
#### Running command: "make -j8 -l8" in "/root/haros/build"
####
Traceback (most recent call last):
  File "/usr/local/bin/haros", line 5, in <module>
    from haros.haros import main
  File "/usr/local/lib/python2.7/dist-packages/haros/haros.py", line 107, in <module>
    from .data import HarosDatabase, HarosSettings
  File "/usr/local/lib/python2.7/dist-packages/haros/data.py", line 33, in <module>
    from .metamodel import Location, Resource
  File "/usr/local/lib/python2.7/dist-packages/haros/metamodel.py", line 29, in <module>
    import magic as file_cmd
  File "/usr/local/lib/python2.7/dist-packages/magic.py", line 181, in <module>
    raise ImportError('failed to find libmagic.  Check your installation')
ImportError: failed to find libmagic.  Check your installation
The command 'bash -c source /opt/ros/kinetic/setup.bash; cd ~/haros/src; catkin_init_workspace; cd ~/haros; catkin_make -DCMAKE_EXPORT_COMPILE_COMMANDS=1; source ~/haros/devel/setup.bash;  haros init' returned a non-zero code: 1

Adding

RUN apt-get install -y libmagic-dev

The generation of the image completes

@aremazeilles thanks a lot for the report.

Oh sorry, I have an updated version of the docker configurations in other repository https://github.com/ipa320/ros-model-cloud, I will compare both and if possible merge and migrate the configuration to a single place. I will keep you posted.

Ok
This issue may also hold for haros, as the dockerfile is pretty similar (but I did not test it). Once you have checked it, we could bring that change suggestion to this repo as well.

@aremazeilles thanks! I have updated the Dockerfile, the scripts and the extractor (which solves #106 ) and moved everything to the ros-model-cloud repository.

The related changes can be found here[https://github.com/ipa320/ros-model-cloud/pull/34] and the PR is already merged, you can directly go to the documentation https://github.com/ipa320/ros-model-cloud/tree/master/docker_local_configuration where you have 2 different configurations, for kinetic and melodic. These docker can be used to extract the Ros models of the nodes. My idea is update them to support also local workspaces, apart of clone from github the repository to be analyzed.

The melodic version has the same HAROS and clang version than my cloud system http://ros-model.seronet-project.de/ , however I tested there you dummy package and it doesn't work it seems there is an issue with the global scope of the clang compiler (-> HAROS problem), I have to check the issue using the source code version of HAROS and for the concrete case of your code. I hope I can find some time by the beginning of next week.

Thanks and have a great weekend!

P.S. I will also send a PR to HAROS, the Dockerfile should be almost the same because we created both together

Thanks @ipa-nhg for taking care of this.

Following my attempt in using your model extractor, I added an issue to ros-model-cloud. More than an issue, I am trying t see how I could rely on your component.

Should we close that issue then?

@aremazeilles thanks! I have updated the Dockerfile, the scripts and the extractor (which solves #106 ) and moved everything to the ros-model-cloud repository.

I tried the other docker file you mention, and now the image generation works, but the docker file in this repository remains unchanged, is that correct?

Thanks @ipa-nhg for taking care of this.

Following my attempt in using your model extractor, I added an issue to ros-model-cloud. More than an issue, I am trying t see how I could rely on your component.

Should we close that issue then?

I will close it and point to the new one in ros-model-cloud for further discussions

@aremazeilles thanks! I have updated the Dockerfile, the scripts and the extractor (which solves #106 ) and moved everything to the ros-model-cloud repository.

I tried the other docker file you mention, and now the image generation works, but the docker file in this repository remains unchanged, is that correct?

no, I open the PR on Friday but forgot to merge it, now is clean #107