Failed to compile sample program tachyon with vtune_amplifier_xe_2013

Failed to compile sample program tachyon with vtune_amplifier_xe_2013

When I tried to build the sample program "tachyon", I see the following errors. I am running on Ubuntu 13.04 Linux. Please help.

root@wchiu-Latitude-E6430:/opt/intel/vtune_amplifier_xe_2013/samples/en/C++/tachyon#make

/usr/bin/ld: /tmp/ccgJmRda.o: undefined reference to symbol 'pthread_mutexattr_settype@@GLIBC_2.2.5'
/usr/bin/ld: note: 'pthread_mutexattr_settype@@GLIBC_2.2.5' is defined in DSO /lib/x86_64-linux-gnu/libpthread.so.0 so try adding it to the linker command line
/lib/x86_64-linux-gnu/libpthread.so.0: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status
make[1]: *** [tachyon_analyze_locks] Error 1
make[1]: Leaving directory `/opt/intel/vtune_amplifier_xe_2013/samples/en/C++/tachyon'
make: *** [build_analyze_locks] Error 2

 

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

This looks like Ubuntu 13.04 issue, see here:

http://stackoverflow.com/questions/8198056/having-a-libpthread-so-linking-trouble-on-ubuntu

http://askubuntu.com/questions/308863/compiling-apib-undefined-reference-to-symbol-pthread-createglibc-2-2-5

One of the suggestions on that forums, you may try:

In the TARGET_LINK_LIBRARIES command, move pthread so it is the last item. The GNU linker requires dependent libraries to come before their dependencies.

This issue is solved after I include pthread in the makefile as:

LIBS += -ltbb -L$(TBB_FOR_EXAMPLES_INSTALL_DIR)/lib/$(Arch)  -Wl,-rpath $(miniTBBRootDir)/lib/$(Arch) -lpthread

Thanks for the help.

Quote:

WEN C. wrote:

This issue is solved after I include pthread in the makefile as:

LIBS += -ltbb -L$(TBB_FOR_EXAMPLES_INSTALL_DIR)/lib/$(Arch)  -Wl,-rpath $(miniTBBRootDir)/lib/$(Arch) -lpthread

Thanks for the help.

Would it work for you if you just change the order of linking libs in the Makefile.gmake file?

LIBS += -L/usr/X11R6/lib$(x64) -lX11 -lpthread

-Vladimir

Leave a Comment

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