ruby-build icon indicating copy to clipboard operation
ruby-build copied to clipboard

.rbenv/plugins/ruby-build/bin/ruby-build: line 1176: patch: command not found

Open palladius opened this issue 3 years ago • 3 comments

Steps to reproduce the behavior

  • install rbenv from GIT on your Synology
  • install ruby-build on synology
  • install a rubie

Expected vs. actual behavior

I'm sure this is not this maintainer fault, but would love to find a pointer to how to install PATCH on my system or maybe make it work without patch.

Logs


riccardo@sinologo:~$ rbenv install 2.7.6
To follow progress, use 'tail -f /tmp/ruby-build.20221001172308.19702.log' or pass --verbose
No system openssl version was found, ensure openssl headers are installed (https://github.com/rbenv/ruby-build/wiki#suggested-build-environment)
Downloading openssl-1.1.1q.tar.gz...
-> https://dqw8nmjcqpjn7.cloudfront.net/d7939ce614029cdff0b6c20f0e2e5703158a489a72b2507b8bd51bf8c8fd10ca
Installing openssl-1.1.1q...
/var/services/homes/riccardo/.rbenv/plugins/ruby-build/bin/ruby-build: line 1176: patch: command not found

BUILD FAILED (Linux 4.4.180+ using ruby-build 20220930)

Inspect or clean up the working tree at /tmp/ruby-build.20221001172308.19702.7y5i91
Results logged to /tmp/ruby-build.20221001172308.19702.log

Last 10 log lines:
Server: AmazonS3
Date: Fri, 30 Sep 2022 21:56:18 GMT
ETag: "90d47d61531f00ea75500354ecf05f3a-2"
X-Cache: Hit from cloudfront
Via: 1.1 d92debab8d9ca0518390aebaec8733a6.cloudfront.net (CloudFront)
X-Amz-Cf-Pop: ZRH50-C1
X-Amz-Cf-Id: POIYsv6gW03XissrsByPRiCrMCVo4_VKvgSspffq5OBAs1HkVA9c6A==
Age: 62811


palladius avatar Oct 01 '22 15:10 palladius

Hi, thank you for reporting and sorry for the trouble. The command patch is usually part of “standard” GNU utilities on Linux machines and we did not expect that it would be missing on a machine that has the rest of the tooling to compile programs.

I'm not familiar with how Synology DSM packages additional software for downloading on your machine, but you could check their documentation and see if there is an optional package that you can additionally install that provides the patch util.

mislav avatar Oct 03 '22 11:10 mislav

Synology may used debian fork distribution. You can install patch with apt install patch.

hsbt avatar Oct 04 '22 10:10 hsbt

First thanks for the answer - I was NOT expecting that ruby-build works on synology but I wanted to leave a trace for people to find their way here with solutions.

My synology has no apt, neither ipkg and has discontinued ruby (sigh!) so i guess I'll renounce to ruby on that machine.

palladius avatar Oct 07 '22 16:10 palladius

OpenSSL-1.1.1r and 1.1.1s are already released.

https://www.openssl.org/news/openssl-1.1.1-notes.html

I'll check them for removing our local patch.

hsbt avatar Nov 14 '22 05:11 hsbt

@hsbt Since our openssl patch only affects building openssl-1.1.1q, I'd vote for keeping it in code for a while still.

This is to keep compatibility with custom build formula that still have install_package "openssl-1.1.1q" in them.

mislav avatar Nov 14 '22 21:11 mislav

Update: since https://github.com/rbenv/ruby-build/pull/2088, none of our built-in Ruby definitions link to openssl-1.1.1q, therefore the installation process is no longer dependent on patch being present on the system.

mislav avatar Nov 16 '22 17:11 mislav

Wow. This is amazing @mislav !

palladius avatar Nov 17 '22 09:11 palladius