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

Cannot using ROS in a docker container #6

Open
JinraeKim opened this issue Mar 6, 2021 · 5 comments
Open

Cannot using ROS in a docker container #6

JinraeKim opened this issue Mar 6, 2021 · 5 comments

Comments

@JinraeKim
Copy link

JinraeKim commented Mar 6, 2021

Thank you very much to make and maintain a package for ROS. I also read your future plan about ROS2 in #5 and an issue in Cxx.jl.
I'm looking forward to use the Julia wrapper of ROS2 :)

Before the release of new package for ROS2 compatible with upcoming Cxx.jl for Julia 1.6+, I tried to test ROS.jl with docker.
Unfortunately, using ROS does not work with Julia 1.3.1 in a docker container. It would be very desirable if ROS.jl is compatible with docker.

The docker image is based on docker-ubuntu-vnc-desktop with Ubuntu 18.04 (bionic) and ros distro melodic (I followed the official installation).

I can share my image but my docker repo is now private for some reason. If you need it for reproduction, please leave a comment.

Summary

  • Julia 1.3.1
  • ROS.jl 0.2.3
  • Type using ROS after adding it gave me the following error.
  • I don't think it's a matter of docker because some other packages seem to be fine. For example, using Random works well.

error message

ubuntu@2b7a0c418c3b:~$ julia-1.3
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.3.1 (2019-12-30)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

julia> using ROS
[ Info: Precompiling ROS [a492bfac-16cc-4d50-a8b6-f03352b6b563]
error: unknown target CPU 'generic'

signal (11): Segmentation fault
in expression starting at /home/ubuntu/.julia/packages/Cxx/1RaOv/src/Cxx.jl:178
_ZN5clang16CompilerInstance18createPreprocessorENS_19TranslationUnitKindE at /home/ubuntu/.julia/packages/Cxx/1RaOv/src/../deps/usr/lib/libcxxffi.so (unknown line)
finish_clang_init at /home/ubuntu/.julia/packages/Cxx/1RaOv/src/../deps/usr/lib/libcxxffi.so (unknown line)
init_clang_instance at /home/ubuntu/.julia/packages/Cxx/1RaOv/src/../deps/usr/lib/libcxxffi.so (unknown line)
#setup_instance#20 at /home/ubuntu/.julia/packages/Cxx/1RaOv/src/initialization.jl:38
#setup_instance at ./tuple.jl:0 [inlined]
__init__ at /home/ubuntu/.julia/packages/Cxx/1RaOv/src/initialization.jl:430
unknown function (ip: 0x7f128701d55b)
_jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2141 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2305
jl_apply at /buildworker/worker/package_linux64/build/src/julia.h:1631 [inlined]
do_call at /buildworker/worker/package_linux64/build/src/interpreter.c:328
eval_value at /buildworker/worker/package_linux64/build/src/interpreter.c:417
eval_stmt_value at /buildworker/worker/package_linux64/build/src/interpreter.c:368 [inlined]
eval_body at /buildworker/worker/package_linux64/build/src/interpreter.c:778
jl_interpret_toplevel_thunk_callback at /buildworker/worker/package_linux64/build/src/interpreter.c:888
unknown function (ip: 0xfffffffffffffffe)
unknown function (ip: 0x7f12a115b48f)
unknown function (ip: 0xffffffffffffffff)
jl_interpret_toplevel_thunk at /buildworker/worker/package_linux64/build/src/interpreter.c:897
jl_toplevel_eval_flex at /buildworker/worker/package_linux64/build/src/toplevel.c:814
jl_eval_module_expr at /buildworker/worker/package_linux64/build/src/toplevel.c:181
jl_toplevel_eval_flex at /buildworker/worker/package_linux64/build/src/toplevel.c:640
jl_eval_module_expr at /buildworker/worker/package_linux64/build/src/toplevel.c:181
jl_toplevel_eval_flex at /buildworker/worker/package_linux64/build/src/toplevel.c:640
jl_parse_eval_all at /buildworker/worker/package_linux64/build/src/ast.c:873
jl_load at /buildworker/worker/package_linux64/build/src/toplevel.c:878
include at ./boot.jl:328 [inlined]
include_relative at ./loading.jl:1105
include at ./Base.jl:31
_jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2135 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2305
jl_apply at /buildworker/worker/package_linux64/build/src/julia.h:1631 [inlined]
do_call at /buildworker/worker/package_linux64/build/src/interpreter.c:328
eval_value at /buildworker/worker/package_linux64/build/src/interpreter.c:417
eval_stmt_value at /buildworker/worker/package_linux64/build/src/interpreter.c:368 [inlined]
eval_body at /buildworker/worker/package_linux64/build/src/interpreter.c:778
eval_body at /buildworker/worker/package_linux64/build/src/interpreter.c:705
jl_interpret_toplevel_thunk_callback at /buildworker/worker/package_linux64/build/src/interpreter.c:888
unknown function (ip: 0xfffffffffffffffe)
unknown function (ip: 0x7f12a0954d0f)
unknown function (ip: 0x2)
jl_interpret_toplevel_thunk at /buildworker/worker/package_linux64/build/src/interpreter.c:897
jl_toplevel_eval_flex at /buildworker/worker/package_linux64/build/src/toplevel.c:814
jl_toplevel_eval_in at /buildworker/worker/package_linux64/build/src/toplevel.c:843
eval at ./boot.jl:330 [inlined]
eval at ./client.jl:425
_jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2135 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2305
top-level scope at ./none:3
jl_toplevel_eval_flex at /buildworker/worker/package_linux64/build/src/toplevel.c:808
jl_toplevel_eval_flex at /buildworker/worker/package_linux64/build/src/toplevel.c:764
jl_toplevel_eval_in at /buildworker/worker/package_linux64/build/src/toplevel.c:843
eval at ./boot.jl:330
_jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2135 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2305
exec_options at ./client.jl:263
_start at ./client.jl:460
jfptr__start_2084 at /home/ubuntu/julia-1.3.1/lib/julia/sys.so (unknown line)
_jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2135 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2305
jl_apply at /buildworker/worker/package_linux64/build/ui/../src/julia.h:1631 [inlined]
true_main at /buildworker/worker/package_linux64/build/ui/repl.c:96
main at /buildworker/worker/package_linux64/build/ui/repl.c:217
__libc_start_main at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
_start at /home/ubuntu/julia-1.3.1/bin/julia (unknown line)
Allocations: 1644461 (Pool: 1644031; Big: 430); GC: 2
ERROR: LoadError: Failed to precompile Cxx [a0b5b9ef-44b7-5148-a2d1-f6db19f3c3d2] to /home/ubuntu/.julia/compiled/v1.3/Cxx/ESGkI_lOBhQ.ji.
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1283
 [3] _require(::Base.PkgId) at ./loading.jl:1024
 [4] require(::Base.PkgId) at ./loading.jl:922
 [5] require(::Module, ::Symbol) at ./loading.jl:917
 [6] include at ./boot.jl:328 [inlined]
 [7] include_relative(::Module, ::String) at ./loading.jl:1105
 [8] include(::Module, ::String) at ./Base.jl:31
 [9] top-level scope at none:2
 [10] eval at ./boot.jl:330 [inlined]
 [11] eval(::Expr) at ./client.jl:425
 [12] top-level scope at ./none:3
in expression starting at /home/ubuntu/.julia/packages/ROS/VTErh/src/ROS.jl:3
ERROR: Failed to precompile ROS [a492bfac-16cc-4d50-a8b6-f03352b6b563] to /home/ubuntu/.julia/compiled/v1.3/ROS/EjtV2_lOBhQ.ji.
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1283
 [3] _require(::Base.PkgId) at ./loading.jl:1024
 [4] require(::Base.PkgId) at ./loading.jl:922
 [5] require(::Module, ::Symbol) at ./loading.jl:917
@JinraeKim JinraeKim changed the title Cannot using ROS in docker container Cannot using ROS in a docker container Mar 6, 2021
@gstavrinos
Copy link
Owner

Hey, thanks for the interest in the package, and the detailed error report.

Can you please check that you can use Cxx.jl with any other package that depends on it?

@JinraeKim
Copy link
Author

@gstavrinos Sorry for being late (I usually don't turn on the noti from github).
Actually I'm kind of a newbie of Cxx.jl so I have no idea which package depends on it.
If you know, please recommend it to me. Meanwhile, I'll search some packages.

@JinraeKim
Copy link
Author

JinraeKim commented Mar 10, 2021

I've found that this is an issue of Cxx.jl cuz I cannot using Cxx.

I've raised an issue on Cxx.jl.

ubuntu@2b7a0c418c3b:~$ julia-1.3
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.3.1 (2019-12-30)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

(v1.3) pkg> add Cxx
  Updating registry at `~/.julia/registries/General`
  Updating git-repo `https://github.com/JuliaRegistries/General.git`
 Resolving package versions...
  Updating `~/.julia/environments/v1.3/Project.toml`
  [a0b5b9ef] + Cxx v0.4.0
  Updating `~/.julia/environments/v1.3/Manifest.toml`
 [no changes]

julia> using Cxx
[ Info: Precompiling Cxx [a0b5b9ef-44b7-5148-a2d1-f6db19f3c3d2]
error: unknown target CPU 'generic'

signal (11): Segmentation fault
in expression starting at /home/ubuntu/.julia/packages/Cxx/1RaOv/src/Cxx.jl:178
_ZN5clang16CompilerInstance18createPreprocessorENS_19TranslationUnitKindE at /home/ubuntu/.julia/packages/Cxx/1RaOv/src/../deps/usr/lib/libcxxffi.so (unknown line)
finish_clang_init at /home/ubuntu/.julia/packages/Cxx/1RaOv/src/../deps/usr/lib/libcxxffi.so (unknown line)
init_clang_instance at /home/ubuntu/.julia/packages/Cxx/1RaOv/src/../deps/usr/lib/libcxxffi.so (unknown line)
#setup_instance#20 at /home/ubuntu/.julia/packages/Cxx/1RaOv/src/initialization.jl:38
#setup_instance at ./tuple.jl:0 [inlined]
__init__ at /home/ubuntu/.julia/packages/Cxx/1RaOv/src/initialization.jl:430
unknown function (ip: 0x7f515066531b)
_jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2141 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2305
jl_apply at /buildworker/worker/package_linux64/build/src/julia.h:1631 [inlined]
do_call at /buildworker/worker/package_linux64/build/src/interpreter.c:328
eval_value at /buildworker/worker/package_linux64/build/src/interpreter.c:417
eval_stmt_value at /buildworker/worker/package_linux64/build/src/interpreter.c:368 [inlined]
eval_body at /buildworker/worker/package_linux64/build/src/interpreter.c:778
jl_interpret_toplevel_thunk_callback at /buildworker/worker/package_linux64/build/src/interpreter.c:888
unknown function (ip: 0xfffffffffffffffe)
unknown function (ip: 0x7f516aa9200f)
unknown function (ip: 0xffffffffffffffff)
jl_interpret_toplevel_thunk at /buildworker/worker/package_linux64/build/src/interpreter.c:897
jl_toplevel_eval_flex at /buildworker/worker/package_linux64/build/src/toplevel.c:814
jl_eval_module_expr at /buildworker/worker/package_linux64/build/src/toplevel.c:181
jl_toplevel_eval_flex at /buildworker/worker/package_linux64/build/src/toplevel.c:640
jl_eval_module_expr at /buildworker/worker/package_linux64/build/src/toplevel.c:181
jl_toplevel_eval_flex at /buildworker/worker/package_linux64/build/src/toplevel.c:640
jl_parse_eval_all at /buildworker/worker/package_linux64/build/src/ast.c:873
jl_load at /buildworker/worker/package_linux64/build/src/toplevel.c:878
include at ./boot.jl:328 [inlined]
include_relative at ./loading.jl:1105
include at ./Base.jl:31
_jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2135 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2305
jl_apply at /buildworker/worker/package_linux64/build/src/julia.h:1631 [inlined]
do_call at /buildworker/worker/package_linux64/build/src/interpreter.c:328
eval_value at /buildworker/worker/package_linux64/build/src/interpreter.c:417
eval_stmt_value at /buildworker/worker/package_linux64/build/src/interpreter.c:368 [inlined]
eval_body at /buildworker/worker/package_linux64/build/src/interpreter.c:778
eval_body at /buildworker/worker/package_linux64/build/src/interpreter.c:705
jl_interpret_toplevel_thunk_callback at /buildworker/worker/package_linux64/build/src/interpreter.c:888
unknown function (ip: 0xfffffffffffffffe)
unknown function (ip: 0x7f5169f84a0f)
unknown function (ip: 0x2)
jl_interpret_toplevel_thunk at /buildworker/worker/package_linux64/build/src/interpreter.c:897
jl_toplevel_eval_flex at /buildworker/worker/package_linux64/build/src/toplevel.c:814
jl_toplevel_eval_in at /buildworker/worker/package_linux64/build/src/toplevel.c:843
eval at ./boot.jl:330 [inlined]
eval at ./client.jl:425
_jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2135 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2305
top-level scope at ./none:3
jl_toplevel_eval_flex at /buildworker/worker/package_linux64/build/src/toplevel.c:808
jl_toplevel_eval_flex at /buildworker/worker/package_linux64/build/src/toplevel.c:764
jl_toplevel_eval_in at /buildworker/worker/package_linux64/build/src/toplevel.c:843
eval at ./boot.jl:330
_jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2135 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2305
exec_options at ./client.jl:263
_start at ./client.jl:460
jfptr__start_2084 at /home/ubuntu/julia-1.3.1/lib/julia/sys.so (unknown line)
_jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2135 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2305
jl_apply at /buildworker/worker/package_linux64/build/ui/../src/julia.h:1631 [inlined]
true_main at /buildworker/worker/package_linux64/build/ui/repl.c:96
main at /buildworker/worker/package_linux64/build/ui/repl.c:217
__libc_start_main at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
_start at /home/ubuntu/julia-1.3.1/bin/julia (unknown line)
Allocations: 1644540 (Pool: 1644111; Big: 429); GC: 2
ERROR: Failed to precompile Cxx [a0b5b9ef-44b7-5148-a2d1-f6db19f3c3d2] to /home/ubuntu/.julia/compiled/v1.3/Cxx/ESGkI_lOBhQ.ji.
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1283
 [3] _require(::Base.PkgId) at ./loading.jl:1024
 [4] require(::Base.PkgId) at ./loading.jl:922
 [5] require(::Module, ::Symbol) at ./loading.jl:917

@gstavrinos
Copy link
Owner

In my docker/travis test machine of this repo, I use this command to solve some of the Cxx issues:

sudo cp /usr/lib/x86_64-linux-gnu/libstdc++.so.6 ~/julia/lib/julia/libstdc++.so.6

Check if this is working for you.

@JinraeKim
Copy link
Author

Thanks.
Unfortunately, I'm too busy now to test it.
I'll try it later :)

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