The following commands are used to install the packages needed to build FreeCAD from source on the following distributions.
The following command is used to install the required packages used to compile FreeCAD on Arch Linux.
sudo sh tools/build/arch.sh
The following command is used to install the required packages used to compile FreeCAD on Debian.
sudo sh tools/build/debian.sh
The following command is used to install the required packages used to compile FreeCAD on Fedora.
sudo sh tools/build/fedora.sh
The following command is used to install the required packages used to compile FreeCAD on Manjaro Linux.
sudo sh tools/build/manjaro.sh
The following command is used to install the required packages used to compile FreeCAD on Ubuntu Linux.
sudo sh tools/build/ubuntu.sh
The following will create containers that have all the required dependencies pre-installed that are needed to build FreeCAD from source.
The following commands are used to create and run a Arch Linux build environment.
docker build --file tools/build/Dockerfile.Arch --tag freecad-arch
docker run --rm --interactive --tty --volume $(pwd):/builds:z freecad-arch
The following commands are used to create and run a Debian build environment.
docker build --file tools/build/Dockerfile.Debian --tag freecad-debian
docker run --rm --interactive --tty --volume $(pwd):/builds:z freecad-debian
The following commands are used to create and run a Fedora build environment.
docker build --file tools/build/Dockerfile.Fedora --tag freecad-fedora
docker run --rm --interactive --tty --volume $(pwd):/builds:z freecad-fedora
The following commands are used to create and run a Manjaro build environment.
docker build --file tools/build/Dockerfile.Manjaro --tag freecad-manjaro
docker run --rm --interactive --tty --volume $(pwd):/builds:z freecad-manjaro
The following commands are used to create and run a Ubuntu build environment.
docker build --file tools/build/Dockerfile.Ubuntu --tag freecad-ubuntu
docker run --rm --interactive --tty --volume $(pwd):/builds:z freecad-ubuntu
To build the FreeCAD code inside one of the running containers the following commands should be used
mkdir freecad-build
cd freecad-build
cmake ../freecad-source
make -j$(nproc --ignore=2)