Skip to content

Commit 2033fe6

Browse files
committed
Enable/disable libffi not ffi
The ffi gem depends on the libffi native library. When installing the ffi gem, we need to specify the name of the library in the enable/disable-system-libffi option.
1 parent 66ba06a commit 2033fe6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

configs/components/rubygem-ffi.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,19 +61,19 @@
6161
# Prior to ruby 3.2, both ruby and the ffi gem vendored a version of libffi.
6262
# If libffi happened to be installed in /usr/lib, then the ffi gem preferred
6363
# that instead of building libffi itself. To ensure consistency, we use
64-
# --disable-system-ffi so that the ffi gem *always* builds libffi, then
64+
# --disable-system-libffi so that the ffi gem *always* builds libffi, then
6565
# builds the ffi_c native extension and links it against libffi.so.
6666
#
6767
# In ruby 3.2 and up, libffi is no longer vendored. So we created a separate
6868
# libffi vanagon component which is built before ruby. The ffi gem still
69-
# vendors libffi, so we use the --enable-system-ffi option to ensure the ffi
69+
# vendors libffi, so we use the --enable-system-libffi option to ensure the ffi
7070
# gem *always* uses the libffi.so we already built. Note the term "system" is
7171
# misleading, because we override PKG_CONFIG_PATH below so that our libffi.so
7272
# is preferred, not the one in /usr/lib.
7373
gem_install_options = if rb_major_minor_version > 2.7
74-
"-- --enable-system-ffi"
74+
"-- --enable-system-libffi"
7575
else
76-
"-- --disable-system-ffi"
76+
"-- --disable-system-libffi"
7777
end
7878
instance_eval File.read('configs/components/_base-rubygem.rb')
7979
end

0 commit comments

Comments
 (0)