Application Note #11 - Installing Freecad
Objectives
- install Freecad using four methods
- Install on Arch linux using AUR…
- Download and Install the precompiled Freecad Appimage (recommended- easier)
- Download and build the latest Freecad image (docker image- you compile latest version from github)
- Linkstage 3/Assembly 3 - realthunders fork for bleeding edge Freecad with lotsa fixes…
Description
- download and install Freecad
Platform
- arch
1
uname -a
Linux archy 5.9.13-arch1-1 #1 SMP PREEMPT Tue, 08 Dec 2020 12:09:55 +0000 x86_64 GNU/Linux
=============================================================================
References
- Freecad Appimage on freecadweb.org…
- Install docker on arch…
- Compile on docker
- Freecad releases on github…
- Realthunders github repo: Assembly3/Linkstage 3…
- Realthunders fork: Download releases…
- Install on Arch: “installing and running the aur git package works. Thanks…”
Procedures
Method 0 (installing on arch linux)
NOTES**
Method 1 works on arch linux but sometimes it breaks after a “pacman -Syu”. For example you’l get an error like this
1 | libGL error: MESA-LOADER: failed to open iris: /tmp/.mount_FreeCAgkhRtt/usr/bin/../lib/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /usr/lib/dri/iris_dri.so) (search paths /usr/lib/dri) |
So, on arch linux its recommended to use the steps outlines in Reference 7.
In short, “install the aur git package”. This builds and installs the most recent version of Freecad
1 | yay -Syu freecad-git |
- in then appears in your gnome menus (Activities\Search"Freecad”)
Method 1 (Recommended)
Download and Install a prebuilt Appimage
Step 1
download it
NOTES**
freecadweb.org… describes various methods of installing freecad
DOWNLOAD LATEST……!! from all Freecad releases on github…
1 | # make it executable |
Step 2
Create a desktop entry
NOTE**
Instructions to create a gnome desktop entry in Arch Linux…
Assume home folder == /home/fcarella
First download a Freecad ICON (from here for example) to
/home/fcarella/.local/share/freecad/
Then create a desktop entry (make sure the paths are correct)
Create the file~/.local/share/applications/freecad19.desktop
1
2
3
4
5
6
7
8
9
10
11
12
13cat >> /home/fcarella/.local/share/applications/freecad19.desktop << EOF
[Desktop Entry]
Type=Application
Name=Freecad.19
Comment=3d cad
Exec=/home/fcarella/Downloads/FreeCAD_0.19-24276-Linux-Conda_glibc2.12-x86_64.AppImage %f
Icon=/home/fcarella/.local/share/freecad/freecad-icon.png
Terminal=false
StartupNotify=true
Categories=Engineering;Graphics;3DGraphics;
StartupWMClass=Freecad
X-Desktop-File-Install-Version=0.26
EOFThe desktop entry should now appear in your gnome menus
Method 2
Download and Build docker image
Step 1
Install docker on arch See…
1 | # install docker |
Step 2
clone and build latest freecad
- Clone it
1
git clone https://github.com/FreeCAD/FreeCAD.git ~/freecad_source
- Create build directory
1
mkdir ~/freecad_build
- Pull Docker image
1
2
3sudo docker pull registry.gitlab.com/daviddaish/freecad_docker_env:latest
sudo docker info
# ... - Allow access to your window manager
1
xhost +
- Configure environment variables
- the source code folder and build folders are stored outside of the docker image. This gives you control/access to that data without going into the container. It allows you to run the newly compiled freecad in your local system.
- the folder locations are passed to the docker image through the following environment variables.
1
2
3fc_source=~/freecad_source
fc_build=~/freecad_build
other_files=~/
- Launch the docker image
- NOTE ** you will be presented with a bash terminal logged in to the docker image
1
2
3
4
5
6sudo docker run -it --rm \
-v $fc_source:/mnt/source \
-v $fc_build:/mnt/build \
-v $other_files:/mnt/files \
-e "DISPLAY" -e "QT_X11_NO_MITSHM=1" -v /tmp/.X11-unix:/tmp/.X11-unix:ro \
registry.gitlab.com/daviddaish/freecad_docker_env:latest
- NOTE ** you will be presented with a bash terminal logged in to the docker image
- Build FreeCAD
- NOTE** this command is run in the docker image bash terminal
1
/root/build_script.sh
- NOTE** this command is run in the docker image bash terminal
- Run freecad
- NOTE** this command is run in the docker image bash terminal
- you have access to your local file system through these docker image folders
/mnt/source
/mnt/build
/mnt/files (store the files you create in Freecad somehwere in here…) - Run it
1
/mnt/build/bin/FreeCAD
Method 3
Linkstage 3/Assembly 3 - realthunders fork for bleeding edge Freecad with lotsa fixes…
Step 1
Download current release of Realthunder fork…
For example, assuming URL of the latest release is:
https://github.com/realthunder/FreeCAD_assembly3/releases/download/0.11/FreeCAD-asm3-Daily-Conda-Py3-Qt5-20210307-glibc2.12-x86_64.AppImage
then use your favourite download technique to get it…
1 | wget https://github.com/realthunder/FreeCAD_assembly3/releases/download/0.11/FreeCAD-asm3-Daily-Conda-Py3-Qt5-20210307-glibc2.12-x86_64.AppImage |
Step 2
make it executable
1 | chmod +x FreeCAD_assembly3-current-glibc2.12-x86_64.AppImage |
Step 3
execute it
1 | ./FreeCAD_assembly3-current-glibc2.12-x86_64.AppImage |
Step 4
Create a desktop entry
NOTE**
Instructions to create a gnome desktop entry in Arch Linux…
Assume home folder == /home/fcarella
First download a Freecad ICON (from here for example) to
/home/fcarella/.local/share/freecad/
Then create a desktop entry (make sure the paths are correct)
Create the file~/.local/share/applications/FreeCAD_assembly3-current.desktop
1
2
3
4
5
6
7
8
9
10
11
12
13cat > /home/fcarella/.local/share/applications/FreeCAD_assembly3-current.desktop << EOF
[Desktop Entry]
Type=Application
Name=FreeCAD.19_assembly3-current
Comment=3d cad
Exec=/home/fcarella/Downloads/FreeCAD_assembly3-current-glibc2.12-x86_64.AppImage %f
Icon=/home/fcarella/.local/share/freecad/freecad-icon.png
Terminal=false
StartupNotify=true
Categories=Engineering;Graphics;3DGraphics;
StartupWMClass=Freecad
X-Desktop-File-Install-Version=0.26
EOFThe desktop entry should now appear in your gnome menus
back to Series…