gw1500se Posted October 20, 2018 Report Share Posted October 20, 2018 I am trying to build the alpha version of 0AD on my CentOS 7 system since there seems to be no repository or RPM for that distro. When I try to run 'update-workspaces.sh' I get the following output: Updating bundled third-party dependencies... FCollada/FColladaPlugin.cpp FCollada/FCollada.cpp Package libxml-2.0 was not found in the pkg-config search path. Perhaps you should add the directory containing `libxml-2.0.pc' to the PKG_CONFIG_PATH environment variable No package 'libxml-2.0' found Package libxml-2.0 was not found in the pkg-config search path. Perhaps you should add the directory containing `libxml-2.0.pc' to the PKG_CONFIG_PATH environment variable No package 'libxml-2.0' found In file included from FCollada/FCollada.h:49:0, from FCollada/StdAfx.h:13, from FCollada/FCollada.cpp:9: FCollada/FUtils/FUtils.h:91:25: fatal error: libxml/tree.h: No such file or directory 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. Quote Link to comment Share on other sites More sharing options...
s0600204 Posted October 22, 2018 Report Share Posted October 22, 2018 (edited) 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). (libxml2 is not version 2 of the (deprecated) libxml library. The "Dependencies" section of the Build Instructions does specify libxml2.) Edit to add: Looking into it a little further, it might not be possible (or very difficult) to compile 0AD on CentOS 7 (or 6) at all, as: 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. (Also appears to lack wxwidgets, which is required for Atlas, our map editor.) 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). Edited October 22, 2018 by s0600204 Quote Link to comment Share on other sites More sharing options...
gw1500se Posted October 23, 2018 Author Report Share Posted October 23, 2018 (edited) Thanks for the reply. I've made some progress. Indeed it was libxml2-devel that was missing. I am now into the compile phase and get this error: {standard input}: Assembler messages: {standard input}:92114: Warning: end of file not at end of a line; newline inserted {standard input}:92804: Error: no such instruction: `m' {standard input}: Error: open CFI at the end of file; missing .cfi_endproc directive c++: internal compiler error: Killed (program cc1plus) Please submit a full bug report, with preprocessed source if appropriate. See <http://bugzilla.redhat.com/bugzilla> for instructions. make[3]: *** [Unified_cpp_js_src0.o] Error 4 make[3]: *** Waiting for unfinished jobs.... make[3]: Leaving directory `/home/dap/Downloads/0ad-0.0.23-alpha/libraries/source/spidermonkey/mozjs-38.0.0/js/src/build-debug/js/src' make[2]: *** [js/src/target] Error 2 make[2]: Leaving directory `/home/dap/Downloads/0ad-0.0.23-alpha/libraries/source/spidermonkey/mozjs-38.0.0/js/src/build-debug' make[1]: *** [compile] Error 2 make[1]: Leaving directory `/home/dap/Downloads/0ad-0.0.23-alpha/libraries/source/spidermonkey/mozjs-38.0.0/js/src/build-debug' make: *** [default] Error 2 ERROR: SpiderMonkey build failed 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? Edited October 23, 2018 by gw1500se Quote Link to comment Share on other sites More sharing options...
Stan` Posted October 23, 2018 Report Share Posted October 23, 2018 Try to open the offending file and add a newline to it. Quote Link to comment Share on other sites More sharing options...
Guest Posted October 23, 2018 Report Share Posted October 23, 2018 Which version of GCC is used? Not sure about 38, but the current SM needs 4.9 IIRC. (you might need to check SM dependencies too) Quote Link to comment Share on other sites More sharing options...
gw1500se Posted October 23, 2018 Author Report Share Posted October 23, 2018 Adding an new line to that file did not help. Same error. I'm using gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-28) Quote Link to comment Share on other sites More sharing options...
sarcoma Posted October 23, 2018 Report Share Posted October 23, 2018 Works with (diff distro) GNU assembler (GNU Binutils) 2.31.1 gcc (GCC) 8.2.1 20180831 Takes very long to compile spidermonkey (Unified_cpp_js_src9) 1 Quote Link to comment Share on other sites More sharing options...
Guest Posted October 23, 2018 Report Share Posted October 23, 2018 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. Quote Link to comment Share on other sites More sharing options...
gw1500se Posted October 23, 2018 Author Report Share Posted October 23, 2018 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. Quote Link to comment Share on other sites More sharing options...
gw1500se Posted October 23, 2018 Author Report Share Posted October 23, 2018 (edited) On to the next layer of the onion. I am now using gcc (GCC) 7.3.1 20180303 and get this error: Unified_cpp_js_src1.cpp Unified_cpp_js_src10.o c++: internal compiler error: Killed (program cc1plus) Please submit a full bug report, with preprocessed source if appropriate. See <http://bugzilla.redhat.com/bugzilla> for instructions. make[3]: *** [Unified_cpp_js_src0.o] Error 4 make[3]: *** Deleting file `Unified_cpp_js_src0.o' make[3]: *** Waiting for unfinished jobs.... make[3]: Leaving directory `/home/dap/Downloads/0ad-0.0.23-alpha/libraries/source/spidermonkey/mozjs-38.0.0/js/src/build-debug/js/src' make[2]: *** [js/src/target] Error 2 make[2]: Leaving directory `/home/dap/Downloads/0ad-0.0.23-alpha/libraries/source/spidermonkey/mozjs-38.0.0/js/src/build-debug' make[1]: *** [compile] Error 2 make[1]: Leaving directory `/home/dap/Downloads/0ad-0.0.23-alpha/libraries/source/spidermonkey/mozjs-38.0.0/js/src/build-debug' make: *** [default] Error 2 ERROR: SpiderMonkey build failed 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? Edited October 24, 2018 by gw1500se Update error 4 meaning Quote Link to comment Share on other sites More sharing options...
sarcoma Posted October 24, 2018 Report Share Posted October 24, 2018 how much ram do you have? It compiles with 4 GB + some swap I guess Quote Link to comment Share on other sites More sharing options...
gw1500se Posted October 24, 2018 Author Report Share Posted October 24, 2018 I found the problem. For some reason my swap was turned off. Now it compiles successfully and I am doing the 'make'. I had to install a number of 'devel' packages to get the necessary headers but I'm stuck again with this error: ArchiveBuilder.cpp In file included from ../../../source/network/scripting/JSInterface_Network.cpp:23:0: ../../../source/lib/external_libraries/libsdl.h:32:18: fatal error: SDL.h: No such file or directory # include "SDL.h" ^ compilation terminated. make[1]: *** [obj/engine_Release/JSInterface_Network.o] Error 1 make[1]: *** Waiting for unfinished jobs.... make: *** [engine] Error 2 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? Quote Link to comment Share on other sites More sharing options...
s0600204 Posted October 25, 2018 Report Share Posted October 25, 2018 Please pay attention to the dependencies as stated on our wiki. 0AD depends on sdl2, not sdl (although originating from the same project, they are not interchangeable.) 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. 1 Quote Link to comment Share on other sites More sharing options...
Loki1950 Posted October 25, 2018 Report Share Posted October 25, 2018 1 hour ago, s0600204 said: You may need to build from source. Or there may be a SRPM available for RH or fedora so I would check there first. Enjoy the Choice Quote Link to comment Share on other sites More sharing options...
gw1500se Posted October 25, 2018 Author Report Share Posted October 25, 2018 (edited) I have SDL2-devel.x86_64-2.0.8-5.el7 installed. That was from the epel repository. Edited October 25, 2018 by gw1500se Quote Link to comment Share on other sites More sharing options...
asterix Posted October 25, 2018 Report Share Posted October 25, 2018 10 minutes ago, gw1500se said: I have SDL2-devel.x86_64-2.0.8-5.el7 installed. That was from the epel repository. This version is not supported, supported version is SDL2 2.0.4 as seen here https://trac.wildfiregames.com/browser/ps/trunk/binaries/system?rev=20340 Quote Link to comment Share on other sites More sharing options...
Guest Posted October 25, 2018 Report Share Posted October 25, 2018 "SDL2 (at least 2.0.2)" ~ wiki So either the wiki is wrong or something else is. It's the latter probably. Quote Link to comment Share on other sites More sharing options...
gw1500se Posted October 25, 2018 Author Report Share Posted October 25, 2018 (edited) 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. Edited October 25, 2018 by gw1500se Quote Link to comment Share on other sites More sharing options...
s0600204 Posted October 25, 2018 Report Share Posted October 25, 2018 As @(-_-) points out, 0AD needs version 2.0.2 or greater. The 2.0.8 version should work. Quote Link to comment Share on other sites More sharing options...
gw1500se Posted October 25, 2018 Author Report Share Posted October 25, 2018 Well then why can it not find SDL.h? Quote Link to comment Share on other sites More sharing options...
s0600204 Posted October 25, 2018 Report Share Posted October 25, 2018 Just to check, did you re-run update-workspaces.sh after installing sdl2? And what does pkg-config --cflags sdl2 return? Quote Link to comment Share on other sites More sharing options...
gw1500se Posted October 25, 2018 Author Report Share Posted October 25, 2018 I did not. I didn't know I needed to. After running it again, I get something different. CConsole.cpp In file included from <command-line>:0:0: /usr/include/stdc-predef.h:40:1: error: one or more PCH files were found, but they were invalid #endif ^ /usr/include/stdc-predef.h:40:1: error: use -Winvalid-pch for more information /usr/include/stdc-predef.h:40:1: fatal error: obj/engine_Release/precompiled.h: No such file or directory compilation terminated. In file included from <command-line>:0:0: /usr/include/stdc-predef.h:40:1: error: one or more PCH files were found, but they were invalid #endif ^ /usr/include/stdc-predef.h:40:1: error: use -Winvalid-pch for more information /usr/include/stdc-predef.h:40:1: fatal error: obj/engine_Release/precompiled.h: No such file or directory compilation terminated. make[1]: *** [obj/engine_Release/JSInterface_Network.o] Error 1 make[1]: *** Waiting for unfinished jobs.... make[1]: *** [obj/engine_Release/CConsole.o] Error 1 make: *** [engine] Error 2 I tried 'make -Winvalid-pch' but did not get anything different. Did I need to run 'clean-workspaces.sh' first? Quote Link to comment Share on other sites More sharing options...
s0600204 Posted October 25, 2018 Report Share Posted October 25, 2018 I don't think that should be necessary - run make clean in the ./workspaces/gcc/ folder, then try make again. Quote Link to comment Share on other sites More sharing options...
gw1500se Posted October 25, 2018 Author Report Share Posted October 25, 2018 Thanks. I think that got me further but now I have another error. This seems to be related to sodium. Preprocessor.cpp ../../../source/ps/ModIo.cpp: In constructor ‘ModIo::ModIo()’: ../../../source/ps/ModIo.cpp:120:113: error: ‘sodium_base64_VARIANT_ORIGINAL’ was not declared in this scope if (sodium_base642bin((unsigned char*)&m_pk, sizeof m_pk, pk_str.c_str(), pk_str.size(), NULL, &bin_len, NULL, sodium_base64_VARIANT_ORIGINAL) != 0 || bin_len != sizeof m_pk) ^ ../../../source/ps/ModIo.cpp:120:143: error: ‘sodium_base642bin’ was not declared in this scope if (sodium_base642bin((unsigned char*)&m_pk, sizeof m_pk, pk_str.c_str(), pk_str.size(), NULL, &bin_len, NULL, sodium_base64_VARIANT_ORIGINAL) != 0 || bin_len != sizeof m_pk) ^ In file included from ../../../source/lib/external_libraries/curl.h:50:0, from ../../../source/ps/ModIo.h:26, from ../../../source/ps/ModIo.cpp:25: ../../../source/ps/ModIo.cpp: In member function ‘CURLMcode ModIo::SetupRequest(const string&, bool)’: ../../../source/ps/ModIo.cpp:193:28: error: ‘CURLOPT_XFERINFOFUNCTION’ was not declared in this scope curl_easy_setopt(m_Curl, CURLOPT_XFERINFOFUNCTION, DownloadProgressCallback); ^ ../../../source/ps/ModIo.cpp:194:28: error: ‘CURLOPT_XFERINFODATA’ was not declared in this scope curl_easy_setopt(m_Curl, CURLOPT_XFERINFODATA, (void*)&m_DownloadProgressData); ^ ../../../source/ps/ModIo.cpp: In static member function ‘static bool ModIo::ParseSignature(const std::vector<std::basic_string<char> >&, SigStruct&, const PKStruct&, std::string&)’: ../../../source/ps/ModIo.cpp:777:114: error: ‘sodium_base64_VARIANT_ORIGINAL’ was not declared in this scope if (sodium_base642bin((unsigned char*)&sig, sizeof sig, msg_sig.c_str(), msg_sig.size(), NULL, &bin_len, NULL, sodium_base64_VARIANT_ORIGINAL) != 0 || bin_len != sizeof sig) ^ ../../../source/ps/ModIo.cpp:777:144: error: ‘sodium_base642bin’ was not declared in this scope if (sodium_base642bin((unsigned char*)&sig, sizeof sig, msg_sig.c_str(), msg_sig.size(), NULL, &bin_len, NULL, sodium_base64_VARIANT_ORIGINAL) != 0 || bin_len != sizeof sig) ^ ../../../source/ps/ModIo.cpp:793:121: error: ‘sodium_base64_VARIANT_ORIGINAL’ was not declared in this scope if (sodium_base642bin(global_sig, sizeof global_sig, sig_lines[3].c_str(), sig_lines[3].size(), NULL, &bin_len, NULL, sodium_base64_VARIANT_ORIGINAL) != 0 || bin_len != sizeof global_sig) ^ ../../../source/ps/ModIo.cpp:793:151: error: ‘sodium_base642bin’ was not declared in this scope if (sodium_base642bin(global_sig, sizeof global_sig, sig_lines[3].c_str(), sig_lines[3].size(), NULL, &bin_len, NULL, sodium_base64_VARIANT_ORIGINAL) != 0 || bin_len != sizeof global_sig) ^ make[1]: *** [obj/engine_Release/ModIo.o] Error 1 make[1]: *** Waiting for unfinished jobs.... make: *** [engine] Error 2 I have libsodium13-devel.x86_64-1.0.5-1.el7 installed. Quote Link to comment Share on other sites More sharing options...
s0600204 Posted October 25, 2018 Report Share Posted October 25, 2018 libsodium needs to be at least version 1.0.14. EPEL should have version 1.0.16. (Annoyingly it also, as you've found out, has version 1.0.5. In this case you'll want libsodium and not libsodium13) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.