Building OpenCL Beta 1 on RHL 5.2 x86_64 Configuration setup for running make

Greetings,

This question is regarding the “nvcomputesdk_opencl1.0-beta1_linux.run” beta on RHL 5.2, x86_64.

I followed the instructions given in "OpenCL_Release_Notes_Linux.txt to include installing the CUDA 2.2 drivers (185.18.08).  In section II (Installation) under step 6 (Build) I encountered an error as follows:

ricklentz@devlinux64test1/NVIDIA_GPU_Computing_SDK/OpenCL/ make
make[1]: Entering directory /NVIDIA_GPU_Computing_SDK/OpenCL/common' a - obj/release/oclUtils.cpp.o make[1]: Leaving directory /NVIDIA_GPU_Computing_SDK/OpenCL/common’
make[1]: Entering directory /NVIDIA_GPU_Computing_SDK/shared' make[1]: Leaving directory /NVIDIA_GPU_Computing_SDK/shared’
make -C src/oclConvolutionSeparable/
make[1]: Entering directory /NVIDIA_GPU_Computing_SDK/OpenCL/src/oclConvolutionSeparable' ../../..//OpenCL//common//lib/Linux64//libOpenCL.so: undefined reference to std::basic_istream<char, std::char_traits >& std::basic_istream<char, std::char_traits >::_M_extract(unsigned int&)’
…/…/…//OpenCL//common//lib/Linux64//libOpenCL.so: undefined reference to std::basic_ostream<char, std::char_traits<char> >& std::basic_ostream<char, std::char_traits<char> >::_M_insert<long>(long)' ../../..//OpenCL//common//lib/Linux64//libOpenCL.so: undefined reference to std::basic_ostream<char, std::char_traits >& std::__ostream_insert<char, std::char_traits >(std::basic_ostream<char, std::char_traits >&, char const*, long)’
…/…/…//OpenCL//common//lib/Linux64//libOpenCL.so: undefined reference to std::basic_ostream<char, std::char_traits<char> >& std::basic_ostream<char, std::char_traits<char> >::_M_insert<unsigned long>(unsigned long)' ../../..//OpenCL//common//lib/Linux64//libOpenCL.so: undefined reference to std::basic_ostream<char, std::char_traits >& std::basic_ostream<char, std::char_traits >::_M_insert(double)’
…/…/…//OpenCL//common//lib/Linux64//libOpenCL.so: undefined reference to std::basic_ostream<char, std::char_traits<char> >& std::basic_ostream<char, std::char_traits<char> >::_M_insert<void const*>(void const*)' collect2: ld returned 1 exit status make[1]: *** [../../..//OpenCL//bin//linux/release/oclConvolutionSeparable] Error 1 make[1]: Leaving directory /NVIDIA_GPU_Computing_SDK/OpenCL/src/oclConvolutionSeparable’
make: *** [src/oclConvolutionSeparable/Makefile.ph_build] Error 2

After running ’ nm -D -C /usr/lib64/libstdc++.so.6.0.8 | grep _M_insert’, it confirmed that the linker was indeed giving up because it couldn’t find _M_insert<void const*>(void const*).

Could the issue be that the included libOpenCL.so uses _M_insert<void const*>(void const*) which is not part of the public API?

[Note: The system is RHL 5.2 vs the required RHL 5.3. ]

Thank you.

uh, you have to use the OpenCL driver and this isn’t a 64-bit release anyway so you are very deep in unsupported territory!

We encountered exactly the same problem on RHEL 5.3, x86_64. So 5.3 vs 5.2 seems not the problem.

tmurray:

Sorry I am confused. In the beta release note it says it does support 64-bit linux. Am I missing something?

The 1.0 conformance candidates are 32-bit only at the moment and you definitely have to use them with the correct driver.

Oops, I lied–apparently we added 64-bit conformance candidates and nobody told me!

just for information: nvcomputesdk_opencl1.0-beta1_linux.run runs fine on ubuntu x86_64 with the given examples on my pc

ricklentz:

It seems likely the developers building Beta 1’s libOpenCL.so are linking against a version of libstdc++.so.6 that contains _M_insert<void *const>…

Section II, part 8 of OpenCL_Release_Notes_Linux.txt indicates successful testing was achieved with 32 and 64 versions of Ubuntu 8.1 in single and dual GPU configurations. Initram’s later post confirms this success.

The issue seems to be that there is a slight difference between the supporting libstdc++.so (s). Checking the symbols exported by libstdc++.so.6.0.8 under RHL 8.3 yields the following:

/NVIDIA_GPU_Computing_SDK/OpenCL/ nm -D -C /usr/lib64/libstdc++.so.6.0.8 | grep _M_insert

0000003fd6289540 W std::ostreambuf_iterator<char, std::char_traits > std::num_put<char, std::ostreambuf_iterator<char, std::char_traits > >::_M_insert_int(std::ostreambuf_iterator<char, std::char_traits >, std::ios_base&, char, long) const

0000003fd6289180 W std::ostreambuf_iterator<char, std::char_traits > std::num_put<char, std::ostreambuf_iterator<char, std::char_traits > >::_M_insert_int(std::ostreambuf_iterator<char, std::char_traits >, std::ios_base&, char, unsigned long) const

0000003fd6288d80 W std::ostreambuf_iterator<char, std::char_traits > std::num_put<char, std::ostreambuf_iterator<char, std::char_traits > >::_M_insert_int(std::ostreambuf_iterator<char, std::char_traits >, std::ios_base&, char, long long) const

0000003fd6288a10 W std::ostreambuf_iterator<char, std::char_traits > std::num_put<char, std::ostreambuf_iterator<char, std::char_traits > >::_M_insert_int(std::ostreambuf_iterator<char, std::char_traits >, std::ios_base&, char, unsigned long long) const

0000003fd6288410 W std::ostreambuf_iterator<char, std::char_traits > std::num_put<char, std::ostreambuf_iterator<char, std::char_traits > >::_M_insert_float(std::ostreambuf_iterator<char, std::char_traits >, std::ios_base&, char, char, double) const

0000003fd6287e20 W std::ostreambuf_iterator<char, std::char_traits > std::num_put<char, std::ostreambuf_iterator<char, std::char_traits > >::_M_insert_float(std::ostreambuf_iterator<char, std::char_traits >, std::ios_base&, char, char, long double) const

0000003fd62aeee0 W std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> > std::num_put<wchar_t, std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> > >::_M_insert_int(std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&, wchar_t, long) const

0000003fd62aeb10 W std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> > std::num_put<wchar_t, std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> > >::_M_insert_int(std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&, wchar_t, unsigned long) const

0000003fd62ae700 W std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> > std::num_put<wchar_t, std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> > >::_M_insert_int(std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&, wchar_t, long long) const

0000003fd62ae380 W std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> > std::num_put<wchar_t, std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> > >::_M_insert_int(std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&, wchar_t, unsigned long long) const

0000003fd62adec0 W std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> > std::num_put<wchar_t, std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> > >::_M_insert_float(std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&, wchar_t, char, double) const

0000003fd62ad9f0 W std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> > std::num_put<wchar_t, std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> > >::_M_insert_float(std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&, wchar_t, char, long double) const

0000003fd6285880 W std::ostreambuf_iterator<char, std::char_traits > std::money_put<char, std::ostreambuf_iterator<char, std::char_traits > >::_M_insert(std::ostreambuf_iterator<char, std::char_traits >, std::ios_base&, char, std::string const&) const

0000003fd6282e70 W std::ostreambuf_iterator<char, std::char_traits > std::money_put<char, std::ostreambuf_iterator<char, std::char_traits > >::_M_insert(std::ostreambuf_iterator<char, std::char_traits >, std::ios_base&, char, std::string const&) const

0000003fd62a8630 W std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> > std::money_put<wchar_t, std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> > >::_M_insert(std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&, wchar_t, std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > const&) const

0000003fd62a77d0 W std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> > std::money_put<wchar_t, std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> > >::_M_insert(std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&, wchar_t, std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > const&) const

Comparing the error listed in the original post to the above symbol search indicates that the two underlying libstdc++.so (s) are different. The difference is that classes basic_istream and basic_ostream in RHL 8.3 x86_64 do not have support for the use of …_M_insert<void *const>

We have the same problems on various RHEL machines here too… I’ve filed a bug on this since it makes the SDK samples unusable as aids in verifying and reporting other bugs I’m finding…

Cheers,

John

Hi John,

I’m bumping into the same problem trying to install 1.0beta 1.1 on a CentOS release 5.3 (Final) (g++ 4.1.2)

Have you heard about any fix for this ?

Thanks.

Guillaume

no fix for it yet, I’m working on it

i also have build problems:

platform: SUSE Linux Enterprise Server 10 Service Pack 2
uname -a: Linux gvs1 2.6.16.60-0.34-smp #1 SMP Fri Jan 16 14:59:01 UTC 2009 x86_64 x86_64 x86_64 GNU/Linux
version: nvcomputesdk_opencl1.0-beta1.2_linux.run

make
make[1]: Entering directory /home/cluster/t1221/t1221ac/NVIDIA_GPU_Computing_SDK/OpenCL/common' a - obj/release/oclUtils.cpp.o make[1]: Leaving directory /home/cluster/t1221/t1221ac/NVIDIA_GPU_Computing_SDK/OpenCL/common’
make[1]: Entering directory /home/cluster/t1221/t1221ac/NVIDIA_GPU_Computing_SDK/shared' make[1]: Leaving directory /home/cluster/t1221/t1221ac/NVIDIA_GPU_Computing_SDK/shared’
make -C src/oclBandwidthTest/
make[1]: Entering directory /home/cluster/t1221/t1221ac/NVIDIA_GPU_Computing_SDK/OpenCL/src/oclBandwidthTest' ../../..//OpenCL//common//lib/Linux64//libOpenCL.so: undefined reference to std::basic_ostream<char, std::char_traits >& std::basic_ostream<char, std::char_traits >::_M_insert(unsigned long)’
…/…/…//OpenCL//common//lib/Linux64//libOpenCL.so: undefined reference to std::basic_ostream<char, std::char_traits<char> >& std::basic_ostream<char, std::char_traits<char> >::_M_insert<void const*>(void const*)' ../../..//OpenCL//common//lib/Linux64//libOpenCL.so: undefined reference to std::basic_istream<char, std::char_traits >& std::basic_istream<char, std::char_traits >::_M_extract(unsigned int&)’
…/…/…//OpenCL//common//lib/Linux64//libOpenCL.so: undefined reference to std::basic_ostream<char, std::char_traits<char> >& std::basic_ostream<char, std::char_traits<char> >::_M_insert<long>(long)' ../../..//OpenCL//common//lib/Linux64//libOpenCL.so: undefined reference to std::basic_ostream<char, std::char_traits >& std::basic_ostream<char, std::char_traits >::_M_insert(double)’
…/…/…//OpenCL//common//lib/Linux64//libOpenCL.so: undefined reference to std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, long)' collect2: ld returned 1 exit status make[1]: *** [../../..//OpenCL//bin//linux/release/oclBandwidthTest] Error 1 make[1]: Leaving directory /home/cluster/t1221/t1221ac/NVIDIA_GPU_Computing_SDK/OpenCL/src/oclBandwidthTest’
make: *** [src/oclBandwidthTest/Makefile.ph_build] Error 2

Same problem here with CentOS 5.3 64bit. Have you found any solution to this?

Thanks

I have filed a bug on this already previously. As far as I know there is currently no solution. I have the same problems with RHEL4, RHEL5, etc.

Cheers,

John Stone

my temporary solution is to compile the sdk under 64bit ubuntu and to copy the folder to the suse linux computer. then i had to copy the libstdc++* files to the suse linux computer and to set LD_LIBRARY_PATH to the path of the ubuntu libstdc++* files.

The fix is to install the 4.3 version of the gcc and g++ compilers that are included with the Red Hat and Centos distributions. On Centos the commands are:

yum install gcc43

yum install gcc43-c++

Next edit the Compiler definitions in common/common_opencl.mk so that CXX, CC and LINK are defined as follows:

CXX := g++43

CC := gcc43

LINK := g++43 -fPIC

Return to the OpenCL directory and type:

make clean

make

This should build successfully.

Thanks! However, there is not a “g++43” in CentOS.

The name of the package is gcc43-c++. This will provide the g++43 executable. You may also need libstdc++43-devel.

Dave

Sorry for the problem. I did install on RHEL 5.2 but I pulled the package from a RHEL 5.3 DVD. The same packages are available on the web for Centos. You do not need to upgrade the rest of your OS to use the gcc43 and gcc43-c++ packages.

Dave