steam-runtime
steam-runtime copied to clipboard
Update GCC
Will the Steam Runtime ever support gcc 5?
It seems like as of right now it doesn't support it, which means I'd either have to build my application with gcc 4 (which requires a few changes in the core that I'd rather not touch at this point) or wait until the runtime supports gcc 5.
What about gcc 6 :)
You can compile and install GCC 5 or 6 from source within the runtime to build with it, FWIW
Alright, but do binaries compiled with that run in the client?
The issue here would be linking to libgcc (and libstdc++ if you use C++).
If you link statically (pass -static-libgcc -static-libstdc++
to the linker) the resulting executable should run in the client.
You can use two separate installations of the runtime, one for building and one for testing (*). This way you can be sure that your executables don't depend on anything that's not in the vanilla SteamRT.
(*) Although it's a pain to test OpenGL games inside the chroot, because there are no graphics drivers installed. You have to do some song and dance to forward your X commands to the host. So what I'm doing is just starting the executable and checking that it outputs something so I know that all dynamic libraries are there. If it crashes and burns afterwards, I don't care.
I actually don't have any driver issues with the chroot. I can run our game just fine, even with a weird bumblebee/optirun set-up.
Either way, it would be nice to have gcc5 supported as a dynamic linker, so we don't need to compile this ourselves. I already have to build both wxWidgets and Breakpad in my 32 and 64 schroot's.. Would prefer not to add more to that list :D
+1, wasnt sure this was the right place but as i see this i know it is, i wanted to open an issue, 4.6.3 that the steam-runtime sdk currently has doesnt implement non-static data member initializers as i got the error when building my sdk 2013 mod for linux but it seems that this will go overlooked by valve sadly
GCC 5 has been included in the runtime's scout_beta variant for a long while now. It's supported at runtime, but you have to create your development chroot from scout_beta rather than scout.
Hum.. is that in the Steam client? Will that ship to our customers?
GCC 8 is almost there, is there a plan from the Steam Runtime to jump (officially) to a more recent GCC? (or Clang)
I downloaded the scout_beta_i386 version of the Steam Runtime and it seems to ship GCC/G++ 4.8.4 as the latest, not GCC/G++ 5
I'm also interested in GCC potentially being updated. Though I'd prefer an even later version (like 7.3) for C++17 support, but at least GCC 5 should have C++14 support.
It's getting increasingly more important to get gcc updated. :(
You can install GCC 5 from scout_beta, it's one of the packages that is available in that environment.
Ah okay, still, are there any plans to update GCC officially to even a later version?
It is about time to update GCC || Clang!
Anura game engine also sort of could use this with more modern boost libs.
https://github.com/anura-engine/anura/pull/284
Valve, can you specify a reason for not updating GCC right here in this thread? It's not like upgrading GCC can really break sth.
GNU stuff of that caliber is always triple-quadriple checked for regressions and stuff, and GCC 5 has been an LTS for several years now according to https://gcc.gnu.org/releases.html And as LTS grown up to 5.5 already.
Besides, keeping 4.8 lowers coding standards by disallowing more modern C++ as were mentioned above. You do a great stuff with Proton and come great lengths to support Linux, but for some reason allow such a deterioration for native Linux programs without really specifying any particular reason for it.
Anura game engine also sort of could use this with more modern boost libs. anura-engine/anura#284
Valve, can you specify a reason for not updating GCC right here in this thread? It's not like upgrading GCC can really break sth.
GNU stuff of that caliber is always triple-quadriple checked for regressions and stuff, and GCC 5 has been an LTS for several years now according to https://gcc.gnu.org/releases.html And as LTS grown up to 5.5 already.
Besides, keeping 4.8 lowers coding standards by disallowing more modern C++ as were mentioned above. You do a great stuff with Proton and come great lengths to support Linux, but for some reason allow such a deterioration for native Linux programs without really specifying any particular reason for it.
You can use GCC5 under the Steam Runtime Beta if you install it as Plagman pointed out. It works perfectly fine. But you're of course limited to C++14.
It would be great to get an updated version of GCC. At the very least it should be made an option for a newer version. There are some very useful features in C++17.
I don't suppose there's been any update on this issue? Building and linking against a separate GCC would really be best left as a last resort.
I'd also be interested in seeing if there's an update for this.
For a project to build source ports for various steam games and easily provide them for launching, I've been using the steam runtime as the environment for this. Most of the older engines support GCC 5 ok, but more and more are starting to require C++14 or C++17 concepts. As a workaround, I added the ability to install GCC 9 in the runtime as an option, using the following commands:
echo "deb http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu precise main" | sudo tee /etc/apt/sources.list.d/gcc.list
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 1E9377A2BA9EF27F
sudo apt-get update
sudo apt-get install gcc-9 g++-9 -y
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 9
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 9
sudo update-alternatives --set gcc "/usr/bin/gcc-9"
sudo update-alternatives --set g++ "/usr/bin/g++-9"
Another item I've noticed as well is since the glibc is fairly old, some other concepts will not work in the environment such as PRId64.
In http://repo.steampowered.com/steamrt-images-scout/snapshots/0.20200720.0/com.valvesoftware.SteamRuntime.Sdk-amd64,i386-scout.manifest.dpkg there's a gcc-9-monolithic
, so perhaps this is in progress?