Need help. Can't compile Cuda SDK Can't compile SDK in Arch Linux x64, GCC 4.5.1

I’m trying to compile the Cuda SDK and GCC throwing errors. I’ve looked at similar posts on this forum with no luck as to a fix for my problem.

My system specs are:

Arch Linux x64

GCC 4.5.1

Nvidia GT 130M GPU

Cuda toolkit for Fedora x64 3.2 (The Fedora toolkit is what was recommended on the AUR)

Cuda SDK x64 3.2

Nvidia graphics dev driver 260.24

I have libstdc++5 and lib32-libstdc++5 installed. I’ve updated both my PATH and LD_LIBRARY_PATH variables correctly as mentioned in the release notes for Cuda toolkit 3.2. Does this have anything to do with GCC 4.5.1 having experimental support for C++0x? Please help.

GCC make output:

make[1]: Entering directory `/home/jacob/NVIDIA_GPU_Computing_SDK/C/common'

make[1]: Leaving directory `/home/jacob/NVIDIA_GPU_Computing_SDK/C/common'

make[1]: Entering directory `/home/jacob/NVIDIA_GPU_Computing_SDK/C/common'

make[1]: Leaving directory `/home/jacob/NVIDIA_GPU_Computing_SDK/C/common'

make[1]: Entering directory `/home/jacob/NVIDIA_GPU_Computing_SDK/C/common'

make[1]: Leaving directory `/home/jacob/NVIDIA_GPU_Computing_SDK/C/common'

make[1]: Entering directory `/home/jacob/NVIDIA_GPU_Computing_SDK/shared'

make[1]: Leaving directory `/home/jacob/NVIDIA_GPU_Computing_SDK/shared'

make -C src/smokeParticles/ 

make[1]: Entering directory `/home/jacob/NVIDIA_GPU_Computing_SDK/C/src/smokeParticles'

/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.1/../../../../lib/libGL.so when searching for -lGL

/usr/bin/ld: skipping incompatible /usr/lib/../lib/libGL.so when searching for -lGL

/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.1/../../../libGL.so when searching for -lGL

make[1]: Leaving directory `/home/jacob/NVIDIA_GPU_Computing_SDK/C/src/smokeParticles'

make -C src/radixSort/ 

make[1]: Entering directory `/home/jacob/NVIDIA_GPU_Computing_SDK/C/src/radixSort'

make[1]: Leaving directory `/home/jacob/NVIDIA_GPU_Computing_SDK/C/src/radixSort'

make -C src/matrixMulDynlinkJIT/ 

make[1]: Entering directory `/home/jacob/NVIDIA_GPU_Computing_SDK/C/src/matrixMulDynlinkJIT'

make[1]: Leaving directory `/home/jacob/NVIDIA_GPU_Computing_SDK/C/src/matrixMulDynlinkJIT'

make -C src/template/ 

make[1]: Entering directory `/home/jacob/NVIDIA_GPU_Computing_SDK/C/src/template'

make[1]: Leaving directory `/home/jacob/NVIDIA_GPU_Computing_SDK/C/src/template'

make -C src/histogram/ 

make[1]: Entering directory `/home/jacob/NVIDIA_GPU_Computing_SDK/C/src/histogram'

make[1]: Leaving directory `/home/jacob/NVIDIA_GPU_Computing_SDK/C/src/histogram'

make -C src/MonteCarloMultiGPU/ 

make[1]: Entering directory `/home/jacob/NVIDIA_GPU_Computing_SDK/C/src/MonteCarloMultiGPU'

make[1]: Leaving directory `/home/jacob/NVIDIA_GPU_Computing_SDK/C/src/MonteCarloMultiGPU'

make -C src/simpleAtomicIntrinsics/ 

make[1]: Entering directory `/home/jacob/NVIDIA_GPU_Computing_SDK/C/src/simpleAtomicIntrinsics'

make[1]: Leaving directory `/home/jacob/NVIDIA_GPU_Computing_SDK/C/src/simpleAtomicIntrinsics'

make -C src/Interval/ 

make[1]: Entering directory `/home/jacob/NVIDIA_GPU_Computing_SDK/C/src/Interval'

/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.1/../../../../include/c++/4.5.1/iomanip(64): error: expected an expression

/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.1/../../../../include/c++/4.5.1/iomanip(94): error: expected an expression

/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.1/../../../../include/c++/4.5.1/iomanip(125): error: expected an expression

/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.1/../../../../include/c++/4.5.1/iomanip(193): error: expected an expression

/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.1/../../../../include/c++/4.5.1/iomanip(223): error: expected an expression

5 errors detected in the compilation of "/tmp/tmpxft_00001c14_00000000-6_interval.compute_13.cpp1.ii".

make[1]: *** [obj/x86_64/release/interval.cu_13.o] Error 2

make[1]: Leaving directory `/home/jacob/NVIDIA_GPU_Computing_SDK/C/src/Interval'

make: *** [src/Interval/Makefile.ph_build] Error 2

I’m trying to compile the Cuda SDK and GCC throwing errors. I’ve looked at similar posts on this forum with no luck as to a fix for my problem.

My system specs are:

Arch Linux x64

GCC 4.5.1

Nvidia GT 130M GPU

Cuda toolkit for Fedora x64 3.2 (The Fedora toolkit is what was recommended on the AUR)

Cuda SDK x64 3.2

Nvidia graphics dev driver 260.24

I have libstdc++5 and lib32-libstdc++5 installed. I’ve updated both my PATH and LD_LIBRARY_PATH variables correctly as mentioned in the release notes for Cuda toolkit 3.2. Does this have anything to do with GCC 4.5.1 having experimental support for C++0x? Please help.

GCC make output:

make[1]: Entering directory `/home/jacob/NVIDIA_GPU_Computing_SDK/C/common'

make[1]: Leaving directory `/home/jacob/NVIDIA_GPU_Computing_SDK/C/common'

make[1]: Entering directory `/home/jacob/NVIDIA_GPU_Computing_SDK/C/common'

make[1]: Leaving directory `/home/jacob/NVIDIA_GPU_Computing_SDK/C/common'

make[1]: Entering directory `/home/jacob/NVIDIA_GPU_Computing_SDK/C/common'

make[1]: Leaving directory `/home/jacob/NVIDIA_GPU_Computing_SDK/C/common'

make[1]: Entering directory `/home/jacob/NVIDIA_GPU_Computing_SDK/shared'

make[1]: Leaving directory `/home/jacob/NVIDIA_GPU_Computing_SDK/shared'

make -C src/smokeParticles/ 

make[1]: Entering directory `/home/jacob/NVIDIA_GPU_Computing_SDK/C/src/smokeParticles'

/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.1/../../../../lib/libGL.so when searching for -lGL

/usr/bin/ld: skipping incompatible /usr/lib/../lib/libGL.so when searching for -lGL

/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.1/../../../libGL.so when searching for -lGL

make[1]: Leaving directory `/home/jacob/NVIDIA_GPU_Computing_SDK/C/src/smokeParticles'

make -C src/radixSort/ 

make[1]: Entering directory `/home/jacob/NVIDIA_GPU_Computing_SDK/C/src/radixSort'

make[1]: Leaving directory `/home/jacob/NVIDIA_GPU_Computing_SDK/C/src/radixSort'

make -C src/matrixMulDynlinkJIT/ 

make[1]: Entering directory `/home/jacob/NVIDIA_GPU_Computing_SDK/C/src/matrixMulDynlinkJIT'

make[1]: Leaving directory `/home/jacob/NVIDIA_GPU_Computing_SDK/C/src/matrixMulDynlinkJIT'

make -C src/template/ 

make[1]: Entering directory `/home/jacob/NVIDIA_GPU_Computing_SDK/C/src/template'

make[1]: Leaving directory `/home/jacob/NVIDIA_GPU_Computing_SDK/C/src/template'

make -C src/histogram/ 

make[1]: Entering directory `/home/jacob/NVIDIA_GPU_Computing_SDK/C/src/histogram'

make[1]: Leaving directory `/home/jacob/NVIDIA_GPU_Computing_SDK/C/src/histogram'

make -C src/MonteCarloMultiGPU/ 

make[1]: Entering directory `/home/jacob/NVIDIA_GPU_Computing_SDK/C/src/MonteCarloMultiGPU'

make[1]: Leaving directory `/home/jacob/NVIDIA_GPU_Computing_SDK/C/src/MonteCarloMultiGPU'

make -C src/simpleAtomicIntrinsics/ 

make[1]: Entering directory `/home/jacob/NVIDIA_GPU_Computing_SDK/C/src/simpleAtomicIntrinsics'

make[1]: Leaving directory `/home/jacob/NVIDIA_GPU_Computing_SDK/C/src/simpleAtomicIntrinsics'

make -C src/Interval/ 

make[1]: Entering directory `/home/jacob/NVIDIA_GPU_Computing_SDK/C/src/Interval'

/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.1/../../../../include/c++/4.5.1/iomanip(64): error: expected an expression

/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.1/../../../../include/c++/4.5.1/iomanip(94): error: expected an expression

/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.1/../../../../include/c++/4.5.1/iomanip(125): error: expected an expression

/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.1/../../../../include/c++/4.5.1/iomanip(193): error: expected an expression

/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.1/../../../../include/c++/4.5.1/iomanip(223): error: expected an expression

5 errors detected in the compilation of "/tmp/tmpxft_00001c14_00000000-6_interval.compute_13.cpp1.ii".

make[1]: *** [obj/x86_64/release/interval.cu_13.o] Error 2

make[1]: Leaving directory `/home/jacob/NVIDIA_GPU_Computing_SDK/C/src/Interval'

make: *** [src/Interval/Makefile.ph_build] Error 2

I had also the same problem with OpenSUSE 11.3 (i586).
When I try to compile the gpusdk I got also that “iomanip(64): error: expected an expression” error when the “Interval” example is compiled.
I think the problem is that SUSE is using gcc 4.5.0 which is relatively new and the GPU SDK is not really compatible with that compiler or the stc++ lib.
Any idea how to fix that, pls?

I had also the same problem with OpenSUSE 11.3 (i586).
When I try to compile the gpusdk I got also that “iomanip(64): error: expected an expression” error when the “Interval” example is compiled.
I think the problem is that SUSE is using gcc 4.5.0 which is relatively new and the GPU SDK is not really compatible with that compiler or the stc++ lib.
Any idea how to fix that, pls?

I found this on some random other forum. There is no ‘libstdc++43-devel’ package for Arch but the point is that we should try to use a legacy set of includes when making the program Interval. How you would set the path to the different includes in a makefile, I don’t know. I’m still a beginner with coding and compiling in Linux actually.

A simple workaround to compiling the rest of the SDK would be to remove the folder Interval from the SDK’s src folder and put it somewhere in your home directory where you will remember it later.

The complete list of programs that don’t compile from the 3.2 SDK with GCC 4.5.1 are:

Interval

SobelFilter

FunctionPointers

This thread is now devoted to just working with these three programs and getting them to compile with GCC 4.5.x.

I found this on some random other forum. There is no ‘libstdc++43-devel’ package for Arch but the point is that we should try to use a legacy set of includes when making the program Interval. How you would set the path to the different includes in a makefile, I don’t know. I’m still a beginner with coding and compiling in Linux actually.

A simple workaround to compiling the rest of the SDK would be to remove the folder Interval from the SDK’s src folder and put it somewhere in your home directory where you will remember it later.

The complete list of programs that don’t compile from the 3.2 SDK with GCC 4.5.1 are:

Interval

SobelFilter

FunctionPointers

This thread is now devoted to just working with these three programs and getting them to compile with GCC 4.5.x.

I hope this is fixed before marking the 3.2 SDK as “stable and official”.

I hope this is fixed before marking the 3.2 SDK as “stable and official”.

Hi All.
I am experiencing this issue with gcc 4.5.1, has anyone figured a work around to get the SDK to compile.
khk

Hi All.
I am experiencing this issue with gcc 4.5.1, has anyone figured a work around to get the SDK to compile.
khk

Hi All.
I am experiencing this issue with gcc 4.5.1, has anyone figured a work around to get the SDK to compile.
khk

Hi All.
I am experiencing this issue with gcc 4.5.1, has anyone figured a work around to get the SDK to compile.
khk

Hi All.
I am experiencing this issue with gcc 4.5.1, has anyone figured a work around to get the SDK to compile.
khk

Hi All.
I am experiencing this issue with gcc 4.5.1, has anyone figured a work around to get the SDK to compile.
khk

The work around would be to remove whatever program’s source folders don’t compile from the src directory in the SDK. Put them in some other folder for later then run ‘make’ from within the ‘C’ directory to compile everything else. Repeat as needed. Then, cd into the program’s source folder that doesn’t work and run ‘make’. Look and the error it throws and try and troubleshoot the cause. Do this for all the programs that won’t compile. Everyone’s system will throw something slightly different, that’s why there’s no easy answer to compiling this SDK.

The work around would be to remove whatever program’s source folders don’t compile from the src directory in the SDK. Put them in some other folder for later then run ‘make’ from within the ‘C’ directory to compile everything else. Repeat as needed. Then, cd into the program’s source folder that doesn’t work and run ‘make’. Look and the error it throws and try and troubleshoot the cause. Do this for all the programs that won’t compile. Everyone’s system will throw something slightly different, that’s why there’s no easy answer to compiling this SDK.

Hi J-Cube,

I’m the current maintainer of cuda, cuda-toolkit and cuda-sdk on the AUR.

As a matter of fact, there are issues with gcc 4.5. Before that, CUDA 3.0 had issues with gcc 4.4, older versions had issues with gcc 4.3, etc. IMHO, the best way to have everything working is just to use an older version of gcc (4.4 works fine, available as gcc44 on the AUR), and use “nvcc --compiler-bindir=/opt/gcc-4.4”. That’s how it works in my AUR packages.

If you really wish to use gcc 4.5 only, you may want to use “make -k”, which will not stop when a SDK example does not compile.

If you want to use the cuda-* AUR packages on x86_64, you might be interested in using my own repo: add the following lines to your /etc/pacman.conf, and you’ll be able to install precompiled packages directly from pacman. (gcc44 is there too, which is quite useful because it’s so long to compile ;))

[schnouki]

Server = http://repo.schnouki.net/archlinux/$arch

Hi J-Cube,

I’m the current maintainer of cuda, cuda-toolkit and cuda-sdk on the AUR.

As a matter of fact, there are issues with gcc 4.5. Before that, CUDA 3.0 had issues with gcc 4.4, older versions had issues with gcc 4.3, etc. IMHO, the best way to have everything working is just to use an older version of gcc (4.4 works fine, available as gcc44 on the AUR), and use “nvcc --compiler-bindir=/opt/gcc-4.4”. That’s how it works in my AUR packages.

If you really wish to use gcc 4.5 only, you may want to use “make -k”, which will not stop when a SDK example does not compile.

If you want to use the cuda-* AUR packages on x86_64, you might be interested in using my own repo: add the following lines to your /etc/pacman.conf, and you’ll be able to install precompiled packages directly from pacman. (gcc44 is there too, which is quite useful because it’s so long to compile ;))

[schnouki]

Server = http://repo.schnouki.net/archlinux/$arch

I’m not a fedora guy. I use Ubuntu. But you can try this.

go to common/common.mk

In the common.mk file, there will be a line with -O2. Comment that line and try rebuilding it.

I’m not a fedora guy. I use Ubuntu. But you can try this.

go to common/common.mk

In the common.mk file, there will be a line with -O2. Comment that line and try rebuilding it.