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.
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.
So I’m did some retries and research and here is results:
[ul] ]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./:m][/ul]
So personally I think best way to go it’s setup cross-compiler and built it for Jessie.
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.
OK. I am compiling vcmi on my rasspberry right now.
What steps did i take:
Upgraded from wheezy to Jessie
Got dependent libs: sdl2, sdl2-mixer,…etc.
Got minizip-dev
Compiled fuzzy-lite from source
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.
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
Aborted
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
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)
opengles
software
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.