Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8008075
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T18:01:48+00:00 2026-06-04T18:01:48+00:00

I would like to know how to install TBB from source and make it

  • 0

I would like to know how to install TBB from source and make it work on a Linux system. I have had some problems when it comes using it, problems that don’t appear if I install TBB via the package manager.

In the TBB webpage, there are some guidelines on how about to do this, like setting the LD_LIBRARY_PATH and CPATH variables, or sourcing the tbbvars.sh file. Even if I do that, when I try to compile an example g++ says that tbb is not found.

So my question is, is there an easy way to setup everything (compile the source code, what variables should I set…) in order to use TBB?

Thanks.

NOTE: The library version number when this question was asked was 2 (if I recall correctly). I have personally tested the solution up to version 4.1, but I think it should work too for current version 4.2 (update 3) since the building method remains the same.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T18:01:49+00:00Added an answer on June 4, 2026 at 6:01 pm

    I have come with the solution. I’ll post it here so it will help others with this topic.

    1. Download the latest stable source code and uncompress it, i.e in ~/tbbsrc

    2. Inside, type make. It should start compiling the tbb library and the memory allocators.

    3. The headers are in ~/tbbsrc/include

    4. Inside ~/tbbsrc/build will be two new folders, one for the release version and the other for the debug version. Those folders are named like architecture_ldVersion_g++Version_kernelVersion.

    5. I recommend setting some variables, for example in your ~/.bashrc file, like:

    TBB_INSTALL_DIR = $HOME/tbbsrc
    TBB_INCLUDE = $TBB_INSTALL_DIR/include
    TBB_LIBRARY_RELEASE = $TBB_INSTALL_DIR/build/RELEASE_FOLDER
    TBB_LIBRARY_DEBUG = $TBB_INSTALL_DIR/build/DEBUG_FOLDER
    
    1. Let’s try a simple example:
    // main.cpp
    #include "tbb/task_scheduler_init.h"
    
    int main(int argc, char* argv[]) {
        // tbb::task_scheduler_init init(tbb::task_scheduler_init::automatic);
        // implicit tbb::task_sheduler_init::automatic
        tbb::task_scheduler_init init;
        return 0;
    }
    
    1. To compile, for example, with the release version:
    g++ main.cpp -I$TBB_INCLUDE -Wl,-rpath,$TBB_LIBRARY_RELEASE -L$TBB_LIBRARY_RELEASE -ltbb
    

    Note: with -Wl,-rpath,$TBB_LIBRARY_RELEASE, we are telling the dynamic linker where to find libtbb.so

    1. And that should work fine!

    Best regards!

    Installation for Apple clang 5.1: [thanks to rwols for the info]

    Instead of typing make, type make compiler=clang or make compiler=clang stdlib=libc++

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to know how I can have VoIP on a godaddy Linux
I would like to know if I can install IIS 7.5 on Windows Server
i would like know some reference. I know i can googling it. but prefer
I am new to Erlang and would like to to know how to install
Would like to know what does Drupal 7 and Acquia have in common? I
I would like to know if there is any Linux distribution where you can
I have two questions regarding python libraries: I would like to know if there
I've been using unix for some time, and I would like to know if
I would like to know the difference? I can run both and they install
I'm completey new to Solaris, coming from a Linux background. I would like to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.