This how-to assumes that you are somewhat experienced in FreeBSD and have installed python 3.6. Linux_base-c7 is installed with linux_enable="YES" in rc.conf. You should have a backup of your system and be able to restore it to a working configuration if anything goes wrong. Because this method utilizes some source not available via pkg manager or ports, it may not be entirely supported by FreeBSD forums. This is running on FreeBSD 12.1-RELEASE-p1, MATE Desktop, nvidia-driver-390.87_3 on AMD 3900X.
1. Prep: Install all the packages needed by gns3-gui, gns3-server and ubridge. Note: The py36-qt5-websockets port doesn't exists that I know of, so we will compile it from source in step 2.
2. Compile and install PyQt5.QtWebSockets. Download the matched version of PyQt5 from https://www.riverbankcomputing.com/software/pyqt/download5 . Example: if pkg installed FreeBSD package qt5-core-5.12.2, download PyQt5_gpl-5.12.2.tar.gz. I keep non-native sources in ~/src.
Configure, passing the sip binary location.
Install as root
3. Compile and install ubridge, which is needed to connect switch, router, etc. images.
Git ubridge from https://github.com/GNS3/ubridge and cd into the cloned directory:
Gmake and gmake install as root:
4. At last, we can install gns3 using pip. I installed locally with the --user flag, as advised by the pip installation's warning.
1. Prep: Install all the packages needed by gns3-gui, gns3-server and ubridge. Note: The py36-qt5-websockets port doesn't exists that I know of, so we will compile it from source in step 2.
- py36-pip-19.1.1 : Tool for installing and managing Python packages
- py36-qt5-core-5.12.2 : Python bindings for the Qt5 toolkit, QtCore module
- py36-qt5-gui-5.12.2 : Python bindings for the Qt5 toolkit, QtGui module
- py36-qt5-network-5.12.2 : Python bindings for the Qt5 toolkit, QtNetwork module
- py36-qt5-opengl-5.12.2 : Python bindings for the Qt5 toolkit, QtOpenGL module
- py36-qt5-svg-5.12.2 : Python bindings for the Qt5 toolkit, QtSvg module
- py36-qt5-widgets-5.12.2 : Python bindings for the Qt5 toolkit, QtWidgets module
- py36-sip-4.19.17 : Python to C and C++ bindings generator
- gmake : GNU version of 'make' utility
- libpcap : Ubiquitous network traffic capture library
pkg install py36-pip-19.1.1 py36-qt5-core py36-qt5-gui py36-qt5-network py36-qt5-widgets py36-qt5-svg
...etc2. Compile and install PyQt5.QtWebSockets. Download the matched version of PyQt5 from https://www.riverbankcomputing.com/software/pyqt/download5 . Example: if pkg installed FreeBSD package qt5-core-5.12.2, download PyQt5_gpl-5.12.2.tar.gz. I keep non-native sources in ~/src.
user@localnet:~/src % tar xvf PyQt5_gpl-5.12.2.tar.gz
user@localnet:~/src % cd PyQt5_gpl-5.12.2
Configure, passing the sip binary location.
user@localnet: ~/src/PyQt5_gpl-5.12.2% python3.6 ./configure.py -e QtWebSockets --sip=/usr/local/bin/sip
Copy the sip header into the include directory: use@localnet:~/src/PyQt5_gpl-5.12.2 % cp /usr/local/include/python3.6/sip.h include/
We only want to install the QtWebSockets module since pkg already installed py36-qt5-core and the other modules we needed, cd into the QtWebSockets dir and run make. user@localnet:~/src/PyQt5_gpl-5.12.2 % cd QtWebSockets
user@localnet:~/src/PyQt5_gpl-5.12.2/QtWebSockets % make
Install as root
root@localnet: ~/# src/PyQt5_gpl-5.12.2/QtWebSockets # make install
If all goes well, you should see the websockets module in /usr/local/lib/python3.6/site-packages/PyQt5 as QtWebSockets.so3. Compile and install ubridge, which is needed to connect switch, router, etc. images.
Git ubridge from https://github.com/GNS3/ubridge and cd into the cloned directory:
user@localnet: ~/src% git clone https://github.com/GNS3/ubridge
user@localnet: ~/src% cd ubridge
Gmake and gmake install as root:
user@localnet:~/src/git/ubridge % gmake
user@localnet:~/src/git/ubridge % gmake install
4. At last, we can install gns3 using pip. I installed locally with the --user flag, as advised by the pip installation's warning.
pip install --user gns3-gui gns3-server
This will install gns3 binaries in ~/.local/bin
Cheers!