Open JinraeKim opened 3 years ago
A workaround might be passing target="..."
to https://github.com/JuliaInterop/Cxx.jl/blob/896ec3c00bd722509d9aa8aaf378298d9583b58b/src/initialization.jl#L430
or directly create a correct llvm::Triple
and put it here.
@Gnimuc Thanks for answering my question :)
But I'm sorry I don't get it cuz I'm not aware of details.
I corrected the line you suggested as
C = setup_instance(GlobalPCHBuffer; PCHTime=PCHTime, target="...")
and it gives me
julia> using Cxx
[ Info: Precompiling Cxx [a0b5b9ef-44b7-5148-a2d1-f6db19f3c3d2]
error: unknown target triple '...', please use -triple or -arch
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: 0x7f2863ca332b)
_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: 0x7f287e15600f)
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: 0x7f287d648a0f)
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: 1644543 (Pool: 1644111; Big: 432); 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
And I've tried "generic"
, "-triple"
, etc. .
Could you explane what I should do in detail?
I guess it should be something that matches ROS2's TARGET_TRIPLE
.
I guess it should be something that matches ROS2's
TARGET_TRIPLE
.
I've changed it to target="aarch64-linux-gnu"
and it produced a huge error message.
I think it's not correct because the ROS implementation (ROS.jl) is based on ROS(1), not ROS(2).
I tried to find a similar way, containing something like TARGET_TRIPLE
for ROS(1), but I failed to search it :(
Thanks for helping me. If you have another idea for this issue, please tell me whenver you want :)
target="aarch64-linux-gnu"
I believe that's just an example. What's the cpu architecture type of the device that your docker instance is running on?
target="aarch64-linux-gnu"
I believe that's just an example. What's the cpu architecture type of the device that your docker instance is running on?
The docker container is run on Ryzen 5900x, and I guess that it's architecture is amd64. The answer would be really poor due to the lack of my knowledge about cpu architectures.
have you given target="amd64-linux-gnu"
a try?
have you given
target="amd64-linux-gnu"
a try?
Unfortunately, the same error occurs.
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: 0x7f45ca85932b)
_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: 0x7f45e74bec8f)
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: 0x7f45e4178a0f)
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: 783609 (Pool: 783416; Big: 193); GC: 1
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
This issue has nothing to do with Docker. I've been seeing the same thing with Ryzen 5900x (without Docker) and was just about to file a new issue. Cxx works fine with Ryzen 3900x so this seems somehow related to Ryzen 5000 series.
Maybe the cpu architecture of Ryzen 5000 series is too new so that the old LLVM/Clang on which Cxx.jl based fails to make a correct detection.
This issue has nothing to do with Docker. I've been seeing the same thing with Ryzen 5900x (without Docker) and was just about to file a new issue. Cxx works fine with Ryzen 3900x so this seems somehow related to Ryzen 5000 series.
Oh, my cpu is also Ryzen 5000 series (5950x, probably?). It might be an issue about cpu...!
Cxx.jl seems not compatible with docker. Or, I may be too new to Cxx.jl to use it properly.
Notes
melodic
(I followed the official installation).Error message