11

I'm trying to get C++17 parallel execution policies to work on Ubuntu 18.04. I have gcc 9, which supports them, and I got tbb installed via

$ sudo apt install libtbb-dev

But now I get the complaint:

/usr/include/c++/9/pstl/parallel_backend_tbb.h:28:2: error: #error Intel(R) Threading Building Blocks 2018 is required; older versions are not supported.
   28 | #error Intel(R) Threading Building Blocks 2018 is required; older versions are not supported.
      |  ^~~~~
compilation terminated due to -Wfatal-errors.

Is it possible to get TBB 2018 or newer via apt?

user14717
  • 265

3 Answers3

12

To upgrade to the latest version, please do the following:

  1. Add the Ubuntu repository that contains the latest version 2019~U8-1, run the following command in terminal:

    echo "deb http://cz.archive.ubuntu.com/ubuntu eoan main universe" | sudo tee -a /etc/apt/sources.list

  2. Update the repositories, run the following command in terminal:

    sudo apt update

  3. Upgrade to the latest version, run the following command in terminal:

    sudo apt install libtbb-dev

After this you should have the latest libtbb-dev installed.


CAUTION:

One of the most common problems we help untangle is folks who have mixed sources from different releases of Ubuntu and broke their system, so we usually don't recommend it. Folks who want newer software should use a newer release of Ubuntu instead. It is strongly advised to just upgrade the needed package and remove the repository added above, once you have successfully upgraded the needed package. This can be done by editing the /etc/apt/sources.list file and commenting out or removing that line deb http://cz.archive.ubuntu.com/ubuntu eoan main universe and running sudo apt update afterwards.


NOTICE:

To know which official Ubuntu repository contains the latest version of a certain package, you can search for it at Ubuntu packages.

Raffa
  • 32,237
  • This solution does not work any more. – AnirudhJ May 30 '21 at 14:59
  • so it seems eoan is essentially ubtunu 19.10 which has reached EOL (end of life). So this solution does not work anymore. However, a hack which can be used is to replace cz.archive to old-releases. I was able to install tbb-dev 2019 with it. – AnirudhJ May 30 '21 at 17:05
1

I used (as a workaround) the official releases from Intel's github page.

user14717
  • 265
  • I tried it: tbb/index.html file suggests using Makefile to install it, but there is no such file :( – Slaus Feb 21 '20 at 15:21
-1

If your apt update tbb failed, you can update manually. Download it from here.

NotTheDr01ds
  • 17,888