nano.specs not found in arm-none-eabi-gcc - 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 ?

Related

How to compile C++ code using modules-ts and gcc (experimental)?

I've been trying to code something using the new experimental feature "modules-ts" that will be included in c++20. I've cloned the gcc branch (found here: https://gcc.gnu.org/wiki/cxx-modules), and I'm trying to follow that tutorial (on the link) using modules-ts but an g++ error is preventing me from doing that:
g++: error: unrecognized command-line option ‘-fmodules-ts’
I tried to see the version of g++, to make sure that is not reading from another previous version. And the answer is:
g++ (GCC) 10.0.0 20191029 (experimental)
Copyright (C) 2019 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.
Here is the command that I'm trying to run:
g++ -fmodules-ts hello.cppm main.cpp
Modules-ts is not merged into GCC's main branch yet. You need to download GCC's source and compile it yourself, for further instructions see GCC's installation guide. Grab the source using
svn co svn://gcc.gnu.org/svn/gcc/branches/c++-modules SomeLocalDir
instead of
svn checkout svn://gcc.gnu.org/svn/gcc/trunk SomeLocalDir
and you'll get the correct version.
EDIT:
For clarification, in this answer I assumed the OP did not compile the right GCC version because there is no svn revision number inside his gcc --version.

Mac OS X: Installed and linked gcc 6.2 with Homebrew, but gcc --version still says 4.9.2

On OS X 10.11.6, I installed gcc 6.2.0 using homebrew. It lives over in usr/local/Cellar/gcc/6.2.0/bin. After getting it to link (it didn't do this automagically), I cd there and try the solution from this other thread to create an alias
ln -s gcc-6 gcc
then gcc --version gives me
cc (GCC) 4.9.2 20141029 (prerelease)
Copyright (C) 2014 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.
All this is because trying to install things crashes because of -rdynamic flags, that I hope is fixed in a newer version.
You created the symlink with the proper target name (gcc) but forgot to set the PATH to your newly installed location (or set it after the system path).
What's confusing is that your system already has a version of gcc installed. You have to override the default path so your gcc command comes first.
edit your ~/.profile file and check PATH adjustment. Add a line in the end which contains:
export PATH=/usr/local/Cellar/gcc/6.2.0/bin:$PATH
Then open a new terminal and ensure that which gcc prints
/usr/local/Cellar/gcc/6.2.0/bin/gcc

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.

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

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.

Resources