Command line tools not accessible from Eclipse on OSX

冷暖自知 提交于 2021-01-28 21:26:19

问题


I am using Eclipse on a macOS machine. CMake is present on my machine at /usr/local/bin/cmake and has been installed using Homebrew. Eclipse is at the latest version (2018-09).

I have the following target in a Makefile, which has been set up and is visible from Eclipse:

all:
    ./configure
    Rscript -e "Rcpp::compileAttributes()"
    R CMD INSTALL --no-multiarch --with-keep.source .

Inside the configure file, there is this code:

cd src/build;cmake ..

However, when I double click the all target in Eclipse, I get the following message:

make all
./configure
./configure: line 1: cmake: command not found
make: *** [all] Error 127

I remember that some time ago this target worked out of the box on macOS. I can also launch CMake from a terminal without any trouble.

echo $PATH shows different behaviour:

  • If called from a standard macOS terminal, it yields /usr/local/sbin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/opt/X11/bin
  • If called from a TM Terminal inside Eclipse, it yields /usr/bin:/bin:/usr/sbin:/sbin

What is the most canonical way to have Eclipse detect my CMake installation ?


回答1:


For macOS High Sierra 10.13.6, the solution provided here works. This must be performed to see the changes immediately.



来源:https://stackoverflow.com/questions/52428657/command-line-tools-not-accessible-from-eclipse-on-osx

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!