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
Universe Generation Crash / Bad Version String when using Slackware 14.1 Custom Build Script #323
Comments
What OS are you using? The version string / application title are oddly broken. Please clear the contents of the directory described here: http://freeorion.org/index.php/Config.xml Then attempt to start a game with 1 AI and otherwise default settings. After it crashes, go to the same directory and locate all the .log files, and post them somewhere (eg. pastebin) and link to them in a reply. |
I using Slackware 14.1 x86_64 'stable' Delete the folder ~/.freeorion and i restart the game again and the problem is the same. These are the logs: |
How did you build FreeOrion? Given the broken version string in the screenshot, you might not have run CMake properly. Aside from that, much of the galaxy setup seems to have run OK, but it ends suddenly after adding starting buildings. |
Maintain this game for Slackware. This is the build script |
How are you running FreeOrion? From what directory? The crash appears to be happening when the Python scripts setting up the player homeworlds tries to load "starting_buildings.txt" from the resource directory. Given that you have weird errors in the version string, I'm guessing you haven't built and installed FreeOrion as it is expecting, so it can't find that file. |
Is that build script running CMake? If not, you might need to modify it to do everything that the CMake script is doing, including putting content files where they're expected. Alternatively, adding the resource directory to the path so the Python scripts can find "starting_buildings.txt" and similar files it might help. Apparently the in-Python path resolution isn't working the same as the in C++ equivalents, for you. |
A solution would you suggest ? |
Use CMake to build and install instead of whatever that Slackware-specific script is doing. Or try adding the resources directory to the system path. That might be the easiest / simplest, though might just reveal another related problem given the odd installation. Or wait for someone else who knows more about the CMake build system and how it works on Linux or Slackware in particular to comment. That all said, there should be some error reporting if that string list load fails, and I don't know why you wouldn't see that in the server log file, so there might be something else going on. |
Ok, a few things:
Well, whatever, first thing I'd suggest doing now is trying again with RC2 which is going to be released today, and this time using the manually created source tarball. Second, if FO still crashes (which is probably to be expected), launch it several times, check freeoriond.log if the last lines are always the same or if they vary, and report back. |
Ok... Thank you, |
Boost::Log is being set to auto_flush = true which should result in logs being written immediately. ("should") Another thing to try is adding to line 427 of empire.py to see if it crashes before or after finishing adding the buildings. |
Hm, I think it would make more sense to add
between line 425 and 426, as part of the loop, like this:
because I don't think adding a print statement after the loop has finished will help much - after all, there is a print statement on the next line that apparently didn't get executed, which already indicates that the loop never finished. Adding the print statement within the loop will give us some more precise info on where exactly the crash happens - if the print statement never executes, then it's the |
RC2 is up now. |
Try to build without rename |
Now i try to build from sourceforge tarball https://sourceforge.net/projects/freeorion/files/FreeOrion/FreeOrion%20Version%200.4.5/ |
Build normal from sourceforge tarball but the error is the same "The connection to the server has been lost". |
Wouldn't have expected otherwise. See above suggestions to try adding logging to the building adding part of the Python universe generation. |
What did you change to produce the new log? |
After building the release version RC2 deleted directory ~ / .freeorion and ran the FO around 7 times. |
This is latest FO configuration http://pastebin.com/5wpS7np8 |
Please try adding the logging line suggested by Vezzra above, to narrow down the location of the crash. |
Thank you, i will try it now... |
Apparently you didn't use the source tarball I linked to (the server log contains error messages that are caused by a bug that has been fixed in the version of this source tarball), and also didn't remove the lines from your build script that copy util/version.cpp.in to util/version.cpp. Please, try again and use this source tarball: FreeOrion_2015-09-01.e3ab1c5_Source.tar.gz. This is a special tarball with additional logging commands, which are not contained in the tarballs you can download from github or sourceforge. You have to use the link I provided. And please also remove these lines from your build script:
Otherwise the version string isn't correctly set, and we can't verify if the log files you provided really have been generated by the correct build. |
Use, maybe something went wrong... no problem i try again... |
I removed folder /build, source code and package, download again and build so: |
try removing the line |
@geoffthemedio vanilla |
I know what you wrote above, but it doesn't make sense that this macro definition would cause problems just with parsing buildings.txt and only with the following macro also present. Particularly so since the DESCRIPTION_EFFECTSGROUP_MACRO macro isn't even used in buildings.txt or any of the files it includes. More so when nobody else has reported this problem except when also building/running on Slackware. So, I'm trying to figure out if there's something else going on, like the fully-included buildings.txt being too long, or something unusual about the identified macros being a source of the problem, like the @1@ line. I would again/still like to know what happens with a newer version of Boost. |
Any effect from removing the comment starting with |
Do you mean the content from
Perhaps @dslackw can repeat all these tests in his Slackware -current instance, I can only do the tests for 14.1 and boost 1.54
vanilla |
Sorry for reporting back only now, but I've been trying to install a Slackware 14.1 system in a VM and build and run FO there. Me being the Linux noob I am, that took some trial and error, but right now FO is compiling (hopefully it will complete successfully, that remains to be seen). @dslackw, @pitchforks, assuming I'll get the same crashes as you, I might need some assistance/instructions at installing a newer boost version. |
Good and bad news. Good news: FO built successfully. Bad news: when I launch FO, I get the following error messages on the command line:
I guess that might have to do with running inside a VM and not having sound? How can I work around that? |
try blanking buildings.txt; perhaps the segfault is the topic of this issue, and the AL lib issues are unrelated? |
Oh, sorry, these error messages have nothing to do with the issue itself. They occur immediately when I try to launch the human client and are printed to the console, freeorion.log contains only two lines. I've been posting them here in hope that @dslackw or @pitchforks might have any ideas what's going wrong here and how I can work around it (as it looks like something doesn't work right here with the alsa lib installation on Slackware 14.1). |
Are you running freeorion as regular user that you eventually did not add to the |
@pitchforks: yes and yes, I did not add that user to the audio group. Doing this didn't help though, I still get the same error messages. However, I think @geoffthemedio might be right after all, at least insofar as the segfault might not be related to the alsa lib issues. Unfortunately, as I already said, the failure occurs very early during program startup, freeorion.log only contains two lines which give no hint at all at the cause of the problem. Which means I'm most likely screwed, as my know how is far to limited to tackle this kind of issue on a Linux system. I can only tell what I did to get FO built, maybe I did something wrong. The main problem for me was to get the dependencies on SDL2 and OpenAL installed. Running the resulting |
@Vezzra diving into an unknown Linux distro without much prior experience is probably as challenging as trying to build freeorion without knowing the codebase and generally much programming - and hitting a nasty bug like this one :)
This is certainly not the best approach, but I won't comment on it to avoid derailing the topic a lot. Perhaps we can find a way to deal with these long delays between posts here by chatting interactively? I was pointed to a forum thread where you say you don't do IRC, it can be Jabber or tox then. If you're willing to push this further, perhaps we can catch eachother online somehow? I'm not thinking about any arranged meeting at certain hours, just that it would be nice if we can talk interactively when we happen to be both online. |
And not to forget, only having so much time I can allocate to this problem... 😉
Yeah, I've already been wondering how far I should continue discussing this side-issue here. You're probably right, we should continue this elsewhere. I can open a thread on our forum, you'll need to register there.
Hm, the problem is, the only IM program I'm actually using is Skype, and even there I'm only online when I actually need it. Furthermore, for purposes like these I only use the account of my cyber-alter-ego Vezzra (I try to avoid revealing my real identity), with which I'm almost never online - pratically only when making specific appointments (which does happen, I already had chat sessions for FO purposes). But we should probalbly continue this discussion too elsewhere. As github lacks PMs, either per email (a public email should be visible at my profile), or on our forum via PM? |
Ok, I've found a fix for the issue. @geoffthemedio was spot on:
That's apparently exactly what's going on here, gcc somehow messes something up in the parser code. Fortunately, Slackware 14.1 also ships with clang/llvm, and when you build FO with that toolchain everything works fine. The question now is, if it's mandatory for the build script to use gcc, or if switching to clang/llvm is ok. The following adjustments to the build script are required:
CMake honors those environment variables and consequently uses clang instead of gcc.
This apparently is required to tell cmake to use the llvm toolchain. Building FO with this modifications to the build script produced a working build. @dslackw, @pitchforks, can you test on your systems if this fix works for you? If you can't use clang/llvm for building packages, we're out of luck, unfortunately. Fixing gcc issues is beyond our possibilities, sorry. |
I would once again suggest trying a newer version of Boost. It's possible they noticed the issue and fixed it in a later release. |
Thanks everyone, for your patience and for the great job, works fine now. @geoffthemedio at present I can not use the latest version of boost is not available at release Slackware 14.1 -stable. So i have update freeorion with version 0.4.5 in the repository SlackBuilds.org and it is available next week after public update. Best regards, |
Are you unable to download and build Boost from source? |
According to what @dslackw said earlier:
And @pitchforks mentioned:
This would indicate that @dslackw already tried to build against boost 1.58, which didn't solve the issue. So it really looks like we're dealing with a compiler issue here (I mean, building with clang/llvm works after all...). Anyway, we have a working solution, so I'm closing this issue. |
The solution probably works but the slackbuild author must have messed the clang/llvm architecture flags and the alleged i586 build crashes with SIGILL on my non-SSE2 machine. I contacted the author of the script about it and he mentioned this issue here. If there's a standard way of passing the clang march flags I'm sure he'll be adding it to his script. |
Hm, the only thing that caught my attention when looking at the
When $ARCH="i686", both the -march and the -mtune options are set to "i686", but for $ARCH="i486", only the -march option is also set to "i486", -mtune is set to "i686", maybe that's the problem here? @petevine, can you try and edit your freeorion.SlackBuild script and set -mtune to "i486" for the i486 architecture, then try to build and report back? |
I used a binary build from the slackonly repo and won't be able to build FO myself but it's clear you've found the problem (cross-compiling or even building natively on a newer SSE(x) machine with (the 14.1 version compiled for i486 didn't have the SIGILL issue, just the one that's been fixed here) |
Ok, if I understand correctly, you're using a prebuilt binary that has (apparently mistakenly) been built for i686 and later architectures, which caused the SIGILL when you tried to run it on your system. So, whoever produced these prebuilt binaries will have to adjust the build script accordingly, or the maintainer of the slackbuild package has to do that for the build script hosted on slackbuilds.org (so anyone who uses it to produce prebuilt binaries will get ones that won't cause SIGILL crashes on i586 architectures). @petevine, can you report those findings back to whoever needs to know to make the necessary adjustments? Anything else you need from me or I can assist you with? |
Thanks, that's exactly what's needed - the slackbuild author has redirected me here so I'm sure he's reading the solution as well. The script must have defaulted to i686 after encountering an unknown arch (i586 in the current slackware) |
Well, I'm not entirely sure if he actively monitors the discussion here, it's a closed issue after all. @dslackw, can you confirm that you've taken notice of this issue and our discussion about it here and implemented the fix? Just so I can remove this from my todo list... 😉 |
Slackware -current not supported from SBo repository. |
I've notified the author. We're talking about this repo, as you can see it has those two versions (14.1 and current) covered: http://packages.slackonly.com/pub/packages/ The fix is simple, just add a new elif section for
|
Ok, I see. So, if I understand correctly, the prebuilt binary for 14.1 has been working anyway, it was only the one for -current that was messed up (the build script not adjusted correctly). Well, I guess you guys have to take it from here. Let me know if you need any further assistance from me (as far as I'm able to provide it, that is). |
The script has been made to work correctly in version Slackware -stable 14.1, as the repository ( slackbuilds.org ) requires. Unfortunately I can not support the version -current because there are major changes in the distribution structure. If Slackware -current users want to run this script you need to make changes themselves. I think this issue closed. |
freeorion 0.4.5-RC1
The game doesn't work.
I start it by typing
freeorion
in command line. It launches, gets to the main menu. I select "Quick Start". After that the Messages window prints a "Creating AI Clients" message, then a "Generating Universe" message and after that an error window saying "The connection to the server has been lost".Sreenshot
The text was updated successfully, but these errors were encountered: