ViZDoom icon indicating copy to clipboard operation
ViZDoom copied to clipboard

Cross compilation fails

Open jbrea opened this issue 2 years ago • 5 comments

I'm trying to cross-compile ViZDoom 1.1.13 (see here), but it fails with errors

CMake Error at src/vizdoom/CMakeLists.txt:32 (include):
  include could not find requested file:

    IMPORTFILE-NOTFOUND

CMake Error at src/vizdoom/tools/lemon/CMakeLists.txt:17 (add_custom_command):
  No TARGET 'lemon' has been created in this directory.

Am I doing something wrong?

jbrea avatar May 23 '22 12:05 jbrea

Pinging @mwydmuch as he is the wizard who understands all of this makefile stuff 🙃

Miffyli avatar May 23 '22 15:05 Miffyli

Hello @jbrea, ViZDoom doesn't officially support cross-compilation. There are some parts in CMakeFilles that suggest that someone used it for ZDoom, but it wasn't and still isn't documented. Personally, I've never tried to cross-compile ViZDoom.

Maybe there is a way to make cross-compilation work, but unfortunately, at the moment, I'm not sure if I'm able to help you. I suggest trying to create separate builds for Linux, macOS, and Windows using their target platforms to build them.

I checked the list of targets you tried to compile in your PR (long list), please note that ViZDoom won't compile for C++03 targets (only C++11 and higher are supported), ARM targets (this one was broken last time I checked, but we've never aimed to support it, and I will probably scrap ARM code, and work on compatibility for M1 later this year), and there is no support for FreeBSD and PowerPC.

mwydmuch avatar May 23 '22 19:05 mwydmuch

please note that ViZDoom won't compile for C++03 targets

C++03 refers to GCC C++03 std::string ABI, which does not have anything to do with the standard of the source code.

giordano avatar May 23 '22 20:05 giordano

@giordano I haven't known about it, thank you. This makes a lot of sense.

mwydmuch avatar May 23 '22 20:05 mwydmuch

Thanks a lot for the feedback!

jbrea avatar May 24 '22 06:05 jbrea

Closing this issue due to lack of activity.

mwydmuch avatar Sep 11 '23 21:09 mwydmuch

This issue still exists though, no?

StefanKarpinski avatar Sep 12 '23 02:09 StefanKarpinski

I would assume the issue still exists, but it is something we don't plan to work on. (Vi)ZDoom was not really created with cross-compilation in mind, as it has rather complicated building system. Some elements of the building system build subprograms that generate sources for further steps of compilation. We never supported this way of building it. We compile for ViZDoom can be compiled for x86_x64 and ARM64 Linux and MacOS using docker and architecture emulation.

mwydmuch avatar Sep 12 '23 11:09 mwydmuch