* [ruby-core:112262] [Ruby master Feature#19422] Make `--enabled-shared` mandatory on macOS
@ 2023-02-07 8:14 nobu (Nobuyoshi Nakada) via ruby-core
2023-02-07 8:19 ` [ruby-core:112263] " nobu (Nobuyoshi Nakada) via ruby-core
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: nobu (Nobuyoshi Nakada) via ruby-core @ 2023-02-07 8:14 UTC (permalink / raw)
To: ruby-core; +Cc: nobu (Nobuyoshi Nakada)
Issue #19422 has been reported by nobu (Nobuyoshi Nakada).
----------------------------------------
Feature #19422: Make `--enabled-shared` mandatory on macOS
https://bugs.ruby-lang.org/issues/19422
* Author: nobu (Nobuyoshi Nakada)
* Status: Open
* Priority: Normal
----------------------------------------
From the troubles around linker on macOS, I propose `--enable-shared` option mandatory on macOS.
This patch enables the option by default, and abort if `--disable-shared` option is given explicitly.
```diff
diff --git i/configure.ac w/configure.ac
index 7db2ab5257c..923ac7d1199 100644
--- i/configure.ac
+++ w/configure.ac
@@ -504,6 +504,11 @@ AS_CASE(["$target_os"],
rb_cv_binary_elf=no
: ${enable_shared=yes}
],
+[darwin*], [
+ AS_IF([test "${enable_shared=yes}" = no], [
+ AC_MSG_ERROR([--disable-shared is not supported on this platform])
+ ])
+],
[hiuxmpp*], [AC_DEFINE(__HIUX_MPP__)]) # by TOYODA Eizi <toyoda@npd.kishou.go.jp>
AC_PROG_LN_S
@@ -3055,14 +3060,7 @@ AC_SUBST(EXTOBJS)
: ${LDFLAGS=""}
: ${LIBPATHENV=DYLD_FALLBACK_LIBRARY_PATH}
: ${PRELOADENV=DYLD_INSERT_LIBRARIES}
- AS_IF([test x"$enable_shared" = xyes], [
- # Resolve symbols from libruby.dylib when --enable-shared
- EXTDLDFLAGS='$(LIBRUBYARG_SHARED)'
- ], [test "x$EXTSTATIC" = x], [
- # When building exts as bundles, a mach-o bundle needs to know its loader
- # program to bind symbols from the ruby executable
- EXTDLDFLAGS="-bundle_loader '\$(BUILTRUBY)'"
- ])
+ EXTDLDFLAGS='$(LIBRUBYARG_SHARED)'
rb_cv_dlopen=yes],
[aix*], [ : ${LDSHARED='$(CC)'}
AS_IF([test "$GCC" = yes], [
@@ -3356,10 +3354,6 @@ AS_IF([test x"$cross_compiling" = xyes], [
AC_SUBST(XRUBY_RUBYLIBDIR)
AC_SUBST(XRUBY_RUBYHDRDIR)
PREP='$(arch)-fake.rb'
- AS_CASE(["$enable_shared:$EXTSTATIC:$target_os"], [no::darwin*], [
- # darwin target requires miniruby for linking ext bundles
- PREP="$PREP"' miniruby$(EXEEXT)'
- ])
RUNRUBY_COMMAND='$(MINIRUBY) -I`cd $(srcdir)/lib; pwd`'
RUNRUBY='$(RUNRUBY_COMMAND)'
XRUBY='$(MINIRUBY)'
```
--
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/
^ permalink raw reply [flat|nested] 8+ messages in thread
* [ruby-core:112263] [Ruby master Feature#19422] Make `--enabled-shared` mandatory on macOS
2023-02-07 8:14 [ruby-core:112262] [Ruby master Feature#19422] Make `--enabled-shared` mandatory on macOS nobu (Nobuyoshi Nakada) via ruby-core
@ 2023-02-07 8:19 ` nobu (Nobuyoshi Nakada) via ruby-core
2023-02-14 12:40 ` [ruby-core:112424] " hsbt (Hiroshi SHIBATA) via ruby-core
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: nobu (Nobuyoshi Nakada) via ruby-core @ 2023-02-07 8:19 UTC (permalink / raw)
To: ruby-core; +Cc: nobu (Nobuyoshi Nakada)
Issue #19422 has been updated by nobu (Nobuyoshi Nakada).
Status changed from Open to Assigned
Assignee set to mrkn (Kenta Murata)
----------------------------------------
Feature #19422: Make `--enabled-shared` mandatory on macOS
https://bugs.ruby-lang.org/issues/19422#change-101691
* Author: nobu (Nobuyoshi Nakada)
* Status: Assigned
* Priority: Normal
* Assignee: mrkn (Kenta Murata)
----------------------------------------
From the troubles around linker on macOS, I propose `--enable-shared` option mandatory on macOS.
This patch enables the option by default, and abort if `--disable-shared` option is given explicitly.
```diff
diff --git i/configure.ac w/configure.ac
index 7db2ab5257c..923ac7d1199 100644
--- i/configure.ac
+++ w/configure.ac
@@ -504,6 +504,11 @@ AS_CASE(["$target_os"],
rb_cv_binary_elf=no
: ${enable_shared=yes}
],
+[darwin*], [
+ AS_IF([test "${enable_shared=yes}" = no], [
+ AC_MSG_ERROR([--disable-shared is not supported on this platform])
+ ])
+],
[hiuxmpp*], [AC_DEFINE(__HIUX_MPP__)]) # by TOYODA Eizi <toyoda@npd.kishou.go.jp>
AC_PROG_LN_S
@@ -3055,14 +3060,7 @@ AC_SUBST(EXTOBJS)
: ${LDFLAGS=""}
: ${LIBPATHENV=DYLD_FALLBACK_LIBRARY_PATH}
: ${PRELOADENV=DYLD_INSERT_LIBRARIES}
- AS_IF([test x"$enable_shared" = xyes], [
- # Resolve symbols from libruby.dylib when --enable-shared
- EXTDLDFLAGS='$(LIBRUBYARG_SHARED)'
- ], [test "x$EXTSTATIC" = x], [
- # When building exts as bundles, a mach-o bundle needs to know its loader
- # program to bind symbols from the ruby executable
- EXTDLDFLAGS="-bundle_loader '\$(BUILTRUBY)'"
- ])
+ EXTDLDFLAGS='$(LIBRUBYARG_SHARED)'
rb_cv_dlopen=yes],
[aix*], [ : ${LDSHARED='$(CC)'}
AS_IF([test "$GCC" = yes], [
@@ -3356,10 +3354,6 @@ AS_IF([test x"$cross_compiling" = xyes], [
AC_SUBST(XRUBY_RUBYLIBDIR)
AC_SUBST(XRUBY_RUBYHDRDIR)
PREP='$(arch)-fake.rb'
- AS_CASE(["$enable_shared:$EXTSTATIC:$target_os"], [no::darwin*], [
- # darwin target requires miniruby for linking ext bundles
- PREP="$PREP"' miniruby$(EXEEXT)'
- ])
RUNRUBY_COMMAND='$(MINIRUBY) -I`cd $(srcdir)/lib; pwd`'
RUNRUBY='$(RUNRUBY_COMMAND)'
XRUBY='$(MINIRUBY)'
```
--
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/
^ permalink raw reply [flat|nested] 8+ messages in thread
* [ruby-core:112424] [Ruby master Feature#19422] Make `--enabled-shared` mandatory on macOS
2023-02-07 8:14 [ruby-core:112262] [Ruby master Feature#19422] Make `--enabled-shared` mandatory on macOS nobu (Nobuyoshi Nakada) via ruby-core
2023-02-07 8:19 ` [ruby-core:112263] " nobu (Nobuyoshi Nakada) via ruby-core
@ 2023-02-14 12:40 ` hsbt (Hiroshi SHIBATA) via ruby-core
2023-10-05 15:35 ` [ruby-core:114949] " nobu (Nobuyoshi Nakada) via ruby-core
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: hsbt (Hiroshi SHIBATA) via ruby-core @ 2023-02-14 12:40 UTC (permalink / raw)
To: ruby-core; +Cc: hsbt (Hiroshi SHIBATA)
Issue #19422 has been updated by hsbt (Hiroshi SHIBATA).
Assignee changed from mrkn (Kenta Murata) to hsbt (Hiroshi SHIBATA)
We discuss this feature in DevMeeting.
We will back to use `dynamic_lookup` and suppress warnings. But Apple may remove `dynamic_lookup` completely in the future. We need to look and test Xcode 15 in this summer.
After that, we will decide how to handle this problem.
----------------------------------------
Feature #19422: Make `--enabled-shared` mandatory on macOS
https://bugs.ruby-lang.org/issues/19422#change-101872
* Author: nobu (Nobuyoshi Nakada)
* Status: Assigned
* Priority: Normal
* Assignee: hsbt (Hiroshi SHIBATA)
----------------------------------------
From the troubles around linker on macOS, I propose `--enable-shared` option mandatory on macOS.
This patch enables the option by default, and abort if `--disable-shared` option is given explicitly.
```diff
diff --git i/configure.ac w/configure.ac
index 7db2ab5257c..923ac7d1199 100644
--- i/configure.ac
+++ w/configure.ac
@@ -504,6 +504,11 @@ AS_CASE(["$target_os"],
rb_cv_binary_elf=no
: ${enable_shared=yes}
],
+[darwin*], [
+ AS_IF([test "${enable_shared=yes}" = no], [
+ AC_MSG_ERROR([--disable-shared is not supported on this platform])
+ ])
+],
[hiuxmpp*], [AC_DEFINE(__HIUX_MPP__)]) # by TOYODA Eizi <toyoda@npd.kishou.go.jp>
AC_PROG_LN_S
@@ -3055,14 +3060,7 @@ AC_SUBST(EXTOBJS)
: ${LDFLAGS=""}
: ${LIBPATHENV=DYLD_FALLBACK_LIBRARY_PATH}
: ${PRELOADENV=DYLD_INSERT_LIBRARIES}
- AS_IF([test x"$enable_shared" = xyes], [
- # Resolve symbols from libruby.dylib when --enable-shared
- EXTDLDFLAGS='$(LIBRUBYARG_SHARED)'
- ], [test "x$EXTSTATIC" = x], [
- # When building exts as bundles, a mach-o bundle needs to know its loader
- # program to bind symbols from the ruby executable
- EXTDLDFLAGS="-bundle_loader '\$(BUILTRUBY)'"
- ])
+ EXTDLDFLAGS='$(LIBRUBYARG_SHARED)'
rb_cv_dlopen=yes],
[aix*], [ : ${LDSHARED='$(CC)'}
AS_IF([test "$GCC" = yes], [
@@ -3356,10 +3354,6 @@ AS_IF([test x"$cross_compiling" = xyes], [
AC_SUBST(XRUBY_RUBYLIBDIR)
AC_SUBST(XRUBY_RUBYHDRDIR)
PREP='$(arch)-fake.rb'
- AS_CASE(["$enable_shared:$EXTSTATIC:$target_os"], [no::darwin*], [
- # darwin target requires miniruby for linking ext bundles
- PREP="$PREP"' miniruby$(EXEEXT)'
- ])
RUNRUBY_COMMAND='$(MINIRUBY) -I`cd $(srcdir)/lib; pwd`'
RUNRUBY='$(RUNRUBY_COMMAND)'
XRUBY='$(MINIRUBY)'
```
--
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/
^ permalink raw reply [flat|nested] 8+ messages in thread
* [ruby-core:114949] [Ruby master Feature#19422] Make `--enabled-shared` mandatory on macOS
2023-02-07 8:14 [ruby-core:112262] [Ruby master Feature#19422] Make `--enabled-shared` mandatory on macOS nobu (Nobuyoshi Nakada) via ruby-core
2023-02-07 8:19 ` [ruby-core:112263] " nobu (Nobuyoshi Nakada) via ruby-core
2023-02-14 12:40 ` [ruby-core:112424] " hsbt (Hiroshi SHIBATA) via ruby-core
@ 2023-10-05 15:35 ` nobu (Nobuyoshi Nakada) via ruby-core
2023-10-12 9:02 ` [ruby-core:115013] " hsbt (Hiroshi SHIBATA) via ruby-core
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: nobu (Nobuyoshi Nakada) via ruby-core @ 2023-10-05 15:35 UTC (permalink / raw)
To: ruby-core; +Cc: nobu (Nobuyoshi Nakada)
Issue #19422 has been updated by nobu (Nobuyoshi Nakada).
Although the problem seems avoided (or postponed maybe) now, this would still make sense, I think.
Since the ruby 2.6 bundled with macOS is configured to `--enable-shared` too, there is no reason for us to disable the `shared` option.
----------------------------------------
Feature #19422: Make `--enabled-shared` mandatory on macOS
https://bugs.ruby-lang.org/issues/19422#change-104820
* Author: nobu (Nobuyoshi Nakada)
* Status: Assigned
* Priority: Normal
* Assignee: hsbt (Hiroshi SHIBATA)
----------------------------------------
From the troubles around linker on macOS, I propose `--enable-shared` option mandatory on macOS.
This patch enables the option by default, and abort if `--disable-shared` option is given explicitly.
```diff
diff --git i/configure.ac w/configure.ac
index 7db2ab5257c..923ac7d1199 100644
--- i/configure.ac
+++ w/configure.ac
@@ -504,6 +504,11 @@ AS_CASE(["$target_os"],
rb_cv_binary_elf=no
: ${enable_shared=yes}
],
+[darwin*], [
+ AS_IF([test "${enable_shared=yes}" = no], [
+ AC_MSG_ERROR([--disable-shared is not supported on this platform])
+ ])
+],
[hiuxmpp*], [AC_DEFINE(__HIUX_MPP__)]) # by TOYODA Eizi <toyoda@npd.kishou.go.jp>
AC_PROG_LN_S
@@ -3055,14 +3060,7 @@ AC_SUBST(EXTOBJS)
: ${LDFLAGS=""}
: ${LIBPATHENV=DYLD_FALLBACK_LIBRARY_PATH}
: ${PRELOADENV=DYLD_INSERT_LIBRARIES}
- AS_IF([test x"$enable_shared" = xyes], [
- # Resolve symbols from libruby.dylib when --enable-shared
- EXTDLDFLAGS='$(LIBRUBYARG_SHARED)'
- ], [test "x$EXTSTATIC" = x], [
- # When building exts as bundles, a mach-o bundle needs to know its loader
- # program to bind symbols from the ruby executable
- EXTDLDFLAGS="-bundle_loader '\$(BUILTRUBY)'"
- ])
+ EXTDLDFLAGS='$(LIBRUBYARG_SHARED)'
rb_cv_dlopen=yes],
[aix*], [ : ${LDSHARED='$(CC)'}
AS_IF([test "$GCC" = yes], [
@@ -3356,10 +3354,6 @@ AS_IF([test x"$cross_compiling" = xyes], [
AC_SUBST(XRUBY_RUBYLIBDIR)
AC_SUBST(XRUBY_RUBYHDRDIR)
PREP='$(arch)-fake.rb'
- AS_CASE(["$enable_shared:$EXTSTATIC:$target_os"], [no::darwin*], [
- # darwin target requires miniruby for linking ext bundles
- PREP="$PREP"' miniruby$(EXEEXT)'
- ])
RUNRUBY_COMMAND='$(MINIRUBY) -I`cd $(srcdir)/lib; pwd`'
RUNRUBY='$(RUNRUBY_COMMAND)'
XRUBY='$(MINIRUBY)'
```
--
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/
^ permalink raw reply [flat|nested] 8+ messages in thread
* [ruby-core:115013] [Ruby master Feature#19422] Make `--enabled-shared` mandatory on macOS
2023-02-07 8:14 [ruby-core:112262] [Ruby master Feature#19422] Make `--enabled-shared` mandatory on macOS nobu (Nobuyoshi Nakada) via ruby-core
` (2 preceding siblings ...)
2023-10-05 15:35 ` [ruby-core:114949] " nobu (Nobuyoshi Nakada) via ruby-core
@ 2023-10-12 9:02 ` hsbt (Hiroshi SHIBATA) via ruby-core
2023-11-21 11:23 ` [ruby-core:115435] " hsbt (Hiroshi SHIBATA) via ruby-core
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: hsbt (Hiroshi SHIBATA) via ruby-core @ 2023-10-12 9:02 UTC (permalink / raw)
To: ruby-core; +Cc: hsbt (Hiroshi SHIBATA)
Issue #19422 has been updated by hsbt (Hiroshi SHIBATA).
We discuss this at dev meeting.
We only change default configuration to `--enable-shared` for macOS. If user want to use `--disable-shared` explicitly, we accept it.
----------------------------------------
Feature #19422: Make `--enabled-shared` mandatory on macOS
https://bugs.ruby-lang.org/issues/19422#change-104883
* Author: nobu (Nobuyoshi Nakada)
* Status: Assigned
* Priority: Normal
* Assignee: hsbt (Hiroshi SHIBATA)
----------------------------------------
From the troubles around linker on macOS, I propose `--enable-shared` option mandatory on macOS.
This patch enables the option by default, and abort if `--disable-shared` option is given explicitly.
```diff
diff --git i/configure.ac w/configure.ac
index 7db2ab5257c..923ac7d1199 100644
--- i/configure.ac
+++ w/configure.ac
@@ -504,6 +504,11 @@ AS_CASE(["$target_os"],
rb_cv_binary_elf=no
: ${enable_shared=yes}
],
+[darwin*], [
+ AS_IF([test "${enable_shared=yes}" = no], [
+ AC_MSG_ERROR([--disable-shared is not supported on this platform])
+ ])
+],
[hiuxmpp*], [AC_DEFINE(__HIUX_MPP__)]) # by TOYODA Eizi <toyoda@npd.kishou.go.jp>
AC_PROG_LN_S
@@ -3055,14 +3060,7 @@ AC_SUBST(EXTOBJS)
: ${LDFLAGS=""}
: ${LIBPATHENV=DYLD_FALLBACK_LIBRARY_PATH}
: ${PRELOADENV=DYLD_INSERT_LIBRARIES}
- AS_IF([test x"$enable_shared" = xyes], [
- # Resolve symbols from libruby.dylib when --enable-shared
- EXTDLDFLAGS='$(LIBRUBYARG_SHARED)'
- ], [test "x$EXTSTATIC" = x], [
- # When building exts as bundles, a mach-o bundle needs to know its loader
- # program to bind symbols from the ruby executable
- EXTDLDFLAGS="-bundle_loader '\$(BUILTRUBY)'"
- ])
+ EXTDLDFLAGS='$(LIBRUBYARG_SHARED)'
rb_cv_dlopen=yes],
[aix*], [ : ${LDSHARED='$(CC)'}
AS_IF([test "$GCC" = yes], [
@@ -3356,10 +3354,6 @@ AS_IF([test x"$cross_compiling" = xyes], [
AC_SUBST(XRUBY_RUBYLIBDIR)
AC_SUBST(XRUBY_RUBYHDRDIR)
PREP='$(arch)-fake.rb'
- AS_CASE(["$enable_shared:$EXTSTATIC:$target_os"], [no::darwin*], [
- # darwin target requires miniruby for linking ext bundles
- PREP="$PREP"' miniruby$(EXEEXT)'
- ])
RUNRUBY_COMMAND='$(MINIRUBY) -I`cd $(srcdir)/lib; pwd`'
RUNRUBY='$(RUNRUBY_COMMAND)'
XRUBY='$(MINIRUBY)'
```
--
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/
^ permalink raw reply [flat|nested] 8+ messages in thread
* [ruby-core:115435] [Ruby master Feature#19422] Make `--enabled-shared` mandatory on macOS
2023-02-07 8:14 [ruby-core:112262] [Ruby master Feature#19422] Make `--enabled-shared` mandatory on macOS nobu (Nobuyoshi Nakada) via ruby-core
` (3 preceding siblings ...)
2023-10-12 9:02 ` [ruby-core:115013] " hsbt (Hiroshi SHIBATA) via ruby-core
@ 2023-11-21 11:23 ` hsbt (Hiroshi SHIBATA) via ruby-core
2023-12-20 9:26 ` [ruby-core:115817] " misdoro (Mikhail Doronin) via ruby-core
2023-12-20 9:37 ` [ruby-core:115819] " katei (Yuta Saito) via ruby-core
6 siblings, 0 replies; 8+ messages in thread
From: hsbt (Hiroshi SHIBATA) via ruby-core @ 2023-11-21 11:23 UTC (permalink / raw)
To: ruby-core; +Cc: hsbt (Hiroshi SHIBATA)
Issue #19422 has been updated by hsbt (Hiroshi SHIBATA).
Status changed from Closed to Open
This change affect some environment like GitHub Actions.
----------------------------------------
Feature #19422: Make `--enabled-shared` mandatory on macOS
https://bugs.ruby-lang.org/issues/19422#change-105369
* Author: nobu (Nobuyoshi Nakada)
* Status: Open
* Priority: Normal
* Assignee: hsbt (Hiroshi SHIBATA)
----------------------------------------
From the troubles around linker on macOS, I propose `--enable-shared` option mandatory on macOS.
This patch enables the option by default, and abort if `--disable-shared` option is given explicitly.
```diff
diff --git i/configure.ac w/configure.ac
index 7db2ab5257c..923ac7d1199 100644
--- i/configure.ac
+++ w/configure.ac
@@ -504,6 +504,11 @@ AS_CASE(["$target_os"],
rb_cv_binary_elf=no
: ${enable_shared=yes}
],
+[darwin*], [
+ AS_IF([test "${enable_shared=yes}" = no], [
+ AC_MSG_ERROR([--disable-shared is not supported on this platform])
+ ])
+],
[hiuxmpp*], [AC_DEFINE(__HIUX_MPP__)]) # by TOYODA Eizi <toyoda@npd.kishou.go.jp>
AC_PROG_LN_S
@@ -3055,14 +3060,7 @@ AC_SUBST(EXTOBJS)
: ${LDFLAGS=""}
: ${LIBPATHENV=DYLD_FALLBACK_LIBRARY_PATH}
: ${PRELOADENV=DYLD_INSERT_LIBRARIES}
- AS_IF([test x"$enable_shared" = xyes], [
- # Resolve symbols from libruby.dylib when --enable-shared
- EXTDLDFLAGS='$(LIBRUBYARG_SHARED)'
- ], [test "x$EXTSTATIC" = x], [
- # When building exts as bundles, a mach-o bundle needs to know its loader
- # program to bind symbols from the ruby executable
- EXTDLDFLAGS="-bundle_loader '\$(BUILTRUBY)'"
- ])
+ EXTDLDFLAGS='$(LIBRUBYARG_SHARED)'
rb_cv_dlopen=yes],
[aix*], [ : ${LDSHARED='$(CC)'}
AS_IF([test "$GCC" = yes], [
@@ -3356,10 +3354,6 @@ AS_IF([test x"$cross_compiling" = xyes], [
AC_SUBST(XRUBY_RUBYLIBDIR)
AC_SUBST(XRUBY_RUBYHDRDIR)
PREP='$(arch)-fake.rb'
- AS_CASE(["$enable_shared:$EXTSTATIC:$target_os"], [no::darwin*], [
- # darwin target requires miniruby for linking ext bundles
- PREP="$PREP"' miniruby$(EXEEXT)'
- ])
RUNRUBY_COMMAND='$(MINIRUBY) -I`cd $(srcdir)/lib; pwd`'
RUNRUBY='$(RUNRUBY_COMMAND)'
XRUBY='$(MINIRUBY)'
```
--
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/
^ permalink raw reply [flat|nested] 8+ messages in thread
* [ruby-core:115817] [Ruby master Feature#19422] Make `--enabled-shared` mandatory on macOS
2023-02-07 8:14 [ruby-core:112262] [Ruby master Feature#19422] Make `--enabled-shared` mandatory on macOS nobu (Nobuyoshi Nakada) via ruby-core
` (4 preceding siblings ...)
2023-11-21 11:23 ` [ruby-core:115435] " hsbt (Hiroshi SHIBATA) via ruby-core
@ 2023-12-20 9:26 ` misdoro (Mikhail Doronin) via ruby-core
2023-12-20 9:37 ` [ruby-core:115819] " katei (Yuta Saito) via ruby-core
6 siblings, 0 replies; 8+ messages in thread
From: misdoro (Mikhail Doronin) via ruby-core @ 2023-12-20 9:26 UTC (permalink / raw)
To: ruby-core; +Cc: misdoro (Mikhail Doronin)
Issue #19422 has been updated by misdoro (Mikhail Doronin).
Should this be tried again? Maybe the failures were caused by the bug #20072 ?
----------------------------------------
Feature #19422: Make `--enabled-shared` mandatory on macOS
https://bugs.ruby-lang.org/issues/19422#change-105766
* Author: nobu (Nobuyoshi Nakada)
* Status: Open
* Priority: Normal
* Assignee: hsbt (Hiroshi SHIBATA)
----------------------------------------
From the troubles around linker on macOS, I propose `--enable-shared` option mandatory on macOS.
This patch enables the option by default, and abort if `--disable-shared` option is given explicitly.
```diff
diff --git i/configure.ac w/configure.ac
index 7db2ab5257c..923ac7d1199 100644
--- i/configure.ac
+++ w/configure.ac
@@ -504,6 +504,11 @@ AS_CASE(["$target_os"],
rb_cv_binary_elf=no
: ${enable_shared=yes}
],
+[darwin*], [
+ AS_IF([test "${enable_shared=yes}" = no], [
+ AC_MSG_ERROR([--disable-shared is not supported on this platform])
+ ])
+],
[hiuxmpp*], [AC_DEFINE(__HIUX_MPP__)]) # by TOYODA Eizi <toyoda@npd.kishou.go.jp>
AC_PROG_LN_S
@@ -3055,14 +3060,7 @@ AC_SUBST(EXTOBJS)
: ${LDFLAGS=""}
: ${LIBPATHENV=DYLD_FALLBACK_LIBRARY_PATH}
: ${PRELOADENV=DYLD_INSERT_LIBRARIES}
- AS_IF([test x"$enable_shared" = xyes], [
- # Resolve symbols from libruby.dylib when --enable-shared
- EXTDLDFLAGS='$(LIBRUBYARG_SHARED)'
- ], [test "x$EXTSTATIC" = x], [
- # When building exts as bundles, a mach-o bundle needs to know its loader
- # program to bind symbols from the ruby executable
- EXTDLDFLAGS="-bundle_loader '\$(BUILTRUBY)'"
- ])
+ EXTDLDFLAGS='$(LIBRUBYARG_SHARED)'
rb_cv_dlopen=yes],
[aix*], [ : ${LDSHARED='$(CC)'}
AS_IF([test "$GCC" = yes], [
@@ -3356,10 +3354,6 @@ AS_IF([test x"$cross_compiling" = xyes], [
AC_SUBST(XRUBY_RUBYLIBDIR)
AC_SUBST(XRUBY_RUBYHDRDIR)
PREP='$(arch)-fake.rb'
- AS_CASE(["$enable_shared:$EXTSTATIC:$target_os"], [no::darwin*], [
- # darwin target requires miniruby for linking ext bundles
- PREP="$PREP"' miniruby$(EXEEXT)'
- ])
RUNRUBY_COMMAND='$(MINIRUBY) -I`cd $(srcdir)/lib; pwd`'
RUNRUBY='$(RUNRUBY_COMMAND)'
XRUBY='$(MINIRUBY)'
```
--
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/
^ permalink raw reply [flat|nested] 8+ messages in thread
* [ruby-core:115819] [Ruby master Feature#19422] Make `--enabled-shared` mandatory on macOS
2023-02-07 8:14 [ruby-core:112262] [Ruby master Feature#19422] Make `--enabled-shared` mandatory on macOS nobu (Nobuyoshi Nakada) via ruby-core
` (5 preceding siblings ...)
2023-12-20 9:26 ` [ruby-core:115817] " misdoro (Mikhail Doronin) via ruby-core
@ 2023-12-20 9:37 ` katei (Yuta Saito) via ruby-core
6 siblings, 0 replies; 8+ messages in thread
From: katei (Yuta Saito) via ruby-core @ 2023-12-20 9:37 UTC (permalink / raw)
To: ruby-core; +Cc: katei (Yuta Saito)
Issue #19422 has been updated by katei (Yuta Saito).
This feature is reverted due to https://bugs.ruby-lang.org/issues/20004 and we are planning to land it again after 3.3 release https://github.com/ruby/ruby/pull/9090
----------------------------------------
Feature #19422: Make `--enabled-shared` mandatory on macOS
https://bugs.ruby-lang.org/issues/19422#change-105768
* Author: nobu (Nobuyoshi Nakada)
* Status: Open
* Priority: Normal
* Assignee: hsbt (Hiroshi SHIBATA)
----------------------------------------
From the troubles around linker on macOS, I propose `--enable-shared` option mandatory on macOS.
This patch enables the option by default, and abort if `--disable-shared` option is given explicitly.
```diff
diff --git i/configure.ac w/configure.ac
index 7db2ab5257c..923ac7d1199 100644
--- i/configure.ac
+++ w/configure.ac
@@ -504,6 +504,11 @@ AS_CASE(["$target_os"],
rb_cv_binary_elf=no
: ${enable_shared=yes}
],
+[darwin*], [
+ AS_IF([test "${enable_shared=yes}" = no], [
+ AC_MSG_ERROR([--disable-shared is not supported on this platform])
+ ])
+],
[hiuxmpp*], [AC_DEFINE(__HIUX_MPP__)]) # by TOYODA Eizi <toyoda@npd.kishou.go.jp>
AC_PROG_LN_S
@@ -3055,14 +3060,7 @@ AC_SUBST(EXTOBJS)
: ${LDFLAGS=""}
: ${LIBPATHENV=DYLD_FALLBACK_LIBRARY_PATH}
: ${PRELOADENV=DYLD_INSERT_LIBRARIES}
- AS_IF([test x"$enable_shared" = xyes], [
- # Resolve symbols from libruby.dylib when --enable-shared
- EXTDLDFLAGS='$(LIBRUBYARG_SHARED)'
- ], [test "x$EXTSTATIC" = x], [
- # When building exts as bundles, a mach-o bundle needs to know its loader
- # program to bind symbols from the ruby executable
- EXTDLDFLAGS="-bundle_loader '\$(BUILTRUBY)'"
- ])
+ EXTDLDFLAGS='$(LIBRUBYARG_SHARED)'
rb_cv_dlopen=yes],
[aix*], [ : ${LDSHARED='$(CC)'}
AS_IF([test "$GCC" = yes], [
@@ -3356,10 +3354,6 @@ AS_IF([test x"$cross_compiling" = xyes], [
AC_SUBST(XRUBY_RUBYLIBDIR)
AC_SUBST(XRUBY_RUBYHDRDIR)
PREP='$(arch)-fake.rb'
- AS_CASE(["$enable_shared:$EXTSTATIC:$target_os"], [no::darwin*], [
- # darwin target requires miniruby for linking ext bundles
- PREP="$PREP"' miniruby$(EXEEXT)'
- ])
RUNRUBY_COMMAND='$(MINIRUBY) -I`cd $(srcdir)/lib; pwd`'
RUNRUBY='$(RUNRUBY_COMMAND)'
XRUBY='$(MINIRUBY)'
```
--
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2023-12-20 9:38 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-07 8:14 [ruby-core:112262] [Ruby master Feature#19422] Make `--enabled-shared` mandatory on macOS nobu (Nobuyoshi Nakada) via ruby-core
2023-02-07 8:19 ` [ruby-core:112263] " nobu (Nobuyoshi Nakada) via ruby-core
2023-02-14 12:40 ` [ruby-core:112424] " hsbt (Hiroshi SHIBATA) via ruby-core
2023-10-05 15:35 ` [ruby-core:114949] " nobu (Nobuyoshi Nakada) via ruby-core
2023-10-12 9:02 ` [ruby-core:115013] " hsbt (Hiroshi SHIBATA) via ruby-core
2023-11-21 11:23 ` [ruby-core:115435] " hsbt (Hiroshi SHIBATA) via ruby-core
2023-12-20 9:26 ` [ruby-core:115817] " misdoro (Mikhail Doronin) via ruby-core
2023-12-20 9:37 ` [ruby-core:115819] " katei (Yuta Saito) via ruby-core
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).