In order to compile software from sources, you'll need the devx module, which is a special SFS extension which contains a compiler, headers and all files that originally came with Puppy's application and libraries that are needed to compile other software packages that depend on them.
Each Puppy version has its own devx module, which is placed alongside the Puppy ISO image in Puppy download pages. Many devx modules can be found here, inside the sfs_modules-x directories or version-specific directories, such as puppy-4.3.1. In order to be able to compile sources, download the devx module suitable for your Puppy version and install it.