#33609: Add variant to nginx for mod_passenger ----------------------------------+----------------------------------------- Reporter: macports@… | Owner: cal@… Type: enhancement | Status: assigned Priority: Normal | Milestone: Component: ports | Version: 2.0.4 Keywords: | Port: nginx ----------------------------------+----------------------------------------- Comment(by cal@…): 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. -- Ticket URL: <https://trac.macports.org/ticket/33609#comment:3> MacPorts <http://www.macports.org/> Ports system for Mac OS