CUDA SDK issues with gcc/g++: old version of gcc can't find old version of g++? - gcc

I'm installing CUDA on F15. I'm well aware of the fact CUDA needs older versions gcc/g++ and I've installed gcc/g++ 4.5.1, and softlinked them as documented here. I no longer get the error mentioned in that post...however, when I tried compiling the SDK, I get the following error:
make[1]: Entering directory `/home/whao/NVIDIA_GPU_Computing_SDK/C/src/bilateralFilter'
gcc: error trying to exec 'cc1plus': execvp: No such file or directory
make[1]: *** [obj/x86_64/release/filter_kernel.cu.o] Error 1
I suspect that somehow, the older version of g++ in question isn't being recognized? For what it's worth, consider the following two outputs:
[whao#gen-whao-cuda C]$ /usr/local/cuda/bin/gcc --version
gcc (GCC) 4.5.1 20101130 (Red Hat 4.5.1-6)
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
[whao#gen-whao-cuda C]$ /usr/local/cuda/bin/g++ --version
g++ (GCC) 4.5.1 20101130 (Red Hat 4.5.1-6)
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

There is a file named host_config.h where gcc version is checked (the path is /usr/local/cuda/include). You can comment out the appropriate if part (if gcc_version>4.5.* ....). gcc 4.5 may be supported in toolkit 4.1 but if this lines remain, there always be an error before even start compiling.

Related

macOS Ventura beta 4, Homebrew gcc-11, warning couldn't not understand version '13.00.00'

Just trying to determine the version of gcc-11 installed by Homebrew, I get an error:
gcc-11 --version
gcc-11: warning: could not understand version '13.00.00'
gcc-11 (Homebrew GCC 11.3.0_2) 11.3.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
I know this is beta software (macOS), but is there a way to make gcc-11 recognize version 13.00.00?

nano.specs not found in arm-none-eabi-gcc

I am using Ubuntu 20.04.3 LTS and I need to use arm-none-eabi-gcc version 4.8.2 ( I know it is old, but i have to use this version)
So I successfully install this library with below files:
binutils-arm-none-eabi_2.24-2ubuntu2+4_amd64.deb
gcc-arm-none-eabi_4.8.2-14ubuntu1+6_amd64.deb
libcloog-isl4_0.18.2-1_amd64.deb
libisl10_0.12.2-1_amd64.deb
libnewlib-arm-none-eabi_2.1.0-3_all.deb
libnewlib-dev_2.1.0-3_all.deb
multiarch-support_2.27-3ubuntu1_amd64.deb
libmpfr4_3.1.6-1_amd64.deb
Than I checked my gcc-arm-none-eabi version like this :
arm-none-eabi-gcc --version
arm-none-eabi-gcc (4.8.2-14ubuntu1+6) 4.8.2
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Than I am trying to compile the source code for stm32f4 with makefile.
If I use the -specs=nano.specs in makefile I get below error:
arm-none-eabi-gcc: error: nano.specs: No such file or directory
But if I dont use -specs=nano.specs command in makefile I can compile successfuly, but I need to use -specs=nano.specs command how can I solve this problem ?

gcc - how to force to not add .exe suffix

On Windows, I'm using MinGw
>gcc --version
gcc (MinGW.org GCC-6.3.0-1) 6.3.0
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
My link step looks like this: gcc -o mpy-cross build/py/mpstate.o ... but the executable produced still has .exe suffix.
Is there a way to NOT have it (besides renaming it afterwards)?

Unable to upgrade cmake from 2.6 to higher

I am using centos 6.5 which has a cmake 2.6.
I want to upgrade to higher version (cmake 2.8 or cmake 3.0).
I have the downloaded the setup files.
When i run the file using ./configure i get the following error message
[root#dtl-sameet cmake-3.0.0]# ./configure
---------------------------------------------
CMake 3.0.0, Copyright 2000-2014 Kitware, Inc.
C compiler on this system is: gcc
---------------------------------------------
Error when bootstrapping CMake:
Cannot find appropriate C++ compiler on this system.
Please specify one using environment variable CXX.
See cmake_bootstrap.log for compilers attempted.
---------------------------------------------
Log of errors: /home/sameet/Downloads/cmake-3.0.0/Bootstrap.cmk/cmake_bootstrap.log
I have updated the gcc to higher version and i want to keep this higher version
[root#dtl-sameet cmake-3.0.0]# gcc --version
gcc (GCC) 4.8.2 20140120 (Red Hat 4.8.2-15)
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
[root#dtl-sameet cmake-3.0.0]# g++ --version
g++ (GCC) 4.8.2 20140120 (Red Hat 4.8.2-15)
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
The link answers the similar question but i did not wanted to install "Development Tools" as this would make gcc fall back to old version.
This link answers the similar question but i did not wanted install a package manager.
I set the environmental variable for CXX as
export CXX="/usr/bin/gcc"
It did not work.
Look into Bootstrap.cmk/cmake_bootstrap.log.
The configure script runs a number of tests. I assume that one of them failed.
You need to find out which one, what the test does and how to make it work or disable it.
You might want to update your question and hopefully someone will find out what is wrong with the cmake bootstrap on your system.

Do all gcc compilers support the #FILE flag?

I am trying to cross-compile some code for an i.mx51 platform.
I am using gcc provided by freescale for the platform, see below:
user#:/media/sf_repos/1109$ /opt/freescale/usr/local/gcc-4.1.2-glibc-2.5-nptl-3/arm-none-linux-gnueabi/bin/arm-none-linux-gnueabi-gcc --version
arm-none-linux-gnueabi-gcc (GCC) 4.1.2
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
The makefile which I am using utilizes the # flag which is available in GCC.
#FILE Read options from FILE
But using the provided gcc and using #FILE to point to my commands file, I get:
arm-none-linux-gnueabi-gcc: #hello.o_command: No such file or directory
arm-none-linux-gnueabi-gcc: no input files
(I know that this question may be too specific)
Does anyone have any idea about this issue? In the -v --help I can see that #FILE is mentioned so it should be supported!
OK, I managed to find the answer myself.
# was introduced in gcc 4.2.1. See the documentation.
So my compiler which is based on gcc 4.1.2 does not support it.

Resources