Actions
Bug #13361
closedCan't build Ruby trunk with i386 arch on macOS 10.12
Description
Ruby uses deprecated function and it causes build error.
Here is reproduce operation.
$ svn co http://svn.ruby-lang.org/repos/ruby/trunk ruby
$ cd ruby
$ autoconf
$ ./configure --with-arch=i386
$ make
CC = clang
LD = ld
LDSHARED = clang -dynamic -bundle
CFLAGS = -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wno-tautological-compare -Wno-parentheses-equality -Wno-constant-logical-operand -Wno-self-assign -Wunused-variable -Werror=implicit-int -Werror=pointer-arith -Werror=write-strings -Werror=declaration-after-statement -Werror=shorten-64-to-32 -Werror=implicit-function-declaration -Werror=division-by-zero -Werror=deprecated-declarations -Werror=extra-tokens -pipe -arch i386
XCFLAGS = -D_FORTIFY_SOURCE=2 -fstack-protector -fno-strict-overflow -fvisibility=hidden -DRUBY_EXPORT -fPIE
CPPFLAGS = -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -I. -I.ext/include/i386-darwin16 -I./include -I. -I./enc/unicode/9.0.0
DLDFLAGS = -arch i386 -Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress -fstack-protector -Wl,-u,_objc_msgSend -Wl,-pie -framework CoreFoundation -arch i386
SOLIBS =
Apple LLVM version 8.1.0 (clang-802.0.38)
Target: x86_64-apple-darwin16.5.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
compiling main.c
compiling dmydln.c
compiling miniinit.c
compiling dmyext.c
generating miniprelude.c
miniprelude.c updated
compiling miniprelude.c
generating id.h
id.h updated
/Users/watson/.rbenv/shims/ruby --disable=gems ./tool/gen_dummy_probes.rb ./probes.d > probes.dmyh
translating probes probes.d
. ./vm_opts.h
compiling array.c
compiling bignum.c
compiling class.c
compiling compar.c
generating opt_sc.inc
generating optunifs.inc
generating insns.inc
generating insns_info.inc
generating optinsn.inc
compiling compile.c
compiling complex.c
compiling cont.c
compiling debug.c
compiling debug_counter.c
compiling dir.c
compiling dln_find.c
compiling encoding.c
compiling enum.c
compiling enumerator.c
generating known_errors.inc
known_errors.inc updated
compiling error.c
compiling eval.c
compiling file.c
compiling gc.c
compiling hash.c
compiling inits.c
compiling io.c
io.c:9493:11: error: 'syscall' is deprecated: first deprecated in macOS 10.12 - syscall(2) is unsupported; please switch to a supported
interface. For SYS_kdebug_trace use kdebug_signpost(). [-Werror,-Wdeprecated-declarations]
retval = SYSCALL(num);
^
io.c:9462:18: note: expanded from macro 'SYSCALL'
# define SYSCALL syscall
^
/usr/include/unistd.h:733:6: note: 'syscall' has been explicitly marked deprecated here
int syscall(int, ...);
^
io.c:9496:11: error: 'syscall' is deprecated: first deprecated in macOS 10.12 - syscall(2) is unsupported; please switch to a supported
interface. For SYS_kdebug_trace use kdebug_signpost(). [-Werror,-Wdeprecated-declarations]
retval = SYSCALL(num, arg[0]);
^
io.c:9462:18: note: expanded from macro 'SYSCALL'
# define SYSCALL syscall
^
/usr/include/unistd.h:733:6: note: 'syscall' has been explicitly marked deprecated here
int syscall(int, ...);
^
io.c:9499:11: error: 'syscall' is deprecated: first deprecated in macOS 10.12 - syscall(2) is unsupported; please switch to a supported
interface. For SYS_kdebug_trace use kdebug_signpost(). [-Werror,-Wdeprecated-declarations]
retval = SYSCALL(num, arg[0],arg[1]);
^
io.c:9462:18: note: expanded from macro 'SYSCALL'
# define SYSCALL syscall
^
/usr/include/unistd.h:733:6: note: 'syscall' has been explicitly marked deprecated here
int syscall(int, ...);
^
io.c:9502:11: error: 'syscall' is deprecated: first deprecated in macOS 10.12 - syscall(2) is unsupported; please switch to a supported
interface. For SYS_kdebug_trace use kdebug_signpost(). [-Werror,-Wdeprecated-declarations]
retval = SYSCALL(num, arg[0],arg[1],arg[2]);
^
io.c:9462:18: note: expanded from macro 'SYSCALL'
# define SYSCALL syscall
^
/usr/include/unistd.h:733:6: note: 'syscall' has been explicitly marked deprecated here
int syscall(int, ...);
^
io.c:9505:11: error: 'syscall' is deprecated: first deprecated in macOS 10.12 - syscall(2) is unsupported; please switch to a supported
interface. For SYS_kdebug_trace use kdebug_signpost(). [-Werror,-Wdeprecated-declarations]
retval = SYSCALL(num, arg[0],arg[1],arg[2],arg[3]);
^
io.c:9462:18: note: expanded from macro 'SYSCALL'
# define SYSCALL syscall
^
/usr/include/unistd.h:733:6: note: 'syscall' has been explicitly marked deprecated here
int syscall(int, ...);
^
io.c:9508:11: error: 'syscall' is deprecated: first deprecated in macOS 10.12 - syscall(2) is unsupported; please switch to a supported
interface. For SYS_kdebug_trace use kdebug_signpost(). [-Werror,-Wdeprecated-declarations]
retval = SYSCALL(num, arg[0],arg[1],arg[2],arg[3],arg[4]);
^
io.c:9462:18: note: expanded from macro 'SYSCALL'
# define SYSCALL syscall
^
/usr/include/unistd.h:733:6: note: 'syscall' has been explicitly marked deprecated here
int syscall(int, ...);
^
io.c:9511:11: error: 'syscall' is deprecated: first deprecated in macOS 10.12 - syscall(2) is unsupported; please switch to a supported
interface. For SYS_kdebug_trace use kdebug_signpost(). [-Werror,-Wdeprecated-declarations]
retval = SYSCALL(num, arg[0],arg[1],arg[2],arg[3],arg[4],arg[5]);
^
io.c:9462:18: note: expanded from macro 'SYSCALL'
# define SYSCALL syscall
^
/usr/include/unistd.h:733:6: note: 'syscall' has been explicitly marked deprecated here
int syscall(int, ...);
^
io.c:9514:11: error: 'syscall' is deprecated: first deprecated in macOS 10.12 - syscall(2) is unsupported; please switch to a supported
interface. For SYS_kdebug_trace use kdebug_signpost(). [-Werror,-Wdeprecated-declarations]
retval = SYSCALL(num, arg[0],arg[1],arg[2],arg[3],arg[4],arg[5],arg[6]);
^
io.c:9462:18: note: expanded from macro 'SYSCALL'
# define SYSCALL syscall
^
/usr/include/unistd.h:733:6: note: 'syscall' has been explicitly marked deprecated here
int syscall(int, ...);
^
8 errors generated.
make: *** [io.o] Error 1
Updated by nobu (Nobuyoshi Nakada) about 7 years ago
Only i386 but not x86_64?
Updated by watson1978 (Shizuo Fujita) about 7 years ago
The build error is occurred on i386 only.
Updated by nobu (Nobuyoshi Nakada) about 7 years ago
- Status changed from Open to Feedback
Does this work?
diff --git a/configure.in b/configure.in
index 1cec2e33ac..dcd56ba2f7 100644
--- a/configure.in
+++ b/configure.in
@@ -1100,6 +1100,12 @@ AS_CASE(["$target_os"],
],
[macosx_10_5=yes], [macosx_10_5=no])
AC_MSG_RESULT($macosx_10_5)
+ AS_IF([test "${target_os@%:@darwin}" -ge 16], [
+ ac_cv_func___syscall=no
+ ac_cv_func_syscall=no
+ ac_cv_header_sys_syscall_h=no
+ ac_cv_header_syscall_h=no
+ ])
if test $macosx_10_5 = yes; then
ac_cv_func_getcontext=no
ac_cv_func_setcontext=no
Updated by watson1978 (Shizuo Fujita) about 7 years ago
I succeeded to build i386 on my macOS with your patch.
Thank you, nobu !
Updated by nobu (Nobuyoshi Nakada) about 7 years ago
- Status changed from Feedback to Closed
Applied in changeset trunk|r58084.
configure.in: syscall is deprecated on macOS
- configure.in: syscall is no longer supported on macOS since
10.12. [ruby-core:80300] [Bug #13361]
Updated by nagachika (Tomoyuki Chikanaga) about 7 years ago
- Backport changed from 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: UNKNOWN to 2.2: UNKNOWN, 2.3: REQUIRED, 2.4: REQUIRED
Updated by nagachika (Tomoyuki Chikanaga) about 7 years ago
- Backport changed from 2.2: UNKNOWN, 2.3: REQUIRED, 2.4: REQUIRED to 2.2: UNKNOWN, 2.3: DONE, 2.4: REQUIRED
ruby_2_3 r58187 merged revision(s) 58084.
Updated by usa (Usaku NAKAMURA) about 7 years ago
- Backport changed from 2.2: UNKNOWN, 2.3: DONE, 2.4: REQUIRED to 2.2: DONE, 2.3: DONE, 2.4: REQUIRED
ruby_2_2 r58193 merged revision(s) 58084.
Updated by nagachika (Tomoyuki Chikanaga) about 7 years ago
- Backport changed from 2.2: DONE, 2.3: DONE, 2.4: REQUIRED to 2.2: DONE, 2.3: DONE, 2.4: DONE
ruby_2_4 r58619 merged revision(s) 58084.
Actions
Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0