繁体   English   中英

构建最新的红宝石失败:使用未声明的标识符'YAML_VERSION_ *'

[英]Building the latest ruby fails: use of undeclared identifier 'YAML_VERSION_*'

在OSX上构建最新的Ruby失败:

../.././ext/psych/yaml/api.c:11:12: error: use of undeclared identifier 'YAML_VERSION_STRING'
    return YAML_VERSION_STRING;
           ^
../.././ext/psych/yaml/api.c:21:14: error: use of undeclared identifier 'YAML_VERSION_MAJOR'
    *major = YAML_VERSION_MAJOR;
             ^
../.././ext/psych/yaml/api.c:22:14: error: use of undeclared identifier 'YAML_VERSION_MINOR'
    *minor = YAML_VERSION_MINOR;
             ^
../.././ext/psych/yaml/api.c:23:14: error: use of undeclared identifier 'YAML_VERSION_PATCH'
    *patch = YAML_VERSION_PATCH;

为什么会这样呢? 来源没有经过测试吗?

通过将#include "config.h"添加到...yaml/api.c

但是随后会出现其他不同的错误。

我不明白为什么红宝石开发人员会发布不正确的源代码。

编辑更多信息:

似乎缺少某些定义(配置失败?)。 其他错误通过添加修复

#define HAVE_IFADDRS_H 1
#define HAVE_NET_IF_H 1

ext/socket/rubysocket.h 这些修复后,编译运行正常。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM