Project

General

Profile

Actions

Bug #19143

closed

Windows - bundled extension gems compile, but don't copy *.so files to lib folder

Bug #19143: Windows - bundled extension gems compile, but don't copy *.so files to lib folder

Added by MSP-Greg (Greg L) almost 3 years ago. Updated almost 3 years ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:110867]

Description

Just finished updating ruby-loco's mswin build to use a system similar to the ucrt & mingw builds.

Confirmed something I noticed previously, and also occurs with the RubyInstaller2 head build.

On Windows, bundled extension gems (debug, rbs) compile their extension in the ext folder, but do not copy them to the lib folder. So, the *.so file is created, but not copied.

I think this was working correctly on Ruby 3.1?

Updated by alanwu (Alan Wu) almost 3 years ago Actions #1 [ruby-core:110869]

Does that mean the native extensions of those gems don't work when one tries to load them after installation?

Updated by MSP-Greg (Greg L) almost 3 years ago Actions #2 [ruby-core:110871]

@alanwu (Alan Wu)

Thanks. A bit of 'multi-tasking brain freeze' going on this morning.

Or, yes they do work without a copy in the lib folder.

Please close...

Updated by alanwu (Alan Wu) almost 3 years ago Actions #3

  • Status changed from Open to Closed

Updated by nobu (Nobuyoshi Nakada) almost 3 years ago Actions #4 [ruby-core:111108]

It is intended.
*.so files are architecture-dependent, which are "tainted" in other words, while lib directories are architecture-independent, "untainted".
"Tainted" files should not infect "untainted" directories.

Updated by MSP-Greg (Greg L) almost 3 years ago Actions #5 [ruby-core:111130]

@nobu (Nobuyoshi Nakada)

Yes, I agree, it might be very helpful when one has more than one platform installed and uses --user-install. As in Gem.install_extension_in_lib, also Gem::Ext::ExtConfBuilder. I overwrite my Windows Ruby master installs daily, so I always use --user-install.

Maybe issues with existing extension gems that load with require_relative, and also pre-compiled gems?

Actions

Also available in: PDF Atom