News:

SMF - Just Installed!

Main Menu

Recent posts

#51
Knights Discussion / Re: Linux issues
Last post by Stephen - August 13, 2017, 09:30:49 AM
g++ --version
#52
Knights Discussion / Dagger hotkey
Last post by d.healey - August 13, 2017, 01:31:27 AM
If you take requests could we have a hot key for throwing daggers?
#53
Knights Discussion / Re: Linux issues
Last post by d.healey - August 12, 2017, 11:53:51 PM
How do I check my compiler version?
#54
Knights Discussion / Re: Linux issues
Last post by Stephen - August 12, 2017, 10:27:34 PM
Also, here is a screenshot from gdb of the disassembly of the RStream::Initialize function.

http://www.knightsgame.org.uk/disassembly.png

Dave's executable is on the left and mine is on the right.

I'm not sure why, but there are some differences... for example, my version reserves more stack space (0x58 bytes as opposed to 0x30) and mine is doing something with the %fs register which I don't quite understand.

I think most of the code that we're seeing here has actually been inlined from bfs::canonical so it is possible that Dave is picking up a rogue boost header file from somewhere. Alternatively, it might be some difference in compiler version or compiler flags perhaps?

It's a bit of a mystery at the moment!

My compiler version is g++ 5.4.0.
#55
Knights Discussion / Re: Linux issues
Last post by Stephen - August 12, 2017, 09:51:13 PM
Hmm... good question...

Maybe try "find / -name boost 2>/dev/null" and see what it prints out.

On my clean linux install it gives

/usr/include/boost
/usr/include/boost/chrono/typeof/boost

...which indicates there is only one set of boost headers, in /usr/include/boost.
#56
Knights Discussion / Re: Linux issues
Last post by d.healey - August 12, 2017, 08:08:28 PM
Quote from: Stephen on August 12, 2017, 04:46:17 PMd.healey please could you look in /usr/include/boost/version.hpp (or wherever you have the boost headers installed) and see what it says for BOOST_LIB_VERSION. It's possible you might have boost installed in two places or something like that, and it's picking up the wrong version of the headers during the compile.

This is what it shows in that file on my system - #define BOOST_LIB_VERSION "1_58"

Is there a way to check if there are multiple versions installed?
#57
Knights Discussion / Re: Linux issues
Last post by Stephen - August 12, 2017, 04:46:17 PM
I did some investigating.

First I reproduced Impassive's result -- I did a clean Linux Mint install and built Knights and there was no crash.

Then I downloaded d.healey's executable and ran it, and I got a segmentation fault.

From reading what Impassive wrote it does indeed sound as though the stack is being corrupted across one of the boost library calls.

The only thing I can think of that might cause this is a mismatch between Boost header and library (.so) versions on d.healey's system.

I can see that the knights exe supplied by d.healey links against boost 1.58 (you can see this by running "objdump -p knights" and looking at the .so file versions). I can't see which version of the boost headers he used though.

d.healey please could you look in /usr/include/boost/version.hpp (or wherever you have the boost headers installed) and see what it says for BOOST_LIB_VERSION. It's possible you might have boost installed in two places or something like that, and it's picking up the wrong version of the headers during the compile.
#58
Knights Discussion / Re: Linux issues
Last post by d.healey - August 12, 2017, 12:38:52 AM
Quote from: Stephen on August 11, 2017, 07:34:19 PM
Firstly, to d.healey, I forgot to say, thank you for your interest in Knights, and I'm sorry you're having problems. With your help I'm sure we'll get it sorted :)
Yeah it's an excellent game. I found it by chance, it's a shame it isn't in a repo (or is it). The mods are great too, I play it with some friends online (on Windows) and it's great fun.
#59
Knights Discussion / Re: Linux issues
Last post by Stephen - August 11, 2017, 07:34:19 PM
Firstly, to d.healey, I forgot to say, thank you for your interest in Knights, and I'm sorry you're having problems. With your help I'm sure we'll get it sorted :)

To ImpassIve:

Thanks for your investigation, it looks like there is some useful info there. I need to refresh my memory about that code though, I'll have a look and get back to you soon... :)
#60
Knights Discussion / Re: Linux issues
Last post by d.healey - August 11, 2017, 10:03:49 AM
Quote from: ImpassIve_rus on August 10, 2017, 09:51:11 PM
Yeah, something is wrong with those executables, not sure about the reason. Maybe you could try to replace them with mine and see if that works?
http://www.filedropper.com/linuxmintexecutablestar
(just a reminder: after replacement, run the game as "./knights" instead of "knights" since the latter will launch a previously installed copy, instead of a local one)
Thanks. When I extracted your archive it said an error occurred, truncated tar archive. An executable still popped out though which when run with ./knights still gives the segmentation fault.