avikpal Posted August 30, 2020 Report Share Posted August 30, 2020 @Stan` thanks for the detailed build instructions. I was able to build it on Ubuntu 20.04 (AMD Ryzen 5 4600 + NVIDIA 1650Ti setup). However, on starting the game it is showing me ```WARNING: You are using 'llvmpipe (LLVM 10.0.0, 128 bits)' graphics driver, expect very poor performance! WARNING: If possible install a proper graphics driver for your hardware.``` The gameplay is like 6 FPS against AI on a 2 player medium map. Any suggestions on how to fix it? Quote Link to comment Share on other sites More sharing options...
Stan` Posted August 30, 2020 Report Share Posted August 30, 2020 I assume you don't play in a VM ? It seems the game is given the wrong GPU Quote Link to comment Share on other sites More sharing options...
avikpal Posted August 31, 2020 Report Share Posted August 31, 2020 Yes indeed, it was an issue with the system configuration. With some debugging on the linux side of things I was able to the get the game up and running with great performance. Quote Link to comment Share on other sites More sharing options...
just_a_fan Posted December 25, 2020 Report Share Posted December 25, 2020 Hi guys, thank you first for the awesome game that you have created. I have enjoyed it a lot! A few days ago I got my new PC with AMD Ryzen 7 pro 4750g (I have no additional graphics card, just the build-in one), installed Ubuntu 20.04 and after that 0AD from snap: sudo snap install 0ad. As you can guess the game didn't run. It didn't open at all. Error messages seemed very similar to the ones posted at the beginning of this thread. Then I uninstalled 0AD and installed it from the Ubuntu Software Center but with the same result. After some googling I arrived at this thread and followed the steps listed by Stan' in his last comment on June 29. Up to sh update-workspaces.sh -j3 everything went fine, but when I executed sh update-workspaces.sh -j3 I got the following error message: Â Building SpiderMonkey... Package nspr was not found in the pkg-config search path. Perhaps you should add the directory containing `nspr.pc' to the PKG_CONFIG_PATH environment variable No package 'nspr' found ERROR: SpiderMonkey build failed then I got back the prompt of the terminal. Does anyone have an idea how to deal with that error? Quote Link to comment Share on other sites More sharing options...
Stan` Posted December 26, 2020 Report Share Posted December 26, 2020 Ah yeah the instructions have been updated since then. You need to install nspr for A23 Â You will need to patch the game to be able to play with your CPU though. Quote Link to comment Share on other sites More sharing options...
just_a_fan Posted December 26, 2020 Report Share Posted December 26, 2020 (edited) Thanks for the reply, Stan! How can I install nspr and where can one find the updated instructions? BTW, I thought that those instructions include the "patching of the game" (Step 4). Is there another patch that has to be made? P.S. Today I realized that my default Python version is Python 2.7.18 and not Python 3.8.5. Since the default version for Ubuntu 20.04 is Python3, I assume that the change happened when I executed the command 'sudo apt-get install libxml2-dev python subversion zlib1g-dev libenet-dev'. I plan to change the default version back to Python3 because of other projects. Will that affect the game? Edited December 26, 2020 by just_a_fan Quote Link to comment Share on other sites More sharing options...
OptimusShepard Posted December 26, 2020 Report Share Posted December 26, 2020 (edited) 2 hours ago, just_a_fan said: and where can one find the updated instructions? https://trac.wildfiregames.com/wiki/BuildInstructions 2 hours ago, just_a_fan said: BTW, I thought that those instructions include the "patching of the game" (Step 4). Is there another patch that has to be made? (Step 4) is fixing the crash which occurs when you start the game. The other bug doesn't occur on Linux that often. It's known as a slow-down, and speed-up bug. If you like, you can use this (https://code.wildfiregames.com/D3066) to fix it. Have a look on the main topic. Â Edited December 26, 2020 by OptimusShepard Quote Link to comment Share on other sites More sharing options...
GunChleoc Posted December 27, 2020 Report Share Posted December 27, 2020 (edited) The current SVN version compiles fine with Pyton3. I noticed that the Rust version from the Ubuntu package manager installs python-is-python2 though, so it's better to get rust with rustup https://www.rust-lang.org/tools/install Edited December 27, 2020 by GunChleoc Quote Link to comment Share on other sites More sharing options...
just_a_fan Posted December 27, 2020 Report Share Posted December 27, 2020 Hi, thanks for all the advice. I made some progress, I think (or at least now I get a different error message). Here is what I did: - In addition to Step 4 from Stan's comment I also modified the timer.cpp file as explained in the second link provided by OptimusShepard (https://code.wildfiregames.com/D3066). - I installed the package libmozjs-68-dev as suggested by the updated instructions linked by OptimusShepard. ($ sudo apt install libmozjs-68-dev) - Then I installed the nspr package as suggested by Stan:   ($ sudo apt install libnspr4-dev) - Next, I navigated to the workspaces directory ($ cd ~/0ad/build/workspaces/) and, following the updated instructions, executed   ($ ./update-workspaces.sh --with-system-mozjs) The execution went further this time (I think), but eventually I got the following error:  Linking Premake5 make: Leaving directory '/home/my_user_name/0ad/build/premake/premake5/build/gmake.unix' Premake args: --with-system-mozjs --atlas Error: invalid option 'with-system-mozjs' ERROR: Premake failed Any ideas what the reasons for this error are and how to solve it? Quote Link to comment Share on other sites More sharing options...
Stan` Posted December 27, 2020 Report Share Posted December 27, 2020 Don't use with-system mozjs Quote Link to comment Share on other sites More sharing options...
OptimusShepard Posted December 27, 2020 Report Share Posted December 27, 2020 5 hours ago, just_a_fan said: I installed the package libmozjs-68-dev as suggested by the updated instructions linked by OptimusShepard. ($ sudo apt install libmozjs-68-dev) It should be Spidermonkey 78. Seems to, that the general instructions are up to date, but not the Ubuntu specific ones. Quote Link to comment Share on other sites More sharing options...
Stan` Posted December 27, 2020 Report Share Posted December 27, 2020 8 minutes ago, OptimusShepard said: It should be Spidermonkey 78. Seems to, that the general instructions are up to date, but not the Ubuntu specific ones. I thought he was building A23B ? So that would be 38. And installing the rest is pointless because it's no longer in repos. Quote Link to comment Share on other sites More sharing options...
OptimusShepard Posted December 27, 2020 Report Share Posted December 27, 2020 20 minutes ago, Stan` said: I thought he was building A23B ? So that would be 38. And installing the rest is pointless because it's no longer in repos. He never specified which version he was trying to build, right? But as you said, A23b uses an older version, the current SVN a never version. Quote Link to comment Share on other sites More sharing options...
just_a_fan Posted December 28, 2020 Report Share Posted December 28, 2020 OK, I indeed didn't specify it explicitly. I just want to install the version that is currently in the Software Center of Ubuntu 20.04. Here it says "Version:Â 0.0.23b-alpha", "Channel: latest/stable". So, what should I do with this Spidermonkey? Do I have to install 38, 68 or 78 (respectively libmozjs-38-dev, libmozjs-68-dev or libmozjs-68-dev) and do I need it at all? If a different version than 68 is needed, should I uninstall 68 first? I executed "./update-workspaces.sh --with-system-mozjs" simply because that was given in the Ubuntu section of the updated instructions. I can remove the last part (--with-system-mozjs) but should I put something instead of it? I assume I am just a couple of correct commands away from my goal, but am reluctant to just start experimenting because I don't want to accidentally break something and make things worse and hard to fix. Quote Link to comment Share on other sites More sharing options...
Nescio Posted December 28, 2020 Report Share Posted December 28, 2020 37 minutes ago, just_a_fan said: So, what should I do with this Spidermonkey? Do I have to install 38, 68 or 78 (respectively libmozjs-38-dev, libmozjs-68-dev or libmozjs-68-dev) and do I need it at all? If a different version than 68 is needed, should I uninstall 68 first? I executed "./update-workspaces.sh --with-system-mozjs" simply because that was given in the Ubuntu section of the updated instructions. I can remove the last part (--with-system-mozjs) but should I put something instead of it? You don't need to install any version of SpiderMonkey, the 0 A.D. repository includes the required version by default. The --with-system-mozjs is optional, just omit it. 41 minutes ago, just_a_fan said: OK, I indeed didn't specify it explicitly. I just want to install the version that is currently in the Software Center of Ubuntu 20.04. Here it says "Version:Â 0.0.23b-alpha", "Channel: latest/stable". Looking at your first post, I understand you want to install the latest stable, but patch it to work with your AMD Ryzen processor. A23b was released two years ago, so you don't want the latest svn development version. What I would recommend you to do is: get the full A23b version from https://github.com/0ad/0ad/tree/eb2fc5c53d0c55de308be6dc5bb7f952cfbc210d patch the relevant files to work with your CPU follow the build instructions from two years ago: https://trac.wildfiregames.com/wiki/BuildInstructions?version=337 1 1 Quote Link to comment Share on other sites More sharing options...
just_a_fan Posted January 9, 2021 Report Share Posted January 9, 2021 Thanks for the advice, Nescio! I downloaded the corresponding version and followed the steps. (Strangely enough I didn't have to patch any files. The two files cache.cpp and timer.cpp were already corrected. BTW, I also had to install rustc via '$ sudo apt install rustc'.) This time I made it to the last step (i.e. the compilation), but it failed: ~/0ad/build/workspaces/gcc$ make -j3 ==== Building mocks_real (release) ==== Creating obj/mocks_real_Release mocks_real.cpp Linking mocks_real ==== Building network (release) ==== Creating obj/network_Release precompiled.h In file included from ../../../source/lib/precompiled.h:111, from ../../../source/pch/network/precompiled.h:19: ../../../source/ps/CLogger.h:28:10: fatal error: fmt/printf.h: No such file or directory 28 | #include <fmt/printf.h> | ^~~~~~~~~~~~~~ compilation terminated. make[1]: *** [network.make:138: obj/network_Release/precompiled.h.gch] Error 1 make: *** [Makefile:77: network] Error 2 Any ideas how to fix that? Where do I get printf.h? Was it not supposed to be in the folder that I downloaded from GitHub or was it supposed to be created at one of the previous steps? Quote Link to comment Share on other sites More sharing options...
hyperion Posted January 9, 2021 Report Share Posted January 9, 2021 You are missing the build dependency fmt, just install it via package manager. The package might be called libfmt-devel or such. Quote Link to comment Share on other sites More sharing options...
just_a_fan Posted January 9, 2021 Report Share Posted January 9, 2021 Thanks hyperion! I installed it. ($ sudo apt install libfmt-dev). Now the game compiled successfully it seems. After executing '$ make -j3' it just returned to the prompt. However, how can I run the game? There is no folder 'system' in '0ad'. Here is what I have in the '0ad' directory (i.e., the output of $ ls): Quote binaries docs      license_dbghelp.txt license_lgpl-2.1.txt LICENSE.txt source build    libraries license_gpl-2.0.txt license_mit.txt      README.txt Did something go wrong or should I just search for the executable in another directory? Quote Link to comment Share on other sites More sharing options...
Nescio Posted January 9, 2021 Report Share Posted January 9, 2021 6 minutes ago, just_a_fan said: However, how can I run the game? 0ad/binaries/system/pyrogenesis  Quote Link to comment Share on other sites More sharing options...
just_a_fan Posted January 9, 2021 Report Share Posted January 9, 2021 Thanks! That worked! The game runs fine, no problems detected so far, but it's different than the one I had. Apparently, I now have Alpha XXIV instead of Alpha 23B, don't know why though. I followed the link provided by Nescio. When clicking in the upper right corner on the green button 'Code', GitHub provided me with the following link: https://github.com/0ad/0ad.git By the list of files and the timestamp (Dec 9 2018) I assumed that it should be Alpha 23B. Anyway, the only question now is if I would be able to play together with someone who has Alpha XXIII. Quote Link to comment Share on other sites More sharing options...
Stan` Posted January 9, 2021 Report Share Posted January 9, 2021 Well you compiled A24 the dev version, so no you won't be able to play with A23B people. Did you download the zip, or did you clone the repo? If you cloned the repo, you can run $ git log -q --grep 21946 which will give you commit 535f7881d52ff25cabec5730c051f7552873b324 (tag: A23) Author: Itms <Itms@3db68df2-c116-0410-a063-a993310a9797> Date: Sat Dec 8 22:04:04 2018 +0000 [i18n] Last manual update of the translations and associated credits. git-svn-id: https://svn.wildfiregames.com/public/ps/trunk@21946 3db68df2-c116-0410-a063-a993310a9797 Where the first line is the hash you need to revert to using git reset 535f7881d52ff25cabec5730c051f7552873b324 --hard Then you need to patch the game for it to work with your Ryzen CPU then recompile. Quote Link to comment Share on other sites More sharing options...
hyperion Posted January 9, 2021 Report Share Posted January 9, 2021 The tag can substitute for the commit hash git reset --hard A23 Â 1 Quote Link to comment Share on other sites More sharing options...
just_a_fan Posted January 9, 2021 Report Share Posted January 9, 2021 I cloned the repo using git. After the reset that Stan' suggested I patched the two files and repeated Step 5. However, this time the compilation ($ make -j3) failed. Here is the last part with the error message: Linking atlas ==== Building gui (release) ==== make[1]: *** No rule to make target '../../../source/gui/ObjectTypes/CButton.cpp', needed by 'obj/gui_Release/CButton.o'. Stop. make[1]: *** Waiting for unfinished jobs.... precompiled.h make: *** [Makefile:129: gui] Error 2 Is there a way to fix that error? The other way would be for the person that I am playing with to also switch to A24, I guess. However, he is playing on a Mac OS. Is there a repository on GitHub with A24 for Mac OS that he can clone? How can I now (after the error compiling A23) switch back to A24? There should be a hash for that commit too. (Erasing everything and downloading it again should do the trick but it will take longer.) Quote Link to comment Share on other sites More sharing options...
Nescio Posted January 9, 2021 Report Share Posted January 9, 2021 Did you run cd 0ad/build/workspaces/gcc/ make clean cd .. sh clean-workspaces.sh before rebuilding? 13 minutes ago, just_a_fan said: The other way would be for the person that I am playing with to also switch to A24, I guess. However, he is playing on a Mac OS. Is there a repository on GitHub with A24 for Mac OS that he can clone? It's the same repository, 0 A.D. is cross-platform, he should just follow https://trac.wildfiregames.com/wiki/BuildInstructions#OSX If you intend to play the development version (A24) with other players, it's very important to double-check everyone is at exactly the same revision/commit, to avoid going out of sync; the git mirrors are some hours behind the svn. Quote Link to comment Share on other sites More sharing options...
just_a_fan Posted January 9, 2021 Report Share Posted January 9, 2021 Thanks, Nescio! That helped me compile successfully. However, when I start the game now, I get the same error as at the very beginning of this thread. I don't understand why, since (after the cleaning of the workspace and before updating it and compiling) I fixed cache.cpp just like Stan' explains and also changed the few lines in timer.cpp. BTW, what GitHub-link should I use when cloning the repository with git in order to get A23B? I am thinking using https://github.com/0ad/0ad/tree/535f7881d52ff25cabec5730c051f7552873b324, since that seems to be the commit with A23B. However, clicking on the green button 'Code' gives me again https://github.com/0ad/0ad.git, hence executing $ git clone https://github.com/0ad/0ad.git I will download A24 as before, I assume. (BTW, I tried downloading the zip-file twice, but the download failed both times at around 1.1 GB.) 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.