Intel® oneAPI Threading Building Blocks
Ask questions and share information about adding parallelism to your applications when using this threading library.
Announcements
This community is designed for sharing of public information. Please do not share Intel or third-party confidential information here.

Building tbb U6 with gcc 4.9.2

Petros_M_
Beginner
272 Views

Hi,

I have been trying ti build the tbb from source code using gcc 4.9.2.

a) if you could point me to a location where I could find it already built, would be ideal.

b) if not, can you please point to a location with instructions for how to build?

Right now all I am doing is typing gmake and hacking the "make" files (.inc) to add manually a couple of flags for the gcc locale (namely -D__USE_XOPEN2K8 and -std=c++11) but these do not properly propagate, as this shows:

gmake[1]: Entering directory `/.../_dev/tbb_dev/tbb-2017_U6/build/linux_intel64_gcc_cc4.9.2_libc2.12_kernel2.6.32_debug'
g++ -c -MMD -DTBB_USE_DEBUG -DDO_ITT_NOTIFY -g -O0 -DUSE_PTHREAD -m64 -mrtm    -fno-rtti -fno-exceptions -D__TBBMALLOC_BUILD=1  -Wno-parentheses -Wno-non-virtual-dtor -fPIC  -I../../src -I../../src/rml/include -I../../include -I../../src/tbbmalloc -I../../src/tbbmalloc ../../src/tbbmalloc/backend.cpp
In file included from ../../src/tbbmalloc/backend.cpp:21:0:
/usr/include/string.h:548:5: error: '__locale_t' has not been declared
     __locale_t __loc)

 

Can you please help?

TIA,

Petros

 

 

0 Kudos
6 Replies
Vladimir_P_Intel2
272 Views

Hello Petros,

It looks you use very old glibc headers for the 4.9 compiler. system gcc looks to be version 4.4 (CentOS 6?). for GCC 4.9 it is needed glibc 2.19 at least but I see that glibc 2.12 is used in your case.

--Vladimir

Petros_M_
Beginner
272 Views

Hi Vladimir,

Thank you for your response, really appreciate it.

Any directions for how to build tbb? Just gmake+enter?

Vladimir_P_Intel2
272 Views

this should be the right aproach to make it built:)

did you try to build a simple application which uses string.h file by gcc 4.9.2?

--Vladimir

Petros_M_
Beginner
272 Views

Yes I have built a lot of code in this configuration.

All I had to do is define this strange -D__USE_XOPEN2K8 which I "fished" from the web 3 years ago.

Actually tbb built once (by defining this in CXXFLAGS prior to calling gmake) but I was looking for some gmake command that would  install it like the official distribution does to some directory of my choice. (If I add the flag in the Makefile it does not propagate everywhere properly - very likely my bad, as I am only trying things semi-blindly).

Any ideas?

TIA,

Petros

Petros_M_
Beginner
272 Views

I managed to build everything except tbb_preview.

Is there some flag/env.variable that I need to set to build this target as well?

Also who the "packaging" as in tbb2017_2017041oss/lib/intel64/gcc4.7 (and the bin and include) are done from the invocation of gmake? 

TIA,

Petros


PS: I defined externally ( export CXXFLAGS="-D__USE_XOPEN2K8" ).

Alexey_K_Intel3
Employee
272 Views

Hi Petros,

in order to build preview binaries, you need to specify tbb_cpf=1 in the make command line. Make sure to do a clean build, e.g either do "make clean" in advance or add -B to the make command line. Otherwise, existing object files built without preview functionality might be used.

Also note that most of the current preview features of the library affect only the headers and so do not require preview binaries.

Reply