我正在尝试将火炬与hdf5包一起使用.我试图安装它,luarocks install hdf5但在构建阶段我得到一个关于gcc-plugin标头的错误.(gcc依赖于clang后端).完整的错误消息是:
luarocks install --local hdf5
Installing https://luarocks.org/hdf5-2.0.0-1.src.rock...
Using https://luarocks.org/hdf5-2.0.0-1.src.rock... switching to 'build' mode
Warning: variable CFLAGS was not passed in build_variables
gcclua-config.h:1:10: fatal error: 'gcc-plugin.h' file not found
#include "gcc-plugin.h"
^
1 error generated.
env MACOSX_DEPLOYMENT_TARGET=10.8 gcc -c -o gcclua.o -Iplugin/include -fPIC -O2 -Wall -Wformat-security -I/usr/local/Cellar/lua/5.2.4_3/include gcclua.c
gcclua.c:7:10: fatal error: 'gcc-plugin.h' file not found
#include "gcc-plugin.h"
^
1 error generated.
make[2]: *** [gcclua.o] Error 1
make[1]: *** [gcc] Error 2
make: *** [gcc-lua] Error 2
Run Code Online (Sandbox Code Playgroud)
只是为了提供更多信息,我依靠
gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
xcrun: error: couldn't stat toolchain: '/Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.11.xctoolchain' (errno=No such file or directory)
Apple LLVM version 7.3.0 (clang-703.0.29)
Target: x86_64-apple-darwin15.0.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
Run Code Online (Sandbox Code Playgroud)
有没有人提示如何解决这个问题?
非常感谢每一位帮助!
除此之外gcc,您需要在Linux上可以使用的标头sudo apt-get install gcc-4.8-plugin-dev.如果您使用的是其他操作系统或版本的gcc,只需替换相应的软件包管理器/ gcc版本号即可.
gcc-plugin.h是 GCC 的一部分,所以我认为您确实需要安装gcc才能获得它。Clang 提供了一个gcc兼容的前端脚本,但它仅仅提供了一个带有兼容标志的命令行驱动程序。
您应该能够使用 Homebrew 安装 GCC:https://apple.stackexchange.com/a/86588
| 归档时间: |
|
| 查看次数: |
1869 次 |
| 最近记录: |