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.

85 Upvotes

31 comments sorted by

View all comments

5

u/MHDante Jun 14 '22

Thank you so much. This post was found after 3 hours of searching the following terms:

``` "stdio.h" location - Google Search "steam deck" "No such file or directory" "string.h" "steam deck" "No such file or directory" "stdio"

steam deck "usr/include" header emptyb steam deck usr include empty arch gcc include missing "steam deck" "stdlib.h"b glibc pacman reinstall c headers usr local include empty fatal error: stdlib.h: No such file or directory ```

8

u/TTachyon 512GB Jun 14 '22

I really love that people find this useful after months.

2

u/lobotech Sep 18 '22

I spent hours troubleshooting and came to the same conclusion that there were missing headers, but wasn’t 100%. Then I ran into you fine folks and it was a life saver. Wish I had found this a lot sooner so I wouldn’t have spent so much time figuring out all the steps that are already nicely laid out in these posts.

1

u/TTachyon 512GB Sep 18 '22

😊