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
1c625107
Commit
1c625107
authored
Feb 10, 2014
by
Mislav Marohnić
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use `colorize` helper for `require_gcc`
Ensures that color is off if the stderr stream is not a terminal
parent
047953e1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
7 deletions
+12
-7
bin/ruby-build
+12
-7
No files found.
bin/ruby-build
View file @
1c625107
...
...
@@ -595,15 +595,16 @@ require_gcc() {
local
gcc
=
"
$(
locate_gcc
||
true
)
"
if
[
-z
"
$gcc
"
]
;
then
local
esc
=
$'
\0
33'
{
echo
echo
"
${
esc
}
[1mERROR
${
esc
}
[0m: This package must be compiled with GCC, but ruby-build couldn't"
colorize 1
"ERROR"
echo
": This package must be compiled with GCC, but ruby-build couldn't"
echo
"find a suitable
\`
gcc
\`
executable on your system. Please install GCC"
echo
"and try again."
echo
if
[
"
$(
uname
-s
)
"
=
"Darwin"
]
;
then
echo
"
${
esc
}
[1mDETAILS
${
esc
}
[0m: Apple no longer includes the official GCC compiler with Xcode"
colorize 1
"DETAILS"
echo
": Apple no longer includes the official GCC compiler with Xcode"
echo
"as of version 4.2. Instead, the
\`
gcc
\`
executable is a symlink to"
echo
"
\`
llvm-gcc
\`
, a modified version of GCC which outputs LLVM bytecode."
echo
...
...
@@ -613,15 +614,19 @@ require_gcc() {
echo
"GCC compiler installed on your system."
echo
colorize 1
"TO FIX THE PROBLEM"
if
type
brew &>/dev/null
;
then
echo
"
${
esc
}
[1mTO FIX THE PROBLEM
${
esc
}
[0m: Install Homebrew's apple-gcc42 package with this"
echo
"command:
${
esc
}
[4mbrew tap homebrew/dupes ; brew install apple-gcc42
${
esc
}
[0m"
echo
": Install Homebrew's apple-gcc42 package with this"
echo
-n
"command: "
colorize 4
"brew tap homebrew/dupes ; brew install apple-gcc42"
else
echo
"
${
esc
}
[1mTO FIX THE PROBLEM
${
esc
}
[0m: Install the official GCC compiler using these"
echo
"packages:
${
esc
}
[4mhttps://github.com/kennethreitz/osx-gcc-installer/downloads
${
esc
}
[0m"
echo
": Install the official GCC compiler using these"
echo
-n
"packages: "
colorize 4
"https://github.com/kennethreitz/osx-gcc-installer/downloads"
fi
echo
echo
echo
"You will need to install the official GCC compiler to build older"
echo
"versions of Ruby even if you have installed Apple's Command Line Tools"
echo
"for Xcode package. The Command Line Tools for Xcode package only"
...
...
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