New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to properly install and configure the latest stable release of TBB in Ubuntu 16.04 Server Edition with gcc version 8.1.0 ? #67

Closed
marcoippolito opened this Issue Jul 11, 2018 · 5 comments

Comments

Projects
None yet
5 participants
@marcoippolito

marcoippolito commented Jul 11, 2018

Hi,
I would like to properly install and configure the latest stable release of TBB in my Ubuntu 16.04 Server Edition with gcc version 8.1.0 (Ubuntu 8.1.0-5ubuntu1~16.04)
I downloaded the latest stable release of TBB for linux : https://github.com/01org/tbb/releases/download/2018_U5/tbb2018_20180618oss_lin.tgz and then, following the instructions given in this video tutorial:
https://www.youtube.com/watch?v=4nrDZjyIOXE I modified in this file /home/marco/tbb2018_20180618oss/bin/tbbvars.sh this line:

`#TBBROOT=SUBSTITUTE_INSTALL_DIR_HERE`

into

`TBBROOT=/home/marco/tbb2018_20180618oss`

And then, following the same video tutorial I executed:

`marco@PC:~/tbb2018_20180618oss/bin$ . ./tbbvars.sh intel64
marco@PC:~/tbb2018_20180618oss/bin$
`

Within the main directory tbb2018_20180618oss I created a test dir and filled it with a simple test.cpp file:

`marco@PC:~/tbb2018_20180618oss/test$ nano test.cpp
`

Where test.cpp is :

`#include <tbb/tbb.h>
#include <tbb/parallel_for.h>

int main() {


  return 0;
}
`

Compiling I got a list of warnings which are not really understandable, since I didn't put anything actually in test.cpp :

`marco@PC:~/tbb2018_20180618oss/test$ g++ -std=c++17 test.cpp -ltbb -otest
In file included from /home/marco/tbb2018_20180618oss/include/tbb/tbb.h:77,
                 from test.cpp:1:
/home/marco/tbb2018_20180618oss/include/tbb/task_group.h: In destructor  
‘tbb::internal::task_group_base::~task_group_base()’:
/home/marco/tbb2018_20180618oss/include/tbb/task_group.h:131:53: warning: ‘bool  
std::uncaught_exception()’ is deprecated [-Wdeprecated-declarations]
             bool stack_unwinding_in_progress = std::uncaught_exception();
                                                     ^~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/8/new:40,
                 from /usr/include/c++/8/ext/new_allocator.h:33,
                 from /usr/include/x86_64-linux-gnu/c++/8/bits/c++allocator.h:33,
                 from /usr/include/c++/8/bits/allocator.h:46,
                 from /usr/include/c++/8/memory:63,
                 from /home/marco/tbb2018_20180618oss/include/tbb/tbb_stddef.h:427,
                 from /home/marco/tbb2018_20180618oss/include/tbb/aligned_space.h:24,
                 from /home/marco/tbb2018_20180618oss/include/tbb/tbb.h:35,
                 from test.cpp:1:
/usr/include/c++/8/exception:102:8: note: declared here
   bool uncaught_exception() _GLIBCXX_USE_NOEXCEPT __attribute__ ((__pure__));
        ^~~~~~~~~~~~~~~~~~
In file included from /home/marco/tbb2018_20180618oss/include/tbb/tbb.h:77,
                 from test.cpp:1:
/home/marco/tbb2018_20180618oss/include/tbb/task_group.h:131:72: warning: ‘bool   
std::uncaught_exception()’ is deprecated [-Wdeprecated-declarations]
             bool stack_unwinding_in_progress = std::uncaught_exception();
                                                                        ^
In file included from /usr/include/c++/8/new:40,
                 from /usr/include/c++/8/ext/new_allocator.h:33,
                 from /usr/include/x86_64-linux-gnu/c++/8/bits/c++allocator.h:33,
                 from /usr/include/c++/8/bits/allocator.h:46,
                 from /usr/include/c++/8/memory:63,
                 from /home/marco/tbb2018_20180618oss/include/tbb/tbb_stddef.h:427,
                 from /home/marco/tbb2018_20180618oss/include/tbb/aligned_space.h:24,
                 from /home/marco/tbb2018_20180618oss/include/tbb/tbb.h:35,
                 from test.cpp:1:
/usr/include/c++/8/exception:102:8: note: declared here
   bool uncaught_exception() _GLIBCXX_USE_NOEXCEPT __attribute__ ((__pure__));
        ^~~~~~~~~~~~~~~~~~
In file included from /home/marco/tbb2018_20180618oss/include/tbb/tbb.h:77,
                 from test.cpp:1:
/home/marco/tbb2018_20180618oss/include/tbb/task_group.h:131:72: warning: ‘bool    
std::uncaught_exception()’ is deprecated [-Wdeprecated-declarations]
             bool stack_unwinding_in_progress = std::uncaught_exception();
                                                                        ^
In file included from /usr/include/c++/8/new:40,
                 from /usr/include/c++/8/ext/new_allocator.h:33,
                 from /usr/include/x86_64-linux-gnu/c++/8/bits/c++allocator.h:33,
                 from /usr/include/c++/8/bits/allocator.h:46,
                 from /usr/include/c++/8/memory:63,
                 from /home/marco/tbb2018_20180618oss/include/tbb/tbb_stddef.h:427,
                 from /home/marco/tbb2018_20180618oss/include/tbb/aligned_space.h:24,
                 from /home/marco/tbb2018_20180618oss/include/tbb/tbb.h:35,
                 from test.cpp:1:
/usr/include/c++/8/exception:102:8: note: declared here
   bool uncaught_exception() _GLIBCXX_USE_NOEXCEPT __attribute__ ((__pure__));
        ^~~~~~~~~~~~~~~~~~
marco@PC:~/tbb2018_20180618oss/test$
`

What am I missing? How to solve the problem?
Looking forward to your kind help.
Marco

@alexey-katranov

This comment has been minimized.

alexey-katranov commented Jul 12, 2018

The warnings can be safely ignored. Currently, TBB uses some deprecated stuff in C++17. We will try to fix warnings in future releases.

@hjmjohnson

This comment has been minimized.

hjmjohnson commented Nov 10, 2018

I'm getting an error on macos 10.14 with TBB as well:

tbb-2019_U1/include/tbb/task_group.h:132:53: error: 'uncaught_exceptions' is unavailable: introduced in macOS 10.12
bool stack_unwinding_in_progress = std::uncaught_exceptions() > 0;
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/exception:130:63: note: 'uncaught_exceptions' has been explicitly marked unavailable here
_LIBCPP_FUNC_VIS _LIBCPP_AVAILABILITY_UNCAUGHT_EXCEPTIONS int uncaught_exceptions() _NOEXCEPT;
^

For this is caused by the fact that TBB is not considering the MACOSX_DEPLOYMENT_TARGET being used.

@hjmjohnson

This comment has been minimized.

hjmjohnson commented Nov 10, 2018

FYI: I changed tbb_config.h to the following:

#define __TBB_CPP17_UNCAUGHT_EXCEPTIONS_PRESENT (_MSC_VER >= 1900 || GLIBCXX && __cpp_lib_uncaught_exceptions || _LIBCPP_VERSION >= 3700)
&& ( !defined(MAC_OS_X_VERSION_MIN_REQUIRED) || MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12 )

--- NOTE: I'm a bit concerned about binary incompatibilities that and the interplay of MAC_OS_X_VERSION_MIN_REQUIRED between the built version of TBB and my tools.

See /usr/include/AvailabilityMacros.h

@akukanov

This comment has been minimized.

akukanov commented Nov 21, 2018

@hjmjohnson, the issue for macOS is fixed in TBB 2019 Update 2.

As of now, TBB binaries are built with -mmacosx-version-min=10.11

@hjmjohnson

This comment has been minimized.

hjmjohnson commented Nov 21, 2018

Thanks!

@tbbdev tbbdev closed this Nov 23, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment