Why is Jammy's Ruby using nonexistent /usr/bin/mkdir when building gems?

Asked by Antryg G. Revok

Some of the problems I've had with Ruby in Jammy are building stuff.

This is in aarch64 / Android 11 / Termux / Ubuntu server 22.04 LTS

Both gems snappy & sha3 broke due to there being no /usr/bin/mkdir,
but mkdir has been in /bin, for decades, ttbomk.

The keeper of snappy told me to try a couple of searches,
which highlighted this,
copied from the github issues-tracker for the snappy gem:

'''
I think you've got it!

$ ruby -v -rrbconfig -e "puts RbConfig::CONFIG['MAKEDIRS']"

ruby 3.0.2p107 (2021-07-07 revision 0db68f0233) [aarch64-linux-gnu] /usr/bin/mkdir -p

But there IS no mkdir, there!

That needs to get upstream to someone
( meaning you, who actually know what you're doing,
needs to get that to someone : )

$ grep -A 3 -B 3 mkdir $(gem env gemdir)/gems/snappy-0.3.0/ext/Makefile

RM = rm -f RM_RF = $(RUBY) -run -e rm -- -rf RMDIRS = rmdir --ignore-fail-on-non-empty -p MAKEDIRS = /usr/bin/mkdir -p INSTALL = /usr/bin/install -c INSTALL_PROG = $(INSTALL) -m 0755 INSTALL_DATA = $(INSTALL) -m 644

again!'''

Subsystems should only insist on tools at their *actual* location, right?

This is just an FYI,
as it likely breaks LOTS of things,
& may be ( part of ) what is underlying the complete inability to rbenv build Ruby versions in Jammy...
( except for the git version of rbenv, which can only build 3.1.2,
but at-least that is one version, right? )

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

Can work around it with a symlink. I suggest you report a bug

Can you help with this problem?

Provide an answer of your own, or ask Antryg G. Revok for more information if necessary.

To post a message you must log in.