Project

General

Profile

Actions

Bug #20185

closed

Switch back to using binary ruby when rvm is fixed

Added by Peter Amstutz over 1 year ago. Updated about 1 month ago.

Status:
Closed
Priority:
Normal
Assigned To:
Category:
Deployment
Target version:
-
Story points:
0.5

Description

In order to fix the issue described below, our Debian 11 package build and package test Docker images use --disable-binary (see 907983bcaaf9cf2f058d150b2e91dcbfba465074). This increases build time substantially, so we should switch back to using pre-built packages from rvm if/when they are updated.

Original issue

Ruby gems that involve C extensions are failing to build with this error

make: /usr/bin/mkdir: No such file or directory

Example:

build-packages-debian11: #676 /consoleFull

This is affecting multiple different gems. I've seen it with 'racc' and
'ffi'.

Other projects have been bitten by this:

https://github.com/sparklemotion/nokogiri/issues/2046

https://github.com/brianmario/mysql2/issues/724

https://github.com/fullstaq-ruby/server-edition/issues/101

Tentatively, the problem seems to be that Ruby records the location of mkdir when it is built/installed. Our package build uses rvm to install Ruby. It seems that all the packages were rebuilt Feb 22:

https://rvm_io.global.ssl.fastly.net/binaries/debian/11/x86_64/

I'm wondering if these packages were prepared on a system that had /usr/bin/mkdir even though the standard debian image is /bin/mkdir.

On further research, this looks like exactly the issue listed here:

https://github.com/rvm/rvm/issues/4975

I filed a new bug:

https://github.com/rvm/rvm/issues/5329

Actions #1

Updated by Peter Amstutz over 1 year ago

  • Status changed from New to In Progress
Actions #2

Updated by Peter Amstutz over 1 year ago

  • Description updated (diff)
  • Subject changed from Package building issues with ruby ffi to Package building issues with ruby gems
Actions #3

Updated by Peter Amstutz over 1 year ago

  • Description updated (diff)
Actions #4

Updated by Peter Amstutz over 1 year ago

  • Description updated (diff)
Actions #5

Updated by Peter Amstutz over 1 year ago

  • Description updated (diff)
Actions #6

Updated by Peter Amstutz over 1 year ago

  • Description updated (diff)
Actions #7

Updated by Brett Smith over 1 year ago

Peter Amstutz wrote:

I'm wondering if these packages were prepared on a system that had /usr/bin/mkdir even though the standard debian image is /bin/mkdir.

This depends on the version of Debian. On Debian 12 bookworm the standard path will be /usr/bin/mkdir, and you can get that on Debian 11 bullseye today by installing the usrmerge package, which gets installed by default on new standard installs. For more info see the Debian UsrMerge wiki page. For really deep why, see Booting Without /usr is Broken.

Actions #8

Updated by Peter Amstutz over 1 year ago

Brett Smith wrote in #note-7:

Peter Amstutz wrote:

I'm wondering if these packages were prepared on a system that had /usr/bin/mkdir even though the standard debian image is /bin/mkdir.

This depends on the version of Debian. On Debian 12 bookworm the standard path will be /usr/bin/mkdir, and you can get that on Debian 11 bullseye today by installing the usrmerge package, which gets installed by default on new standard installs. For more info see the Debian UsrMerge wiki page. For really deep why, see Booting Without /usr is Broken.

The Debian Docker image doesn't have /usr/bin/mkdir out of the box, but maybe we could add a dependency on usrmerge as a workaround?

Actions #9

Updated by Brett Smith over 1 year ago

Peter Amstutz wrote in #note-8:

The Debian Docker image doesn't have /usr/bin/mkdir out of the box, but maybe we could add a dependency on usrmerge as a workaround?

I think that's worth a shot at least.

Digging into the GitHub issues a little more, it sounds like RVM builds on Ubuntu, and Ubuntu recently did a dot release that merged /usr, probably because Debian bookworm is close enough that it made sense for them. But then builds fail on systems that don't have merged /usr.

Actions #10

Updated by Peter Amstutz over 1 year ago

  • Target version changed from 2023-03-01 sprint to Development 2023-03-15 sprint
Actions #11

Updated by Peter Amstutz over 1 year ago

  • Category set to Deployment
Actions #12

Updated by Peter Amstutz over 1 year ago

  • Assigned To set to Peter Amstutz
Actions #13

Updated by Peter Amstutz over 1 year ago

  • Target version changed from Development 2023-03-15 sprint to Development 2023-03-29 Sprint
Actions #14

Updated by Peter Amstutz over 1 year ago

  • Status changed from In Progress to Feedback
  • Description updated (diff)
  • Subject changed from Package building issues with ruby gems to Switch back to using binary ruby when rvm is fixed
Actions #15

Updated by Peter Amstutz over 1 year ago

  • Description updated (diff)
Actions #16

Updated by Peter Amstutz over 1 year ago

  • Target version changed from Development 2023-03-29 Sprint to To be scheduled
Actions #17

Updated by Peter Amstutz over 1 year ago

  • Story points set to 0.5
Actions #18

Updated by Peter Amstutz 5 months ago

  • Target version changed from To be scheduled to Future
Actions #19

Updated by Lucas Di Pentima about 1 month ago

I guess this ticket is irrelevant now due to #21522 ?

Actions #20

Updated by Peter Amstutz about 1 month ago

  • Target version deleted (Future)
  • Status changed from Feedback to Closed
Actions #21

Updated by Peter Amstutz about 1 month ago

Yep, I have closed this issue.

Actions #22

Updated by Brett Smith about 1 month ago

Lucas Di Pentima wrote in #note-19:

I guess this ticket is irrelevant now due to #21522 ?

#21700 is where the work actually got done but yeah, same idea.

Actions

Also available in: Atom PDF