New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stop copying compiled binaries #203
base: master
Are you sure you want to change the base?
Conversation
Considering multi-architecture systems, it is obvious that architecture-independent library directories should not contain architecture-dependent binary files. Mixing such files often results in trying to load inproper files.
I'm not sure if I understand this patch properly but is it meant to restrict installing arch-specific or arch-optimizes builds from being installed natively? If a generic build is intended to be made it should be decided on compile time. |
This is to place arch-specific and arch-independent files to the respective directories.
The |
As for your question, although I'm not sure if I get your intention correctly, I guess it is unrelated probably. |
Ok but what would be the generic method for locating the .so file in :test after :compile is finished? And wouldn't this have compatibility issues? If Ruby is changing its strategy of placing .so files to other directories instead of lib just perhaps so multiplatfirm support can be allowed then it should be announced and discussed. |
Ok I'll look at this thoroughly. |
The version- and arch-specific path is in the load path already, isn't it? |
Agreed this would be a good change, and avoids issues when using Rubies with different ABIs (e.g., 2 CRuby versions and/or ruby-head, or some CRuby version + TruffleRuby for instance). Of course we'll need the ABI/arch-specific directory to be on |
Yes but only in installed gems. Minitest for example does not specify where the binary is properly located and I only see It also will be difficult to add a Rakefile rule that makes sure the so file exists regardless of how the compilation output worked. A lazy rule that helps testing gems with differing environment from compile-time environments in making sure the so file isn't recompiled and cause failure like the following:
In my opinion it will be better to just filter out the so files during install time instead than risk breakage of already existing gems that rely on so files being placed in |
No it isn't. |
Right, we'd need to somehow teach |
This is only related to local test case, right? (This isn't related to The problem is occurred in the following case, right? $ cd ruby/date
$ ruby2.7 -S rake
$ ruby3.0 -S rake # Load date_core.so for Ruby 2.7 |
Due to my confusion and not being able to recall right away that rake-compiler has got nothing to do with gem installation I wasn't able to pay attention to this, but how is not copying files to |
I meant for local testing, i.e., There is a separate issue that RubyGems makes a copy under lib/ in addition to the arch/ABI-specific dir, and that seems unnecessary but it is also AFAIK completely unrelated to @nobu Could you clarify the original issue for you? Is it like @kou said above? |
Considering multi-architecture systems, it is obvious that architecture-independent library directories should not contain architecture-dependent binary files.
Mixing such files often results in trying to load inproper files.