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

没有从PATH变量寻找编译器的问题 #321

Closed
hyqhyq3 opened this issue Jan 10, 2019 · 1 comment
Closed

没有从PATH变量寻找编译器的问题 #321

hyqhyq3 opened this issue Jan 10, 2019 · 1 comment
Labels
Milestone

Comments

@hyqhyq3
Copy link

hyqhyq3 commented Jan 10, 2019

在CentOS 6系统上,安装了devtoolset-7(gcc-7编译器套件)。然后在shell执行 source /opt/rh/devtoolset-7/enable,这时候环境变量PATH里面有了/opt/rh/devtoolset-7/root/usr/bin,但是执行xmake的时候,不能找到这个目录下的gcc和g++,xmake f -c清除缓存也没有作用。

@waruqi waruqi added the bug label Jan 10, 2019
@waruqi waruqi added this to the v2.2.4 milestone Jan 10, 2019
@waruqi
Copy link
Member

waruqi commented Jan 10, 2019

dev分支,我已修复,详情见:89271a60c4b4e56e9801dc11241b5d67cd3b2a2b

之前由于传入指定搜索目录去探测gcc,还是去优先找了$PATH中的gcc,所以我修改了find_program的逻辑,优先探测全路径下的gcc

不过这样就引出了你这边的问题,主要原因是find_program开头添加了两个/usr/bin/的系统搜索目录,导致也去优先查找了,对于系统默认路径的探测移动到$PATH检测之后就行了。

@waruqi waruqi closed this as completed Jan 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants