Yggdrasil icon indicating copy to clipboard operation
Yggdrasil copied to clipboard

add ViZDoom

Open jbrea opened this issue 3 years ago • 8 comments

jbrea avatar May 23 '22 02:05 jbrea

The build system assumes you can run executables built for the target platform, which we can't. This is very cross-compilation-unfriendly.

giordano avatar May 23 '22 09:05 giordano

Thanks for the review!

The build system assumes you can run executables built for the target platform, which we can't. This is very cross-compilation-unfriendly.

Can I fix this somehow? Note that I use the flag -DCMAKE_CROSSCOMPILING=FALSE, because I couldn't resolve some cmake errors otherwise. But I don't really understand its implications.

jbrea avatar May 23 '22 09:05 jbrea

Note that I use the flag -DCMAKE_CROSSCOMPILING=FALSE, because I couldn't resolve some cmake errors otherwise. But I don't really understand its implications.

Well, we are cross-compiling, so that's a blatant lie :slightly_smiling_face:

giordano avatar May 23 '22 09:05 giordano

Btw. To actually use ViZDoom_jll I have the following lines in ViZDoom.jl

module ViZDoom

using CxxWrap
using ViZDoom_jll

@wrapmodule("libvizdoomjl")

function __init__()
    @initcxx
end

include("util.jl")
export get_scenario_path, set_game

include("games/games.jl")
export basic_game

end # module

Now, when I actually want to run a game I get

~/.julia/artifacts/01f94640f8ea8b00edc310b9f24899fa7811a6ca/lib/vizdoom: error while loading shared libraries: libboost_thread.so.1.76.0: cannot open shared object file: No such file or directory

unless I set my LD_LIBRARY_PATH to the artifact containing libboost 1.76.0. Is there an alternative to setting the LD_LIBRARY_PATH in ViZDoom.jl?

I also get occasionally and seemingly at random the error

C++ exception while wrapping module ViZDoom: invalid subtyping in definition of Label with supertype Any
ERROR: InitError: invalid subtyping in definition of Label with supertype Any
during initialization of module ViZDoom

Don't know if this is related.

jbrea avatar May 23 '22 10:05 jbrea

Now, when I actually want to run a game I get

How are you running the program?

giordano avatar May 23 '22 10:05 giordano

Side note: I quickly skimmed through CMake files of ViZDoom and there are some references to cross-compilation. It sounds like they should support it, but I have no idea how they want to do it. I also don't really have the time to dig into this, so if you want to target all platforms you'll have to do some investigations on your own.

giordano avatar May 23 '22 10:05 giordano

How are you running the program?

In a Julia REPL,

julia> using ViZDoom

julia> game = basic_game()

julia> ViZDoom.init(game)

jbrea avatar May 23 '22 10:05 jbrea

I wanted to know how you're running the executable. I have no idea what basic_game() and ViZDoom.init(game) do.

giordano avatar May 23 '22 10:05 giordano

Closing due to inactivity. Please submit a new PR on top of the current master branch if you still want to include this recipe.

imciner2 avatar Apr 03 '24 19:04 imciner2