Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
ruby-build
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ruby-build
Commits
27d02db6
Commit
27d02db6
authored
Jul 19, 2015
by
Erik Michaels-Ober
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #629 from sstephenson/dep-checks
Check that openssl, yaml, readline, zlib are all loadable
parents
0a3f010b
025e7c69
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
4 deletions
+27
-4
bin/ruby-build
+27
-4
No files found.
bin/ruby-build
View file @
27d02db6
...
@@ -926,15 +926,38 @@ build_package_mac_openssl() {
...
@@ -926,15 +926,38 @@ build_package_mac_openssl() {
# Post-install check that the openssl extension was built.
# Post-install check that the openssl extension was built.
build_package_verify_openssl
()
{
build_package_verify_openssl
()
{
"
$RUBY_BIN
"
-e
'begin
"
$RUBY_BIN
"
-e
'
require "openssl"
manager = ARGV[0]
packages = {
"apt-get" => Hash.new {|h,k| "lib#{k}-dev" }.update(
"openssl" => "libssl-dev",
"zlib" => "zlib1g-dev"
),
"yum" => Hash.new {|h,k| "#{k}-devel" }.update(
"yaml" => "libyaml-devel"
)
}
failed = %w[openssl readline zlib yaml].reject do |lib|
begin
require lib
rescue LoadError
rescue LoadError
$stderr.puts "The Ruby openssl extension was not compiled. Missing the OpenSSL lib?"
$stderr.puts "The Ruby #{lib} extension was not compiled."
end
end
if failed.size > 0
$stderr.puts "ERROR: Ruby install aborted due to missing extensions"
$stderr.print "Try running `%s install -y %s` to fetch missing dependencies.\n\n" % [
manager,
failed.map { |lib| packages.fetch(manager)[lib] }.join(" ")
] unless manager.empty?
$stderr.puts "Configure options used:"
$stderr.puts "Configure options used:"
require "rbconfig"; require "shellwords"
require "rbconfig"; require "shellwords"
RbConfig::CONFIG.fetch("configure_args").shellsplit.each { |arg| $stderr.puts " #{arg}" }
RbConfig::CONFIG.fetch("configure_args").shellsplit.each { |arg| $stderr.puts " #{arg}" }
exit 1
exit 1
end'
>
&4 2>&1
end
'
"
$(
basename
"
$(
type
-p
yum apt-get | head
-1
)
"
)
"
>
&4 2>&1
}
}
# Ensure that directories listed in LDFLAGS exist
# Ensure that directories listed in LDFLAGS exist
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment