macOS Mojave генерирует ошибку: использование необъявленного идентификатора 'errno' при запуске ruby-build - PullRequest
0 голосов
/ 08 февраля 2019

Я пытаюсь обновить ruby ​​в моей системе до 2.6.1, используя rbenv, но получаю ошибку, которую не могу понять.

Я обновил свою систему до последней версии macOS (10.14.3) и убедился, что Xcode 10.1 и инструменты CLI также установлены.Я удалил ruby-build и rbenv через homebrew и переустановил с последними версиями.Я все еще получаю сообщение об ошибке.

Вот часть журнала, в которой отображается ошибка:

compiling enumerator.c
cont.c:897:9: error: use of undeclared identifier 'errno'
        errno = 0;
        ^
cont.c:900:80: error: use of undeclared identifier 'errno'
            rb_raise(rb_eFiberError, "can't alloc machine stack to fiber: %s", ERRNOMSG);
                                                                               ^
cont.c:862:27: note: expanded from macro 'ERRNOMSG'
#define ERRNOMSG strerror(errno)
                          ^
cont.c:906:68: error: use of undeclared identifier 'errno'
            rb_raise(rb_eFiberError, "can't set a guard page: %s", ERRNOMSG);
                                                                   ^
cont.c:862:27: note: expanded from macro 'ERRNOMSG'
#define ERRNOMSG strerror(errno)
                          ^
3 errors generated.
make: *** [cont.o] Error 1
make: *** Waiting for unfinished jobs....
dir.c:562:10: error: use of undeclared identifier 'errno'
        int e = errno;
                ^
dir.c:567:16: error: use of undeclared identifier 'EIO'
        else if (e == EIO) {
                      ^
dir.c:788:5: error: use of undeclared identifier 'errno'
    errno = 0;
    ^
dir.c:793:10: error: use of undeclared identifier 'errno'
        int e = errno;
                ^
dir.c:1363:17: error: use of undeclared identifier 'ENOENT'
    return e == ENOENT || e == ENOTDIR;
                ^
dir.c:1363:32: error: use of undeclared identifier 'ENOTDIR'
    return e == ENOENT || e == ENOTDIR;
                               ^
dir.c:1401:35: error: use of undeclared identifier 'errno'
    if (ret < 0 && !to_be_ignored(errno))
                                  ^
dir.c:1416:35: error: use of undeclared identifier 'errno'
    if (ret < 0 && !to_be_ignored(errno))
                                  ^
dir.c:1463:10: error: use of undeclared identifier 'errno'
        int e = errno;
                ^
dir.c:1516:10: error: use of undeclared identifier 'errno'
        int e = errno;
                ^
dir.c:1804:21: error: use of undeclared identifier 'errno'
        if (!to_be_ignored(errno))
                           ^
dir.c:1993:18: error: use of undeclared identifier 'EACCES'
    if (error == EACCES) {
                 ^
dir.c:2221:42: error: use of undeclared identifier 'errno'
            if ((magical < 2) && !recursive && (errno == EACCES)) {
                                                ^
dir.c:2221:51: error: use of undeclared identifier 'EACCES'
            if ((magical < 2) && !recursive && (errno == EACCES)) {
                                                         ^
dir.c:3292:10: error: use of undeclared identifier 'errno'
        int e = errno;
                ^
15 errors generated.
make: *** [dir.o] Error 1

Кто-нибудь еще видел эту ошибку?Я проверил ruby-build проблемы на Github.Похоже, что у кого-то есть похожая проблема , но не эта конкретная.

...