Compilation Error on Linux - No suitable libboost variant


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, which compiles with Qt5.

Here are the full results of cmake .

-- 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:


  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:

  * (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:

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 focal main
           Active apt repos in: /etc/apt/sources.list.d/google-chrome.list 
           1: deb [arch=amd64] stable main
           Active apt repos in: /etc/apt/sources.list.d/home:bgstack15:Chicago95.list 
           1: deb /
           Active apt repos in: /etc/apt/sources.list.d/official-package-repositories.list 
           1: deb ulyssa main upstream import backport
           2: deb focal main restricted universe multiverse
           3: deb focal-updates main restricted universe multiverse
           4: deb focal-backports main restricted universe multiverse
           5: deb focal-security main restricted universe multiverse
           6: deb 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!

Hi Collisteru,

It looks like you’re using Python 3.9 but libboost is linked to Python 3.8 (both versions must match): (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:

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:

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.