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

无法识别/安装 brew::mkl-dnn包 #732

Closed
zhangxp1998 opened this issue Mar 25, 2020 · 2 comments
Closed

无法识别/安装 brew::mkl-dnn包 #732

zhangxp1998 opened this issue Mar 25, 2020 · 2 comments
Milestone

Comments

@zhangxp1998
Copy link

zhangxp1998 commented Mar 25, 2020

注:提问题时若使用不能用/没效果/有问题/报错此类模糊表达,但又没有根据下面的模板给出任何相关辅助信息的,将绝对不会有任何反馈。

描述问题

  1. 建立一个简单的项目,add_requires添加brew::mkl-dnn包,xmake无法识别

xmake.lua:

add_requires("brew::mkl-dnn", {alias = "mkl-dnn"})
target("snippet")
    set_kind("binary")
    add_files("snippet.cpp")
	add_packages("mkl-dnn")

运行xmake,会报错:
Xnip2020-03-25_18-35-50

虽然xmake询问是否安装mkl-dnn, 但实际上我的系统已经安装了mkl-dnn, xmake无法识别,自动安装也不成功
error log:

fetch brew::mkl-dnn failed!

请尽量清晰精准地描述你碰到的问题。

期待的结果

请尽量清晰精准地描述你所期待的结果。

错误信息

如果可能,请尽量附加程序运行过程中的错误输出信息。

如果是xmake相关编译问题,请加上-v -D参数运行,并给出详细编译输出信息。
-v -D 运行结果:

▶ xmake -v -D
checking for the Xcode directory ... /Applications/Xcode.app
checking for the SDK version of Xcode ... 10.15
checking for the unzip ... /usr/bin/unzip
checking for the git ... /usr/bin/git
checking for the gzip ... /usr/bin/gzip
checking for the tar ... /usr/bin/tar
checking for the ping ... /sbin/ping
checking for the nmap ... /usr/local/bin/nmap
pinging for the host(github.com) ... 160 ms
pinging for the host(gitlab.com) ... 190 ms
pinging for the host(gitee.com) ... 1920 ms
finding mkl-dnn from brew ..
checking for the brew ... /usr/local/bin/brew
checking for the brew::mkl-dnn ... no
note: try installing these packages (pass -y to skip confirm)?
in brew:
  -> brew::mkl-dnn
please input: y (y/n)
installing mkl-dnn from brew ..
/usr/local/bin/brew install mkl-dnn --verbose
Warning: mkl-dnn 1.2.1 is already installed and up-to-date
To reinstall 1.2.1, run `brew reinstall mkl-dnn`
finding mkl-dnn from brew ..
checking for the brew::mkl-dnn ... no

error: @programdir/actions/require/impl/action/install.lua:190: fetch brew::mkl-dnn failed!
stack traceback:
    [C]: in function 'error'
    [@programdir/core/base/os.lua:814]: in function 'raiselevel'
    [@programdir/core/sandbox/modules/utils.lua:206]: in function 'assert'
    [@programdir/actions/require/impl/action/install.lua:190]:
    [C]: in function 'trycall'
    [@programdir/core/sandbox/modules/try.lua:121]: in function 'try'
    [@programdir/actions/require/impl/action/install.lua:126]: in function 'install'
    [@programdir/actions/require/impl/package.lua:616]: in function 'jobfunc'
    [@programdir/modules/private/async/runjobs.lua:132]:
    [C]: in function 'trycall'
    [@programdir/core/sandbox/modules/try.lua:121]: in function 'try'
    [@programdir/modules/private/async/runjobs.lua:130]: in function 'cotask'
    [@programdir/core/base/scheduler.lua:306]:

  => install brew::mkl-dnn  .. failed
error: @programdir/modules/private/async/runjobs.lua:154: @programdir/actions/require/impl/action/install.lua:249: install failed!
stack traceback:
    [C]: in function 'error'
    [@programdir/core/base/os.lua:814]: in function 'raise'
    [@programdir/actions/require/impl/action/install.lua:249]: in function 'catch'
    [@programdir/core/sandbox/modules/try.lua:127]: in function 'try'
    [@programdir/actions/require/impl/action/install.lua:126]: in function 'install'
    [@programdir/actions/require/impl/package.lua:616]: in function 'jobfunc'
    [@programdir/modules/private/async/runjobs.lua:132]:
    [C]: in function 'trycall'
    [@programdir/core/sandbox/modules/try.lua:121]: in function 'try'
    [@programdir/modules/private/async/runjobs.lua:130]: in function 'cotask'
    [@programdir/core/base/scheduler.lua:306]:

stack traceback:
	[C]: in function 'error'
	@programdir/core/base/os.lua:814: in function 'raise'
	@programdir/modules/private/async/runjobs.lua:154: in function 'catch'
	@programdir/core/sandbox/modules/try.lua:127: in function 'try'
	@programdir/modules/private/async/runjobs.lua:130: in function 'cotask'
	@programdir/core/base/scheduler.lua:306: in function <@programdir/core/base/scheduler.lua:304>

相关环境

请提供编译和运行环境信息,例如:xmake版本、操作系统等
xmake v2.3.1+202002280850, Mac OS 10.15.4 (19E266)

其他信息

请提供其他附加信息帮助我们诊断问题。

@waruqi
Copy link
Member

waruqi commented Mar 26, 2020

这个包是通过cmake装到homebrew的,没有pkg-config的信息,之前的检测方式找不到

我改进过了,如果没pkg-config,直接从lib/include下探测,你更新到dev再试试 xmake update dev

@waruqi waruqi added this to the v2.3.2 milestone Mar 26, 2020
@zhangxp1998
Copy link
Author

解决了,非常感谢!

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

No branches or pull requests

2 participants