Project

General

Profile

Actions

Bug #15603

closed

Use of undeclared identifier 'errno' when building 2.6.1

Added by neomachina2011 (Daniel Hampton) about 5 years ago. Updated about 5 years ago.

Status:
Third Party's Issue
Target version:
-
ruby -v:
ruby 2.3.7p456 (2018-03-28 revision 63024) [universal.x86_64-darwin18]
[ruby-core:91533]

Description

I've been trying to install ruby 2.6.1 for a few days. I've tried using rbenv and ruby-build with no success. Now, I'm trying to build directly from source. I complete the ./configure step and everything looks fine. But, when I make, I get the following error:

BASERUBY = /usr/bin/ruby --disable=gems
	CC = clang
	LD = ld
	LDSHARED = clang -dynamiclib
	CFLAGS = -O3 -ggdb3 -Wall -Wextra -Wdeclaration-after-statement -Wdeprecated-declarations -Wdivision-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wmissing-noreturn -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wextra-tokens   -pipe
	XCFLAGS = -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fno-strict-overflow -fvisibility=hidden -DRUBY_EXPORT -fPIE -DCANONICALIZATION_FOR_MATHN
	CPPFLAGS = -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT   -I. -I.ext/include/x86_64-darwin18 -I./include -I. -I./enc/unicode/11.0.0
	DLDFLAGS = -Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress -fstack-protector-strong -Wl,-pie -framework Security -framework Foundation
	SOLIBS = -lpthread -ldl -lobjc
	LANG = en_US.UTF-8
	LC_ALL =
	LC_CTYPE = en_US.UTF-8
Apple LLVM version 10.0.1 (clang-1001.0.37.9)
Target: x86_64-apple-darwin18.2.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
compiling cont.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

I'm on macOS 10.14.3 and Xcode 10.1 with CLI tools installed.


Files

ruby-build.20190213132604.49331.log (32.1 KB) ruby-build.20190213132604.49331.log Complete rbenv configure and make log neomachina2011 (Daniel Hampton), 02/13/2019 07:32 PM

Updated by hsbt (Hiroshi SHIBATA) about 5 years ago

  • Status changed from Open to Third Party's Issue
  • Assignee set to hsbt (Hiroshi SHIBATA)

Duplicate with https://github.com/rbenv/ruby-build/issues/1286 (I also maintain ruby-build)

Actions

Also available in: Atom PDF

Like0
Like0