Issue #15603 has been updated by hsbt (Hiroshi SHIBATA).

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

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

----------------------------------------
Bug #15603: Use of undeclared identifier 'errno' when building 2.6.1
https://bugs.ruby-lang.org/issues/15603#change-76806

* Author: neomachina2011 (Daniel Hampton)
* Status: Third Party's Issue
* Priority: Normal
* Assignee: hsbt (Hiroshi SHIBATA)
* Target version: 
* ruby -v: ruby 2.3.7p456 (2018-03-28 revision 63024) [universal.x86_64-darwin18]
* Backport: 2.4: UNKNOWN, 2.5: UNKNOWN, 2.6: UNKNOWN
----------------------------------------
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:
``` shell
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)


-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>