Bug 979941

Summary: passenger-install-nginx-module fails to compile
Product: Red Hat Enterprise Linux 6 Reporter: me
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED NOTABUG QA Contact: qe-baseos-tools-bugs
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.4CC: mpolacek
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-07-04 16:35:58 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Shell input/output none

Description me 2013-07-01 08:01:37 UTC
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): 
gcc-4.4.7
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 08:36:04 UTC
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 08:51:18 UTC
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 16:35:58 UTC
Not a gcc bug, you need enough memory to compile stuff.