Does TBB support Alpha ISA

Does TBB support Alpha ISA

I try to cross-compile TBB
version of blackscholes (PARSEC benchmark)for Alpha ISA, butthere is an
error:

root@gem5-desktop:/home/parsec-2.1#parsecmgmt-abuild-calpha-gcc-tbb-pblackscholes
[PARSEC]Packagestobuild:blackscholes

[PARSEC][==========Buildingpackageblackscholes==========]
[PARSEC][----------Analyzingpackageblackscholes----------]
[PARSEC]blackscholesdependson:tbblib
[PARSEC][----------Analyzingpackagetbblib----------]
[PARSEC]Packagetbblibalreadyexists,proceeding.
[PARSEC][----------Buildingpackageblackscholes----------]
[PARSEC]Removingoldbuilddirectory.
[PARSEC]Copyingsourcecodeofpackageblackscholes.
[PARSEC]Running'envversion=tbb/usr/bin/make':
rm-fblackscholes
/home/alphaev67-unknown-linux-gnu/bin/alphaev67-unknown-linux-gnu-g++-O3-funroll-loops-fprefetch-loop-arrays-fpermissive-fno-exceptions-static-libgcc-Wl,--hash-style=both,--as-needed-DPARSEC_VERSION=2.1-I/home/parsec-2.1/pkgs/libs/tbblib/inst/amd64-linux.alpha-gcc-tbb/include-DTBB_VERSION-DN=960-DNCO=4blackscholes.tbb.cpp-L/usr/lib64-L/usr/lib-L/home/parsec-2.1/pkgs/libs/tbblib/inst/amd64-linux.alpha-gcc-tbb/lib-ltbb-ldl-lrt-lpthread-oblackscholes
Infileincludedfrom/home/parsec-2.1/pkgs/libs/tbblib/inst/amd64-linux.alpha-gcc-tbb/include/tbb/aligned_space.h:33,
from/home/parsec-2.1/pkgs/libs/tbblib/inst/amd64-linux.alpha-gcc-tbb/include/tbb/parallel_reduce.h:33,
fromblackscholes.tbb.cpp:15:
/home/parsec-2.1/pkgs/libs/tbblib/inst/amd64-linux.alpha-gcc-tbb/include/tbb/tbb_machine.h:91:2:error:#errorMinimalrequirementsfortbb_machine.hnotsatisfied
Infileincludedfrom/home/parsec-2.1/pkgs/libs/tbblib/inst/amd64-linux.alpha-gcc-tbb/include/tbb/aligned_space.h:33,
from/home/parsec-2.1/pkgs/libs/tbblib/inst/amd64-linux.alpha-gcc-tbb/include/tbb/parallel_reduce.h:33,
fromblackscholes.tbb.cpp:15:
/home/parsec-2.1/pkgs/libs/tbblib/inst/amd64-linux.alpha-gcc-tbb/include/tbb/tbb_machine.h:Infunction'void__TBB_Pause(int32_t)':
/home/parsec-2.1/pkgs/libs/tbblib/inst/amd64-linux.alpha-gcc-tbb/include/tbb/tbb_machine.h:119:error:'__TBB_Yield'wasnotdeclaredinthisscope
/home/parsec-2.1/pkgs/libs/tbblib/inst/amd64-linux.alpha-gcc-tbb/include/tbb/tbb_machine.h:Inmemberfunction'voidtbb::internal::AtomicBackoff::pause()':
/home/parsec-2.1/pkgs/libs/tbblib/inst/amd64-linux.alpha-gcc-tbb/include/tbb/tbb_machine.h:145:error:'__TBB_Yield'wasnotdeclaredinthisscope
/home/parsec-2.1/pkgs/libs/tbblib/inst/amd64-linux.alpha-gcc-tbb/include/tbb/tbb_machine.h:Infunction'Ttbb::internal::__TBB_CompareAndSwapGeneric(volatilevoid*,T,T)[withlongunsignedintS=4ul,T=unsignedint]':
/home/parsec-2.1/pkgs/libs/tbblib/inst/amd64-linux.alpha-gcc-tbb/include/tbb/tbb_machine.h:215:error:'__TBB_CompareAndSwap4'wasnotdeclaredinthisscope
/home/parsec-2.1/pkgs/libs/tbblib/inst/amd64-linux.alpha-gcc-tbb/include/tbb/tbb_machine.h:Infunction'Ttbb::internal::__TBB_CompareAndSwapGeneric(volatilevoid*,T,T)[withlongunsignedintS=8ul,T=longunsignedint]':
/home/parsec-2.1/pkgs/libs/tbblib/inst/amd64-linux.alpha-gcc-tbb/include/tbb/tbb_machine.h:220:error:'__TBB_CompareAndSwap8'wasnotdeclaredinthisscope
/home/parsec-2.1/pkgs/libs/tbblib/inst/amd64-linux.alpha-gcc-tbb/include/tbb/tbb_machine.h:Infunction'intptr_ttbb::internal::__TBB_MaskedCompareAndSwap(volatileint32_t*,T,T)[withlongunsignedintS=1ul,T=unsignedchar]':
/home/parsec-2.1/pkgs/libs/tbblib/inst/amd64-linux.alpha-gcc-tbb/include/tbb/tbb_machine.h:200:instantiatedfromhere
/home/parsec-2.1/pkgs/libs/tbblib/inst/amd64-linux.alpha-gcc-tbb/include/tbb/tbb_machine.h:182:error:'__TBB_CompareAndSwap4'wasnotdeclaredinthisscope
/home/parsec-2.1/pkgs/libs/tbblib/inst/amd64-linux.alpha-gcc-tbb/include/tbb/tbb_machine.h:Infunction'intptr_ttbb::internal::__TBB_MaskedCompareAndSwap(volatileint32_t*,T,T)[withlongunsignedintS=2ul,T=shortunsignedint]':
/home/parsec-2.1/pkgs/libs/tbblib/inst/amd64-linux.alpha-gcc-tbb/include/tbb/tbb_machine.h:209:instantiatedfromhere
/home/parsec-2.1/pkgs/libs/tbblib/inst/amd64-linux.alpha-gcc-tbb/include/tbb/tbb_machine.h:182:error:'__TBB_CompareAndSwap4'wasnotdeclaredinthisscope
/home/parsec-2.1/pkgs/libs/tbblib/inst/amd64-linux.alpha-gcc-tbb/include/tbb/tbb_machine.h:Infunction'Ttbb::internal::__TBB_CompareAndSwapGeneric(volatilevoid*,T,T)[withlongunsignedintS=8ul,T=longint]':
/home/parsec-2.1/pkgs/libs/tbblib/inst/amd64-linux.alpha-gcc-tbb/include/tbb/tbb_machine.h:525:instantiatedfromhere
/home/parsec-2.1/pkgs/libs/tbblib/inst/amd64-linux.alpha-gcc-tbb/include/tbb/tbb_machine.h:192:error:'__TBB_CompareAndSwapW'wasnotdeclaredinthisscope
make:***[blackscholes]Error1
[PARSEC]Error:'envversion=tbb/usr/bin/make'failed.
root@gem5-desktop:/home/parsec-2.1#

Does this mean
thatTBBdoesnotsupportalphaarchitecture?
Because
TBBrequiressomeatomicprimitiveswhichALPHAdoes
nothave,the"minialrequirements...notsatisfied"?
If I try
towritemyown__TBB_CompareAndSwap4()and
__TBB_CompareAndSwap8()forALPHAarchitecture,
andthendefiningthetwomacro""_TBB_CompareAndSwap4"and"_TBB_CompareAndSwap8",

will it
work?

43 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Do you mean Alpha as in DEC Alpha, the late architecture? I don't have high hopes for it to ever be supported, even though Intel apparently bought the intellectual property for it from Compaq in 2001 (according to Wikipedia), but trying to port TBB to it would at least be interesting, because it is the most wild and wacky architecture out there in terms of memory semantics, and probably the only one you could use to really verify correctness of a C++11 program by straightforward testing as opposed to advanced static analysis or simulated dynamic analysis (assuming that somebody has ported or will port a C++11 compiler to it?), since any other architecture I know of has implicit "consume" semantics... unless one would completely disregard "consume" as a non-issue and leave it at that, no longer using any Alpha machines still out there.

You may not have a recent enough g++ compiler to use built-in atomics (it's not clear what version of TBB you have or whether it supports any available built-in atomics yet, but it doesn't seem to be the most recent one), so you may have to provide definitions for those macros for best performance or if the compiler really doesn't have built-in atomics. Start with a more recent TBB version to try the built-in atomics. Then, if the compiler doesn't have them, you can't upgrade the compiler to a version that does, you feel up to the challenge and don't mind ultimate disappointment, follow the porting directions in build/index.html (even if they are not quite complete). (I might be tempted to join your efforts at some point, without promising anything.)

BTW, how does "amd64" get in there? And if you don't know because this just came in the Linux distribution on such a system, somebody must have missed similar problems building the library.

hello,The simplest instructions to port to new architecture you can find atbuild/index.html file.As Raf wrote above if there is gcc 4.5 and above with intrinsic atomics a port will be simpler.--Vladimir

I think that a root cause of all compilation errors is:

...
error: #error Minimal requirements for tbb_machine.h not satisfied In file included from
/home/parsec-2.1/pkgs/libs/tbblib/inst/amd64-linux.alpha-gcc-tbb/include/tbb/aligned_space.h:33
...

There is a statement in 'tbb_machine.h' header file that:

...
/** This header provides basic platform abstraction layer by hooking up appropriate
architecture/OS/compiler specific headers from the /include/tbb/machine directory.
If a plug-in header does not implement all the required APIs, it must specify
the missing ones by setting one or more of the following macros:

__TBB_USE_GENERIC_PART_WORD_CAS
__TBB_USE_GENERIC_PART_WORD_FETCH_ADD
__TBB_USE_GENERIC_PART_WORD_FETCH_STORE
__TBB_USE_GENERIC_FETCH_ADD
...

"I think that a root cause of all compilation errors is:"
Well, yes, but it seemed more helpful to go straight to sketching out an appropriate course of action.

BTW, those built-in atomics are only a stopgap measure (they're more expensive than they should be), so a native port may still be a good idea later on. But, as already implied, the Alpha is also likely to require an unpredictable amount of extra porting work beyond getting the atomics right.

chenxuhao,
As has been previously mentioned the shortest way you can take is possibly
to try Generic GCC* Atomics Support . For that you need :
- the minimal tbb version is : TBB 3.0 Update 7
- the gcc version is 4.3.6 (4.1.2 might also work, but probably require
some hacking)

during a build the port should be enabled automatically. For sure macro
TBB_USE_GCC_BUILTINS should be defined in the build command. E.g. like
this:

make compiler=gcc CXXFLAGS="-DTBB_USE_GCC_BUILTINS"

Once the tbb is built it is a good idea to run tbb unit tests, as the Alpha is greatly
differ in memory semantics from all other platform TBB is able working on.

Thank you for your reply.I tried to cross compile TBB 4.0, but there is stillerror that '__TBB_machine_load8' was not declared. My alpha gcc compiler version is 4.3.2, so it may be due to this. I will try it again using 4.3.6.root@gem5-desktop:/home/tbb40_233oss/src# make tbb_release arch=alphaCreated ../build/linux_alpha_gcc_cc4.4.3_libc2.11.1_kernel2.6.32_release directorymake -C "../build/linux_alpha_gcc_cc4.4.3_libc2.11.1_kernel2.6.32_release" -r -f ../../build/Makefile.tbb cfg=release tbb_root=../..make[1]: Entering directory `/home/tbb40_233oss/build/linux_alpha_gcc_cc4.4.3_libc2.11.1_kernel2.6.32_release'../../build/Makefile.tbb:39: CONFIG: cfg=release arch=alpha compiler=gcc os=linux runtime=cc4.4.3_libc2.11.1_kernel2.6.32/home/alphaev67-unknown-linux-gnu/bin/alphaev67-unknown-linux-gnu-g++ -c -MMD -DDO_ITT_NOTIFY -O2 -DUSE_PTHREAD -fPIC -D__TBB_BUILD=1 -Wall -Wno-parentheses -Wno-non-virtual-dtor -I../../src -I../../src/rml/include -I../../include ../../src/tbb/concurrent_hash_map.cppIn file included from ../../include/tbb/spin_rw_mutex.h:33, from ../../include/tbb/concurrent_hash_map.h:50, from ../../src/tbb/concurrent_hash_map.cpp:29:../../include/tbb/tbb_machine.h: In static member function 'static T tbb::internal::machine_load_store::load_with_acquire(const volatile T&)':../../include/tbb/tbb_machine.h:525: error: there are no arguments to '__TBB_machine_load8' that depend on a template parameter, so a declaration of '__TBB_machine_load8' must be available../../include/tbb/tbb_machine.h:525: error: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)../../include/tbb/tbb_machine.h: In static member function 'static void tbb::internal::machine_load_store::store_with_release(volatile T&, T)':../../include/tbb/tbb_machine.h:528: error: there are no arguments to '__TBB_machine_store8' that depend on a template parameter, so a declaration of '__TBB_machine_store8' must be available../../include/tbb/tbb_machine.h: In static member function 'static T tbb::internal::machine_load_store_relaxed::load(const volatile T&)':../../include/tbb/tbb_machine.h:590: error: there are no arguments to '__TBB_machine_load8' that depend on a template parameter, so a declaration of '__TBB_machine_load8' must be available../../include/tbb/tbb_machine.h: In static member function 'static void tbb::internal::machine_load_store_relaxed::store(volatile T&, T)':../../include/tbb/tbb_machine.h:593: error: there are no arguments to '__TBB_machine_store8' that depend on a template parameter, so a declaration of '__TBB_machine_store8' must be available../../include/tbb/tbb_machine.h: In static member function 'static void tbb::internal::machine_load_store::store_with_release(volatile T&, T) [with T = long unsigned int]':../../include/tbb/tbb_machine.h:609: instantiated from here../../include/tbb/tbb_machine.h:528: error: '__TBB_machine_store8' was not declared in this scope../../include/tbb/tbb_machine.h: In static member function 'static void tbb::internal::machine_load_store_relaxed::store(volatile T&, T) [with T = long unsigned int]':../../include/tbb/tbb_machine.h:635: instantiated from here../../include/tbb/tbb_machine.h:593: error: '__TBB_machine_store8' was not declared in this scope../../include/tbb/tbb_machine.h: In static member function 'static void tbb::internal::machine_load_store::store_with_release(volatile T&, T) [with T = long int]':../../include/tbb/tbb_machine.h:605: instantiated from 'void tbb::internal::__TBB_store_with_release(volatile T&, V) [with T = int64_t, V = long int]'../../include/tbb/atomic.h:263: instantiated from 'T tbb::internal::atomic_impl::store_with_release(T) [with T = long long int]'../../include/tbb/atomic.h:354: instantiated from here../../include/tbb/tbb_machine.h:528: error: '__TBB_machine_store8' was not declared in this scope../../include/tbb/tbb_machine.h: In static member function 'static T tbb::internal::machine_load_store::load_with_acquire(const volatile T&) [with T = long int]':../../include/tbb/tbb_machine.h:601: instantiated from 'T tbb::internal::__TBB_load_with_acquire(const volatile T&) [with T = int64_t]'../../include/tbb/atomic.h:233: instantiated from 'tbb::internal::atomic_impl::operator T() const volatile [with T = long long int]'../../include/tbb/atomic.h:354: instantiated from here../../include/tbb/tbb_machine.h:525: error: '__TBB_machine_load8' was not declared in this scope../../include/tbb/tbb_machine.h: In static member function 'static T tbb::internal::machine_load_store::load_with_acquire(const volatile T&) [with T = tbb::interface5::internal::hash_map_node_base*]':../../include/tbb/tbb_machine.h:601: instantiated from 'T tbb::internal::__TBB_load_with_acquire(const volatile T&) [with T = tbb::interface5::internal::hash_map_node_base*]'../../include/tbb/tbb_profiling.h:168: instantiated from 'T tbb::internal::itt_load_word_with_acquire(const T&) [with T = tbb::interface5::internal::hash_map_node_base*]'../../include/tbb/concurrent_hash_map.h:269: instantiated from here../../include/tbb/tbb_machine.h:525: error: '__TBB_machine_load8' was not declared in this scopemake[1]: *** [concurrent_hash_map.o] Error 1make[1]: Leaving directory `/home/tbb40_233oss/build/linux_alpha_gcc_cc4.4.3_libc2.11.1_kernel2.6.32_release'make: *** [tbb_release] Error 2

Thank you for your reply.Yes, I mean DEC Alpha. I usedtbb30_131oss when I observed this error. I will try to use the most recent TBB and GCC.I have no idea about the "amd64", this may be the information from PARSEC benchmark suite.

Thank you very much for your advise. I will try it again.

Thank you for your reply.I just don't know how to implement these atomics currently. So I will firstly try to use the more recent gcc.

Quoting chenxuhaoThank you for your reply. I tried to cross compile TBB 4.0, but there is stillerror that '__TBB_machine_load8' was not declared. My alpha gcc compiler
version is 4.3.2, so it may be due to this. I will try it again using 4.3.6...

A port of some library to a different platform is a complex process and it consists of many phases. Currently,
you're trying to solve some low level problem.A different approach could be more eficient:

- Phase 1 - If there is a compilation problem(s),due to some piece of code,comment it out or replace itwith
an empty piece of code. For example, a '__TBB_machine_load8' causes some compilation
problems because it is not declared.In that case, declare it as follows, or something like this:
( Note: don't spend time on internals and continue with another compilation problem )

#ifdef _PLATFORM_DEC_ALPHA
...
#define _TBB_machine_load8( ... ) //???
...
#endif

and mark it with '//???' label. After first a couple of hours of porting you could have lots of
commented pieces of code withlabels '//???'. The most important thing is thatin Phase 1
the source codes have to be compiled. A total number of detected issues or problems
is unpredictable.

- Phase 2 - Review all cases marked with '//???' and start fixing them. It is recommended that all easy
cases are fixed first, and more complex cases are fixedlast. But, it is really hard to predict what has to
be fixed first.Then a Phase 3 comes ahead.

- Phase 3 - Create some set of simpletests.Tests for all fixedcases (previously marked with '//???' ) also
have to be done.

and so on.

In overall, the process I just desribed is a 'Top-to-Down' process. From my point of view your current
approach is opposite, that is 'Down-to-Top'. Also, I don't think thatyour currentcompilation problems are
related to an older version ofGCC compiler.

Best regards,
Sergey

"Also, I don't think thatyour currentcompilation problems are related to an older version ofGCC compiler."
Please see #5. We're not guessing.

Quoting Raf Schietekat"Also, I don't think thatyour currentcompilation problems are related to an older version ofGCC compiler."
Please see #5. We're not guessing.

Thanks for the note. I missed that.

I use gcc 4.4.2 and tbb 4.0, it still doesn't work:root@gem5-desktop:/home/tbb40_233oss# make arch=alpha compiler=gcc CXXFLAGS="-DTBB_USE_GCC_BUILTINS"Created ./build/linux_alpha_gcc_cc4.4.3_libc2.11.1_kernel2.6.32_release and ..._debug directoriesmake -C "./build/linux_alpha_gcc_cc4.4.3_libc2.11.1_kernel2.6.32_debug" -r -f ../../build/Makefile.tbb cfg=debug tbb_root=../..make[1]: Entering directory `/home/tbb40_233oss/build/linux_alpha_gcc_cc4.4.3_libc2.11.1_kernel2.6.32_debug'../../build/Makefile.tbb:39: CONFIG: cfg=debug arch=alpha compiler=gcc os=linux runtime=cc4.4.3_libc2.11.1_kernel2.6.32/root/x-tools/alphaev67-unknown-linux-gnu/bin/alphaev67-unknown-linux-gnu-g++ -c -MMD -DTBB_USE_DEBUG -DDO_ITT_NOTIFY -g -O0 -DUSE_PTHREAD -fPIC -D__TBB_BUILD=1 -Wall -Wno-parentheses -Wno-non-virtual-dtor -DTBB_USE_GCC_BUILTINS -I../../src -I../../src/rml/include -I../../include ../../src/tbb/concurrent_hash_map.cppIn file included from ../../include/tbb/spin_rw_mutex.h:33, from ../../include/tbb/concurrent_hash_map.h:50, from ../../src/tbb/concurrent_hash_map.cpp:29:../../include/tbb/tbb_machine.h: In static member function 'static T tbb::internal::machine_load_store::load_with_acquire(const volatile T&)':../../include/tbb/tbb_machine.h:525: error: there are no arguments to '__TBB_machine_load8' that depend on a template parameter, so a declaration of '__TBB_machine_load8' must be available../../include/tbb/tbb_machine.h:525: note: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)../../include/tbb/tbb_machine.h: In static member function 'static void tbb::internal::machine_load_store::store_with_release(volatile T&, T)':../../include/tbb/tbb_machine.h:528: error: there are no arguments to '__TBB_machine_store8' that depend on a template parameter, so a declaration of '__TBB_machine_store8' must be available../../include/tbb/tbb_machine.h: In static member function 'static T tbb::internal::machine_load_store_relaxed::load(const volatile T&)':../../include/tbb/tbb_machine.h:590: error: there are no arguments to '__TBB_machine_load8' that depend on a template parameter, so a declaration of '__TBB_machine_load8' must be available../../include/tbb/tbb_machine.h: In static member function 'static void tbb::internal::machine_load_store_relaxed::store(volatile T&, T)':../../include/tbb/tbb_machine.h:593: error: there are no arguments to '__TBB_machine_store8' that depend on a template parameter, so a declaration of '__TBB_machine_store8' must be available../../include/tbb/tbb_machine.h: In static member function 'static void tbb::internal::machine_load_store::store_with_release(volatile T&, T) [with T = long unsigned int]':../../include/tbb/tbb_machine.h:609: instantiated from here../../include/tbb/tbb_machine.h:528: error: '__TBB_machine_store8' was not declared in this scope../../include/tbb/tbb_machine.h: In static member function 'static void tbb::internal::machine_load_store_relaxed::store(volatile T&, T) [with T = long unsigned int]':../../include/tbb/tbb_machine.h:635: instantiated from here../../include/tbb/tbb_machine.h:593: error: '__TBB_machine_store8' was not declared in this scope../../include/tbb/tbb_machine.h: In static member function 'static void tbb::internal::machine_load_store::store_with_release(volatile T&, T) [with T = long int]':../../include/tbb/tbb_machine.h:605: instantiated from 'void tbb::internal::__TBB_store_with_release(volatile T&, V) [with T = int64_t, V = long int]'../../include/tbb/atomic.h:263: instantiated from 'T tbb::internal::atomic_impl::store_with_release(T) [with T = long long int]'../../include/tbb/atomic.h:354: instantiated from here../../include/tbb/tbb_machine.h:528: error: '__TBB_machine_store8' was not declared in this scope../../include/tbb/tbb_machine.h: In static member function 'static T tbb::internal::machine_load_store::load_with_acquire(const volatile T&) [with T = long int]':../../include/tbb/tbb_machine.h:601: instantiated from 'T tbb::internal::__TBB_load_with_acquire(const volatile T&) [with T = int64_t]'../../include/tbb/atomic.h:233: instantiated from 'tbb::internal::atomic_impl::operator T() const volatile [with T = long long int]'../../include/tbb/atomic.h:354: instantiated from here../../include/tbb/tbb_machine.h:525: error: '__TBB_machine_load8' was not declared in this scopemake[1]: *** [concurrent_hash_map.o] Error 1make[1]: Leaving directory `/home/tbb40_233oss/build/linux_alpha_gcc_cc4.4.3_libc2.11.1_kernel2.6.32_debug'make: *** [tbb] Error 2it seems like the GCC BUILTINS doesn't take effect, and the compiler still thinks that '__TBB_machine_store8' was not declared.

To get a little further, insert "#define __TBB_64BIT_ATOMICS 0" somewhere in include/tbb/machine/gcc_generic.h.

Quoting Raf SchietekatTo get a little further, insert "#define __TBB_64BIT_ATOMICS 0" somewhere in include/tbb/machine/gcc_generic.h.

I'm not confident that it could resolve all these compilation errors because in 'tbb_machine.h' header file
there is a piece of code:

...
#ifndef __TBB_64BIT_ATOMICS
#define __TBB_64BIT_ATOMICS 1
#endif
...

and it defines that macro again. Anyway, you could try and please post results of your attempt.

What does this mean? I add this at the end ofinclude/tbb/machine/gcc_generic.h, and there are errors aboutincomplete type:root@gem5-desktop:/home/tbb40_233oss# make arch=alpha compiler=gcc CXXFLAGS="-DTBB_USE_GCC_BUILTINS" runtime=cc4.3.6_libc2.9Created ./build/linux_alpha_gcc_cc4.3.6_libc2.9_release and ..._debug directoriesmake -C "./build/linux_alpha_gcc_cc4.3.6_libc2.9_debug" -r -f ../../build/Makefile.tbb cfg=debug tbb_root=../..make[1]: Entering directory `/home/tbb40_233oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug'../../build/Makefile.tbb:39: CONFIG: cfg=debug arch=alpha compiler=gcc os=linux runtime=cc4.3.6_libc2.9/root/x-tools/alphaev67-unknown-linux-gnu/bin/alphaev67-unknown-linux-gnu-g++ -c -MMD -DTBB_USE_DEBUG -DDO_ITT_NOTIFY -g -O0 -DUSE_PTHREAD -fPIC -D__TBB_BUILD=1 -Wall -Wno-parentheses -Wno-non-virtual-dtor -DTBB_USE_GCC_BUILTINS -I../../src -I../../src/rml/include -I../../include ../../src/tbb/concurrent_hash_map.cppIn file included from ../../include/tbb/tbb_profiling.h:105, from ../../include/tbb/spin_rw_mutex.h:34, from ../../include/tbb/concurrent_hash_map.h:50, from ../../src/tbb/concurrent_hash_map.cpp:29:../../include/tbb/atomic.h: In instantiation of 'tbb::internal::atomic_impl':../../include/tbb/atomic.h:273: instantiated from 'tbb::internal::atomic_impl_with_arithmetic'../../include/tbb/atomic.h:359: instantiated from here../../include/tbb/atomic.h:196: error: 'tbb::internal::atomic_impl::rep' has incomplete type../../include/tbb/atomic.h:75: error: declaration of 'struct tbb::internal::atomic_rep<8ul>'../../include/tbb/atomic.h: In instantiation of 'tbb::internal::atomic_impl':../../include/tbb/atomic.h:273: instantiated from 'tbb::internal::atomic_impl_with_arithmetic'../../include/tbb/atomic.h:360: instantiated from here../../include/tbb/atomic.h:196: error: 'tbb::internal::atomic_impl::rep' has incomplete type../../include/tbb/atomic.h:75: error: declaration of 'struct tbb::internal::atomic_rep<8ul>'../../include/tbb/atomic.h: In instantiation of 'tbb::internal::atomic_impl':../../include/tbb/atomic.h:405: instantiated from here../../include/tbb/atomic.h:196: error: 'tbb::internal::atomic_impl::rep' has incomplete type../../include/tbb/atomic.h:75: error: declaration of 'struct tbb::internal::atomic_rep<8ul>'../../include/tbb/atomic.h: In instantiation of 'tbb::internal::atomic_impl::converter':../../include/tbb/atomic.h:261: instantiated from 'T tbb::internal::atomic_impl::store_with_release(T) [with T = long int]'../../include/tbb/atomic.h:359: instantiated from here../../include/tbb/atomic.h:201: error: invalid use of incomplete type 'struct tbb::internal::atomic_rep<8ul>'../../include/tbb/atomic.h:75: error: declaration of 'struct tbb::internal::atomic_rep<8ul>'../../include/tbb/atomic.h: In member function 'T tbb::internal::atomic_impl::store_with_release(T) [with T = long int]':../../include/tbb/atomic.h:359: instantiated from here../../include/tbb/atomic.h:263: error: using invalid field 'tbb::internal::atomic_impl::rep'../../include/tbb/atomic.h:263: error: 'union tbb::internal::atomic_impl::converter' has no member named 'bits'../../include/tbb/atomic.h: In member function 'tbb::internal::atomic_impl::operator T() const volatile [with T = long int]':../../include/tbb/atomic.h:359: instantiated from here../../include/tbb/atomic.h:233: error: using invalid field 'tbb::internal::atomic_impl::rep'../../include/tbb/atomic.h:233: error: 'union tbb::internal::atomic_impl::converter' has no member named 'bits'../../include/tbb/atomic.h: At global scope:../../include/tbb/atomic.h: In instantiation of 'tbb::internal::atomic_impl::converter':../../include/tbb/atomic.h:261: instantiated from 'T tbb::internal::atomic_impl::store_with_release(T) [with T = long unsigned int]'../../include/tbb/atomic.h:360: instantiated from here../../include/tbb/atomic.h:201: error: invalid use of incomplete type 'struct tbb::internal::atomic_rep<8ul>'../../include/tbb/atomic.h:75: error: declaration of 'struct tbb::internal::atomic_rep<8ul>'../../include/tbb/atomic.h: In member function 'T tbb::internal::atomic_impl::store_with_release(T) [with T = long unsigned int]':../../include/tbb/atomic.h:360: instantiated from here../../include/tbb/atomic.h:263: error: using invalid field 'tbb::internal::atomic_impl::rep'../../include/tbb/atomic.h:263: error: 'union tbb::internal::atomic_impl::converter' has no member named 'bits'../../include/tbb/atomic.h: In member function 'tbb::internal::atomic_impl::operator T() const volatile [with T = long unsigned int]':../../include/tbb/atomic.h:360: instantiated from here../../include/tbb/atomic.h:233: error: using invalid field 'tbb::internal::atomic_impl::rep'../../include/tbb/atomic.h:233: error: 'union tbb::internal::atomic_impl::converter' has no member named 'bits'../../include/tbb/atomic.h: At global scope:../../include/tbb/atomic.h: In instantiation of 'tbb::internal::atomic_impl::converter':../../include/tbb/atomic.h:261: instantiated from 'T tbb::internal::atomic_impl::store_with_release(T) [with T = void*]'../../include/tbb/atomic.h:408: instantiated from here../../include/tbb/atomic.h:201: error: invalid use of incomplete type 'struct tbb::internal::atomic_rep<8ul>'../../include/tbb/atomic.h:75: error: declaration of 'struct tbb::internal::atomic_rep<8ul>'../../include/tbb/atomic.h: In member function 'T tbb::internal::atomic_impl::store_with_release(T) [with T = void*]':../../include/tbb/atomic.h:408: instantiated from here../../include/tbb/atomic.h:263: error: using invalid field 'tbb::internal::atomic_impl::rep'../../include/tbb/atomic.h:263: error: 'union tbb::internal::atomic_impl::converter' has no member named 'bits'../../include/tbb/atomic.h: In member function 'tbb::internal::atomic_impl::operator T() const volatile [with T = void*]':../../include/tbb/atomic.h:411: instantiated from here../../include/tbb/atomic.h:233: error: using invalid field 'tbb::internal::atomic_impl::rep'../../include/tbb/atomic.h:233: error: 'union tbb::internal::atomic_impl::converter' has no member named 'bits'../../include/tbb/atomic.h: In member function 'I tbb::internal::atomic_impl_with_arithmetic::fetch_and_add(D) [with tbb::memory_semantics M = full_fence, I = long unsigned int, D = long unsigned int, StepType = char]':../../include/tbb/atomic.h:283: instantiated from 'I tbb::internal::atomic_impl_with_arithmetic::fetch_and_add(D) [with I = long unsigned int, D = long unsigned int, StepType = char]'../../include/tbb/atomic.h:316: instantiated from 'I tbb::internal::atomic_impl_with_arithmetic::operator++() [with I = long unsigned int, D = long unsigned int, StepType = char]'../../include/tbb/concurrent_hash_map.h:282: instantiated from here../../include/tbb/atomic.h:279: error: incomplete type 'tbb::internal::atomic_traits<8ul, full_fence>' used in nested name specifier../../include/tbb/atomic.h:279: error: 'struct tbb::internal::atomic_impl_with_arithmetic' has no member named 'rep'make[1]: *** [concurrent_hash_map.o] Error 1make[1]: Leaving directory `/home/tbb40_233oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug'make: *** [tbb] Error 2

Quoting chenxuhaoI use gcc 4.4.2 and tbb 4.0, it still doesn't work:...../../include/tbb/tbb_machine.h: In static member function 'static T tbb::internal::machine_load_store::load_with_acquire(const volatile T&)':../../include/tbb/tbb_machine.h:525: error: there are no arguments to '__TBB_machine_load8' that ...

it seems like the GCC BUILTINS doesn't take effect, and the compiler still thinks that '__TBB_machine_store8' was not declared.

First compilation errors are related to 'tbb::internal::machine_load_store' template classand
'__TBB_machine_load8' function. The second error recommends you to look at a line 525 in
'tbb_machine.h' header file. A couple of lines above there is a piece of codes:

...
#if __TBB_USE_GENERIC_DWORD_LOAD_STORE

inline void __TBB_machine_store8 (volatile void *ptr, int64_t value) {
for(;;) {
int64_t result = *(int64_t *)ptr;
if( __TBB_machine_cmpswp8(ptr,value,result)==result ) break;
}
}

inline int64_t __TBB_machine_load8 (const volatile void *ptr) {
// Comparand and new value may be anything, they only must be equal, and
// the value should have a low probability to be actually found in 'location'.
const int64_t anyvalue = 2305843009213693951;
return __TBB_machine_cmpswp8(const_cast(ptr),anyvalue,anyvalue);
}

#endif /* __TBB_USE_GENERIC_DWORD_LOAD_STORE */
...

If the macro __TBB_USE_GENERIC_DWORD_LOAD_STORE is not defined there will be a compilation error(s).

What is a state of that macro? Is that defined or not in your build environment?

Quoting Sergey KostrovIf the macro __TBB_USE_GENERIC_DWORD_LOAD_STORE is not defined there will be a compilation error(s).

What is a state of that macro? Is that defined or not in your build environment?

That's a good catch. Actually, the most recent TBB update fixed a bug in previous versions that do not have this macro defined in gcc_generic.h. Sochenxuhaoneeds to make sure the latest TBB release (4.0 Update 3)is used.

I see that there is some kind of "escalation" of compilation errors. Every time something else is "broken".

So, please set __TBB_64BIT_ATOMICS to 0, or comment, or undefine itand please try to concentrate
your efforts on resolving first two compilation errors related to my comments in Post #17.

Best regards,
Sergey

PS: Could you verify a complete version of TBB installed on your computer? Look at 'tbb_stddef.h' header file.

1. There are many cases when __TBB_64BIT_ATOMICS is used with __TBB_WORDSIZE, like:

...
#if __TBB_WORDSIZE==4 && __TBB_64BIT_ATOMICS
...

2. For 32-bit Windows platforms '__TBB_machine_store8' and '__TBB_machine_load8' functionsare
declared in 'windows_ia32.h' header file( not applicable in your case ) as follows:

...
extern "C" {
...
void __TBB_EXPORTED_FUNC __TBB_machine_store8 (volatile void *ptr, __int64 value );
__int64 __TBB_EXPORTED_FUNC __TBB_machine_load8 (const volatile void *ptr);
}
...

and when I commented these two lines I had these compilation errors:

------ Build started: Project: tbb, Configuration: Debug Win32 ------
Compiling...
concurrent_hash_map.cpp
c:\worklib\tbb40\include\tbb\tbb_machine.h(525) : error C3861: '__TBB_machine_load8': identifier not found
c:\worklib\tbb40\include\tbb\tbb_machine.h(524) : while compiling class template member function
'tbb::internal::int64_t tbb::internal::machine_load_store::load_with_acquire(volatile const T &)'
with
[
T=tbb::internal::int64_t,
S=8
]
...

It also "breaks" on line 525 and it partially reproduces your compilation errors.

As you can see they are similar to your compilation errors. Also, implementations for both functions are
in 'atomic_support.asm' file.

3. I think it makes sense to try a simple test with declaration of these two functions in some header file, like:

...
void __TBB_EXPORTED_FUNC __TBB_machine_store8 (volatile void *ptr, __int64 value );
__int64 __TBB_EXPORTED_FUNC __TBB_machine_load8 (const volatile void *ptr);
...

and implementation for these two functions in some C/C++ file, like:

...
void __TBB_EXPORTED_FUNC __TBB_machine_store8 (volatile void *ptr, __int64 value )
{
}

__int64 __TBB_EXPORTED_FUNC __TBB_machine_load8 (const volatile void *ptr)
{
return ( __int64 )0;
}
...

#18 "Sochenxuhaoneeds to make sure the latest TBB release (4.0 Update 3)is used."
I concur: try that latest update (tbb40_20120201oss or tbb40_297oss), without my previous suggestion to insert "#define __TBB_64BIT_ATOMICS 0", but for a different reason (previously __TBB_WORDSIZE was evaluated incorrectly as 4 on what now appears to be LP64). Now the errors should get a bit more interesting. :-)

The error is about redefinition this time right?root@gem5-desktop:/home/tbb40_20120201oss# make arch=alpha compiler=gcc CXXFLAGS="-DTBB_USE_GCC_BUILTINS" runtime=cc4.3.6_libc2.9Created ./build/linux_alpha_gcc_cc4.3.6_libc2.9_release and ..._debug directoriesmake -C "./build/linux_alpha_gcc_cc4.3.6_libc2.9_debug" -r -f ../../build/Makefile.tbb cfg=debug tbb_root=../..make[1]: Entering directory `/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug'../../build/Makefile.tbb:39: CONFIG: cfg=debug arch=alpha compiler=gcc os=linux runtime=cc4.3.6_libc2.9/root/x-tools/alphaev67-unknown-linux-gnu/bin/alphaev67-unknown-linux-gnu-g++ -c -MMD -DTBB_USE_DEBUG -DDO_ITT_NOTIFY -g -O0 -DUSE_PTHREAD -fPIC -D__TBB_BUILD=1 -Wall -Wno-parentheses -Wno-non-virtual-dtor -DTBB_USE_GCC_BUILTINS -I../../src -I../../src/rml/include -I../../include ../../src/tbb/concurrent_hash_map.cpp/root/x-tools/alphaev67-unknown-linux-gnu/bin/alphaev67-unknown-linux-gnu-g++ -c -MMD -DTBB_USE_DEBUG -DDO_ITT_NOTIFY -g -O0 -DUSE_PTHREAD -fPIC -D__TBB_BUILD=1 -Wall -Wno-parentheses -Wno-non-virtual-dtor -DTBB_USE_GCC_BUILTINS -I../../src -I../../src/rml/include -I../../include ../../src/tbb/concurrent_queue.cpp/root/x-tools/alphaev67-unknown-linux-gnu/bin/alphaev67-unknown-linux-gnu-g++ -c -MMD -DTBB_USE_DEBUG -DDO_ITT_NOTIFY -g -O0 -DUSE_PTHREAD -fPIC -D__TBB_BUILD=1 -Wall -Wno-parentheses -Wno-non-virtual-dtor -DTBB_USE_GCC_BUILTINS -I../../src -I../../src/rml/include -I../../include ../../src/tbb/concurrent_vector.cpp/root/x-tools/alphaev67-unknown-linux-gnu/bin/alphaev67-unknown-linux-gnu-g++ -c -MMD -DTBB_USE_DEBUG -DDO_ITT_NOTIFY -g -O0 -DUSE_PTHREAD -fPIC -D__TBB_BUILD=1 -Wall -Wno-parentheses -Wno-non-virtual-dtor -DTBB_USE_GCC_BUILTINS -I../../src -I../../src/rml/include -I../../include ../../src/tbb/dynamic_link.cpp/root/x-tools/alphaev67-unknown-linux-gnu/bin/alphaev67-unknown-linux-gnu-g++ -c -MMD -DTBB_USE_DEBUG -DDO_ITT_NOTIFY -g -O0 -DUSE_PTHREAD -fPIC -D__TBB_BUILD=1 -Wall -Wno-parentheses -Wno-non-virtual-dtor -DTBB_USE_GCC_BUILTINS -I../../src -I../../src/rml/include -I../../include ../../src/tbb/cache_aligned_allocator.cpp/root/x-tools/alphaev67-unknown-linux-gnu/bin/alphaev67-unknown-linux-gnu-g++ -c -MMD -DTBB_USE_DEBUG -DDO_ITT_NOTIFY -g -O0 -DUSE_PTHREAD -fPIC -D__TBB_BUILD=1 -Wall -Wno-parentheses -Wno-non-virtual-dtor -DTBB_USE_GCC_BUILTINS -I../../src -I../../src/rml/include -I../../include ../../src/tbb/pipeline.cpp/root/x-tools/alphaev67-unknown-linux-gnu/bin/alphaev67-unknown-linux-gnu-g++ -c -MMD -DTBB_USE_DEBUG -DDO_ITT_NOTIFY -g -O0 -DUSE_PTHREAD -fPIC -D__TBB_BUILD=1 -Wall -Wno-parentheses -Wno-non-virtual-dtor -DTBB_USE_GCC_BUILTINS -I../../src -I../../src/rml/include -I../../include ../../src/tbb/queuing_mutex.cpp/root/x-tools/alphaev67-unknown-linux-gnu/bin/alphaev67-unknown-linux-gnu-g++ -c -MMD -DTBB_USE_DEBUG -DDO_ITT_NOTIFY -g -O0 -DUSE_PTHREAD -fPIC -D__TBB_BUILD=1 -Wall -Wno-parentheses -Wno-non-virtual-dtor -DTBB_USE_GCC_BUILTINS -I../../src -I../../src/rml/include -I../../include ../../src/tbb/queuing_rw_mutex.cpp/root/x-tools/alphaev67-unknown-linux-gnu/bin/alphaev67-unknown-linux-gnu-g++ -c -MMD -DTBB_USE_DEBUG -DDO_ITT_NOTIFY -g -O0 -DUSE_PTHREAD -fPIC -D__TBB_BUILD=1 -Wall -Wno-parentheses -Wno-non-virtual-dtor -DTBB_USE_GCC_BUILTINS -I../../src -I../../src/rml/include -I../../include ../../src/tbb/reader_writer_lock.cpp/root/x-tools/alphaev67-unknown-linux-gnu/bin/alphaev67-unknown-linux-gnu-g++ -c -MMD -DTBB_USE_DEBUG -DDO_ITT_NOTIFY -g -O0 -DUSE_PTHREAD -fPIC -D__TBB_BUILD=1 -Wall -Wno-parentheses -Wno-non-virtual-dtor -DTBB_USE_GCC_BUILTINS -I../../src -I../../src/rml/include -I../../include ../../src/tbb/spin_rw_mutex.cpp/root/x-tools/alphaev67-unknown-linux-gnu/bin/alphaev67-unknown-linux-gnu-g++ -c -MMD -DTBB_USE_DEBUG -DDO_ITT_NOTIFY -g -O0 -DUSE_PTHREAD -fPIC -D__TBB_BUILD=1 -Wall -Wno-parentheses -Wno-non-virtual-dtor -DTBB_USE_GCC_BUILTINS -I../../src -I../../src/rml/include -I../../include ../../src/tbb/spin_mutex.cpp/root/x-tools/alphaev67-unknown-linux-gnu/bin/alphaev67-unknown-linux-gnu-g++ -c -MMD -DTBB_USE_DEBUG -DDO_ITT_NOTIFY -g -O0 -DUSE_PTHREAD -fPIC -D__TBB_BUILD=1 -Wall -Wno-parentheses -Wno-non-virtual-dtor -DTBB_USE_GCC_BUILTINS -I../../src -I../../src/rml/include -I../../include ../../src/tbb/critical_section.cpp/root/x-tools/alphaev67-unknown-linux-gnu/bin/alphaev67-unknown-linux-gnu-g++ -c -MMD -DTBB_USE_DEBUG -DDO_ITT_NOTIFY -g -O0 -DUSE_PTHREAD -fPIC -D__TBB_BUILD=1 -Wall -Wno-parentheses -Wno-non-virtual-dtor -DTBB_USE_GCC_BUILTINS -I../../src -I../../src/rml/include -I../../include ../../src/tbb/task.cpp/root/x-tools/alphaev67-unknown-linux-gnu/bin/alphaev67-unknown-linux-gnu-g++ -c -MMD -DTBB_USE_DEBUG -DDO_ITT_NOTIFY -g -O0 -DUSE_PTHREAD -fPIC -D__TBB_BUILD=1 -Wall -Wno-parentheses -Wno-non-virtual-dtor -DTBB_USE_GCC_BUILTINS -I. -I../../src -I../../src/rml/include -I../../include ../../src/tbb/tbb_misc.cpp/root/x-tools/alphaev67-unknown-linux-gnu/bin/alphaev67-unknown-linux-gnu-g++ -c -MMD -DTBB_USE_DEBUG -DDO_ITT_NOTIFY -g -O0 -DUSE_PTHREAD -fPIC -D__TBB_BUILD=1 -Wall -Wno-parentheses -Wno-non-virtual-dtor -DTBB_USE_GCC_BUILTINS -I../../src -I../../src/rml/include -I../../include ../../src/tbb/tbb_misc_ex.cpp/root/x-tools/alphaev67-unknown-linux-gnu/bin/alphaev67-unknown-linux-gnu-g++ -c -MMD -DTBB_USE_DEBUG -DDO_ITT_NOTIFY -g -O0 -DUSE_PTHREAD -fPIC -D__TBB_BUILD=1 -Wall -Wno-parentheses -Wno-non-virtual-dtor -DTBB_USE_GCC_BUILTINS -I../../src -I../../src/rml/include -I../../include ../../src/tbb/mutex.cpp/root/x-tools/alphaev67-unknown-linux-gnu/bin/alphaev67-unknown-linux-gnu-g++ -c -MMD -DTBB_USE_DEBUG -DDO_ITT_NOTIFY -g -O0 -DUSE_PTHREAD -fPIC -D__TBB_BUILD=1 -Wall -Wno-parentheses -Wno-non-virtual-dtor -DTBB_USE_GCC_BUILTINS -I../../src -I../../src/rml/include -I../../include ../../src/tbb/recursive_mutex.cpp/root/x-tools/alphaev67-unknown-linux-gnu/bin/alphaev67-unknown-linux-gnu-g++ -c -MMD -DTBB_USE_DEBUG -DDO_ITT_NOTIFY -g -O0 -DUSE_PTHREAD -fPIC -D__TBB_BUILD=1 -Wall -Wno-parentheses -Wno-non-virtual-dtor -DTBB_USE_GCC_BUILTINS -I../../src -I../../src/rml/include -I../../include ../../src/tbb/condition_variable.cpp/root/x-tools/alphaev67-unknown-linux-gnu/bin/alphaev67-unknown-linux-gnu-g++ -c -MMD -DTBB_USE_DEBUG -DDO_ITT_NOTIFY -g -O0 -DUSE_PTHREAD -fPIC -D__TBB_BUILD=1 -Wall -Wno-parentheses -Wno-non-virtual-dtor -DTBB_USE_GCC_BUILTINS -I../../src -I../../src/rml/include -I../../include ../../src/tbb/tbb_thread.cpp/root/x-tools/alphaev67-unknown-linux-gnu/bin/alphaev67-unknown-linux-gnu-g++ -c -MMD -DTBB_USE_DEBUG -DDO_ITT_NOTIFY -g -O0 -DUSE_PTHREAD -fPIC -D__TBB_BUILD=1 -Wall -Wno-parentheses -Wno-non-virtual-dtor -DTBB_USE_GCC_BUILTINS -I../../src -I../../src/rml/include -I../../include ../../src/tbb/concurrent_monitor.cpp/root/x-tools/alphaev67-unknown-linux-gnu/bin/alphaev67-unknown-linux-gnu-g++ -c -MMD -DTBB_USE_DEBUG -DDO_ITT_NOTIFY -g -O0 -DUSE_PTHREAD -fPIC -D__TBB_BUILD=1 -Wall -Wno-parentheses -Wno-non-virtual-dtor -DTBB_USE_GCC_BUILTINS -I../../src -I../../src/rml/include -I../../include ../../src/tbb/private_server.cpp/root/x-tools/alphaev67-unknown-linux-gnu/bin/alphaev67-unknown-linux-gnu-g++ -c -MMD -DTBB_USE_DEBUG -DDO_ITT_NOTIFY -g -O0 -DUSE_PTHREAD -fPIC -D__TBB_BUILD=1 -Wall -Wno-parentheses -Wno-non-virtual-dtor -DTBB_USE_GCC_BUILTINS -I../../src -I../../src/rml/include -I../../include ../../src/tbb/task_group_context.cpp/root/x-tools/alphaev67-unknown-linux-gnu/bin/alphaev67-unknown-linux-gnu-g++ -c -MMD -DTBB_USE_DEBUG -DDO_ITT_NOTIFY -g -O0 -DUSE_PTHREAD -fPIC -D__TBB_BUILD=1 -Wall -Wno-parentheses -Wno-non-virtual-dtor -DTBB_USE_GCC_BUILTINS -I../../src -I../../src/rml/include -I../../include ../../src/tbb/governor.cpp/root/x-tools/alphaev67-unknown-linux-gnu/bin/alphaev67-unknown-linux-gnu-g++ -c -MMD -DTBB_USE_DEBUG -DDO_ITT_NOTIFY -g -O0 -DUSE_PTHREAD -fPIC -D__TBB_BUILD=1 -Wall -Wno-parentheses -Wno-non-virtual-dtor -DTBB_USE_GCC_BUILTINS -I../../src -I../../src/rml/include -I../../include ../../src/tbb/market.cpp/root/x-tools/alphaev67-unknown-linux-gnu/bin/alphaev67-unknown-linux-gnu-g++ -c -MMD -DTBB_USE_DEBUG -DDO_ITT_NOTIFY -g -O0 -DUSE_PTHREAD -fPIC -D__TBB_BUILD=1 -Wall -Wno-parentheses -Wno-non-virtual-dtor -DTBB_USE_GCC_BUILTINS -I../../src -I../../src/rml/include -I../../include ../../src/tbb/arena.cpp/root/x-tools/alphaev67-unknown-linux-gnu/bin/alphaev67-unknown-linux-gnu-g++ -c -MMD -DTBB_USE_DEBUG -DDO_ITT_NOTIFY -g -O0 -DUSE_PTHREAD -fPIC -D__TBB_BUILD=1 -Wall -Wno-parentheses -Wno-non-virtual-dtor -DTBB_USE_GCC_BUILTINS -I../../src -I../../src/rml/include -I../../include ../../src/tbb/scheduler.cpp/root/x-tools/alphaev67-unknown-linux-gnu/bin/alphaev67-unknown-linux-gnu-g++ -c -MMD -DTBB_USE_DEBUG -DDO_ITT_NOTIFY -g -O0 -DUSE_PTHREAD -fPIC -D__TBB_BUILD=1 -Wall -Wno-parentheses -Wno-non-virtual-dtor -DTBB_USE_GCC_BUILTINS -I../../src -I../../src/rml/include -I../../include ../../src/tbb/observer_proxy.cpp/root/x-tools/alphaev67-unknown-linux-gnu/bin/alphaev67-unknown-linux-gnu-g++ -c -MMD -DTBB_USE_DEBUG -DDO_ITT_NOTIFY -g -O0 -DUSE_PTHREAD -fPIC -D__TBB_BUILD=1 -Wall -Wno-parentheses -Wno-non-virtual-dtor -DTBB_USE_GCC_BUILTINS -I../../src -I../../src/rml/include -I../../include ../../src/tbb/tbb_main.cpp/root/x-tools/alphaev67-unknown-linux-gnu/bin/alphaev67-unknown-linux-gnu-g++ -c -MMD -DTBB_USE_DEBUG -DDO_ITT_NOTIFY -g -O0 -DUSE_PTHREAD -fPIC -D__TBB_BUILD=1 -Wall -Wno-parentheses -Wno-non-virtual-dtor -DTBB_USE_GCC_BUILTINS -I../../src -I../../src/rml/include -I../../include ../../src/old/concurrent_vector_v2.cpp/root/x-tools/alphaev67-unknown-linux-gnu/bin/alphaev67-unknown-linux-gnu-g++ -c -MMD -DTBB_USE_DEBUG -DDO_ITT_NOTIFY -g -O0 -DUSE_PTHREAD -fPIC -D__TBB_BUILD=1 -Wall -Wno-parentheses -Wno-non-virtual-dtor -DTBB_USE_GCC_BUILTINS -I../../src -I../../src/rml/include -I../../include ../../src/old/concurrent_queue_v2.cpp/root/x-tools/alphaev67-unknown-linux-gnu/bin/alphaev67-unknown-linux-gnu-g++ -c -MMD -DTBB_USE_DEBUG -DDO_ITT_NOTIFY -g -O0 -DUSE_PTHREAD -fPIC -D__TBB_BUILD=1 -Wall -Wno-parentheses -Wno-non-virtual-dtor -DTBB_USE_GCC_BUILTINS -I../../src -I../../src/rml/include -I../../include ../../src/old/spin_rw_mutex_v2.cpp/root/x-tools/alphaev67-unknown-linux-gnu/bin/alphaev67-unknown-linux-gnu-g++ -c -MMD -DTBB_USE_DEBUG -DDO_ITT_NOTIFY -g -O0 -DUSE_PTHREAD -fPIC -D__TBB_BUILD=1 -Wall -Wno-parentheses -Wno-non-virtual-dtor -DTBB_USE_GCC_BUILTINS -I../../src -I../../src/rml/include -I../../include ../../src/old/task_v2.cpp/root/x-tools/alphaev67-unknown-linux-gnu/bin/alphaev67-unknown-linux-gnu-g++ -fPIC -o libtbb_debug.so.2 concurrent_hash_map.o concurrent_queue.o concurrent_vector.o dynamic_link.o itt_notify.o cache_aligned_allocator.o pipeline.o queuing_mutex.o queuing_rw_mutex.o reader_writer_lock.o spin_rw_mutex.o spin_mutex.o critical_section.o task.o tbb_misc.o tbb_misc_ex.o mutex.o recursive_mutex.o condition_variable.o tbb_thread.o concurrent_monitor.o semaphore.o private_server.o rml_tbb.o task_group_context.o governor.o market.o arena.o scheduler.o observer_proxy.o tbb_statistics.o tbb_main.o concurrent_vector_v2.o concurrent_queue_v2.o spin_rw_mutex_v2.o task_v2.o -ldl -lpthread -lrt -shared -Wl,-soname=libtbb_debug.so.2 -Wl,--version-script,tbb.defconcurrent_queue.o: In function `tbb::internal::gcc_builtins::clz(unsigned long)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: multiple definition of `tbb::internal::gcc_builtins::clz(unsigned long)'concurrent_hash_map.o:/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: first defined hereconcurrent_queue.o: In function `tbb::internal::gcc_builtins::clz(unsigned int)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:76: multiple definition of `tbb::internal::gcc_builtins::clz(unsigned int)'concurrent_hash_map.o:/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:76: first defined hereconcurrent_vector.o: In function `tbb::internal::gcc_builtins::clz(unsigned long)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: multiple definition of `tbb::internal::gcc_builtins::clz(unsigned long)'concurrent_hash_map.o:/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: first defined hereconcurrent_vector.o: In function `tbb::internal::gcc_builtins::clz(unsigned int)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:76: multiple definition of `tbb::internal::gcc_builtins::clz(unsigned int)'concurrent_hash_map.o:/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:76: first defined heredynamic_link.o: In function `tbb::internal::gcc_builtins::clz(unsigned long)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: multiple definition of `tbb::internal::gcc_builtins::clz(unsigned long)'concurrent_hash_map.o:/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: first defined heredynamic_link.o: In function `tbb::internal::gcc_builtins::clz(unsigned int)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:76: multiple definition of `tbb::internal::gcc_builtins::clz(unsigned int)'concurrent_hash_map.o:/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:76: first defined herecache_aligned_allocator.o: In function `tbb::internal::gcc_builtins::clz(unsigned long)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: multiple definition of `tbb::internal::gcc_builtins::clz(unsigned long)'concurrent_hash_map.o:/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: first defined herecache_aligned_allocator.o: In function `tbb::internal::gcc_builtins::clz(unsigned int)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:76: multiple definition of `tbb::internal::gcc_builtins::clz(unsigned int)'concurrent_hash_map.o:/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:76: first defined herepipeline.o: In function `tbb::internal::gcc_builtins::clz(unsigned long)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: multiple definition of `tbb::internal::gcc_builtins::clz(unsigned long)'concurrent_hash_map.o:/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: first defined herepipeline.o: In function `tbb::internal::gcc_builtins::clz(unsigned int)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:76: multiple definition of `tbb::internal::gcc_builtins::clz(unsigned int)'concurrent_hash_map.o:/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:76: first defined herequeuing_mutex.o: In function `tbb::internal::gcc_builtins::clz(unsigned long)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: multiple definition of `tbb::internal::gcc_builtins::clz(unsigned long)'concurrent_hash_map.o:/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: first defined herequeuing_mutex.o: In function `tbb::internal::gcc_builtins::clz(unsigned int)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:76: multiple definition of `tbb::internal::gcc_builtins::clz(unsigned int)'concurrent_hash_map.o:/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:76: first defined herequeuing_rw_mutex.o: In function `tbb::internal::gcc_builtins::clz(unsigned long)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: multiple definition of `tbb::internal::gcc_builtins::clz(unsigned long)'concurrent_hash_map.o:/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: first defined herequeuing_rw_mutex.o: In function `tbb::internal::gcc_builtins::clz(unsigned int)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:76: multiple definition of `tbb::internal::gcc_builtins::clz(unsigned int)'concurrent_hash_map.o:/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:76: first defined herereader_writer_lock.o: In function `tbb::internal::gcc_builtins::clz(unsigned long)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: multiple definition of `tbb::internal::gcc_builtins::clz(unsigned long)'concurrent_hash_map.o:/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: first defined herereader_writer_lock.o: In function `tbb::internal::gcc_builtins::clz(unsigned int)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:76: multiple definition of `tbb::internal::gcc_builtins::clz(unsigned int)'concurrent_hash_map.o:/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:76: first defined herespin_rw_mutex.o: In function `tbb::internal::gcc_builtins::clz(unsigned long)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: multiple definition of `tbb::internal::gcc_builtins::clz(unsigned long)'concurrent_hash_map.o:/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: first defined herespin_rw_mutex.o: In function `tbb::internal::gcc_builtins::clz(unsigned int)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:76: multiple definition of `tbb::internal::gcc_builtins::clz(unsigned int)'concurrent_hash_map.o:/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:76: first defined herespin_mutex.o: In function `tbb::internal::gcc_builtins::clz(unsigned long)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: multiple definition of `tbb::internal::gcc_builtins::clz(unsigned long)'concurrent_hash_map.o:/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: first defined herespin_mutex.o: In function `tbb::internal::gcc_builtins::clz(unsigned int)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:76: multiple definition of `tbb::internal::gcc_builtins::clz(unsigned int)'concurrent_hash_map.o:/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:76: first defined herecritical_section.o: In function `tbb::internal::gcc_builtins::clz(unsigned long)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: multiple definition of `tbb::internal::gcc_builtins::clz(unsigned long)'concurrent_hash_map.o:/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: first defined herecritical_section.o: In function `tbb::internal::gcc_builtins::clz(unsigned int)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:76: multiple definition of `tbb::internal::gcc_builtins::clz(unsigned int)'concurrent_hash_map.o:/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:76: first defined heretask.o: In function `tbb::internal::gcc_builtins::clz(unsigned long)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: multiple definition of `tbb::internal::gcc_builtins::clz(unsigned long)'concurrent_hash_map.o:/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: first defined heretask.o: In function `tbb::internal::gcc_builtins::clz(unsigned int)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:76: multiple definition of `tbb::internal::gcc_builtins::clz(unsigned int)'concurrent_hash_map.o:/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:76: first defined heretbb_misc.o: In function `tbb::internal::gcc_builtins::clz(unsigned long)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: multiple definition of `tbb::internal::gcc_builtins::clz(unsigned long)'concurrent_hash_map.o:/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: first defined heretbb_misc.o: In function `tbb::internal::gcc_builtins::clz(unsigned int)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:76: multiple definition of `tbb::internal::gcc_builtins::clz(unsigned int)'concurrent_hash_map.o:/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:76: first defined heretbb_misc_ex.o: In function `tbb::internal::gcc_builtins::clz(unsigned long)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: multiple definition of `tbb::internal::gcc_builtins::clz(unsigned long)'concurrent_hash_map.o:/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: first defined heretbb_misc_ex.o: In function `tbb::internal::gcc_builtins::clz(unsigned int)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:76: multiple definition of `tbb::internal::gcc_builtins::clz(unsigned int)'concurrent_hash_map.o:/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:76: first defined heremutex.o: In function `tbb::internal::gcc_builtins::clz(unsigned long)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: multiple definition of `tbb::internal::gcc_builtins::clz(unsigned long)'concurrent_hash_map.o:/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: first defined heremutex.o: In function `tbb::internal::gcc_builtins::clz(unsigned int)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:76: multiple definition of `tbb::internal::gcc_builtins::clz(unsigned int)'concurrent_hash_map.o:/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:76: first defined hererecursive_mutex.o: In function `tbb::internal::gcc_builtins::clz(unsigned long)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: multiple definition of `tbb::internal::gcc_builtins::clz(unsigned long)'concurrent_hash_map.o:/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: first defined hererecursive_mutex.o: In function `tbb::internal::gcc_builtins::clz(unsigned int)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:76: multiple definition of `tbb::internal::gcc_builtins::clz(unsigned int)'concurrent_hash_map.o:/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:76: first defined herecondition_variable.o: In function `tbb::internal::gcc_builtins::clz(unsigned long)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/compat/../machine/gcc_generic.h:77: multiple definition of `tbb::internal::gcc_builtins::clz(unsigned long)'concurrent_hash_map.o:/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: first defined herecondition_variable.o: In function `tbb::internal::gcc_builtins::clz(unsigned int)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/compat/../machine/gcc_generic.h:76: multiple definition of `tbb::internal::gcc_builtins::clz(unsigned int)'concurrent_hash_map.o:/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:76: first defined heretbb_thread.o: In function `tbb::internal::gcc_builtins::clz(unsigned long)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: multiple definition of `tbb::internal::gcc_builtins::clz(unsigned long)'concurrent_hash_map.o:/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: first defined heretbb_thread.o: In function `tbb::internal::gcc_builtins::clz(unsigned int)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:76: multiple definition of `tbb::internal::gcc_builtins::clz(unsigned int)'concurrent_hash_map.o:/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:76: first defined hereconcurrent_monitor.o: In function `tbb::internal::gcc_builtins::clz(unsigned long)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: multiple definition of `tbb::internal::gcc_builtins::clz(unsigned long)'concurrent_hash_map.o:/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: first defined hereconcurrent_monitor.o: In function `tbb::internal::gcc_builtins::clz(unsigned int)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:76: multiple definition of `tbb::internal::gcc_builtins::clz(unsigned int)'concurrent_hash_map.o:/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:76: first defined hereprivate_server.o: In function `tbb::internal::gcc_builtins::clz(unsigned long)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: multiple definition of `tbb::internal::gcc_builtins::clz(unsigned long)'concurrent_hash_map.o:/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: first defined hereprivate_server.o: In function `tbb::internal::gcc_builtins::clz(unsigned int)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:76: multiple definition of `tbb::internal::gcc_builtins::clz(unsigned int)'concurrent_hash_map.o:/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:76: first defined heretask_group_context.o: In function `tbb::internal::gcc_builtins::clz(unsigned long)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: multiple definition of `tbb::internal::gcc_builtins::clz(unsigned long)'concurrent_hash_map.o:/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: first defined heretask_group_context.o: In function `tbb::internal::gcc_builtins::clz(unsigned int)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:76: multiple definition of `tbb::internal::gcc_builtins::clz(unsigned int)'concurrent_hash_map.o:/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:76: first defined heregovernor.o: In function `tbb::internal::gcc_builtins::clz(unsigned long)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: multiple definition of `tbb::internal::gcc_builtins::clz(unsigned long)'concurrent_hash_map.o:/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: first defined heregovernor.o: In function `tbb::internal::gcc_builtins::clz(unsigned int)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:76: multiple definition of `tbb::internal::gcc_builtins::clz(unsigned int)'concurrent_hash_map.o:/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:76: first defined heremarket.o: In function `tbb::internal::gcc_builtins::clz(unsigned long)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: multiple definition of `tbb::internal::gcc_builtins::clz(unsigned long)'concurrent_hash_map.o:/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: first defined heremarket.o: In function `tbb::internal::gcc_builtins::clz(unsigned int)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:76: multiple definition of `tbb::internal::gcc_builtins::clz(unsigned int)'concurrent_hash_map.o:/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:76: first defined herearena.o: In function `tbb::internal::gcc_builtins::clz(unsigned long)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: multiple definition of `tbb::internal::gcc_builtins::clz(unsigned long)'concurrent_hash_map.o:/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: first defined herearena.o: In function `tbb::internal::gcc_builtins::clz(unsigned int)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:76: multiple definition of `tbb::internal::gcc_builtins::clz(unsigned int)'concurrent_hash_map.o:/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:76: first defined herescheduler.o: In function `tbb::internal::gcc_builtins::clz(unsigned long)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: multiple definition of `tbb::internal::gcc_builtins::clz(unsigned long)'concurrent_hash_map.o:/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: first defined herescheduler.o: In function `tbb::internal::gcc_builtins::clz(unsigned int)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:76: multiple definition of `tbb::internal::gcc_builtins::clz(unsigned int)'concurrent_hash_map.o:/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:76: first defined hereobserver_proxy.o: In function `tbb::internal::gcc_builtins::clz(unsigned long)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: multiple definition of `tbb::internal::gcc_builtins::clz(unsigned long)'concurrent_hash_map.o:/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: first defined hereobserver_proxy.o: In function `tbb::internal::gcc_builtins::clz(unsigned int)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:76: multiple definition of `tbb::internal::gcc_builtins::clz(unsigned int)'concurrent_hash_map.o:/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:76: first defined heretbb_main.o: In function `tbb::internal::gcc_builtins::clz(unsigned long)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: multiple definition of `tbb::internal::gcc_builtins::clz(unsigned long)'concurrent_hash_map.o:/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: first defined heretbb_main.o: In function `tbb::internal::gcc_builtins::clz(unsigned int)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:76: multiple definition of `tbb::internal::gcc_builtins::clz(unsigned int)'concurrent_hash_map.o:/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:76: first defined hereconcurrent_vector_v2.o: In function `tbb::internal::gcc_builtins::clz(unsigned long)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: multiple definition of `tbb::internal::gcc_builtins::clz(unsigned long)'concurrent_hash_map.o:/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: first defined hereconcurrent_vector_v2.o: In function `tbb::internal::gcc_builtins::clz(unsigned int)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:76: multiple definition of `tbb::internal::gcc_builtins::clz(unsigned int)'concurrent_hash_map.o:/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:76: first defined hereconcurrent_queue_v2.o: In function `tbb::internal::gcc_builtins::clz(unsigned long)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: multiple definition of `tbb::internal::gcc_builtins::clz(unsigned long)'concurrent_hash_map.o:/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: first defined hereconcurrent_queue_v2.o: In function `tbb::internal::gcc_builtins::clz(unsigned int)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:76: multiple definition of `tbb::internal::gcc_builtins::clz(unsigned int)'concurrent_hash_map.o:/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:76: first defined herespin_rw_mutex_v2.o: In function `tbb::internal::gcc_builtins::clz(unsigned long)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: multiple definition of `tbb::internal::gcc_builtins::clz(unsigned long)'concurrent_hash_map.o:/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: first defined herespin_rw_mutex_v2.o: In function `tbb::internal::gcc_builtins::clz(unsigned int)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:76: multiple definition of `tbb::internal::gcc_builtins::clz(unsigned int)'concurrent_hash_map.o:/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:76: first defined heretask_v2.o: In function `tbb::internal::gcc_builtins::clz(unsigned long)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: multiple definition of `tbb::internal::gcc_builtins::clz(unsigned long)'concurrent_hash_map.o:/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: first defined heretask_v2.o: In function `tbb::internal::gcc_builtins::clz(unsigned int)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:76: multiple definition of `tbb::internal::gcc_builtins::clz(unsigned int)'concurrent_hash_map.o:/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:76: first defined herecollect2: ld returned 1 exit statusmake[1]: *** [libtbb_debug.so.2] Error 1make[1]: Leaving directory `/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug'make: *** [tbb] Error 2

And I comment the line 76 "int clz(unsigned int x){ return __builtin_clz(x);};" ingcc_generic.h, then I get this:
root@gem5-desktop:/home/tbb40_20120201oss# make arch=alpha compiler=gcc CXXFLAGS="-DTBB_USE_GCC_BUILTINS" runtime=cc4.3.6_libc2.9Created ./build/linux_alpha_gcc_cc4.3.6_libc2.9_release and ..._debug directoriesmake -C "./build/linux_alpha_gcc_cc4.3.6_libc2.9_debug" -r -f ../../build/Makefile.tbb cfg=debug tbb_root=../..make[1]: Entering directory `/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug'../../build/Makefile.tbb:39: CONFIG: cfg=debug arch=alpha compiler=gcc os=linux runtime=cc4.3.6_libc2.9/root/x-tools/alphaev67-unknown-linux-gnu/bin/alphaev67-unknown-linux-gnu-g++ -c -MMD -DTBB_USE_DEBUG -DDO_ITT_NOTIFY -g -O0 -DUSE_PTHREAD -fPIC -D__TBB_BUILD=1 -Wall -Wno-parentheses -Wno-non-virtual-dtor -DTBB_USE_GCC_BUILTINS -I../../src -I../../src/rml/include -I../../include ../../src/tbb/concurrent_hash_map.cpp/root/x-tools/alphaev67-unknown-linux-gnu/bin/alphaev67-unknown-linux-gnu-g++ -c -MMD -DTBB_USE_DEBUG -DDO_ITT_NOTIFY -g -O0 -DUSE_PTHREAD -fPIC -D__TBB_BUILD=1 -Wall -Wno-parentheses -Wno-non-virtual-dtor -DTBB_USE_GCC_BUILTINS -I../../src -I../../src/rml/include -I../../include ../../src/tbb/concurrent_queue.cpp/root/x-tools/alphaev67-unknown-linux-gnu/bin/alphaev67-unknown-linux-gnu-g++ -c -MMD -DTBB_USE_DEBUG -DDO_ITT_NOTIFY -g -O0 -DUSE_PTHREAD -fPIC -D__TBB_BUILD=1 -Wall -Wno-parentheses -Wno-non-virtual-dtor -DTBB_USE_GCC_BUILTINS -I../../src -I../../src/rml/include -I../../include ../../src/tbb/concurrent_vector.cpp/root/x-tools/alphaev67-unknown-linux-gnu/bin/alphaev67-unknown-linux-gnu-g++ -c -MMD -DTBB_USE_DEBUG -DDO_ITT_NOTIFY -g -O0 -DUSE_PTHREAD -fPIC -D__TBB_BUILD=1 -Wall -Wno-parentheses -Wno-non-virtual-dtor -DTBB_USE_GCC_BUILTINS -I../../src -I../../src/rml/include -I../../include ../../src/tbb/dynamic_link.cpp/root/x-tools/alphaev67-unknown-linux-gnu/bin/alphaev67-unknown-linux-gnu-g++ -c -MMD -DTBB_USE_DEBUG -DDO_ITT_NOTIFY -g -O0 -DUSE_PTHREAD -fPIC -D__TBB_BUILD=1 -Wall -Wno-parentheses -Wno-non-virtual-dtor -DTBB_USE_GCC_BUILTINS -I../../src -I../../src/rml/include -I../../include ../../src/tbb/cache_aligned_allocator.cpp/root/x-tools/alphaev67-unknown-linux-gnu/bin/alphaev67-unknown-linux-gnu-g++ -c -MMD -DTBB_USE_DEBUG -DDO_ITT_NOTIFY -g -O0 -DUSE_PTHREAD -fPIC -D__TBB_BUILD=1 -Wall -Wno-parentheses -Wno-non-virtual-dtor -DTBB_USE_GCC_BUILTINS -I../../src -I../../src/rml/include -I../../include ../../src/tbb/pipeline.cpp/root/x-tools/alphaev67-unknown-linux-gnu/bin/alphaev67-unknown-linux-gnu-g++ -c -MMD -DTBB_USE_DEBUG -DDO_ITT_NOTIFY -g -O0 -DUSE_PTHREAD -fPIC -D__TBB_BUILD=1 -Wall -Wno-parentheses -Wno-non-virtual-dtor -DTBB_USE_GCC_BUILTINS -I../../src -I../../src/rml/include -I../../include ../../src/tbb/queuing_mutex.cpp/root/x-tools/alphaev67-unknown-linux-gnu/bin/alphaev67-unknown-linux-gnu-g++ -c -MMD -DTBB_USE_DEBUG -DDO_ITT_NOTIFY -g -O0 -DUSE_PTHREAD -fPIC -D__TBB_BUILD=1 -Wall -Wno-parentheses -Wno-non-virtual-dtor -DTBB_USE_GCC_BUILTINS -I../../src -I../../src/rml/include -I../../include ../../src/tbb/queuing_rw_mutex.cpp/root/x-tools/alphaev67-unknown-linux-gnu/bin/alphaev67-unknown-linux-gnu-g++ -c -MMD -DTBB_USE_DEBUG -DDO_ITT_NOTIFY -g -O0 -DUSE_PTHREAD -fPIC -D__TBB_BUILD=1 -Wall -Wno-parentheses -Wno-non-virtual-dtor -DTBB_USE_GCC_BUILTINS -I../../src -I../../src/rml/include -I../../include ../../src/tbb/reader_writer_lock.cpp/root/x-tools/alphaev67-unknown-linux-gnu/bin/alphaev67-unknown-linux-gnu-g++ -c -MMD -DTBB_USE_DEBUG -DDO_ITT_NOTIFY -g -O0 -DUSE_PTHREAD -fPIC -D__TBB_BUILD=1 -Wall -Wno-parentheses -Wno-non-virtual-dtor -DTBB_USE_GCC_BUILTINS -I../../src -I../../src/rml/include -I../../include ../../src/tbb/spin_rw_mutex.cpp/root/x-tools/alphaev67-unknown-linux-gnu/bin/alphaev67-unknown-linux-gnu-g++ -c -MMD -DTBB_USE_DEBUG -DDO_ITT_NOTIFY -g -O0 -DUSE_PTHREAD -fPIC -D__TBB_BUILD=1 -Wall -Wno-parentheses -Wno-non-virtual-dtor -DTBB_USE_GCC_BUILTINS -I../../src -I../../src/rml/include -I../../include ../../src/tbb/spin_mutex.cpp/root/x-tools/alphaev67-unknown-linux-gnu/bin/alphaev67-unknown-linux-gnu-g++ -c -MMD -DTBB_USE_DEBUG -DDO_ITT_NOTIFY -g -O0 -DUSE_PTHREAD -fPIC -D__TBB_BUILD=1 -Wall -Wno-parentheses -Wno-non-virtual-dtor -DTBB_USE_GCC_BUILTINS -I../../src -I../../src/rml/include -I../../include ../../src/tbb/critical_section.cpp/root/x-tools/alphaev67-unknown-linux-gnu/bin/alphaev67-unknown-linux-gnu-g++ -c -MMD -DTBB_USE_DEBUG -DDO_ITT_NOTIFY -g -O0 -DUSE_PTHREAD -fPIC -D__TBB_BUILD=1 -Wall -Wno-parentheses -Wno-non-virtual-dtor -DTBB_USE_GCC_BUILTINS -I../../src -I../../src/rml/include -I../../include ../../src/tbb/task.cpp/root/x-tools/alphaev67-unknown-linux-gnu/bin/alphaev67-unknown-linux-gnu-g++ -c -MMD -DTBB_USE_DEBUG -DDO_ITT_NOTIFY -g -O0 -DUSE_PTHREAD -fPIC -D__TBB_BUILD=1 -Wall -Wno-parentheses -Wno-non-virtual-dtor -DTBB_USE_GCC_BUILTINS -I. -I../../src -I../../src/rml/include -I../../include ../../src/tbb/tbb_misc.cpp/root/x-tools/alphaev67-unknown-linux-gnu/bin/alphaev67-unknown-linux-gnu-g++ -c -MMD -DTBB_USE_DEBUG -DDO_ITT_NOTIFY -g -O0 -DUSE_PTHREAD -fPIC -D__TBB_BUILD=1 -Wall -Wno-parentheses -Wno-non-virtual-dtor -DTBB_USE_GCC_BUILTINS -I../../src -I../../src/rml/include -I../../include ../../src/tbb/tbb_misc_ex.cpp/root/x-tools/alphaev67-unknown-linux-gnu/bin/alphaev67-unknown-linux-gnu-g++ -c -MMD -DTBB_USE_DEBUG -DDO_ITT_NOTIFY -g -O0 -DUSE_PTHREAD -fPIC -D__TBB_BUILD=1 -Wall -Wno-parentheses -Wno-non-virtual-dtor -DTBB_USE_GCC_BUILTINS -I../../src -I../../src/rml/include -I../../include ../../src/tbb/mutex.cpp/root/x-tools/alphaev67-unknown-linux-gnu/bin/alphaev67-unknown-linux-gnu-g++ -c -MMD -DTBB_USE_DEBUG -DDO_ITT_NOTIFY -g -O0 -DUSE_PTHREAD -fPIC -D__TBB_BUILD=1 -Wall -Wno-parentheses -Wno-non-virtual-dtor -DTBB_USE_GCC_BUILTINS -I../../src -I../../src/rml/include -I../../include ../../src/tbb/recursive_mutex.cpp/root/x-tools/alphaev67-unknown-linux-gnu/bin/alphaev67-unknown-linux-gnu-g++ -c -MMD -DTBB_USE_DEBUG -DDO_ITT_NOTIFY -g -O0 -DUSE_PTHREAD -fPIC -D__TBB_BUILD=1 -Wall -Wno-parentheses -Wno-non-virtual-dtor -DTBB_USE_GCC_BUILTINS -I../../src -I../../src/rml/include -I../../include ../../src/tbb/condition_variable.cpp/root/x-tools/alphaev67-unknown-linux-gnu/bin/alphaev67-unknown-linux-gnu-g++ -c -MMD -DTBB_USE_DEBUG -DDO_ITT_NOTIFY -g -O0 -DUSE_PTHREAD -fPIC -D__TBB_BUILD=1 -Wall -Wno-parentheses -Wno-non-virtual-dtor -DTBB_USE_GCC_BUILTINS -I../../src -I../../src/rml/include -I../../include ../../src/tbb/tbb_thread.cpp/root/x-tools/alphaev67-unknown-linux-gnu/bin/alphaev67-unknown-linux-gnu-g++ -c -MMD -DTBB_USE_DEBUG -DDO_ITT_NOTIFY -g -O0 -DUSE_PTHREAD -fPIC -D__TBB_BUILD=1 -Wall -Wno-parentheses -Wno-non-virtual-dtor -DTBB_USE_GCC_BUILTINS -I../../src -I../../src/rml/include -I../../include ../../src/tbb/concurrent_monitor.cpp/root/x-tools/alphaev67-unknown-linux-gnu/bin/alphaev67-unknown-linux-gnu-g++ -c -MMD -DTBB_USE_DEBUG -DDO_ITT_NOTIFY -g -O0 -DUSE_PTHREAD -fPIC -D__TBB_BUILD=1 -Wall -Wno-parentheses -Wno-non-virtual-dtor -DTBB_USE_GCC_BUILTINS -I../../src -I../../src/rml/include -I../../include ../../src/tbb/private_server.cpp/root/x-tools/alphaev67-unknown-linux-gnu/bin/alphaev67-unknown-linux-gnu-g++ -c -MMD -DTBB_USE_DEBUG -DDO_ITT_NOTIFY -g -O0 -DUSE_PTHREAD -fPIC -D__TBB_BUILD=1 -Wall -Wno-parentheses -Wno-non-virtual-dtor -DTBB_USE_GCC_BUILTINS -I../../src -I../../src/rml/include -I../../include ../../src/tbb/task_group_context.cpp/root/x-tools/alphaev67-unknown-linux-gnu/bin/alphaev67-unknown-linux-gnu-g++ -c -MMD -DTBB_USE_DEBUG -DDO_ITT_NOTIFY -g -O0 -DUSE_PTHREAD -fPIC -D__TBB_BUILD=1 -Wall -Wno-parentheses -Wno-non-virtual-dtor -DTBB_USE_GCC_BUILTINS -I../../src -I../../src/rml/include -I../../include ../../src/tbb/governor.cpp/root/x-tools/alphaev67-unknown-linux-gnu/bin/alphaev67-unknown-linux-gnu-g++ -c -MMD -DTBB_USE_DEBUG -DDO_ITT_NOTIFY -g -O0 -DUSE_PTHREAD -fPIC -D__TBB_BUILD=1 -Wall -Wno-parentheses -Wno-non-virtual-dtor -DTBB_USE_GCC_BUILTINS -I../../src -I../../src/rml/include -I../../include ../../src/tbb/market.cpp/root/x-tools/alphaev67-unknown-linux-gnu/bin/alphaev67-unknown-linux-gnu-g++ -c -MMD -DTBB_USE_DEBUG -DDO_ITT_NOTIFY -g -O0 -DUSE_PTHREAD -fPIC -D__TBB_BUILD=1 -Wall -Wno-parentheses -Wno-non-virtual-dtor -DTBB_USE_GCC_BUILTINS -I../../src -I../../src/rml/include -I../../include ../../src/tbb/arena.cpp/root/x-tools/alphaev67-unknown-linux-gnu/bin/alphaev67-unknown-linux-gnu-g++ -c -MMD -DTBB_USE_DEBUG -DDO_ITT_NOTIFY -g -O0 -DUSE_PTHREAD -fPIC -D__TBB_BUILD=1 -Wall -Wno-parentheses -Wno-non-virtual-dtor -DTBB_USE_GCC_BUILTINS -I../../src -I../../src/rml/include -I../../include ../../src/tbb/scheduler.cpp/root/x-tools/alphaev67-unknown-linux-gnu/bin/alphaev67-unknown-linux-gnu-g++ -c -MMD -DTBB_USE_DEBUG -DDO_ITT_NOTIFY -g -O0 -DUSE_PTHREAD -fPIC -D__TBB_BUILD=1 -Wall -Wno-parentheses -Wno-non-virtual-dtor -DTBB_USE_GCC_BUILTINS -I../../src -I../../src/rml/include -I../../include ../../src/tbb/observer_proxy.cpp/root/x-tools/alphaev67-unknown-linux-gnu/bin/alphaev67-unknown-linux-gnu-g++ -c -MMD -DTBB_USE_DEBUG -DDO_ITT_NOTIFY -g -O0 -DUSE_PTHREAD -fPIC -D__TBB_BUILD=1 -Wall -Wno-parentheses -Wno-non-virtual-dtor -DTBB_USE_GCC_BUILTINS -I../../src -I../../src/rml/include -I../../include ../../src/tbb/tbb_main.cpp/root/x-tools/alphaev67-unknown-linux-gnu/bin/alphaev67-unknown-linux-gnu-g++ -c -MMD -DTBB_USE_DEBUG -DDO_ITT_NOTIFY -g -O0 -DUSE_PTHREAD -fPIC -D__TBB_BUILD=1 -Wall -Wno-parentheses -Wno-non-virtual-dtor -DTBB_USE_GCC_BUILTINS -I../../src -I../../src/rml/include -I../../include ../../src/old/concurrent_vector_v2.cpp/root/x-tools/alphaev67-unknown-linux-gnu/bin/alphaev67-unknown-linux-gnu-g++ -c -MMD -DTBB_USE_DEBUG -DDO_ITT_NOTIFY -g -O0 -DUSE_PTHREAD -fPIC -D__TBB_BUILD=1 -Wall -Wno-parentheses -Wno-non-virtual-dtor -DTBB_USE_GCC_BUILTINS -I../../src -I../../src/rml/include -I../../include ../../src/old/concurrent_queue_v2.cpp/root/x-tools/alphaev67-unknown-linux-gnu/bin/alphaev67-unknown-linux-gnu-g++ -c -MMD -DTBB_USE_DEBUG -DDO_ITT_NOTIFY -g -O0 -DUSE_PTHREAD -fPIC -D__TBB_BUILD=1 -Wall -Wno-parentheses -Wno-non-virtual-dtor -DTBB_USE_GCC_BUILTINS -I../../src -I../../src/rml/include -I../../include ../../src/old/spin_rw_mutex_v2.cpp/root/x-tools/alphaev67-unknown-linux-gnu/bin/alphaev67-unknown-linux-gnu-g++ -c -MMD -DTBB_USE_DEBUG -DDO_ITT_NOTIFY -g -O0 -DUSE_PTHREAD -fPIC -D__TBB_BUILD=1 -Wall -Wno-parentheses -Wno-non-virtual-dtor -DTBB_USE_GCC_BUILTINS -I../../src -I../../src/rml/include -I../../include ../../src/old/task_v2.cpp/root/x-tools/alphaev67-unknown-linux-gnu/bin/alphaev67-unknown-linux-gnu-g++ -fPIC -o libtbb_debug.so.2 concurrent_hash_map.o concurrent_queue.o concurrent_vector.o dynamic_link.o itt_notify.o cache_aligned_allocator.o pipeline.o queuing_mutex.o queuing_rw_mutex.o reader_writer_lock.o spin_rw_mutex.o spin_mutex.o critical_section.o task.o tbb_misc.o tbb_misc_ex.o mutex.o recursive_mutex.o condition_variable.o tbb_thread.o concurrent_monitor.o semaphore.o private_server.o rml_tbb.o task_group_context.o governor.o market.o arena.o scheduler.o observer_proxy.o tbb_statistics.o tbb_main.o concurrent_vector_v2.o concurrent_queue_v2.o spin_rw_mutex_v2.o task_v2.o -ldl -lpthread -lrt -shared -Wl,-soname=libtbb_debug.so.2 -Wl,--version-script,tbb.defconcurrent_queue.o: In function `tbb::internal::gcc_builtins::clz(unsigned long)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: multiple definition of `tbb::internal::gcc_builtins::clz(unsigned long)'concurrent_hash_map.o:/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: first defined hereconcurrent_vector.o: In function `tbb::internal::gcc_builtins::clz(unsigned long)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: multiple definition of `tbb::internal::gcc_builtins::clz(unsigned long)'concurrent_hash_map.o:/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: first defined heredynamic_link.o: In function `tbb::internal::gcc_builtins::clz(unsigned long)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: multiple definition of `tbb::internal::gcc_builtins::clz(unsigned long)'concurrent_hash_map.o:/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: first defined herecache_aligned_allocator.o: In function `tbb::internal::gcc_builtins::clz(unsigned long)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: multiple definition of `tbb::internal::gcc_builtins::clz(unsigned long)'concurrent_hash_map.o:/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: first defined herepipeline.o: In function `tbb::internal::gcc_builtins::clz(unsigned long)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: multiple definition of `tbb::internal::gcc_builtins::clz(unsigned long)'concurrent_hash_map.o:/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: first defined herequeuing_mutex.o: In function `tbb::internal::gcc_builtins::clz(unsigned long)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: multiple definition of `tbb::internal::gcc_builtins::clz(unsigned long)'concurrent_hash_map.o:/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: first defined herequeuing_rw_mutex.o: In function `tbb::internal::gcc_builtins::clz(unsigned long)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: multiple definition of `tbb::internal::gcc_builtins::clz(unsigned long)'concurrent_hash_map.o:/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: first defined herereader_writer_lock.o: In function `tbb::internal::gcc_builtins::clz(unsigned long)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: multiple definition of `tbb::internal::gcc_builtins::clz(unsigned long)'concurrent_hash_map.o:/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: first defined herespin_rw_mutex.o: In function `tbb::internal::gcc_builtins::clz(unsigned long)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: multiple definition of `tbb::internal::gcc_builtins::clz(unsigned long)'concurrent_hash_map.o:/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: first defined herespin_mutex.o: In function `tbb::internal::gcc_builtins::clz(unsigned long)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: multiple definition of `tbb::internal::gcc_builtins::clz(unsigned long)'concurrent_hash_map.o:/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: first defined herecritical_section.o: In function `tbb::internal::gcc_builtins::clz(unsigned long)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: multiple definition of `tbb::internal::gcc_builtins::clz(unsigned long)'concurrent_hash_map.o:/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: first defined heretask.o: In function `tbb::internal::gcc_builtins::clz(unsigned long)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: multiple definition of `tbb::internal::gcc_builtins::clz(unsigned long)'concurrent_hash_map.o:/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: first defined heretbb_misc.o: In function `tbb::internal::gcc_builtins::clz(unsigned long)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: multiple definition of `tbb::internal::gcc_builtins::clz(unsigned long)'concurrent_hash_map.o:/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: first defined heretbb_misc_ex.o: In function `tbb::internal::gcc_builtins::clz(unsigned long)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: multiple definition of `tbb::internal::gcc_builtins::clz(unsigned long)'concurrent_hash_map.o:/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: first defined heremutex.o: In function `tbb::internal::gcc_builtins::clz(unsigned long)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: multiple definition of `tbb::internal::gcc_builtins::clz(unsigned long)'concurrent_hash_map.o:/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: first defined hererecursive_mutex.o: In function `tbb::internal::gcc_builtins::clz(unsigned long)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: multiple definition of `tbb::internal::gcc_builtins::clz(unsigned long)'concurrent_hash_map.o:/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: first defined herecondition_variable.o: In function `tbb::internal::gcc_builtins::clz(unsigned long)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/compat/../machine/gcc_generic.h:77: multiple definition of `tbb::internal::gcc_builtins::clz(unsigned long)'concurrent_hash_map.o:/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: first defined heretbb_thread.o: In function `tbb::internal::gcc_builtins::clz(unsigned long)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: multiple definition of `tbb::internal::gcc_builtins::clz(unsigned long)'concurrent_hash_map.o:/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: first defined hereconcurrent_monitor.o: In function `tbb::internal::gcc_builtins::clz(unsigned long)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: multiple definition of `tbb::internal::gcc_builtins::clz(unsigned long)'concurrent_hash_map.o:/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: first defined hereprivate_server.o: In function `tbb::internal::gcc_builtins::clz(unsigned long)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: multiple definition of `tbb::internal::gcc_builtins::clz(unsigned long)'concurrent_hash_map.o:/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: first defined heretask_group_context.o: In function `tbb::internal::gcc_builtins::clz(unsigned long)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: multiple definition of `tbb::internal::gcc_builtins::clz(unsigned long)'concurrent_hash_map.o:/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: first defined heregovernor.o: In function `tbb::internal::gcc_builtins::clz(unsigned long)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: multiple definition of `tbb::internal::gcc_builtins::clz(unsigned long)'concurrent_hash_map.o:/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: first defined heremarket.o: In function `tbb::internal::gcc_builtins::clz(unsigned long)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: multiple definition of `tbb::internal::gcc_builtins::clz(unsigned long)'concurrent_hash_map.o:/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: first defined herearena.o: In function `tbb::internal::gcc_builtins::clz(unsigned long)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: multiple definition of `tbb::internal::gcc_builtins::clz(unsigned long)'concurrent_hash_map.o:/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: first defined herescheduler.o: In function `tbb::internal::gcc_builtins::clz(unsigned long)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: multiple definition of `tbb::internal::gcc_builtins::clz(unsigned long)'concurrent_hash_map.o:/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: first defined hereobserver_proxy.o: In function `tbb::internal::gcc_builtins::clz(unsigned long)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: multiple definition of `tbb::internal::gcc_builtins::clz(unsigned long)'concurrent_hash_map.o:/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: first defined heretbb_main.o: In function `tbb::internal::gcc_builtins::clz(unsigned long)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: multiple definition of `tbb::internal::gcc_builtins::clz(unsigned long)'concurrent_hash_map.o:/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: first defined hereconcurrent_vector_v2.o: In function `tbb::internal::gcc_builtins::clz(unsigned long)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: multiple definition of `tbb::internal::gcc_builtins::clz(unsigned long)'concurrent_hash_map.o:/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: first defined hereconcurrent_queue_v2.o: In function `tbb::internal::gcc_builtins::clz(unsigned long)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: multiple definition of `tbb::internal::gcc_builtins::clz(unsigned long)'concurrent_hash_map.o:/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: first defined herespin_rw_mutex_v2.o: In function `tbb::internal::gcc_builtins::clz(unsigned long)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: multiple definition of `tbb::internal::gcc_builtins::clz(unsigned long)'concurrent_hash_map.o:/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: first defined heretask_v2.o: In function `tbb::internal::gcc_builtins::clz(unsigned long)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: multiple definition of `tbb::internal::gcc_builtins::clz(unsigned long)'concurrent_hash_map.o:/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/machine/gcc_generic.h:77: first defined herecollect2: ld returned 1 exit statusmake[1]: *** [libtbb_debug.so.2] Error 1make[1]: Leaving directory `/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug'make: *** [tbb] Error 2

"And I comment the line 76 "int clz(unsigned int x){ return __builtin_clz(x);};" in gcc_generic.h, then I get this:"
Hmm, it didn't occur to you to make both clz overloads "static inline" like some other functions nearby?

I think this is due to that gcc_generic.h is referenced by multiple .c files (maybe indirect reference), and when compiling them to generate .o files, the linker reports errors about multiple defenition. So what should I do next?

I modify them to "static inline", and the compliling is done successfully.

The problem is that, when I try to compile tbb application (such as blackscholes in PARSEC benchmark suite), the ld cannot find the library:root@gem5-desktop:/home/tbb/app/src# source /home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_release/tbbvars.shroot@gem5-desktop:/home/tbb/app/src# /root/x-tools/alphaev67-unknown-linux-gnu/bin/alphaev67-unknown-linux-gnu-g++ -o bs-tbb blackscholes_tbb.cpp -ltbb/root/x-tools/alphaev67-unknown-linux-gnu/lib/gcc/alphaev67-unknown-linux-gnu/4.3.6/../../../../alphaev67-unknown-linux-gnu/bin/ld: cannot find -ltbbcollect2: ld returned 1 exit statusroot@gem5-desktop:/home/tbb/app/src# echo $LD_LIBRARY_PATH/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_releaseI copy thelibtbb.so andlibtbb.so.2 into /lib and /usr/lib, it doesn't work.I ldconfig the path "/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_release",it still doesn't work.

You're not done yet: first try "make all" to see what happens with the test suite and the examples.

instead of -ltbb you can try to specify the full lib name directly, e.g.:

libtbb.so.2

And one more thing:

Running the TBB tests and examples is a good idea to at least have a sense that all works fine.
If I get it right you are using native compiler, not the cross one. If so, as it have been already mentioned, this can be done in a two ways:

  • make all
  • or
  • make test followed by make examples

if you using the cross compiler you would probably need to run the tests manually or create an ad-hoc script.

Reporting the testing results is a a good idea as well :)

I don't know what causes the "undefined reference":root@gem5-desktop:/home/tbb40_20120201oss# make arch=alpha compiler=gcc CXXFLAGS="-DTBB_USE_GCC_BUILTINS" runtime=cc4.3.6_libc2.9 testCreated ./build/linux_alpha_gcc_cc4.3.6_libc2.9_release and ..._debug directoriesmake -C "./build/linux_alpha_gcc_cc4.3.6_libc2.9_debug" -r -f ../../build/Makefile.tbb cfg=debug tbb_root=../..make[1]: Entering directory `/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug'../../build/Makefile.tbb:39: CONFIG: cfg=debug arch=alpha compiler=gcc os=linux runtime=cc4.3.6_libc2.9make[1]: Nothing to be done for `default_tbb'.make[1]: Leaving directory `/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug'make -C "./build/linux_alpha_gcc_cc4.3.6_libc2.9_release" -r -f ../../build/Makefile.tbb cfg=release tbb_root=../..make[1]: Entering directory `/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_release'../../build/Makefile.tbb:39: CONFIG: cfg=release arch=alpha compiler=gcc os=linux runtime=cc4.3.6_libc2.9make[1]: Nothing to be done for `default_tbb'.make[1]: Leaving directory `/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_release'make -C "./build/linux_alpha_gcc_cc4.3.6_libc2.9_debug" -r -f ../../build/Makefile.tbbmalloc cfg=debug malloc tbb_root=../..make[1]: Entering directory `/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug'make[1]: Nothing to be done for `malloc'.make[1]: Leaving directory `/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug'make -C "./build/linux_alpha_gcc_cc4.3.6_libc2.9_release" -r -f ../../build/Makefile.tbbmalloc cfg=release malloc tbb_root=../..make[1]: Entering directory `/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_release'make[1]: Nothing to be done for `malloc'.make[1]: Leaving directory `/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_release'make -C "./build/linux_alpha_gcc_cc4.3.6_libc2.9_debug" -r -f ../../build/Makefile.tbbmalloc cfg=debug malloc_test tbb_root=../..make[1]: Entering directory `/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug'/root/x-tools/alphaev67-unknown-linux-gnu/bin/alphaev67-unknown-linux-gnu-g++ -o test_ScalableAllocator.exe -DTBB_USE_DEBUG -DDO_ITT_NOTIFY -g -O0 -DUSE_PTHREAD -Wall -DTBB_USE_GCC_BUILTINS test_ScalableAllocator.o libtbbmalloc_debug.so -lpthread -lrt -Wl,-rpath-link=.test_ScalableAllocator.o: In function `memory_pool':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/memory_pool.h:216: undefined reference to `rml::pool_create_v1(long, rml::MemPoolPolicy const*, rml::MemoryPool**)'test_ScalableAllocator.o: In function `fixed_pool':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/memory_pool.h:239: undefined reference to `rml::pool_create_v1(long, rml::MemPoolPolicy const*, rml::MemoryPool**)'test_ScalableAllocator.o: In function `tbb::interface6::internal::pool_base::realloc(void*, unsigned long)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/memory_pool.h:70: undefined reference to `rml::pool_realloc(rml::MemoryPool*, void*, unsigned long)'test_ScalableAllocator.o: In function `tbb::interface6::internal::pool_base::malloc(unsigned long)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/memory_pool.h:62: undefined reference to `rml::pool_malloc(rml::MemoryPool*, unsigned long)'test_ScalableAllocator.o: In function `memory_pool':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/memory_pool.h:216: undefined reference to `rml::pool_create_v1(long, rml::MemPoolPolicy const*, rml::MemoryPool**)'collect2: ld returned 1 exit statusmake[1]: *** [test_ScalableAllocator.exe] Error 1make[1]: Leaving directory `/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug'make: [test] Error 2 (ignored)make -C "./build/linux_alpha_gcc_cc4.3.6_libc2.9_debug" -r -f ../../build/Makefile.test cfg=debug tbb_root=../..make[1]: Entering directory `/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug'/root/x-tools/alphaev67-unknown-linux-gnu/bin/alphaev67-unknown-linux-gnu-g++ -o test_blocked_range.exe -DTBB_USE_DEBUG -DDO_ITT_NOTIFY -g -O0 -DUSE_PTHREAD -Wall -Wshadow -Wcast-qual -Woverloaded-virtual -Wnon-virtual-dtor -Wextra -DTBB_USE_GCC_BUILTINS test_blocked_range.o libtbb_debug.so -lpthread -lrt -Wl,-rpath-link=.test_blocked_range.o: In function `task_scheduler_init':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/task_scheduler_init.h:112: undefined reference to `tbb::task_scheduler_init::initialize(int, unsigned long)'/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/task_scheduler_init.h:112: undefined reference to `tbb::task_scheduler_init::initialize(int, unsigned long)'test_blocked_range.o: In function `operator new(unsigned long, tbb::internal::allocate_root_with_context_proxy const&)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/task.h:929: undefined reference to `tbb::internal::allocate_root_with_context_proxy::allocate(unsigned long) const'test_blocked_range.o: In function `operator new(unsigned long, tbb::internal::allocate_continuation_proxy const&)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/task.h:938: undefined reference to `tbb::internal::allocate_continuation_proxy::allocate(unsigned long) const'test_blocked_range.o: In function `operator new(unsigned long, tbb::internal::allocate_child_proxy const&)':/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug/../../include/tbb/task.h:946: undefined reference to `tbb::internal::allocate_child_proxy::allocate(unsigned long) const'collect2: ld returned 1 exit statusmake[1]: *** [test_blocked_range.exe] Error 1make[1]: Leaving directory `/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_debug'make: [test] Error 2 (ignored)make -C "./build/linux_alpha_gcc_cc4.3.6_libc2.9_release" -r -f ../../build/Makefile.tbbmalloc cfg=release malloc_test tbb_root=../..make[1]: Entering directory `/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_release'/root/x-tools/alphaev67-unknown-linux-gnu/bin/alphaev67-unknown-linux-gnu-g++ -o test_ScalableAllocator.exe -DDO_ITT_NOTIFY -O2 -DUSE_PTHREAD -Wall -DTBB_USE_GCC_BUILTINS test_ScalableAllocator.o libtbbmalloc.so -lpthread -lrt -Wl,-rpath-link=.test_ScalableAllocator.o: In function `TestMain()':(.text+0x53c): undefined reference to `rml::pool_create_v1(long, rml::MemPoolPolicy const*, rml::MemoryPool**)'test_ScalableAllocator.o: In function `TestMain()':(.text+0x578): undefined reference to `rml::pool_create_v1(long, rml::MemPoolPolicy const*, rml::MemoryPool**)'test_ScalableAllocator.o: In function `TestMain()':(.text+0x750): undefined reference to `rml::pool_create_v1(long, rml::MemPoolPolicy const*, rml::MemoryPool**)'test_ScalableAllocator.o: In function `TestMain()':(.text+0x7b8): undefined reference to `rml::pool_create_v1(long, rml::MemPoolPolicy const*, rml::MemoryPool**)'test_ScalableAllocator.o: In function `TestMain()':(.text+0x7d0): undefined reference to `rml::pool_malloc(rml::MemoryPool*, unsigned long)'test_ScalableAllocator.o: In function `TestMain()':(.text+0x7d8): undefined reference to `rml::pool_malloc(rml::MemoryPool*, unsigned long)'test_ScalableAllocator.o: In function `TestMain()':(.text+0x804): undefined reference to `rml::pool_realloc(rml::MemoryPool*, void*, unsigned long)'test_ScalableAllocator.o: In function `TestMain()':(.text+0x880): undefined reference to `rml::pool_realloc(rml::MemoryPool*, void*, unsigned long)'test_ScalableAllocator.o: In function `TestMain()':(.text+0x8d4): undefined reference to `rml::pool_realloc(rml::MemoryPool*, void*, unsigned long)'test_ScalableAllocator.o: In function `TestMain()':(.text+0x8dc): undefined reference to `rml::pool_realloc(rml::MemoryPool*, void*, unsigned long)'test_ScalableAllocator.o: In function `TestMain()':(.text+0x95c): undefined reference to `rml::pool_malloc(rml::MemoryPool*, unsigned long)'test_ScalableAllocator.o: In function `TestMain()':(.text+0x964): undefined reference to `rml::pool_malloc(rml::MemoryPool*, unsigned long)'test_ScalableAllocator.o: In function `tbb::interface6::memory_pool::memory_pool(MinimalAllocator const&)':(.text._ZN3tbb10interface611memory_poolI16MinimalAllocatorEC1ERKS2_[tbb::interface6::memory_pool::memory_pool(MinimalAllocator const&)]+0xc0): undefined reference to `rml::pool_create_v1(long, rml::MemPoolPolicy const*, rml::MemoryPool**)'test_ScalableAllocator.o: In function `tbb::interface6::memory_pool::memory_pool(MinimalAllocator const&)':(.text._ZN3tbb10interface611memory_poolI16MinimalAllocatorEC1ERKS2_[tbb::interface6::memory_pool::memory_pool(MinimalAllocator const&)]+0x100): undefined reference to `rml::pool_create_v1(long, rml::MemPoolPolicy const*, rml::MemoryPool**)'test_ScalableAllocator.o: In function `void TestBasic, tbb::interface6::memory_pool_allocator, tbb::interface6::internal::pool_base> >(tbb::interface6::memory_pool_allocator, tbb::interface6::internal::pool_base>&)':(.text._Z9TestBasicI3FooIdLm1EEN3tbb10interface621memory_pool_allocatorIS1_NS3_8internal9pool_baseEEEEvRT0_[void TestBasic, tbb::interface6::memory_pool_allocator, tbb::interface6::internal::pool_base> >(tbb::interface6::memory_pool_allocator, tbb::interface6::internal::pool_base>&)]+0x58): undefined reference to `rml::pool_malloc(rml::MemoryPool*, unsigned long)'test_ScalableAllocator.o: In function `void TestBasic, tbb::interface6::memory_pool_allocator, tbb::interface6::internal::pool_base> >(tbb::interface6::memory_pool_allocator, tbb::interface6::internal::pool_base>&)':(.text._Z9TestBasicI3FooIdLm1EEN3tbb10interface621memory_pool_allocatorIS1_NS3_8internal9pool_baseEEEEvRT0_[void TestBasic, tbb::interface6::memory_pool_allocator, tbb::interface6::internal::pool_base> >(tbb::interface6::memory_pool_allocator, tbb::interface6::internal::pool_base>&)]+0x68): undefined reference to `rml::pool_malloc(rml::MemoryPool*, unsigned long)'test_ScalableAllocator.o: In function `void TestBasic, tbb::interface6::memory_pool_allocator, tbb::interface6::internal::pool_base> >(tbb::interface6::memory_pool_allocator, tbb::interface6::internal::pool_base>&)':(.text._Z9TestBasicI3FooIdLm1EEN3tbb10interface621memory_pool_allocatorIS1_NS3_8internal9pool_baseEEEEvRT0_[void TestBasic, tbb::interface6::memory_pool_allocator, tbb::interface6::internal::pool_base> >(tbb::interface6::memory_pool_allocator, tbb::interface6::internal::pool_base>&)]+0xcc): undefined reference to `rml::pool_malloc(rml::MemoryPool*, unsigned long)'test_ScalableAllocator.o: In function `void TestBasic, tbb::interface6::memory_pool_allocator, tbb::interface6::internal::pool_base> >(tbb::interface6::memory_pool_allocator, tbb::interface6::internal::pool_base>&)':(.text._Z9TestBasicI3FooIdLm1EEN3tbb10interface621memory_pool_allocatorIS1_NS3_8internal9pool_baseEEEEvRT0_[void TestBasic, tbb::interface6::memory_pool_allocator, tbb::interface6::internal::pool_base> >(tbb::interface6::memory_pool_allocator, tbb::interface6::internal::pool_base>&)]+0xdc): undefined reference to `rml::pool_malloc(rml::MemoryPool*, unsigned long)'test_ScalableAllocator.o: In function `void TestBasic, tbb::interface6::memory_pool_allocator, tbb::interface6::internal::pool_base> >(tbb::interface6::memory_pool_allocator, tbb::interface6::internal::pool_base>&)':(.text._Z9TestBasicI3FooIdLm1EEN3tbb10interface621memory_pool_allocatorIS1_NS3_8internal9pool_baseEEEEvRT0_[void TestBasic, tbb::interface6::memory_pool_allocator, tbb::interface6::internal::pool_base> >(tbb::interface6::memory_pool_allocator, tbb::interface6::internal::pool_base>&)]+0x1d0): undefined reference to `rml::pool_malloc(rml::MemoryPool*, unsigned long)'test_ScalableAllocator.o:(.text._Z9TestBasicI3FooIdLm1EEN3tbb10interface621memory_pool_allocatorIS1_NS3_8internal9pool_baseEEEEvRT0_[void TestBasic, tbb::interface6::memory_pool_allocator, tbb::interface6::internal::pool_base> >(tbb::interface6::memory_pool_allocator, tbb::interface6::internal::pool_base>&)]+0x1e8): more undefined references to `rml::pool_malloc(rml::MemoryPool*, unsigned long)' followcollect2: ld returned 1 exit statusmake[1]: *** [test_ScalableAllocator.exe] Error 1make[1]: Leaving directory `/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_release'make: [test] Error 2 (ignored)make -C "./build/linux_alpha_gcc_cc4.3.6_libc2.9_release" -r -f ../../build/Makefile.test cfg=release tbb_root=../..make[1]: Entering directory `/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_release'/root/x-tools/alphaev67-unknown-linux-gnu/bin/alphaev67-unknown-linux-gnu-g++ -o test_blocked_range.exe -DDO_ITT_NOTIFY -O2 -DUSE_PTHREAD -Wall -Wshadow -Wcast-qual -Woverloaded-virtual -Wnon-virtual-dtor -Wextra -DTBB_USE_GCC_BUILTINS test_blocked_range.o libtbb.so -lpthread -lrt -Wl,-rpath-link=.test_blocked_range.o: In function `TestMain()':(.text+0x670): undefined reference to `tbb::task_scheduler_init::initialize(int, unsigned long)'test_blocked_range.o: In function `TestMain()':(.text+0x684): undefined reference to `tbb::task_scheduler_init::initialize(int, unsigned long)'test_blocked_range.o: In function `tbb::interface6::internal::start_for, Striker, tbb::auto_partitioner>::run(tbb::blocked_range const&, Striker const&, tbb::auto_partitioner const&)':(.text._ZN3tbb10interface68internal9start_forINS_13blocked_rangeIiEE7StrikerNS_16auto_partitionerEE3runERKS4_RKS5_RKS6_[tbb::interface6::internal::start_for, Striker, tbb::auto_partitioner>::run(tbb::blocked_range const&, Striker const&, tbb::auto_partitioner const&)]+0x78): undefined reference to `tbb::internal::allocate_root_with_context_proxy::allocate(unsigned long) const'test_blocked_range.o: In function `tbb::interface6::internal::start_for, Striker, tbb::auto_partitioner>::run(tbb::blocked_range const&, Striker const&, tbb::auto_partitioner const&)':(.text._ZN3tbb10interface68internal9start_forINS_13blocked_rangeIiEE7StrikerNS_16auto_partitionerEE3runERKS4_RKS5_RKS6_[tbb::interface6::internal::start_for, Striker, tbb::auto_partitioner>::run(tbb::blocked_range const&, Striker const&, tbb::auto_partitioner const&)]+0x88): undefined reference to `tbb::internal::allocate_root_with_context_proxy::allocate(unsigned long) const'test_blocked_range.o: In function `void tbb::interface6::internal::partition_type_base::execute, Striker, tbb::auto_partitioner>, tbb::blocked_range >(tbb::interface6::internal::start_for, Striker, tbb::auto_partitioner>&, tbb::blocked_range&)':(.text._ZN3tbb10interface68internal19partition_type_baseINS1_19auto_partition_typeEE7executeINS1_9start_forINS_13blocked_rangeIiEE7StrikerNS_16auto_partitionerEEES8_EEvRT_RT0_[void tbb::interface6::internal::partition_type_base::execute, Striker, tbb::auto_partitioner>, tbb::blocked_range >(tbb::interface6::internal::start_for, Striker, tbb::auto_partitioner>&, tbb::blocked_range&)]+0x70): undefined reference to `tbb::internal::allocate_continuation_proxy::allocate(unsigned long) const'test_blocked_range.o: In function `void tbb::interface6::internal::partition_type_base::execute, Striker, tbb::auto_partitioner>, tbb::blocked_range >(tbb::interface6::internal::start_for, Striker, tbb::auto_partitioner>&, tbb::blocked_range&)':(.text._ZN3tbb10interface68internal19partition_type_baseINS1_19auto_partition_typeEE7executeINS1_9start_forINS_13blocked_rangeIiEE7StrikerNS_16auto_partitionerEEES8_EEvRT_RT0_[void tbb::interface6::internal::partition_type_base::execute, Striker, tbb::auto_partitioner>, tbb::blocked_range >(tbb::interface6::internal::start_for, Striker, tbb::auto_partitioner>&, tbb::blocked_range&)]+0x7c): undefined reference to `tbb::internal::allocate_continuation_proxy::allocate(unsigned long) const'test_blocked_range.o: In function `void tbb::interface6::internal::partition_type_base::execute, Striker, tbb::auto_partitioner>, tbb::blocked_range >(tbb::interface6::internal::start_for, Striker, tbb::auto_partitioner>&, tbb::blocked_range&)':(.text._ZN3tbb10interface68internal19partition_type_baseINS1_19auto_partition_typeEE7executeINS1_9start_forINS_13blocked_rangeIiEE7StrikerNS_16auto_partitionerEEES8_EEvRT_RT0_[void tbb::interface6::internal::partition_type_base::execute, Striker, tbb::auto_partitioner>, tbb::blocked_range >(tbb::interface6::internal::start_for, Striker, tbb::auto_partitioner>&, tbb::blocked_range&)]+0xb0): undefined reference to `tbb::internal::allocate_child_proxy::allocate(unsigned long) const'test_blocked_range.o: In function `void tbb::interface6::internal::partition_type_base::execute, Striker, tbb::auto_partitioner>, tbb::blocked_range >(tbb::interface6::internal::start_for, Striker, tbb::auto_partitioner>&, tbb::blocked_range&)':(.text._ZN3tbb10interface68internal19partition_type_baseINS1_19auto_partition_typeEE7executeINS1_9start_forINS_13blocked_rangeIiEE7StrikerNS_16auto_partitionerEEES8_EEvRT_RT0_[void tbb::interface6::internal::partition_type_base::execute, Striker, tbb::auto_partitioner>, tbb::blocked_range >(tbb::interface6::internal::start_for, Striker, tbb::auto_partitioner>&, tbb::blocked_range&)]+0xbc): undefined reference to `tbb::internal::allocate_child_proxy::allocate(unsigned long) const'test_blocked_range.o: In function `void tbb::interface6::internal::partition_type_base::execute, Striker, tbb::auto_partitioner>, tbb::blocked_range >(tbb::interface6::internal::start_for, Striker, tbb::auto_partitioner>&, tbb::blocked_range&)':(.text._ZN3tbb10interface68internal19partition_type_baseINS1_19auto_partition_typeEE7executeINS1_9start_forINS_13blocked_rangeIiEE7StrikerNS_16auto_partitionerEEES8_EEvRT_RT0_[void tbb::interface6::internal::partition_type_base::execute, Striker, tbb::auto_partitioner>, tbb::blocked_range >(tbb::interface6::internal::start_for, Striker, tbb::auto_partitioner>&, tbb::blocked_range&)]+0x1a4): undefined reference to `tbb::internal::allocate_continuation_proxy::allocate(unsigned long) const'test_blocked_range.o: In function `void tbb::interface6::internal::partition_type_base::execute, Striker, tbb::auto_partitioner>, tbb::blocked_range >(tbb::interface6::internal::start_for, Striker, tbb::auto_partitioner>&, tbb::blocked_range&)':(.text._ZN3tbb10interface68internal19partition_type_baseINS1_19auto_partition_typeEE7executeINS1_9start_forINS_13blocked_rangeIiEE7StrikerNS_16auto_partitionerEEES8_EEvRT_RT0_[void tbb::interface6::internal::partition_type_base::execute, Striker, tbb::auto_partitioner>, tbb::blocked_range >(tbb::interface6::internal::start_for, Striker, tbb::auto_partitioner>&, tbb::blocked_range&)]+0x1b0): undefined reference to `tbb::internal::allocate_continuation_proxy::allocate(unsigned long) const'test_blocked_range.o: In function `void tbb::interface6::internal::partition_type_base::execute, Striker, tbb::auto_partitioner>, tbb::blocked_range >(tbb::interface6::internal::start_for, Striker, tbb::auto_partitioner>&, tbb::blocked_range&)':(.text._ZN3tbb10interface68internal19partition_type_baseINS1_19auto_partition_typeEE7executeINS1_9start_forINS_13blocked_rangeIiEE7StrikerNS_16auto_partitionerEEES8_EEvRT_RT0_[void tbb::interface6::internal::partition_type_base::execute, Striker, tbb::auto_partitioner>, tbb::blocked_range >(tbb::interface6::internal::start_for, Striker, tbb::auto_partitioner>&, tbb::blocked_range&)]+0x1e8): undefined reference to `tbb::internal::allocate_child_proxy::allocate(unsigned long) const'test_blocked_range.o: In function `void tbb::interface6::internal::partition_type_base::execute, Striker, tbb::auto_partitioner>, tbb::blocked_range >(tbb::interface6::internal::start_for, Striker, tbb::auto_partitioner>&, tbb::blocked_range&)':(.text._ZN3tbb10interface68internal19partition_type_baseINS1_19auto_partition_typeEE7executeINS1_9start_forINS_13blocked_rangeIiEE7StrikerNS_16auto_partitionerEEES8_EEvRT_RT0_[void tbb::interface6::internal::partition_type_base::execute, Striker, tbb::auto_partitioner>, tbb::blocked_range >(tbb::interface6::internal::start_for, Striker, tbb::auto_partitioner>&, tbb::blocked_range&)]+0x1f4): undefined reference to `tbb::internal::allocate_child_proxy::allocate(unsigned long) const'test_blocked_range.o: In function `void tbb::interface6::internal::partition_type_base::execute, Striker, tbb::auto_partitioner>, tbb::blocked_range >(tbb::interface6::internal::start_for, Striker, tbb::auto_partitioner>&, tbb::blocked_range&)':(.text._ZN3tbb10interface68internal19partition_type_baseINS1_19auto_partition_typeEE7executeINS1_9start_forINS_13blocked_rangeIiEE7StrikerNS_16auto_partitionerEEES8_EEvRT_RT0_[void tbb::interface6::internal::partition_type_base::execute, Striker, tbb::auto_partitioner>, tbb::blocked_range >(tbb::interface6::internal::start_for, Striker, tbb::auto_partitioner>&, tbb::blocked_range&)]+0x3c8): undefined reference to `tbb::internal::allocate_continuation_proxy::allocate(unsigned long) const'test_blocked_range.o: In function `void tbb::interface6::internal::partition_type_base::execute, Striker, tbb::auto_partitioner>, tbb::blocked_range >(tbb::interface6::internal::start_for, Striker, tbb::auto_partitioner>&, tbb::blocked_range&)':(.text._ZN3tbb10interface68internal19partition_type_baseINS1_19auto_partition_typeEE7executeINS1_9start_forINS_13blocked_rangeIiEE7StrikerNS_16auto_partitionerEEES8_EEvRT_RT0_[void tbb::interface6::internal::partition_type_base::execute, Striker, tbb::auto_partitioner>, tbb::blocked_range >(tbb::interface6::internal::start_for, Striker, tbb::auto_partitioner>&, tbb::blocked_range&)]+0x3d4): undefined reference to `tbb::internal::allocate_continuation_proxy::allocate(unsigned long) const'test_blocked_range.o: In function `void tbb::interface6::internal::partition_type_base::execute, Striker, tbb::auto_partitioner>, tbb::blocked_range >(tbb::interface6::internal::start_for, Striker, tbb::auto_partitioner>&, tbb::blocked_range&)':(.text._ZN3tbb10interface68internal19partition_type_baseINS1_19auto_partition_typeEE7executeINS1_9start_forINS_13blocked_rangeIiEE7StrikerNS_16auto_partitionerEEES8_EEvRT_RT0_[void tbb::interface6::internal::partition_type_base::execute, Striker, tbb::auto_partitioner>, tbb::blocked_range >(tbb::interface6::internal::start_for, Striker, tbb::auto_partitioner>&, tbb::blocked_range&)]+0x40c): undefined reference to `tbb::internal::allocate_child_proxy::allocate(unsigned long) const'test_blocked_range.o: In function `void tbb::interface6::internal::partition_type_base::execute, Striker, tbb::auto_partitioner>, tbb::blocked_range >(tbb::interface6::internal::start_for, Striker, tbb::auto_partitioner>&, tbb::blocked_range&)':(.text._ZN3tbb10interface68internal19partition_type_baseINS1_19auto_partition_typeEE7executeINS1_9start_forINS_13blocked_rangeIiEE7StrikerNS_16auto_partitionerEEES8_EEvRT_RT0_[void tbb::interface6::internal::partition_type_base::execute, Striker, tbb::auto_partitioner>, tbb::blocked_range >(tbb::interface6::internal::start_for, Striker, tbb::auto_partitioner>&, tbb::blocked_range&)]+0x42c): undefined reference to `tbb::internal::allocate_child_proxy::allocate(unsigned long) const'collect2: ld returned 1 exit statusmake[1]: *** [test_blocked_range.exe] Error 1make[1]: Leaving directory `/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_release'make: [test] Error 2 (ignored)

There are errors when "make test". See #30. I am confused that the target is .exe :(

looks like libtbb and libtbbmalloc were not found by the
linker.

BTW that linux distributive do you use?
in particular :
version of gnu make ?
which shell is used ? (bash?)

as for the .exe target, it is intentionally named so in a makefile, so it is ok.

Were the same flags used with all invocations of make, and what are the values of the environment values set by tbbvars.sh?

With arch=alpha there may also have to be some changes to the makefiles.

the version of gnu make is 3.81, and yes, I use bash.root@gem5-desktop:/home/tbb40_20120201oss# make -vGNU Make 3.81Copyright (C) 2006 Free Software Foundation, Inc.This is free software; see the source for copying conditions.There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR APARTICULAR PURPOSE.This program built for i486-pc-linux-gnu

I just execute commands like this:make arch=alpha compiler=gcc CXXFLAGS="-DTBB_USE_GCC_BUILTINS" runtime=cc4.3.6_libc2.9
make arch=alpha compiler=gcc CXXFLAGS="-DTBB_USE_GCC_BUILTINS" runtime=cc4.3.6_libc2.9 test
I didn't modify tbbvars.sh, and I think this file do not take effect when I just do "make" and "make test":
#!/bin/bashexport TBBROOT="/home/tbb40_20120201oss" #tbb_bin="/home/tbb40_20120201oss/build/linux_alpha_gcc_cc4.3.6_libc2.9_release" #if [ -z "$CPATH" ]; then # export CPATH="${TBBROOT}/include" #else # export CPATH="${TBBROOT}/include:$CPATH" #fi #if [ -z "$LIBRARY_PATH" ]; then # export LIBRARY_PATH="${tbb_bin}" #else # export LIBRARY_PATH="${tbb_bin}:$LIBRARY_PATH" #fi #if [ -z "$LD_LIBRARY_PATH" ]; then # export LD_LIBRARY_PATH="${tbb_bin}" #else # export LD_LIBRARY_PATH="${tbb_bin}:$LD_LIBRARY_PATH" #fi ##Besides, do you mean that I should modify the makefile in TBB_HOME? I do not know how to do that. I just modify thelinux.gcc.inc in TBB_HOME/build like this:#CPLUS = g++CPLUS = /root/x-tools/alphaev67-unknown-linux-gnu/bin/alphaev67-unknown-linux-gnu-g++#CONLY = gccCONLY = /root/x-tools/alphaev67-unknown-linux-gnu/bin/alphaev67-unknown-linux-gnu-gccAnother question is that I specified the runtime like this:runtime=cc4.3.6_libc2.9but I don't know whether it is correct.
Thanks.

"Besides, do you mean that I should modify the makefile in TBB_HOME?"
Look where "arch" is used in the relevant makefiles (that includes linux.inc and linux.gcc.inc), and adapt for alpha.

Hi,Looks like all the undefined symbols contain a long argument.. and if you look howdef_prefix is defined in linux.inc, it suggests that your library was compiled exporting 32-bit symbols while you need 64 for alpha. You could fix the linux.inc (e.g. like for sparc) OR specify arch=alpha64 OR adddef_prefix=lin64 to compile with right exported symbols list.

Thank you for your help. I tried again as follows:
#make arch=alpha64 compiler=gcc CXXFLAGS="-DTBB_USE_GCC_BUILTINS" runtime=cc4.3.6_libc2.9#make arch=alpha64 compiler=gcc CXXFLAGS="-DTBB_USE_GCC_BUILTINS" runtime=cc4.3.6_libc2.9 test
.../root/x-tools/alphaev67-unknown-linux-gnu/bin/alphaev67-unknown-linux-gnu-g++ -o test_malloc_lib_unload.exe -DDO_ITT_NOTIFY -O2 -DUSE_PTHREAD -DTBB_USE_GCC_BUILTINS -fno-rtti -fno-exceptions -fno-schedule-insns2 -D__TBB_BUILD=1 -I../../src -I../../src/rml/include -I../../include -I../../src/tbbmalloc -I../../src/tbbmalloc ../../src/test/test_malloc_lib_unload.cpp -lpthread -lrt test_malloc_lib_unload_dll.so -ldl -Wl,-rpath-link=../test_malloc_pools.exe 1:4./test_malloc_pools.exe: 1: ELF: not found./test_malloc_pools.exe: 1: : not found./test_malloc_pools.exe: 2: Syntax error: word unexpected (expecting ")")make[1]: *** [malloc_test_no_depends] Error 2rm test_malloc_atexit_dll.o test_malloc_lib_unload_dll.omake[1]: Leaving directory `/home/tbb40_20120201oss/build/linux_alpha64_gcc_cc4.3.6_libc2.9_release'make: [test] Error 2 (ignored)....../root/x-tools/alphaev67-unknown-linux-gnu/bin/alphaev67-unknown-linux-gnu-g++ -o test_tbb_version.exe -DTBB_USE_DEBUG -DDO_ITT_NOTIFY -g -O0 -DUSE_PTHREAD -Wall -Wshadow -Wcast-qual -Woverloaded-virtual -Wnon-virtual-dtor -Wextra -DTBB_USE_GCC_BUILTINS test_tbb_version.o libtbb_debug.so -lpthread -lrt -Wl,-rpath-link=../test_tbb_version.exe./test_tbb_version.exe: 1: : not found./test_tbb_version.exe: 2: Syntax error: word unexpectedmake[1]: *** [test_tbb_plain] Error 2make[1]: Leaving directory `/home/tbb40_20120201oss/build/linux_alpha64_gcc_cc4.3.6_libc2.9_debug'./test_tbb_version.exe: 1: ELF: not foundmake: [test] Error 2 (ignored)....../root/x-tools/alphaev67-unknown-linux-gnu/bin/alphaev67-unknown-linux-gnu-g++ -o test_tbb_version.exe -DDO_ITT_NOTIFY -O2 -DUSE_PTHREAD -Wall -Wshadow -Wcast-qual -Woverloaded-virtual -Wnon-virtual-dtor -Wextra -DTBB_USE_GCC_BUILTINS test_tbb_version.o libtbb.so -lpthread -lrt -Wl,-rpath-link=../test_tbb_version.exe./test_tbb_version.exe: 1: Syntax error: Unterminated quoted stringmake[1]: *** [test_tbb_plain] Error 2make[1]: Leaving directory `/home/tbb40_20120201oss/build/linux_alpha64_gcc_cc4.3.6_libc2.9_release'make: [test] Error 2 (ignored)/root/x-tools/alphaev67-unknown-linux-gnu/bin/alphaev67-unknown-linux-gnu-g++ -c -MMD -DDO_ITT_NOTIFY -O2 -DUSE_PTHREAD -Wall -Wshadow -Wcast-qual -Woverloaded-virtual -Wnon-virtual-dtor -Wextra -DTBB_USE_GCC_BUILTINS -I../../src -I../../src/rml/include -I../../include -I. ../../src/test/test_atomic.cppI think these are execution errors, so does this mean the test has been passed?

Now I can compile applications (such as matrix multiplification) using the libtbb.so and libtbb.so.2 libraries:# /root/x-tools/alphaev67-unknown-linux-gnu/bin/alphaev67-unknown-linux-gnu-g++ -o matrixMul_tbb matrixMul_tbb.cpp -I/home/tbb40_20120201oss/include/ -L/home/tbb40_20120201oss/build/linux_alpha64_gcc_cc4.3.6_libc2.9_release/ -ltbbBut I want to compile it statically so that I can run it in the simulator where glibc is not installed:# /root/x-tools/alphaev67-unknown-linux-gnu/bin/alphaev67-unknown-linux-gnu-g++ -o matrixMul_tbb matrixMul_tbb.cpp -I/home/tbb40_20120201oss/include/ -L/home/tbb40_20120201oss/build/linux_alpha64_gcc_cc4.3.6_libc2.9_release/ -ltbb -static -static-libgccThere is an error:
/root/x-tools/alphaev67-unknown-linux-gnu/lib/gcc/alphaev67-unknown-linux-gnu/4.3.6/../../../../alphaev67-unknown-linux-gnu/bin/ld: cannot find -ltbbcollect2: ld returned 1 exit statusSo I think I should compile TBB into a static library (.a files), but I don't know how to modify the makefile. Actually I didn't find how the libtbb.so.2 generated, that is, where in makefile this command is defined:/root/x-tools/alphaev67-unknown-linux-gnu/bin/alphaev67-unknown-linux-gnu-g++ -fPIC -o libtbb.so.2 concurrent_hash_map.o concurrent_queue.o concurrent_vector.o dynamic_link.o itt_notify.o cache_aligned_allocator.o pipeline.o queuing_mutex.o queuing_rw_mutex.o reader_writer_lock.o spin_rw_mutex.o spin_mutex.o critical_section.o task.o tbb_misc.o tbb_misc_ex.o mutex.o recursive_mutex.o condition_variable.o tbb_thread.o concurrent_monitor.o semaphore.o private_server.o rml_tbb.o task_group_context.o governor.o market.o arena.o scheduler.o observer_proxy.o tbb_statistics.o tbb_main.o concurrent_vector_v2.o concurrent_queue_v2.o spin_rw_mutex_v2.o task_v2.o -ldl -lpthread -lrt -shared -Wl,-soname=libtbb.so.2 -Wl,--version-script,tbb.defThank you.

If I do not compile the application statically, it can not run in the simulator, since glibc is both required by the application and thelibtbb.so.2 library:# source tbbvars.sh# ./matrixMul_tbb./matrixMul_tbb: /lib/libc.so.6.1: version `GLIBC_2.4' not found (required by ./matrixMul_tbb)./matrixMul_tbb: /lib/libc.so.6.1: version `GLIBC_2.4' not found (required by /tbb/lib/libtbb.so.2)

I modify linux.gcc.inc like this:...#CPLUS = g++CPLUS = /root/x-tools/alphaev67-unknown-linux-gnu/bin/alphaev67-unknown-linux-gnu-g++#CONLY = gccCONLY = /root/x-tools/alphaev67-unknown-linux-gnu/bin/alphaev67-unknown-linux-gnu-gccAR = /root/x-tools/alphaev67-unknown-linux-gnu/bin/alphaev67-unknown-linux-gnu-arRANLIB = /root/x-tools/alphaev67-unknown-linux-gnu/bin/alphaev67-unknown-linux-gnu-ranlib...And then modify makefile.tbb like this:...$(TBB.DLL): $(TBB.OBJ) $(TBB.RES) tbbvars.sh $(TBB_NO_VERSION.DLL)# $(LIB_LINK_CMD) $(LIB_OUTPUT_KEY)$(TBB.DLL) $(TBB.OBJ) $(TBB.RES) $(LIB_LINK_LIBS) $(LIB_LINK_FLAGS) $(AR) rcs libtbb.a $(TBB.OBJ) $(RANLIB) libtbb.a...I get the libtbb.a, then I write a test.cpp like this:#include "tbb/parallel_for.h"#include "tbb/parallel_reduce.h"#include "tbb/task_scheduler_init.h"#include "tbb/blocked_range.h"#include "tbb/tick_count.h"using namespace tbb;using namespace std;int main() { int i, sum; tick_count t0 = tick_count::now(); for(i=1;i<=100;i++) { sum = sum + i; } tick_count t1 = tick_count::now(); double dSeconds=(t1-t0).seconds(); return 0;}Then compile it:root@gem5-desktop:/home/tbb/app/src# /root/x-tools/alphaev67-unknown-linux-gnu/bin/alphaev67-unknown-linux-gnu-g++ -o test test.cpp -static -static-libgcc -I/home/tbb40_20120201oss/include/ -L/home/tbb40_20120201oss/build/linux_alpha64_gcc_cc4.3.6_libc2.9_release/ -ltbb/tmp/ccSGZdHs.o: In function `tbb::tick_count::now()':(.text._ZN3tbb10tick_count3nowEv[tbb::tick_count::now()]+0x40): undefined reference to `clock_gettime'collect2: ld returned 1 exit statusWhat has gone wrong during this process?Thank you.

I add option -static-libgcc when compiling TBB, and it works. Thank you very much for your help.

Leave a Comment

Please sign in to add a comment. Not a member? Join today