# Compilation Error on Linux - No suitable libboost variant

**URL:** <https://discourse.gplates.org/t/compilation-error-on-linux-no-suitable-libboost-variant/332>\
**Category:** Q&A\
**Created:** [26 June 2021 20:36 UTC](https://discourse.gplates.org/t/compilation-error-on-linux-no-suitable-libboost-variant/332 "2021-06-26T20:36:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Collisteru](https://discourse.gplates.org/letter_avatar_proxy/v4/letter/c/50afbb/32.png) [@Collisteru](https://discourse.gplates.org/u/Collisteru)\
**Post date:** [26 June 2021 20:36 UTC](https://discourse.gplates.org/t/compilation-error-on-linux-no-suitable-libboost-variant/332/1 "2021-06-26T20:36:46Z")

</div>

Hello!

I tried to cmake gplates after installing all the dependencies as instructed in the README file, and I got a strange error.

I am using the sourcecode from [here](https://discourse.gplates.org/t/compiling-gplates-from-the-souce-code-on-ubuntu-20-04/235), which compiles with Qt5.

Here are the full results of `cmake .`

```auto
-- Using header-only CGAL
-- Targetting Unix Makefiles
-- Using /usr/bin/c++ compiler.
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake (found suitable version "1.71.0", minimum required is "1.48")  
-- Boost include dirs: /usr/include
-- Boost libraries:    
-- Using gcc version 4 or later. Adding -frounding-math
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake (found suitable version "1.71.0", minimum required is "1.35")  
CMake Error at /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake:117 (find_package):
  Found package configuration file:

    /usr/lib/x86_64-linux-gnu/cmake/boost_python-1.71.0/boost_python-config.cmake

  but it set boost_python_FOUND to FALSE so package "boost_python" is
  considered to be NOT FOUND. Reason given by package:

  No suitable build variant has been found.

  The following variants have been tried and rejected:

  * libboost_python38.so.1.71.0 (3.8, Boost_PYTHON_VERSION=3.9)

  * libboost_python38.a (3.8, Boost_PYTHON_VERSION=3.9)

Call Stack (most recent call first):
  /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake:182 (boost_find_component)
  /usr/share/cmake-3.16/Modules/FindBoost.cmake:443 (find_package)
  src/CMakeLists.txt:114 (find_package)

-- Configuring incomplete, errors occurred!
See also "/home/sean/Downloads/DownloadedPrograms/gplates_src_r19678/CMakeFiles/CMakeOutput.log".
See also "/home/sean/Downloads/DownloadedPrograms/gplates_src_r19678/CMakeFiles/CMakeError.log"

```

I am using Linux Mint 20.1 Ulyssa. System information:

```auto
inxi -Fxxxrz
System: Kernel: 5.8.0-59-generic x86_64 bits: 64 compiler: N/A Desktop: Xfce 4.14.2 
           tk: Gtk 3.24.13 info: xfce4-panel wm: xfwm4 dm: LightDM 1.30.0 
           Distro: Linux Mint 20.1 Ulyssa base: Ubuntu 20.04 focal 
Machine: Type: Convertible System: Dell product: Inspiron 5406 2n1 v: N/A serial: <filter> 
           Chassis: type: 31 serial: <filter> 
           Mobo: Dell model: 0VMRNH v: A00 serial: <filter> UEFI: Dell v: 1.4.1 date: 03/30/2021 
Battery: ID-1: BAT0 charge: 37.5 Wh condition: 37.5/39.8 Wh (94%) volts: 12.6/11.2 
           model: BYD DELL CF5RH0A type: Unknown serial: <filter> status: Full 
           Device-1: hid-0018:04F3:2A81.0001-battery model: CUST0000:00 04F3:2A81 serial: N/A 
           charge: N/A status: N/A 
CPU: Topology: Quad Core model: 11th Gen Intel Core i7-1165G7 bits: 64 type: MCP 
           arch: Tiger Lake rev: 1 L2 cache: 12.0 MiB 
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 13516 
           Speed: 1508 MHz min/max: 400/1700 MHz Core speeds (MHz): 1: 1508 2: 1516 3: 1540 4: 1454 
Graphics: Device-1: Intel vendor: Dell driver: i915 v: kernel bus ID: 00:02.0 chip ID: 8086:9a49 
           Display: x11 server: X.Org 1.20.9 driver: modesetting unloaded: fbdev,vesa 
           compositor: compton v: 0.1~beta2+20150922 resolution: 1920x1080~60Hz 
           OpenGL: renderer: Mesa Intel Xe Graphics (TGL GT2) v: 4.6 Mesa 20.2.6 direct render: Yes 
Audio: Device-1: Intel vendor: Dell driver: sof-audio-pci bus ID: 00:1f.3 chip ID: 8086:a0c8 
           Sound Server: ALSA v: k5.8.0-59-generic 
Network: Device-1: Intel driver: iwlwifi v: kernel port: 3000 bus ID: 00:14.3 chip ID: 8086:a0f0 
           IF: wlp0s20f3 state: up mac: <filter> 
           IF-ID-1: virbr0 state: up speed: 10 Mbps duplex: unknown mac: <filter> 
           IF-ID-2: virbr0-nic state: down mac: <filter> 
           IF-ID-3: vnet0 state: unknown speed: 10 Mbps duplex: full mac: <filter> 
Drives: Local Storage: total: 953.87 GiB used: 147.55 GiB (15.5%) 
           ID-1: /dev/nvme0n1 vendor: Samsung model: PM981a NVMe 1024GB size: 953.87 GiB 
           speed: 31.6 Gb/s lanes: 4 serial: <filter> rev: 15304129 scheme: GPT 
Partition: ID-1: / size: 329.73 GiB used: 147.46 GiB (44.7%) fs: ext4 dev: /dev/nvme0n1p7 
Sensors: System Temperatures: cpu: 48.0 C mobo: N/A 
           Fan Speeds (RPM): cpu: 0 
Repos: No active apt repos in: /etc/apt/sources.list 
           Active apt repos in: /etc/apt/sources.list.d/christian-boxdoerfer-fsearch-daily-focal.list 
           1: deb http://ppa.launchpad.net/christian-boxdoerfer/fsearch-daily/ubuntu focal main
           Active apt repos in: /etc/apt/sources.list.d/google-chrome.list 
           1: deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main
           Active apt repos in: /etc/apt/sources.list.d/home:bgstack15:Chicago95.list 
           1: deb http://download.opensuse.org/repositories/home:/bgstack15:/Chicago95/xUbuntu_20.04/ /
           Active apt repos in: /etc/apt/sources.list.d/official-package-repositories.list 
           1: deb http://mintmirror.math.washington.edu/linuxmint-repo ulyssa main upstream import backport
           2: deb http://mirror.team-cymru.org/ubuntu focal main restricted universe multiverse
           3: deb http://mirror.team-cymru.org/ubuntu focal-updates main restricted universe multiverse
           4: deb http://mirror.team-cymru.org/ubuntu focal-backports main restricted universe multiverse
           5: deb http://security.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
           6: deb http://archive.canonical.com/ubuntu/ focal partner
Info: Processes: 226 Uptime: 3h 03m Memory: 15.37 GiB used: 7.06 GiB (45.9%) Init: systemd 
           v: 245 runlevel: 5 Compilers: gcc: 9.3.0 alt: 9 Shell: bash v: 5.0.17 
           running in: xfce4-terminal inxi: 3.0.38 

```

This is likely a version problem with libboost but I’m unsure what exactly the problem is and how to fix it. Any help would be greatly appreciated.

Thank you!

---

<div class="post-metadata">

**Author:** ![john.cannon](https://discourse.gplates.org/letter_avatar_proxy/v4/letter/j/3e96dc/32.png) [@john.cannon](https://discourse.gplates.org/u/john.cannon)\
**Post date:** [28 June 2021 04:06 UTC](https://discourse.gplates.org/t/compilation-error-on-linux-no-suitable-libboost-variant/332/2 "2021-06-28T04:06:56Z")

</div>

Hi Collisteru,

It looks like you’re using Python 3.9 but libboost is linked to Python 3.8 (both versions must match):

```auto
libboost_python38.so.1.71.0 (3.8, Boost_PYTHON_VERSION=3.9)

```

Maybe you installed a non-default Python version (3.9) ? As in, not the default Python usually installed by your system’s package manager (which I assume is 3.8).

What’s happening is GPlates is finding Python 3.9 and sees that it’s version 3.9 so it then looks for libboost\_python version 3.9 (but instead finds 3.8).

For reference, in this type of situation it is possible to get GPlates to find Python 3.8 with something like:

```auto
cmake -D Python3_ROOT:PATH=/path/to/python3.8 .

```

…or get GPlates to find Python 3.9 (which it’s already doing) and find a version of Boost that is linked to Python 3.9 with something like:

```auto
cmake -D Boost_ROOT:PATH=/path/to/libboost-linked-to-python3.9 .

```

…but it’s probably better in this case to find out why the default version (3.8) is not getting used.

Regards,  
John
