Page 2 of 2

Re: 0.12.13 won't load linux

Posted: Sat Oct 24, 2015 8:10 pm
by Oxyd
I've managed to reproduce this on an Ubuntu 14.04 virtual machine.

I think I know what's happening. In 0.12.12, we enabled link-time optimisation for the Linux build, which caused some issues.

To resolve these issues, we linked 0.12.13 statically against libstdc++ (among other things).
Edit: Actually, we didn't. We've been linking statically against libstdc++ for the past seven months. I might be completely wrong here, then.

During start-up, Factorio transitively loads libtxc_dxtn.so which then makes calls to the system libstdc++.so to initialise standard I/O streams and install a locale facet – which is where the crash comes from. I'm assuming the two C++ standard library implementations – the static one in the factorio binary and the dynamic one loaded from libtxc_dxtn.so – don't cooperate very well. The fact that we build Factorio with GCC 5 and Ubuntu 14.04 is built with GCC 4 probably isn't helping either.

Some mystery still remains, however. libtxc_dxtn (which, remember, is the one making the call to the system libstdc++.so) is a C library. Not C++. And, indeed, on my Fedora 22 box, it doesn't use libstdc++.so at all:

Code: Select all

[nightshade] ~ % ldd /usr/lib/libtxc_dxtn.so 
        linux-gate.so.1 (0xf77f5000)
        libc.so.6 => /lib/libc.so.6 (0xf75ef000)
        /lib/ld-linux.so.2 (0x56629000)
On the Ubuntu 14.04 VM, however:

Code: Select all

oxyd@virt-ubuntu:/usr/lib/x86_64-linux-gnu$ ldd libtxc_dxtn.so 
	linux-vdso.so.1 =>  (0x00007ffc9294e000)
	libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fccec9e4000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fccec6de000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fccec319000)
	/lib64/ld-linux-x86-64.so.2 (0x00007fccecf20000)
	libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fccec103000)
For some reason, libtxc_dxtn is compiled as a C++ library on Ubuntu, even though it isn't. (I assume Debian does the same as there was a report from a Debian user with the same problem.) This difference explains why I can run the released binary just fine on my Fedora box, but it fails on Ubuntu.

It looks like it's no LTO for us on Linux.

Re: 0.12.13 won't load linux

Posted: Sat Oct 24, 2015 10:48 pm
by chris13524
Please fix quickly! I have gone 3 weeks no Factorio cold turkey :( I don't know what else to do with my life! lol

Re: 0.12.13 won't load linux

Posted: Sun Oct 25, 2015 3:46 pm
by SHiRKiT
Revert back to 0.12.12

Re: 0.12.13 won't load linux

Posted: Sun Oct 25, 2015 5:23 pm
by Afforess
Interesting, I have no trouble launching the 0.12.13 linux 64 version of Factorio on Ubuntu 15.10 wily. Is this problem isolated to just 14.04 and older?

Re: 0.12.13 won't load linux

Posted: Sun Oct 25, 2015 6:29 pm
by Oxyd
Afforess wrote:Interesting, I have no trouble launching the 0.12.13 linux 64 version of Factorio on Ubuntu 15.10 wily. Is this problem isolated to just 14.04 and older?
Should be specific to 15.04 and older.

Re: 0.12.13 won't load linux

Posted: Sun Oct 25, 2015 7:49 pm
by gheift
Might be related to this problem: https://wiki.debian.org/GCC5

On debian unstable factorio works for me (except the deserialization, but that's another problem).
Looks like you linked against the new libstdc++, which is incompatbile to the old one.

Re: 0.12.13 won't load linux

Posted: Sun Oct 25, 2015 10:25 pm
by hofi02
I can confirm updating to Ubuntu (in my case Xubuntu) 15.10 solves the issue.

Re: 0.12.13 won't load linux

Posted: Mon Oct 26, 2015 4:58 pm
by cube
This bug should be fixed now, and we're releasing 0.12.14 just now. ... it looks that the world is not yet ready for LTO :-)

Re: 0.12.13 won't load linux

Posted: Mon Oct 26, 2015 7:31 pm
by Rseding91
cube wrote:This bug should be fixed now, and we're releasing 0.12.14 just now. ... it looks that the world is not yet ready for LTO :-)
The Linux world :D

Re: 0.12.13 won't load linux

Posted: Tue Oct 27, 2015 1:45 pm
by chris13524
I can confirm that 0.12.14 fixes the issue.