I have problem when I try to build project for STM32F4 in eclipse on linux system. The error says: arm-none-eabi-gcc: error trying to exec '/home/abcd/.p2/pool/plugins/fr.ac6.mcu.externaltools.arm-none.linux64_1.13.1.201703061524/tools/compiler/bin/../lib/gcc/arm-none-eabi/5.4.1/cc1': execv: No such file or directory. I have found the file under mentioned directory and it exists. I also tried to reinstall and update packages related to gcc and cc1 as mentioned on stackoverflow, but I still cannot build the project. I am feeling helpless, so I will be thankful for any suggestions.
Related
I'm getting some difficulties on building the tutorial codes of Anjay https://github.com/AVSystem/Anjay. the doc wasn't really helpful.
I tried a simple :
cd examples/tutorial/custom-object
cmake . && make
but I'm getting this message :
By not providing "Findanjay.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "anjay", but
CMake did not find one.
Could not find a package configuration file provided by "anjay" with any of
the following names:
anjayConfig.cmake
anjay-config.cmake
Add the installation prefix of "anjay" to CMAKE_PREFIX_PATH or set
"anjay_DIR" to a directory containing one of the above files. If "anjay"
provides a separate development package or SDK, be sure it has been
installed.
CMake Warning (dev) in CMakeLists.txt:
No cmake_minimum_required command is present. A line of code such as
cmake_minimum_required(VERSION 3.10)
should be added at the top of the file. The version specified may be lower
if you wish to support older CMake versions for this project. For more
information run "cmake --help-policy CMP0000".
This warning is for project developers. Use -Wno-dev to suppress it.
I would appreciate any suggetions.
Thank you.
I was doing the same thing. The error is because you have not installed anjay libraries on your local system or provide a way for CMake to find it.
I installed it by following steps mentioned in compilation docs
In the root of Anjay directory execute the following:
cmake . && make && sudo make install
After I followed the instructions in (Building Custom ModSecurity Modules)section in modsecurity dev guide in order to compile (mod_tfn_reverse.c) using the command apxs -ca mod_tfn_reverse.c, I'm still finding "fatal errors" such as unable to find the file modsecurity.h mentioned in the header of the C document.
Here is the link to the source on github modsec
Instructions I did:
I am using Ubuntu 14.4 64bits (New installation with updates).
I installed "apache dev" package, to run "APXS" command on terminal.
Downloaded "modsecurity" zip file from github.
I extracted the zip file, then I located where the mod_tfn_reverse.c is.
It's path : ModSecurity/ext/mod_tfn_reverse.c
Then I changed the directory to the targeted file CD modsecurity/ext
as I placed the folder in "home".
Finally, I executed the command apxs -ca mod_tfn_reverse.c.
These are the instructions I did, apxs works, but the compilation fails because "modsecurity.h" declared in the header was not found, I searched this file I found it in another directory (ModSecurity/apache2/modsecurity.h).
So, the difficulty is, how can I successfully compile that specific file and have the module done and ready to use in apache2 server.
I am also confused about what are the other archives, headers, and development tools required to:
to compile a custom apache module.
to compile mod_tfn_reverse.c, in my case, knowing that this is only the starting point to create custom module for modsecurity.
This is covered by the included README:
apxs -I<MODSECURITY_SOURCE_CODE> -I/usr/include/libxml2 \
-ca mod_tfn_reverse.c
I have installed openmpi by using this link http://lsi.ugr.es/~jmantas/pdp/ayuda/datos/instalaciones/Install_OpenMPI_en.pdf
Howeere, I was getting error in compilation stage:
/bin/sh: /usr/lib64/openmpi/bin/mpicc: No such file or directory
Then I was suggested to install openmpi-devel, but then after installing , I get error which is described here
https://stackoverflow.com/questions/31543045/openmpi-undefined-reference
The problem is that I don't know how to resolve this problem. I see that openmpi is installed with dnf search openmpi, but the command which mpicc is not working. When I installed manually from the first link it seems that I have some collision with commands in /home/$USER/.openmpi folder. Should I remove this folder and try something else?
I am using Eclipse for a C project. I created a new Project by going to New->C project->Executable->Empty Project, Linux gcc toolchain.
When I add a new .c file, I get "program 'g++' not found in path".
How do I get rid of this? I'm not even using C++.
I had similar problem and it is solved by
Installing g++ The GNU C++ complier using ubuntu software centre and
Changing in -
Window -> Preferences -> C/C++ -> Build -> Settings -> Discovery -> CDT GCC Build in Complier Settings [Shared]
From: ${COMMAND} -E -P -v -dD "${INPUTS}"
To : /usr/bin/${COMMAND} -E -P -v -dD "${INPUTS}"
I hope it helps.
For posterity I'm going to post my own solution to this problem. None of the answers above or on related StackOverflow questions helped; most referred to menu entries that didn't exist, and the ones I could try did nothing. I searched other sites as well; there were about 6 different answers repeated many times, and none helped.
Short answer: I blew away the Eclipse install and replaced it. Then it worked. For me at least it wasn't a project or configuration option (at least not one I could get to from the GUI); something in the Eclipse program folder had gotten tweaked and only a new install could repair the problem.
I'm doing Android development using the "ADT" (Android Developer Tools) build of Eclipse. I did something to the configuration that made it start giving the above error (actually two errors, for gcc and g++ both). And I tried plenty of potential solutions (in addition to my own searching for options that might help) with no success.
Thing is, I didn't NEED gcc or g++ in the path. I'm doing Android development, and while both are used in the build process, I'm not using Eclipse to do the builds; I use the Android build system. And the C/C++ Build/Discovery options didn't even give me an option for setting paths for gcc or g++. Other answers I found elsewhere referenced menu entries that don't exist, and most seemed to be about helping people to use the normal C/C++ build within Eclipse, which I didn't need to do.
So I used this opportunity to download the latest ADT package from Google, and then I ran the new one, importing the existing project into a new workspace (just in case the old workspace was corrupted or otherwise part of the problem). No more annoying gcc/g++ error.
I got the same error while I was using "Eclipse IDE for C/C++ Developers."
Install Eclipse from Ubuntu Software Center and then download and install Eclipse CDT.
To install CDT, open Eclipse -> Help -> Install New Software -> Add -> Archieve...
Then give CDT path to there. That's all
I was able to fix the problem by selecting
project(right click in Project Explorer on your project)->properties->Tool Chain Editor
and switching the Current Toolchain: to Android GCC and Current Buolder: to Android Builder
I also had the same problem. I did not have this error running my program but after a adding, including different Api and paths , probably unintentionally some changes happened in my Path that I could not fix it.
I could fix this error by going to Properties and just restore default for all the Tabs.
I'm using Eclipse Juno, trying to get the ARM toolchain working. What I have installed:
Eclipse Juno
Zylin Embedded CDT Plugin
GNU ARM Eclipse plugin
Summon-Arm-Toolchain, installed in the default ~/sat/ directory.
When I create a new C project using the Summon toolchain, the following error appears: 'Program "arm-none-eabi-gcc" not found in path.' The error location is "[Discovery Options] page in project properties." I've tried setting the Eclipse-level (Eclipse->Preferences->C/C++->Build->Environment) PATH and the project-level PATH to include this path, both relatively (~/sat) and absolutely /Users/alterscape/sat), but nothing seems to fix the problem. I've also tried manually adding the full path in the Discovery Options page. Is there a known fix? If not, is there a way to echo $PATH inside Eclipse to see what it thinks its path is?
So, here's the story: Eclipse CDT does NOT automatically re-check errors to see if they go away after you apply changes to your path. You have to manually re-build. This came as a surprise to me because I am used to my Java toolchain checking/updating errors as I make configuration changes. It isn't entirely obvious that you need to re-run Build Project to see if your changes fixed the error, but that's the path forward.