-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Detect libc version, closes #2918 #2922
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
Conversation
|
Thanks for opening a pull request and helping make RubyGems better! Someone from the RubyGems team will take a look at your pull request shortly and leave any feedback. Please make sure that your pull request has tests for any changes or added functionality. We use Travis CI to test and make sure your change works functionally and uses acceptable conventions, you can review the current progress of Travis CI in the PR status window below. If you have any questions or concerns that you wish to ask, feel free to leave a comment in this PR or join our #rubygems channel on Slack. For more information about contributing to the RubyGems project feel free to review our CONTRIBUTING guide |
|
@bundlerbot r+ |
2922: Detect libc version, closes #2918 r=hsbt a=fauno # Description: Detect libc version on Linux, makes it possible to distinguish between distributions compiled with alternative libc # Tasks: - [ ] Describe the problem / feature - [x] Write tests - [ ] Write code to solve the problem - [ ] Get code review from coworkers / friends I will abide by the [code of conduct](https://github.com/rubygems/rubygems/blob/master/CODE_OF_CONDUCT.md). Co-authored-by: f <f@sutty.nl>
Build failed |
|
@bundlerbot retry |
2922: Detect libc version, closes #2918 r=hsbt a=fauno # Description: Detect libc version on Linux, makes it possible to distinguish between distributions compiled with alternative libc # Tasks: - [ ] Describe the problem / feature - [x] Write tests - [ ] Write code to solve the problem - [ ] Get code review from coworkers / friends I will abide by the [code of conduct](https://github.com/rubygems/rubygems/blob/master/CODE_OF_CONDUCT.md). Co-authored-by: f <f@sutty.nl>
Build succeeded |
This patch updates the cross-compiled Ruby build for armhf to explicitly set the `--target` flag during configuration. This prevents Ruby's configure script from stripping the `gnu` suffix from the triplet, which in turn prevents RubyGems from "loosing" gems with compile extensions installed prior to an upgrade to RubyGems 3.1.0 or newer. Ref. ruby/rubygems#2922 Ref. ruby/ruby@5291197
This patch updates the cross-compiled Ruby build for armhf to explicitly set the `--target` flag during configuration. This prevents Ruby's configure script from stripping the `gnu` suffix from the triplet, which in turn prevents RubyGems from "loosing" gems with compile extensions installed prior to an upgrade to RubyGems 3.1.0 or newer. Ref. ruby/rubygems#2922 Ref. ruby/ruby@5291197
This patch updates the cross-compiled Ruby build for armhf to explicitly set the `--target` flag during configuration. This prevents Ruby's configure script from stripping the `gnu` suffix from the triplet, which in turn prevents RubyGems from "loosing" gems with compile extensions installed prior to an upgrade to RubyGems 3.1.0 or newer. Ref. ruby/rubygems#2922 Ref. ruby/ruby@5291197
This patch updates the cross-compiled Ruby build for armhf to explicitly set the `--target` flag during configuration. This prevents Ruby's configure script from stripping the `gnu` suffix from the triplet, which in turn prevents RubyGems from "loosing" gems with compile extensions installed prior to an upgrade to RubyGems 3.1.0 or newer. Ref. ruby/rubygems#2922 Ref. ruby/ruby@5291197
This patch updates the cross-compiled Ruby build for armhf to explicitly set the `--target` flag during configuration. This prevents Ruby's configure script from stripping the `gnu` suffix from the triplet, which in turn prevents RubyGems from "loosing" gems with compile extensions installed prior to an upgrade to RubyGems 3.1.0 or newer. Ref. ruby/rubygems#2922 Ref. ruby/ruby@5291197
This patch updates the cross-compiled Ruby build for armhf to explicitly set the `--target` flag during configuration. This prevents Ruby's configure script from stripping the `gnu` suffix from the triplet, which in turn prevents RubyGems from "loosing" gems with compile extensions installed prior to an upgrade to RubyGems 3.1.0 or newer. Ref. ruby/rubygems#2922 Ref. ruby/ruby@5291197
This commit updates the settings and components related to ruby-2.5.8 to allow it to be cross-compiled when the use_pl_build_tools setting is set to `false` for a platform. The DTrace bindings for Ruby are also universally skipped if the plaform is being cross-compiled. The setup currently assumes that the cross-compiled ruby will be used by the build machine to install gems and run scripts. I.e. Linux binfmt will be configured to run the foreign binaries under QEMU emulation. This patch also updates the cross-compiled Ruby build to explicitly set the `--target` flag during configuration. This prevents Ruby's configure script from stripping the `gnu` suffix from the triplet, which in turn prevents RubyGems from "loosing" gems with compile extensions installed prior to an upgrade to RubyGems 3.1.0 or newer. Ref. ruby/rubygems#2922 Ref. ruby/ruby@5291197
This commit updates the settings and components related to ruby-2.5.8 to allow it to be cross-compiled when the use_pl_build_tools setting is set to `false` for a platform. The DTrace bindings for Ruby are also universally skipped if the plaform is being cross-compiled. The setup currently assumes that the cross-compiled ruby will be used by the build machine to install gems and run scripts. I.e. Linux binfmt will be configured to run the foreign binaries under QEMU emulation. This patch also updates the cross-compiled Ruby build to explicitly set the `--target` flag during configuration. This prevents Ruby's configure script from stripping the `gnu` suffix from the triplet, which in turn prevents RubyGems from "loosing" gems with compile extensions installed prior to an upgrade to RubyGems 3.1.0 or newer. Ref. ruby/rubygems#2922 Ref. ruby/ruby@5291197
This commit updates the settings and components related to ruby-2.5.8 to allow it to be cross-compiled when the use_pl_build_tools setting is set to `false` for a platform. The DTrace bindings for Ruby are also universally skipped if the plaform is being cross-compiled. The setup currently assumes that the cross-compiled ruby will be used by the build machine to install gems and run scripts. I.e. Linux binfmt will be configured to run the foreign binaries under QEMU emulation. This patch also updates the cross-compiled Ruby build to explicitly set the `--target` flag during configuration. This prevents Ruby's configure script from stripping the `gnu` suffix from the triplet, which in turn prevents RubyGems from "loosing" gems with compile extensions installed prior to an upgrade to RubyGems 3.1.0 or newer. Ref. ruby/rubygems#2922 Ref. ruby/ruby@5291197
This commit updates the settings and components related to ruby-2.5.8 to allow it to be cross-compiled when the use_pl_build_tools setting is set to `false` for a platform. The DTrace bindings for Ruby are also universally skipped if the plaform is being cross-compiled. The setup currently assumes that the cross-compiled ruby will be used by the build machine to install gems and run scripts. I.e. Linux binfmt will be configured to run the foreign binaries under QEMU emulation. This patch also updates the cross-compiled Ruby build to explicitly set the `--target` flag during configuration. This prevents Ruby's configure script from stripping the `gnu` suffix from the triplet, which in turn prevents RubyGems from "loosing" gems with compile extensions installed prior to an upgrade to RubyGems 3.1.0 or newer. Ref. ruby/rubygems#2922 Ref. ruby/ruby@5291197
This commit updates the settings and components related to ruby-2.5.8 to allow it to be cross-compiled when the use_pl_build_tools setting is set to `false` for a platform. The DTrace bindings for Ruby are also universally skipped if the plaform is being cross-compiled. The setup currently assumes that the cross-compiled ruby will be used by the build machine to install gems and run scripts. I.e. Linux binfmt will be configured to run the foreign binaries under QEMU emulation. This patch also updates the cross-compiled Ruby build to explicitly set the `--target` flag during configuration. This prevents Ruby's configure script from stripping the `gnu` suffix from the triplet, which in turn prevents RubyGems from "loosing" gems with compile extensions installed prior to an upgrade to RubyGems 3.1.0 or newer. Ref. ruby/rubygems#2922 Ref. ruby/ruby@5291197
This commit updates the settings and components related to ruby-2.5.8 to allow it to be cross-compiled when the use_pl_build_tools setting is set to `false` for a platform. The DTrace bindings for Ruby are also universally skipped if the plaform is being cross-compiled. The setup currently assumes that the cross-compiled ruby will be used by the build machine to install gems and run scripts. I.e. Linux binfmt will be configured to run the foreign binaries under QEMU emulation. This patch also updates the cross-compiled Ruby build to explicitly set the `--target` flag during configuration. This prevents Ruby's configure script from stripping the `gnu` suffix from the triplet, which in turn prevents RubyGems from "loosing" gems with compile extensions installed prior to an upgrade to RubyGems 3.1.0 or newer. Ref. ruby/rubygems#2922 Ref. ruby/ruby@5291197
This commit updates the settings and components related to ruby-2.5.8 to allow it to be cross-compiled when the use_pl_build_tools setting is set to `false` for a platform. The DTrace bindings for Ruby are also universally skipped if the plaform is being cross-compiled. The setup currently assumes that the cross-compiled ruby will be used by the build machine to install gems and run scripts. I.e. Linux binfmt will be configured to run the foreign binaries under QEMU emulation. This patch also updates the cross-compiled Ruby build to explicitly set the `--target` flag during configuration. This prevents Ruby's configure script from stripping the `gnu` suffix from the triplet, which in turn prevents RubyGems from "loosing" gems with compile extensions installed prior to an upgrade to RubyGems 3.1.0 or newer. Ref. ruby/rubygems#2922 Ref. ruby/ruby@5291197
This commit updates the settings and components related to ruby-2.5.8 to allow it to be cross-compiled when the use_pl_build_tools setting is set to `false` for a platform. The DTrace bindings for Ruby are also universally skipped if the plaform is being cross-compiled. The setup currently assumes that the cross-compiled ruby will be used by the build machine to install gems and run scripts. I.e. Linux binfmt will be configured to run the foreign binaries under QEMU emulation. This patch also updates the cross-compiled Ruby build to explicitly set the `--target` flag during configuration. This prevents Ruby's configure script from stripping the `gnu` suffix from the triplet, which in turn prevents RubyGems from "loosing" gems with compile extensions installed prior to an upgrade to RubyGems 3.1.0 or newer. Ref. ruby/rubygems#2922 Ref. ruby/ruby@5291197
This commit updates the settings and components related to ruby-2.5.8 to allow it to be cross-compiled when the use_pl_build_tools setting is set to `false` for a platform. The DTrace bindings for Ruby are also universally skipped if the plaform is being cross-compiled. The setup currently assumes that the cross-compiled ruby will be used by the build machine to install gems and run scripts. I.e. Linux binfmt will be configured to run the foreign binaries under QEMU emulation. This patch also updates the cross-compiled Ruby build to explicitly set the `--target` flag during configuration. This prevents Ruby's configure script from stripping the `gnu` suffix from the triplet, which in turn prevents RubyGems from "loosing" gems with compile extensions installed prior to an upgrade to RubyGems 3.1.0 or newer. Ref. ruby/rubygems#2922 Ref. ruby/ruby@5291197
This commit updates the settings and components related to ruby-2.5.8 to allow it to be cross-compiled when the use_pl_build_tools setting is set to `false` for a platform. The DTrace bindings for Ruby are also universally skipped if the plaform is being cross-compiled. The setup currently assumes that the cross-compiled ruby will be used by the build machine to install gems and run scripts. I.e. Linux binfmt will be configured to run the foreign binaries under QEMU emulation. This patch also updates the cross-compiled Ruby build to explicitly set the `--target` flag during configuration. This prevents Ruby's configure script from stripping the `gnu` suffix from the triplet, which in turn prevents RubyGems from "loosing" gems with compile extensions installed prior to an upgrade to RubyGems 3.1.0 or newer. Ref. ruby/rubygems#2922 Ref. ruby/ruby@5291197
Attempting to install a gem published as both *-linux and *-linux-musl results in the incorrect gem being picked up, causing build failures due to binary incompatibility. This is caused by the `nil` wildcard swallowing the libc information upon version comparison. Handle the linux case by performing only non-wildcard equality on the version and asserting 'gnu' and nil equivalence, while preserving the current behaviour for other OSes. Followup to ruby#2922 Closes ruby#3174
Attempting to install a gem published as both *-linux and *-linux-musl results in the incorrect gem being picked up, causing build failures due to binary incompatibility. This is caused by the `nil` wildcard swallowing the libc information upon version comparison. Handle the linux case by performing only non-wildcard equality on the version and asserting 'gnu' and nil equivalence, while preserving the current behaviour for other OSes. Followup to ruby#2922 Closes ruby#3174
Attempting to install a gem published as both *-linux and *-linux-musl results in the incorrect gem being picked up, causing build failures due to binary incompatibility. This is caused by the `nil` wildcard swallowing the libc information upon version comparison. Handle the linux case by performing only non-wildcard equality on the version and asserting 'gnu' and nil equivalence, while preserving the current behaviour for other OSes. Followup to ruby#2922 Closes ruby#3174
Attempting to install a gem published as both *-linux and *-linux-musl results in the incorrect gem being picked up, causing build failures due to binary incompatibility. This is caused by the `nil` wildcard swallowing the libc information upon version comparison. Handle the linux case by performing only non-wildcard equality on the version and asserting 'gnu' and nil equivalence, while preserving the current behaviour for other OSes. Followup to ruby#2922 Closes ruby#3174
This commit updates the settings and components related to ruby-2.5.8 to allow it to be cross-compiled when the use_pl_build_tools setting is set to `false` for a platform. The DTrace bindings for Ruby are also universally skipped if the plaform is being cross-compiled. The setup currently assumes that the cross-compiled ruby will be used by the build machine to install gems and run scripts. I.e. Linux binfmt will be configured to run the foreign binaries under QEMU emulation. This patch also updates the cross-compiled Ruby build to explicitly set the `--target` flag during configuration. This prevents Ruby's configure script from stripping the `gnu` suffix from the triplet, which in turn prevents RubyGems from "loosing" gems with compile extensions installed prior to an upgrade to RubyGems 3.1.0 or newer. Ref. ruby/rubygems#2922 Ref. ruby/ruby@5291197
Old versions of rubygems (for instance 3.0.3) don't properly detect alternative libc implementations on Linux; in particular for our case, they don't detect musl. (For reference, Rubies older than 2.7 may have shipped with an affected version of rubygems). In such cases, we fall back to use RbConfig::CONFIG['arch'] instead. Why not use `RbConfig::CONFIG['arch']` always? Because `Gem::Platform.local.to_s` does some normalization we want in other situations -- for instance, it turns `x86_64-linux-gnu` to `x86_64-linux`. So for now we only add this workaround in a specific situation where we actually know it is wrong. See also ruby/rubygems#2922 and ruby/rubygems#4082 Fixes DataDog/dd-trace-rb#2222
* Fix issue with old rubygems not detecting musl linux properly Old versions of rubygems (for instance 3.0.3) don't properly detect alternative libc implementations on Linux; in particular for our case, they don't detect musl. (For reference, Rubies older than 2.7 may have shipped with an affected version of rubygems). In such cases, we fall back to use RbConfig::CONFIG['arch'] instead. Why not use `RbConfig::CONFIG['arch']` always? Because `Gem::Platform.local.to_s` does some normalization we want in other situations -- for instance, it turns `x86_64-linux-gnu` to `x86_64-linux`. So for now we only add this workaround in a specific situation where we actually know it is wrong. See also ruby/rubygems#2922 and ruby/rubygems#4082 Fixes DataDog/dd-trace-rb#2222 * Bump libdatadog minor version in preparation for release I'm planning to release 0.7.0.1.1 with the musl fix. This will be automatically picked up by customers using the currently-released version of dd-trace-rb (1.3.0). * Fix file open permissions / directory creation Otherwise this breaks in Linux due to the rest of the spec flow. * Remove redundant directory creation in spec
Description:
Detect libc version on Linux, makes it possible to distinguish between distributions compiled with alternative libc
Tasks:
I will abide by the code of conduct.