Pinned post
Pinned post
Pinned post
Pinned post
Pinned post
Pinned post
Pinned post
Pinned post

Learn to compile source code cheat sheet!

Step 1 - Find all your dependencies.

Use you distribution's, or OS's (BSDs) package manager or package website to find the correct names of all your needed dependencies. Sometime you may have to compile a dependency from source.

Step 2 - Read the documentation to get the build system.

Most good projects have detailed build instructions.

Step 3 - The most common build systems.

1a - The GNU system

$ sh
$ ./configure
$ make
$ sudo make install

1b - The BSD system

$ make # or gmake for GNU make
$ sudo make install

1c - The cmake system

(the base source directory needs a cmakelists.txt)

$ mkdir build && cd build
$ cmake --build ../

Step 4 - Pay attention to compiler errors.

Most of the time configure and compile errors will give you a good clue as to what you're missing. Usually it's a missing or out of date dependency. Or it's designed to look for a folder or file that's not there in your system. Often times this can be fixed by creating a symlink.

$ sudo ln -s /path/to/real/file /path/to/symlink

Good luck and happy learning to port and compile!

Alternate universe where Richard Stallman was actually a Saudi prince and he bought Apple early on and made it a free software computer company...

Show older

Starnix is a community effort lead by FOSS enthusiasts for the purpose of establishing ActivityPub Software and promoting Fediverse usage. The primary topics for this Mastodon instance include but are not limited to software technology, including FOSS, Unix and Unix-like operating systems, and gaming.