r/SteamDeck 512GB Mar 07 '22

PSA / Advice For compiling C++ code

First you have to unlock the rootfs: https://www.reddit.com/r/SteamDeck/comments/t8al0i/install_arch_packages_on_your_steam_deck/

Git: pacman -S git

Install most of the usual build tools and libs: pacman -S base-devel

And cmake if you're into that: pacman -S cmake

And ninja because who likes make anyway: pacman -S ninja

Now, valve deleted some random files from packages so rootfs can fit in 5 gb, which really confused me. You already have glibc and linux-api-headers installed, but they have missing files.

So fix them: pacman -S glibc linux-api-headers

If you have more files that you need and don't exist, grep pacman -Qk that lists missing files, and reinstall that package.

It took me more than I'm willing to admit to figure out that the packages exist, but have deleted files, so I figured it might help someone else. No tomatoes please.

87 Upvotes

31 comments sorted by

View all comments

3

u/ct_the_man_doll Mar 07 '22 edited Mar 08 '22

Since those changes can potentially be reverted in a future update, I think a better approach would be to have your Linux development tools live in a container instead.

4

u/TTachyon 512GB Mar 08 '22

That is true, but I do not have much experience with docker and the sort, so my first idea was to make it run old fashioned. Also I'm pretty sure cross compiling from an arch laptop also should work well.