You will need the necessary build tools, headers and libraries. Because Gentoo’s portage system is designed to compile any packages on your own system, the necessary build tools will have already been installed. This only leaves you to install the necessary libraries:

sqlite: contains the SQLite library
git: contains the client used to check out our code repository
curl: contains the cURL library; to compile with SSL support, apply the net-misc/curl ssl USE flag
To compile and install these packages through emerge, use the emerge -v <package list> command. The -v option shows additional information and can be omitted. (If you want to use any USE flags, prepend emerge with USE="use flags here". You can also use the -pv option to verify that you’re using the correct flags.) Refer to the Gentoo Handbook or manual for more information on emerge.

Example:

emerge -v subversion sqlite
USE=“net-misc/curl ssl” emerge -v curl

A warning for x64

The MTA:SA server currently cannot be properly compiled in 64-bit mode. Instead, you should compile it in 32-bit mode and run it using 32-bit compatibility mode.

General instructions

Prepare the sparsehash library

You can skip this step if your distribution’s package manager provides a sparsehash package that you can install.

Your vanilla server will now be compiled and installed into the MTA10_Server/output/ directory.

Run the server

Grab the latest net.so from the Downloads page on GitHub and place it in your output directory, install the accounts.xml, mtaserver.conf and acl.xml files into the mods/deathmatch/ directory and grab the latest resources from the multitheftauto-resources project. You can then run your server.

cd MTA10_Server/output
./mta-server

Troubleshooting

Any errors during the compilation of json-c can be solved by calling autoreconf -fi from the json-c directory.