- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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-5One 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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page