Intel® oneAPI Threading Building Blocks
Ask questions and share information about adding parallelism to your applications when using this threading library.

Can not find ltbtbb_debug.so.2 linux ubuntu

donnyb
Beginner
326 Views
Listen I am really having a big problem here. I have installed the ttb blocks by downloading the _lin and _src file and using make all. Make all runs perfect along with the exapmples. After trying to set the LIBARY_PATH and the two others and the path it still will not work. Also after I managed to find it in the synapic packed manager,so i installed it there hoping it would solve it for me. No matter what I do my code::blocks compiler can not fined the libtbb_debug.so.2 file. Actuallly the complier does not say it can not find it, when I run the program it prints it out on the terminal that it can not find this file. So in short the compliler is finding it I just think it can not run the compiled file because the compiled file can not find it. My guess is this is just the begining of a list of problems to come about not being able to find the files. I have installed numerous libc files, but this one is just not working. Yes I tried linking it in code::blocks linker and search files.
Look I really need help here I do not understand what to do.
I modified the file tbbvars.sh under current installed verstion /bin tbbvars.sh and I get an error saying this (modified code below)
ERROR: Unknown switch '$1'. Accepted values: ia32, intel64, ia64

I am new to my bash but I have studied it and understand most of this code the get_ia32 and the others is something I do not understand.
At any rate after installing it by the packed manager it put it into an other file so I want to modify that one and use as I have to asume it was installed right.
To the best of my knowlegde I need to install this file into one of my boot files which is simple enough, but if it is giving an error it is not going to help much.
How do I know which verstion to specify. eg.
cc3.4.4_libc2.3.4_kernel2.6.9 or the other one in the file
There are so may files and folders I am not sure which to use. After runing the make all it did fill up the build
file with what I assume is the proper header and .o files and so on.
Can anyone help me out here, I have done my homework, but do not understand what is going on.
I think that code::blocks is finding the files, but when I run a very simple example of just init of a task it gives
the missing error file. I think it is because the .o, .so and so on in the accutal tbb blocks files can not find it, not
the compiler. I have linked the compiler may times with no problems.
The other thing is I did install the path to that directory in the bash terminal. I know I need to set this into the starup file,
so as I test I copyied all the files temparly to my /bin file to see if they would find them with no change. tested
it this way, so I knew if it was a path problem, that needed to to be set up in the starup file.
Please if you can help me I would be really thankful. I have tried a number of things with no results. If you
could supply me with not only the anwser, but an explaination to what I am missing, so in the future I can do
it my self I would be very thankful. After I get this working on ubuntu I am going to have to install it on my server
that is running opensuse.
Thank you,
Donald

P.S. the #!/bin is giving an error that it can not find bash, but bash is my default and I am running this program from
a bash terminal. I changed it to #!/bin from #!/bin/bash because it says it can not find it or something. I was not to
worried about this as I said I am in a bash terminal and I know the bash commands are in the /bin file.
#!/bin
#
# Copyright 2005-2010 Intel Corporation.  All Rights Reserved.
#
# This file is part of Threading Building Blocks.
#
# Threading Building Blocks is free software; you can redistribute it
# and/or modify it under the terms of the GNU General Public License
# version 2 as published by the Free Software Foundation.
#
# Threading Building Blocks is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied warranty
# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Threading Building Blocks; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
#
# As a special exception, you may use this file as part of a free software
# library without restriction.  Specifically, if other files instantiate
# templates or use macros or inline functions from this file, or you compile
# this file and link it with other files to produce an executable, this
# file does not by itself cause the resulting executable to be covered by
# the GNU General Public License.  This exception does not however
# invalidate any other reasons why the executable file might be covered by
# the GNU General Public License.


get_ia32(){ 
	echo cc3.4.4_libc2.3.4_kernel2.6.9
}

get_ia64(){
	echo cc3.4.3_libc2.3.4_kernel2.6.9
}

get_intel64(){
	echo cc3.4.3_libc2.3.4_kernel2.6.9
}
export TBB30_INSTALL_DIR=/opt/intel/tbb/tbb30_20100406oss
1=ia32
if [[ "$1" != "ia32" && "$1" != "intel64" && "$1" != "ia64" ]]; then
   echo "ERROR: Unknown switch '$1'. Accepted values: ia32, intel64, ia64"
   exit 1;
fi

TBB30_ARCH=$(get_$1)

if [ -z "${LD_LIBRARY_PATH}" ]
then
   LD_LIBRARY_PATH="$TBB30_INSTALL_DIR/lib/$1/$TBB30_ARCH"; export LD_LIBRARY_PATH
else
   LD_LIBRARY_PATH="$TBB30_INSTALL_DIR/lib/$1/$TBB30_ARCH:${LD_LIBRARY_PATH}"; export LD_LIBRARY_PATH
fi
if [ -z "${LIBRARY_PATH}" ]
then
   LIBRARY_PATH="$TBB30_INSTALL_DIR/lib/$1/$TBB30_ARCH"; export LIBRARY_PATH
else
   LIBRARY_PATH="$TBB30_INSTALL_DIR/lib/$1/$TBB30_ARCH:${LIBRARY_PATH}"; export LIBRARY_PATH
fi
if [ -z "${CPATH}" ]; then
    CPATH="${TBB30_INSTALL_DIR}/include"; export CPATH
else
    CPATH="${TBB30_INSTALL_DIR}/include:$CPATH"; export CPATH
fi
0 Kudos
3 Replies
Tux__the_Linux_Pengu
326 Views
Quoting donnyb
How do I know which verstion to specify. eg.
cc3.4.4_libc2.3.4_kernel2.6.9 or the other one in the file


You simply check the version of the software.

Check the versions of cc, libc, and the linux kernel.

To check the version of cc (I'm guessing it's gcc, cc is for unix)

[bash]gcc -v[/bash]
More info

To check the version of libc

[bash]dpkg -l | grep libc[/bash]
More info

To check the version of your kernel

[bash]uname -r[/bash]
More info

If you have gcc 3.4.4 and libc 2.3.4 along with kernel 2.6.9, choose cc3.4.4_libc2.3.4_kernel2.6.9. If your versions match the other dir, choose the other one.

Then, open up the tbbvars.sh in the proper "versions" directory in a text editor and replace the tbb install path in the script. Run the script. It should set the tbb variables (the path, lib path, include, etc.)

Hope this helps!

0 Kudos
Vladimir_P_1234567890
326 Views
hello donnyb, I have a few questions to clarify to understand the picture better.

1. Do you have bash installed? in some cases it is not installed during default ubuntu installation and we do not work with /bin/dash shell which replaced bash in ubuntu 8.04.

2. which gcc/ubuntu version do you use? if you use gcc from 3.x to you need to setcc3.4.4_libc2.3.4_kernel2.6.9 string in the tbbvars.sh file. if you use gcc 4.1 and above you need to usecc4.1.0_libc2.4_kernel2.6.16.21string in the tbbvars.sh file.

thanks,
--Vladimir
0 Kudos
donnyb
Beginner
326 Views
My cc is 4.3.3
My libc6 is 2.9.4
And the kernal is 2.6.28-19-generic

Under a folder that my package manager installed, it installed under /tbb/build/linux_ia32_gcc_cc4.3.3_libc2.9_kernel2.6.28_debug
and /tbb/build/linux_ia32_gcc_cc4.3.3_libc2.9_kernel2.6.28_release.
I went into the build file and modified in the tbb/bin/ .sh file and modified as above minus without that dumb 1=ia32. stupid attempt to get it to work. I am not sure which folder to go to use the .sh. There are so many in the package.
At anyrate I know I am running bash because I tested by typing a command in that I can not remember at this point. When I was studying my bash it told me to type something to test to see if it was installed. All the commands are in /bin. At any rate I would reread the manual to find the command, but I have an important meeting this morning.
By looking at my cc and libc and kernal I think the files under the /tbb/build/linux_ia32_gcc_cc4.3.3_libc2.9_kernel2.6.28_debug are the ones I need and/or the realise vertion, I am just not sure which folder to change the .sh file and maybe the command to confirm that bash is installed. Evern though I am sure that I did.
Thanks you very much,
Donald

P.s. Thank you for the help I would spend more time on this morning, but I got to make it to that meeting, but I want to make sure I do not loss you. I now understand how to find the verstion I need, now I just I need to figure out the rest
0 Kudos
Reply