|
|
Subscribe / Log in / New account

Snaps for gaming?

Snaps for gaming?

Posted Jun 20, 2016 8:36 UTC (Mon) by Cyberax (✭ supporter ✭, #52523)
In reply to: Snaps for gaming? by oak
Parent article: Ubuntu’s snap apps are coming to distros everywhere (Ars Technica)

The correct action, of course, is NOT to depend on system stdlibc++. It can be done with a bit of effort but at this point it's probably easier to just use musl+libc++.


to post comments

Snaps for gaming?

Posted Jun 20, 2016 17:40 UTC (Mon) by zlynx (guest, #2285) [Link] (4 responses)

When the userspace GPU driver uses system libc++, are you suggesting they should just use C instead?

Snaps for gaming?

Posted Jun 20, 2016 20:30 UTC (Mon) by Cyberax (✭ supporter ✭, #52523) [Link] (3 responses)

libc++ and musl can be compiled statically, so that several copies of them can live inside the same address space.

Snaps for gaming?

Posted Jun 20, 2016 20:42 UTC (Mon) by zlynx (guest, #2285) [Link] (2 responses)

I suppose that would work as long as the code never, ever passes objects with vtables, exceptions, or uses RTTI between the static blobs.

Snaps for gaming?

Posted Jun 20, 2016 21:19 UTC (Mon) by excors (subscriber, #95769) [Link]

and doesn't allocate memory in one module then free it in a different one, since they'll have separate heap implementations with no shared state, which means you're unable to use pretty much any interesting C++ object in the interface between modules.

That's already a common problem on Windows even with dynamic linking - every version of MSVC has a different CRT, and debug vs release builds have different CRTs, so you need to either compile your whole dependency tree with the same compiler and similar compiler flags, or limit all your APIs to either plain C or very carefully restricted C++ with lots of custom wrapper types.

That's not much fun, but if you're already designing your code with those limitations then statically linking the CRT shouldn't make it that much worse.

Snaps for gaming?

Posted Jun 20, 2016 21:32 UTC (Mon) by Cyberax (✭ supporter ✭, #52523) [Link]

Since we're talking about low-level libraries like Mesa - that's perfectly OK.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds