Versiones comparadas

Clave

  • Se ha añadido esta línea.
  • Se ha eliminado esta línea.
  • El formato se ha cambiado.

...

Info

Note: 
While compiling you may get one error like: "c++: internal compiler error: Killed (program cc1plus)" the reasons of this can be:

Low ram/swap amount: increase ram/swap to a minimum of 2GB of ram and 2GB of swap or decrease the amount of make -j to 1 (more concurrent compile threads = more memory usage). (you can get this using VPS servers)
SELinux/grsecurity/Hardened kernel: Kernels that use ASLR as a security measure tend to mess up GCC's precompiled header implementation. Try using an unhardened kernel (without ASLR), or compiling using clang, or gcc without pch. (you can get this issue when using OVH hosting).


Your server may be abruptly killed by an angry administrator or system staff or system restrictions for overuse of system resources and you willl see something like:

collect2: fatal error: ld terminated with signal 9 [Killed] compilation terminated.

you will need to use less jobs (make -j1) or increase swap.

Debian based distributions (heavy recommended debian stable, it's the distribution we use to set minimum requirements)

...

Bloque de código
languagebash
apt-get update
apt-get install git clang cmake make gcc g++ libmariadbclient-dev libssl-dev libbz2-dev libreadline-dev libncurses-dev libboost-all-dev mariadb-server p7zip libmysqlclient-dev default-libmysqlclient-dev
update-alternatives --install /usr/bin/cc cc /usr/bin/clang 100
update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang 100

...