Opened 13 years ago
Closed 10 years ago
#33609 closed enhancement (wontfix)
Add variant to nginx for mod_passenger
Reported by: | macports@… | Owned by: | neverpanic (Clemens Lang) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.0.4 |
Keywords: | lack-of-interest | Cc: | cooljeanius (Eric Gallager) |
Port: | nginx |
Description
I have attached a patch to the Portfile for nginx that adds the code needed to build mod_passenger 3.0.11.
Attachments (1)
Change History (12)
Changed 13 years ago by macports@…
Attachment: | nginx_passenger_Portfile.diff added |
---|
comment:1 Changed 13 years ago by neverpanic (Clemens Lang)
Owner: | changed from macports-tickets@… to cal@… |
---|---|
Status: | new → assigned |
comment:2 Changed 13 years ago by neverpanic (Clemens Lang)
Port: | nginx added; www/nginx removed |
---|
comment:3 Changed 13 years ago by neverpanic (Clemens Lang)
Please remember to Cc or assign to the maintainer.
mod_passenger uses /usr/bin/rake in it's configure phase; does it also link against (or use at run-time) system ruby? Per MacPorts wiki:FAQ#ownlibs we do not link against or use system libraries, but should rather depend on one of the ruby port available in MacPorts to be self-contained. This patch should probably add a dependency on MacPorts ruby and set environment variables or patch Makefiles/configure where necessary to make it use MacPorts ruby.
mod_passenger also seems to ship it's own version of libev:
cd ext/libev/ && sh /opt/local/var/macports/build/_opt_dports_www_nginx/nginx/work/passenger-3.0.11/ext/libev/configure --disable-shared --enable-static
Is this necessary? Can MacPorts' libev port be used instead? What are the reasons for mod_passenger shipping it's own libev?
Also actually compiling mod_passenger seems to ignore the CC environment variable specified at configure time and always use "gcc" instead. We usually always specify an explicit compiler and want software to use this compiler in order to get reproducible builds. Maybe this patch needs to add
build.args-append CC=${configure.cc} \ CXX=${configure.cxx} \ CPP=${configure.cpp}
as described in UsingTheRightCompiler?
The error output I see is:
mkdir -p 'ext/ruby/ruby-1.8.7-universal-macosx/' cd 'ext/ruby/ruby-1.8.7-universal-macosx/' && /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby '/opt/local/var/macports/build/_opt_dports_www_nginx/nginx/work/passenger-3.0.11/ext/ruby/extconf.rb' checking for alloca.h... no checking for ruby/io.h... no creating Makefile cd 'ext/ruby/ruby-1.8.7-universal-macosx/' && make gcc -I. -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin11.0 -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin11.0 -I/opt/local/var/macports/build/_opt_dports_www_nginx/nginx/work/passenger-3.0.11/ext/ruby -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -fno-common -arch i386 -arch x86_64 -g -Os -pipe -fno-common -DENABLE_DTRACE -fno-common -pipe -fno-common -g -c /opt/local/var/macports/build/_opt_dports_www_nginx/nginx/work/passenger-3.0.11/ext/ruby/passenger_native_support.c gcc -I. -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin11.0 -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin11.0 -I/opt/local/var/macports/build/_opt_dports_www_nginx/nginx/work/passenger-3.0.11/ext/ruby -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -fno-common -arch i386 -arch x86_64 -g -Os -pipe -fno-common -DENABLE_DTRACE -fno-common -pipe -fno-common -g -c /opt/local/var/macports/build/_opt_dports_www_nginx/nginx/work/passenger-3.0.11/ext/ruby/passenger_native_support.c gcc: Error: You should be using ${configure.cc} See http://trac.macports.org/wiki/UsingTheRightCompiler make: *** [passenger_native_support.o] Error 1 rake aborted! Command failed with status (2): [cd 'ext/ruby/ruby-1.8.7-universal-macosx/'...]
The last paragraph in using UsingTheRightCompiler describes the test setup I have on my development system in order to test for ports using the default compiler (and is what is causing the error message I pasted). You will not see this without this special setup.
comment:4 Changed 13 years ago by neverpanic (Clemens Lang)
Do you have any interest in resolving the problems I mentioned?
comment:5 follow-up: 6 Changed 13 years ago by robsonpeixoto@…
IMHO, isn't a good choice put the passenger module on nginx's Portage.
comment:6 Changed 13 years ago by robsonpeixoto@…
Replying to robsonpeixoto@…:
IMHO, isn't a good choice put the passenger module on nginx's Portage.
Sorry, man, I didn't like of this solution: #19342 and I commented on the wrong place.
Your solution made me change my mind.
comment:7 Changed 13 years ago by robsonpeixoto@…
Add rb-rubygems on deps, and maybe this problem will be solved
comment:9 Changed 13 years ago by neverpanic (Clemens Lang)
Adding a dependency on rb-rubygems doesn't solve the problems outlined above. Also, from the installation guide (http://www.modrails.com/documentation/Users%20guide%20Nginx.html) it sounds like a bad idea to compile passenger in the nginx working directory, since "The Phusion Passenger files are to reside in that location permanently." cannot be guaranteed by the way MacPorts works.
Maybe this should be turned into a separate port, the variant should add a dependency on that port and add --add-module=$(passenger-config --root)
to configure.args
.
comment:11 Changed 10 years ago by neverpanic (Clemens Lang)
Keywords: | lack-of-interest added |
---|---|
Resolution: | → wontfix |
Status: | assigned → closed |
Please re-open when there is new input.
Patch to nginx Portfile to add passenger variant