Bug 979941 - passenger-install-nginx-module fails to compile
passenger-install-nginx-module fails to compile
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: gcc (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Jakub Jelinek
Depends On:
  Show dependency treegraph
Reported: 2013-07-01 04:01 EDT by me
Modified: 2013-07-04 12:35 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-07-04 12:35:58 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Shell input/output (50.86 KB, text/plain)
2013-07-01 04:01 EDT, me
no flags Details

  None (edit)
Description me 2013-07-01 04:01:37 EDT
Created attachment 767276 [details]
Shell input/output

Description of problem: 
Unable to use the automatic nginx + passenger module compiler and installer. 

Version-Release number of selected component (if applicable): 
ruby 1.9.3p448
rvm 1.21.3 (stable)
Phusion Passenger version 4.0.5

How reproducible:
Reproducible 100% on my system.

Steps to Reproduce:
1. Run passenger-install-nginx-module
2. Press Enter.
3. Choose Option 1 (Automatic download nginx source and compile with addon)

Actual results:
mkdir -p agents/
g++ -o agents/PassengerHelperAgent.o  -Iext -Iext/common  -Iext/libev -Wno-ambiguous-member-template -Iext/libeio -D_REENTRANT -I/usr/local/include -DHAS_TR1_UNORDERED_MAP -DHAVE_ACCEPT4 -DHAS_ALLOCA_H -DHAS_SFENCE -DHAS_LFENCE -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-long-long -Wno-missing-field-initializers -ggdb -DPASSENGER_DEBUG -DBOOST_DISABLE_ASSERTS -fcommon -feliminate-unused-debug-symbols -feliminate-unused-debug-types -fvisibility=hidden -DVISIBILITY_ATTRIBUTE_SUPPORTED -Wno-attributes -c ext/common/agents/HelperAgent/Main.cpp
g++: Internal error: Killed (program cc1plus)
Please submit a full bug report.
See <http://bugzilla.redhat.com/bugzilla> for instructions.
rake aborted!
Command failed with status (1): [g++ -o agents/PassengerHelperAgent.o  -Iext -Iext/common  -Iext/libev -Wno-ambiguous-member-template -Iext/libeio -D_REENTRANT -I/usr/local/include -DHAS_TR1_UNORDERED_MAP -DHAVE_ACCEPT4 -DHAS_ALLOCA_H -DHAS_SFENCE -DHAS_LFENCE -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-long-long -Wno-missing-field-initializers -ggdb -DPASSENGER_DEBUG -DBOOST_DISABLE_ASSERTS -fcommon -feliminate-unused-debug-symbols -feliminate-unused-debug-types -fvisibility=hidden -DVISIBILITY_ATTRIBUTE_SUPPORTED -Wno-attributes -c ext/common/agents/HelperAgent/Main.cpp]
/usr/local/rvm/gems/ruby-1.9.3-p448/gems/passenger-4.0.5/build/cplusplus_support.rb:42:in `run_compiler'
/usr/local/rvm/gems/ruby-1.9.3-p448/gems/passenger-4.0.5/build/cplusplus_support.rb:52:in `compile_cxx'
/usr/local/rvm/gems/ruby-1.9.3-p448/gems/passenger-4.0.5/build/agents.rb:93:in `block in <top (required)>'
/usr/local/rvm/gems/ruby-1.9.3-p448/bin/ruby_noexec_wrapper:14:in `eval'
/usr/local/rvm/gems/ruby-1.9.3-p448/bin/ruby_noexec_wrapper:14:in `<main>'
Tasks: TOP => nginx => nginx_without_native_support => agents/PassengerHelperAgent
(See full trace by running task with --trace)

Expected results:
Nginx with Passenger module

Additional info:
Comment 2 Marek Polacek 2013-07-01 04:36:04 EDT
Judging from g++: Internal error: Killed (program cc1plus), it seems that your computer just doesn't have enough memory and the OOM killer kills cc1plus process.
Comment 3 me 2013-07-01 04:51:18 EDT
I'm running this on an Amazon EC2 Micro instance, which should have 613 MiB... The comments in this article (https://www.digitalocean.com/community/articles/how-to-install-rails-and-nginx-with-passenger-on-ubuntu) seem to imply that at most 612 MiB RAM is necessary to compile nginx.

Are there any options I can specify to let it compile under my circumstances, if memory is the issue?
Comment 4 Jakub Jelinek 2013-07-04 12:35:58 EDT
Not a gcc bug, you need enough memory to compile stuff.

Note You need to log in before you can comment on or make changes to this bug.