Compiling VCMI on raspberry

I am trying to compile vcmi from source on rasp and get this error
2%] Building CXX object lib/CMakeFiles/vcmi.dir/CRandomGenerator.cpp.o
/media/NASDrive1/vcmi/vcmi-0.96/lib/CRandomGenerator.cpp: In member function ‘void CRandomGenerator::resetSeed()’:
/media/NASDrive1/vcmi/vcmi-0.96/lib/CRandomGenerator.cpp:29:27: error: aggregate ‘boost::hash<std::basic_string > stringHash’ has incomplete type and cannot be defined
/media/NASDrive1/vcmi/vcmi-0.96/lib/CRandomGenerator.cpp:30:95: error: unable to deduce ‘auto’ from ‘’
lib/CMakeFiles/vcmi.dir/build.make:1482: recipe for target ‘lib/CMakeFiles/vcmi.dir/CRandomGenerator.cpp.o’ failed

It seems that I have some lib missing or some code compatability. I just have basic knowledge c++ so I am sorry if the question sounds silly. Can it be corrected. I just commented function resetSeed() for now.

Any reason why would you try to compile 0.96 or it’s just wrong directory name?
Also can you clarify what Linux distribution you running here?

It’s also available in both debian and raspbian:

I could not compile 0.97 because it required bigger cmake version. If so that you have compiled vcmi on rasp could you give an archive with executables.

A and my raspbian is Version:December 2014 Release date:2014-12-24 Kernel version:3.12. And raspberry model b+

Would be happy to help, but not sure if I have any SD card available atm. :neutral_face:

So no chance you can just get some package from sid?

PS: Looks I manager to boot raspbian in QEMU, will try to compile VCMI now.

I am looking forward to your try.

So I’m did some retries and research and here is results:
]First of all if you upgrade to Debian Jessie it’s should work on Pi and it’s solve all dependencies of VCMI except libav/FFMPEG. Not yet managed to fix it, but it’s only used for videos on client so I think it’s should be easier to exclude this dependency on demand./:m]
]Upgrade on Jessie isn’t hard at all and it’s should work reasonable well./:m]
]I tried to compile VCMI git on RPi itself where I only have 128MB model and it’s clearly not real task for this hardware. Though I don’t think that 256MB will make sense because it’s still too low for VCMI which may use up to 1.5GB when compiling./:m]
]Also keep in mind that 0.96 would compile any longer that current git because @AVS add some optimizations here./:m]
]Lastly I do compile it in QEMU right now with fake swap (RAM) have no idea when it’s will be ready.
Though it’s looks more or less real./
So personally I think best way to go it’s setup cross-compiler and built it for Jessie.

Thank you for your effort SXX. I will try upgrading to Jessie. I have pi with 512 ram. And I could have another g as a swap.

Sadly I didn’t managed to finish the build in QEMU cuz it’s exceed my 4.5GB partition size and I’m really messes up everything due to newer udev with 3.10 kernel (pre-built for QEMU emulation). Though it’s pass like 40% (of lib, not client or server!) of so before this occur. I think next time I’ll try to setup cross compilation environment as it’s looks easier and faster way.

Please post here if you’ll manage to go further.

Also I suppose you’ll met same issue with FFMPEG (you can bypass it by comment lines in CMakeList) so if you met them let me know. I’m far from expert from VCMI codebase, but think I have enough skill to remove video playback if needed. :slight_smile:

OK. I am compiling vcmi on my rasspberry right now.
What steps did i take:

  1. Upgraded from wheezy to Jessie
  2. Got dependent libs: sdl2, sdl2-mixer,…etc.
  3. Got minizip-dev
  4. Compiled fuzzy-lite from source
  5. Increased swap file to 2000Mb

Now It seems everything is going good so far. I will write how it ends.
p.s. I did not get any errors/warnings about ffmpeg. Maybe I got the right libs accidentally.

Good news, hope it’s successful build!

This is likely was result of my attempt to upgrade Debian without new kernel as building new for QEMU not trivial. :confused:

Compilation took less when on week and it was successful, but I cannot start the game it throws exception.
It says:

Error: SDL says that 800x600 resolution is not available!
terminate called after throwing an instance of 'std::runtime_error'
   what(): Requested screen resolution is not available


Is this configuration mistake of program bug?

Ok I got pass last one changing resolution in file resolutions.json to native resolution of my display and it seems to load some windows but if flickers and closes. I get another error which now says:

terminate called after throwing an instance of 'std::runtime_error' 
   what(): Unable to create rerender 

So what is actual resolution of your display?

“Unable to create renderer” = internal error in SDL or wrong video backend selected. Try select another renderer:

  1. find in client log list of all available renderers.
  2. set one on them in “settings.json”: “video”:{“driver”:“name”}

I will give some detail about what I do. So first of all I start vcmi by comand “vcmiclient”. This is what i get in the console:

Creating console and configuring logger: 92
The log file will be saved to "/home/pi/.cache/vcmi/VCMI_Client_log.txt"
                  Initialization:  56
                  Data loading: 3607
                 Mod hanler:  1
File CONFIG/MODSETTINGS is not a valid JSON file!
At line 1, position 0 error: File is empty

                     Mod filesystems: 460
Basic initialization: 4128
Initialization logging system based on settings successfully.
Error: campaign movies was not found!
Error: campaign music was not found!
Loading settings: 4160
VCMI 0.97b (client)
Found 3 render drives
                  opengles2 (active)
terminate called after throwing an instance of 'std::runtime_error'
   what(): Unable to create rerender

I have also tried doing sudo but it does not help. Error is the same.

Actual resolution is 1280x1024. I have put this into resolutions.json file

Did you tried to set renderer (like “software”) as @AVS suggested?

PS: I’ll also appreciate if you upload binaries for testing. :wink:

I have tried all three modes.
How files are uploaded in this forum?

There is quite huge file upload limit (50MB), but only for registered users.