-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Having issues getting this edition to work on Lubuntu (Jammy Jellyfish) #384
Comments
Welcome to the civctp2 source code project!
You seem to be missing tiff and sound libs. Did you follow https://github.com/civctp2/civctp2#building-on-linux, in particular: The install instructions from the DF work for Ubuntu, see e.g. Lines 18 to 20 in 5c67aa3
|
I followed that part of the guide and have those libraries installed already:
Thank you so much! I'm just glad the game's modding scene is alive, it was one of my favorite childhood games and it's nice seeing people keeping it alive |
Hm, either the compiler does not look where the libs are installed, or they have changed in some of the later upgrades. I just noticed the DF still uses ubuntu:18.04 not the newest ubuntu available Line 4 in 5c67aa3
I always played and debugged the game run from a docker-image. I might find some time in the next days (no guaranty though) to test the situation with a docker-image based on the current ubuntu. |
If you are not bound to building the game locally you could try to just develop using GL-CI, see e.g. the latest DEB-package (see #351): |
Thank you so much for the info! I'll definitely see about trying the CI later. I'll also let you know if I can get it to work locally |
So I've been trying for a few days to get it running with Docker, but after running this:
it fails on the 15th step with:
I'm not using the CD version which is probably the issue. I commented out the line for the COPY in the Dockerfile, and then had this also crop up (makes sense, I'm on Lubuntu):
After commenting that out, I finally got fairly close to the end when I had this issue:
If I remove those lines, it builds successfully but running the Docker container it made fails (it can't find "./ctp2", which makes sense because I commented the last bit out). I'm honestly not sure how to approach this or what would be considered best practices for this repo but I would love to talk out how to add support for Lubuntu somewhere. Is there some sort of Discord or group chat for contributors? Thank you again! |
see e.g. here for what the GL-CI does: Lines 43 to 62 in 5c67aa3
|
Once again, thank you so much. I will try zipping my edition up into a ctp2CD.zip later and try again. I really appreciate all of your help! |
Okay, I managed to get the build to be successful (I built with Here was the output of the Docker build (at the bottom, as I said it was completely successful):
Any ideas on what could segfault it? I'm also trying to build locally (hopefully should work now with the same steps as Docker) and trying a debug build. |
Built debug version, error for the segfault:
Edit: tried saving the image's filesystem but the find command couldn't find any files with the name "c3debug.cpp" when I extracted the tars for the layers |
Your error probably comes from a missing volume/mount into the docker container, like Lines 60 to 63 in 5c67aa3
The docker run command needs some extra work due to the graphics. I use https://github.com/civctp2/civctp2/blob/5c67aa3eabfb0829335a942a32d20d576ea641d7/tools/run-DI.sh for playing the game from the DI with e.g. tools/run-DI.sh -v ~/civctp1-music/:/opt/ctp2/ctp2_program/ctp/music/:ro -v ~/videos/:/opt/ctp2/ctp2_data/default/videos/:ro --env="ALSA_CARD=1" ctp2 ./ctp2
|
see #385 |
Okay awesome, I'll try that out!
That's literally awesome news, thank you! 😁 |
BTW: The source files are not part of the final DEP nor in the final DI. The message comes from the info the compiler left in the built files for debugging, i.e. the source files are to be found in the source repo (or in case of the records, those are generated during compile time from the record files). |
Thank you for this, I see the files now (under ctp2_code). That honestly gives a ton of insight. It boots into the menu and the game as a whole! :D I used It feels so good to have gotten this far. I do have some issues actually loading into a map though:
This occurs when I simply click singleplayer->launch and when things start to load (after clicking ignore twice, it simply crashes). I've tracked that error message down to I'm also noticing that there are no scenarios which makes me think maybe there is code that isn't being added somehow. |
|
Hm, just noticed in your screen shot that the compilation date shown is 2022-07-06. Either your system date is off or you have a compilation that is not from your recent attempts. |
Oh wow I didn't even notice that. My system date is correct (just checked) so that is really interesting, I took that screenshot the same night as I made the comment I think I'ma try cloning into another folder and doing the steps again, just to make sure my fiddling around didn't mess anything up, I'll let you know when I do that how it works out |
Okay, I just re-cloned and got the same results. Here are the exact commands I ran to get this to happen (copy pasted from my terminal history): From there, I moved the ctp2CD and deb folders into the top level of the project. The deb files were found from GitLab runs. From there, I built and ran:
Here is the output:
It also, notably, still says 2022-07-06 on the title screen (I definitely did not have this copy of CTP2 at that time, I purchased it 2 weeks ago, so I'm really not sure where it could come from - maybe the .deb files I got?). Lastly, I added the video folder into the run command (forgot it last time): Still the same result sadly :( Thank you guys so much for helping though, I know this is a long one |
I guess you did not build CTP2 yourself but are using the version from the deb file, @justinfarrelldev. 2022-07-06 is the day when I merged the last time something into master. Anyway, when I build it myself as debug version and start a new game than I get this:
It is a bit wired why it is looking for the Windows map plugins first. But then it looks for the Linux map plugins. However, there is no geometric.so generated even not in the wrong folder. |
True, didn't think of that. So you got the DEB from the GL-CI built? That's fine, it wouldn't contain any of your changes though (if you already made any).
Odd, it gets built and copied here: |
That line says: I guess inflating means copying. Where does i copying it from and why is it a dll, that is a Windows library. So it should not build it. That is during installation, which is also fine: However, the map plugins are not generated at the position or copied to the position where the development version expects them. That would be: |
Sorry, got the wrong line in the long logs. It's where the content of the CD is deflated from the ZIP, so that's the old original windows DLL.
That's the right one.
Odd, could it be that it does not matter? The GL-CI tests for the development version pass all fine. |
@justinfarrelldev have a try wit |
What is the directory the GL-CI is running from? I guess it is not ctp2/ctp2_code/ctp/. |
Will do as soon as I can! Sorry I haven't replied much, I have been very busy and haven't gotten to try out anything since my last reply Edit 9/4/22: I'm still gonna try it out, I'm just absolutely busy at the moment. |
Did it work for you? I'll be off again soon (till at least Christmas). |
I'll try it again tonight (I've been quite busy, sorry!). Edit: still have not gotten around to it. Honestly been a wild month, I haven't forgotten |
Sorry, I'll be off for the time being now. Hope you can get it to work, in any case please let us know, either how you got it to work (and what was the problem) or if it is still not working for you (I'll probably be back some time around Christmas to continue helping). Running the game either directly or from the DI only needs an Xserver instance (like during the smoke tests, SDL even supports to avoid that by unsing fbdev), so it should not matter weather Ubuntu/Lubuntu/Kubuntu or the like is used. |
@justinfarrelldev So what's the status? |
Just got access to a Windows computer so I'm just giving it a shot on there. Was never able to get it working on Lubuntu or Mint when I tried that |
I'm still completely unable to build on Windows or on Lubuntu (even after following #379 and checking out #348 thoroughly). I'd love to contribute to the repo, I just can't figure out how to build for the life of me. Is there any chance that we could have the documentation updated? I'm not the only person struggling with the build process at the moment (as shown by #348 never being resolved) and I really think that the game would be in a much better place overall if the build instructions and readme were up-to-date and clear for Windows as well as Linux. At the moment, they're full of loads of technical details and not very easily digestible (and, importantly, lack a clear process for building for Linux and especially Windows). It should probably be mentioned in the readme as well that the only verified build is g++ on Ubuntu (and mention which Ubuntu version - is it latest, 18.04, 14.04? New devs won't want to dig into the CI or issues to find out. Also, which version of g++?). Maybe someone who can build and has in-depth knowledge of the repo can step through the process with a clean slate in a VM? That way, they could note every step of the process, their thought process behind stuff, GitLab downloads and everything necessary to get the edition working properly. I'm not meaning to come off snarky or pushy in any way, I just really care about the game and would love to play an up-to-date version of the Apolyton Edition. Apolyton Edition has always been the pinnacle of CTP2 gameplay (and, in the last few years, has been the only way to play multiplayer at all). Having it more easily accessible, buildable and editable is crucial for CTP2's playerbase to stick around. We're practically an endangered species haha. What are your thoughts @LynxAbraxas @MartinGuehmann? |
I should also follow that up with that I really, genuinely appreciate the work you guys have put in over the years. Don't get me wrong, I think you are all doing brilliant work! |
Sure, but for me so far it is not clear what is missing for you in the documentation and where your problems currently lie.
Sorry, so far I've ever only built and played CTP2 on Linux.
Hm, how about contributing a modified Readme in a new PR by You? Then we can discuss Your suggested changes there;-)
Since #385 is merged (7eb2091) it is Line 4 in 9cd7c30
which means ubuntu:latest (ubuntu:latest tag points to the "latest LTS" (https://hub.docker.com/_/ubuntu) so currently latest is 22.04 (jammy))
The default that comes with ubuntu:latest: Line 21 in 9cd7c30
Well, that is basically what is done in the Dockerfile:
A download of a DEP-file from GitLab is only needed if you do not want to compile the game yourself. It works like other DEP-Packages with binaries except that again you need to provide the original game files prior to installing the DEP-file, which is what is done in Lines 58 to 67 in 9cd7c30
Sady, building the game was never tuned to be user-friendly (since it originally was closed source) and still is not like FOSS due to the given EULA. That's why I introduced the DEP-files from GL-CI Artifacts, so that user that only want to play the newest version of the game on linux do not need to cope with the built-process at all.
That's why we are very happy about everyone trying out the current CTP2 and in particular contributing issues or PRs here;-) |
Since, the readme file has been updated with better build instructions, I consider this as completed. If not please open a new issue. |
Hello,
I followed all of the Linux instructions as best as I could, but I still get this error when I try to run CTP2:
Expected keword TURNS_TO_SUE_FRANCHISE not found
(the typo in "keyword" is intentional - it's in the error message).I am trying this on the Steam version of the game (again, on Lubuntu's latest version - Jammy Jellyfish).
Configure does say I am missing
libbsd
as well as the freetype directory, but I havelibbsd-dev
already installed (and frankly, I am not sure where to find the freetype stuff). I also installed various other deps that were needed which I am listing here (I simplysudo apt-get install
ed these):Output of
./configure
(am I missing something?):make
also exits with code 1, which I assume is the root cause, but I really have no idea why it does this (I simplygit clone
d the main branch). The relevant portion of the make output is below:Any help would be greatly appreciated. I really would love to fork this repo and improve upon the game's code, but I really need to have the building part working first obviously haha.
Thank you!
The text was updated successfully, but these errors were encountered: