On CentOS 7 the package containing that is 'libxml-devel' and the 'tree.h' include file is located in /usr/include/gnome-xml/libxml. It is unclear from the build instructions how to deal with this. I cannot add a directory for 'libxml-2.0.pc' since that does not exist on CentOS. Can someone point me to a compatible rpm or explain how to deal with this dependency? TIA.
Looking through an online list of packages available for CentOS 7 (such as this one), the package you need is libxml2-devel, which contains the file libxml-2.0.pc (and places it under /usr/lib64/pkgconfig).
CentOS 7's official repos appear to lack the libenet, libgloox, libsodium, miniupnpc, openal, and sdl2 libraries, all of which are required dependencies of 0AD.
The minimum version of boost required to compile/run 0AD is version 1.57. CentOS 7 has 1.53.
If you do succeed, we'd love to know how (and so we can add instructions to our wiki).
This does not seem like a missing pre-req. The source was download and not changed. Is this a bug in the source or do I need a different assembler (GNU assembler version 2.27-28.base.el7_5.1)? Any suggestions?
Try to open the offending file and add a newline to it.
Which version of GCC is used?
Not sure about 38, but the current SM needs 4.9 IIRC.
I don't know much about this but if I have to guess I would say it's due to an outdated GCC. Could be wrong, probably is.
That is the lastest GCC in the CentOS repository. I'll look to see if I can find something newer externally. It did indeed take a long time compiling before that error popped up.
Reading up on error 4 the implication is that I have insufficient swap space. My swap is 2GB. Is it really possible that compiling that file really needs more than that or is this error 4 indicating something else?
I have SDL.h installed but it seems it can't find it (/usr/include/SDL/SDL.h). Do I need to add a path somewhere?
Also note that, as mentioned above, sdl2 is one of the libraries the official CentOS repositories appears to lack. You may need to build from source.
You may need to build from source.
Or there may be a SRPM available for RH or fedora so I would check there first.
I have SDL2-devel.x86_64-2.0.8-5.el7 installed. That was from the epel repository.
I have SDL2-devel.x86_64-2.0.8﻿-5.el7 installed. That was from the epel repository.
So either the wiki is wrong or something else is. It's the latter probably.
Interesting and highly unusual for CentOS to be ahead of the curve. Most of the time it is far behind. That is the only version available for SDL2. It cannot be downgraded to an earlier version. I guess I need to abandon this project for now.
As @(-_-) points out, 0AD needs version 2.0.2 or greater. The 2.0.8 version should work.
Well then why can it not find SDL.h?
Just to check, did you re-run update-workspaces.sh after installing sdl2? And what does pkg-config --cflags sdl2 return?
I did not. I didn't know I needed to. After running it again, I get something different.
I tried 'make -Winvalid-pch' but did not get anything different. Did I need to run 'clean-workspaces.sh' first?
I don't think that should be necessary - run make clean in the ./workspaces/gcc/ folder, then try make again.
Thanks. I think that got me further but now I have another error. This seems to be related to sodium.
libsodium needs to be at least version 1.0.14. EPEL should have version 1.0.16.