Build, install & configure mod_spdy

#See for building environment, script and other things not defined here.
#Before starting do declare the environment variables specified to the link above.

#When depot_tools is already updated than run once:
cd /ffp/home/root/compile/depot_tools
~/ ffpg

export PATH=$PATH:/ffp/home/root/compile/depot_tools/
export GIT_SSL_NO_VERIFY=true

cd ~/compile
rm -r ~/compile/mod_spdy
cd ~/compile && mkdir mod_spdy
cd ~/compile/mod_spdy
#gclient config ""
gclient config ""
gclient sync --force

	KeyError: 'Undefined variable deb_arch in /usr/local/zy-pkgs/ffproot/ffp/home/root/compile/mod_spdy/src/build/install.gyp while loading dependencies
	modify /ffp/home/root/compile/mod_spdy/src/build/install.gyp:
        'conditions': [				-> existing line
          ['target_arch=="ia32"', {	-> existing line
            'deb_arch': 'i386',		-> existing line
            'rpm_arch': 'i386',		-> existing line
          }],						-> existing line
		  ['target_arch=="arm"', {
			'deb_arch': 'ia32',
			'rpm_arch': 'ia32',

	third_party/chromium/src/base/debug/ fatal error: execinfo.h: No such file or directory
	 #include <execinfo.h>
	compilation terminated.
	make: *** [out/Release/] Error 1
	Comment (# character too) any include of execinfo.h (,
	sed -i s/"#include <execinfo.h"/"\/\/#include <execinfo.h"/ third_party/chromium/src/base/debug/
	sed -i s/"#include <execinfo.h"/"\/\/#include <execinfo.h"/ third_party/chromium/src/base/debug/
	sed -i s/"#include <execinfo.h"/"\/\/#include <execinfo.h"/ third_party/chromium/src/base/

	third_party/chromium/src/base/debug/ error: 'backtrace' was not declared in this scope
	   count_ = std::max(backtrace(trace_, arraysize(trace_)), 0);
	make: *** [out/Release/] Error 1
	Modify /ffp/home/root/compile/mod_spdy/src/third_party/chromium/src/base/debug/ 
	by commenting lines using backtrace. At this moment (13 Feb 2015) the below are the parts that need commenting.
	Modify /ffp/home/root/compile/mod_spdy/src/third_party/chromium/src/base/debug/ (comment lines):
	//  count_ = std::max(backtrace(trace_, arraysize(trace_)), 0);		-> commented line
	count_ = 0;								-> added line
	Modify /ffp/home/root/compile/mod_spdy/src/third_party/chromium/src/base/debug/ (comment lines):
	//  if (in_signal_handler == 0) {
	//    scoped_ptr_malloc<char*> trace_symbols(backtrace_symbols(trace, size));
	//    if (trace_symbols.get()) {
	//      for (int i = 0; i < size; ++i) {
	//        std::string trace_symbol = trace_symbols.get()[i];
	//        DemangleSymbols(&trace_symbol);
	//        handler->HandleOutput(trace_symbol.c_str());
	//        handler->HandleOutput("\n");
	//      }
	//      printed = true;
	//    }
	//  }

#ERROR4 (other similar errors occur and all have a similar solution):
	CC(target) out/Release/
	third_party/chromium/src/base/third_party/dynamic_annotations/dynamic_annotations.c:35:20: fatal error: stdlib.h: No such file or directory
	grep -r dynamic_annotations.o .
	#result of grep:
	#modify dynamic_annotations. ... .mk
	INCS_Release := \
		... \

	Something about not supporting sysroot.
	find . -type f -name *.mk -exec sed -i s/"\-\-sysroot=\/usr\/local\/zy-pkgs\/ffproot\/ffp\/home\/root\/compile\/mod_spdy\/src\/arm-sysroot"/""/g {} \;

export CFLAGS="$CFLAGS -Wno-error"
export CPPFLAGS="$CPPFLAGS -Wno-error"
export CXXFLAGS="$CXXFLAGS -Wno-error"
cd ~/compile/mod_spdy/src
#./ --insecure -> instead of this do compile apache with npn patch applied
nohup make BUILDTYPE=Release &
renice -14 `pidof cc1plus` -p `pidof make` -p `pidof as`
tail -f nohup.out

#INSTALL & configure apache
cp -v out/Release/ /ffp/opt/apache-2.2.29-worker/modules/
#LoadModule	spdy_module		/ffp/opt/apache-2.2.29-worker/modules/
#SpdyEnabled on
#Open another tab and navigate to chrome://net-internals/#spdy, and verify that your hostname appears in the table.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.