Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trying to resolve cmake build error=2, on build #39

Open
pch-jp opened this issue Nov 19, 2020 · 3 comments
Open

Trying to resolve cmake build error=2, on build #39

pch-jp opened this issue Nov 19, 2020 · 3 comments
Assignees

Comments

@pch-jp
Copy link

pch-jp commented Nov 19, 2020

I can build from the command line via Cmake or west. I cannot build via "Build Project" in Eclipse.

Mac 10.15.7
Eclipse Version: 2020-09 (4.17.0) / Build id: 20200910-1200

Error Description:

Errors occurred during the build.
Errors running builder 'Zephyr Application Builder' on project 'cork-demo1'.
Error invoking CMake for project cork-demo1!
Cannot run program "cmake" (in directory "/Users/john.norair/repos/cork-demo1/build"): error=2, No such file or directory
Error invoking CMake for project cork-demo1!
Cannot run program "cmake" (in directory "/Users/john.norair/repos/cork-demo1/build"): error=2, No such file or directory

The directory is most certainly present and with permissions that allow operation from command line.

I saw a previous issue -- which was apparently resolved -- although the interim resolution was to use an older version of Eclipse CDT. I will attempt to install an older version, but I am reporting this issue nonetheless.

@phsommer
Copy link

I observe the exact same behaviour. I can build from the command line using west, but cannot build in Eclipse.

MacOS 10.15.7
Eclipse Version: 2020-12 (4.18.0), Build id: 20201210-1552
Zephyr Project Development Support: 0.2.99.202009250453

Error description:

Errors occurred during the build.
Errors running builder 'Zephyr Application Builder' on project 'Test'.
Error invoking CMake for project Test!
Cannot run program "cmake" (in directory "/Users/username/eclipse-workspace/Test/build"): error=2, No such file or directory
Error invoking CMake for project Test!
Cannot run program "cmake" (in directory "/Users/username/eclipse-workspace/Test/build"): error=2, No such file or directory

@pch-jp
Copy link
Author

pch-jp commented Feb 18, 2021

One thing that might fix this issue (I don't remember exactly), is launching Eclipse from the command line. This will preserve environment variables from the shell into the Eclipse instance.

Try this from your shell that has the necessary Zephyr environment vars.
~> open [path-to-eclipse]

@phsommer
Copy link

Indeed, starting eclipse from a shell that has sourced the Zephyr environment variables fixed the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants