Project

General

Profile

Actions

Bug #19133

closed

mswin build - missing RbConfig::CONFIG['libdirname']

Added by MSP-Greg (Greg L) about 2 years ago. Updated about 2 years ago.

Status:
Feedback
Assignee:
-
Target version:
-
ruby -v:
ruby 3.2.0dev (2022-11-17T00:30:39Z master a777ec0d85) [x64-mswin64_140]
[ruby-core:110787]

Description

Key and value exists with Ubuntu & mingw/ucrt builds, missing in mswin build.

Noticed when locally run spec test (spec/ruby/optional/capi/rbasic_spec.rb) failed.

Updated by nobu (Nobuyoshi Nakada) about 2 years ago

  • Status changed from Open to Feedback

It may not exist.

Probably, this patch works?

diff --git a/spec/ruby/optional/capi/spec_helper.rb b/spec/ruby/optional/capi/spec_helper.rb
index ec6b9093977..940b6bce059 100644
--- a/spec/ruby/optional/capi/spec_helper.rb
+++ b/spec/ruby/optional/capi/spec_helper.rb
@@ -35,7 +35,7 @@
 
   if RbConfig::CONFIG["ENABLE_SHARED"] == "yes"
     libdirname = RbConfig::CONFIG['libdirname'] # defined since 2.1
-    libruby = "#{RbConfig::CONFIG[libdirname]}/#{RbConfig::CONFIG['LIBRUBY']}"
+    libruby = "#{RbConfig::CONFIG[libdirname || 'libdir']}/#{RbConfig::CONFIG['LIBRUBY']}"
   end
 
   begin

Updated by MSP-Greg (Greg L) about 2 years ago

@nobu (Nobuyoshi Nakada)

Thanks. Exactly the same patch I started with, then changed to:

libdirname = RbConfig::CONFIG.fetch 'libdirname', 'libdir' # defined since 2.1

I don't recall if I've built mswin locally, but the guard on this is:

return if /mswin/ =~ RUBY_PLATFORM && ENV.key?('GITHUB_ACTIONS') # not working from the beginning

Which won't be triggered if it's local and ENV.key?('GITHUB_ACTIONS') isn't set.

Regardless, am I to assume it won't be added to RbConfig::CONFIG? Probably better things to spend time on, given the date, as in ~ 5 weeks

Actions

Also available in: Atom PDF

Like0
Like0Like0