{"id":98,"date":"2014-10-14T17:14:46","date_gmt":"2014-10-14T17:14:46","guid":{"rendered":"http:\/\/adrhc.go.ro\/wordpress\/?p=98"},"modified":"2015-02-13T23:21:23","modified_gmt":"2015-02-13T21:21:23","slug":"build-install-configure-mod_spdy","status":"publish","type":"post","link":"https:\/\/adrhc.go.ro\/blog\/build-install-configure-mod_spdy\/","title":{"rendered":"Build, install &#038; configure mod_spdy"},"content":{"rendered":"<p><a href=\"https:\/\/code.google.com\/p\/mod-spdy\/wiki\/GettingStarted\">https:\/\/code.google.com\/p\/mod-spdy\/wiki\/GettingStarted<\/a><br \/>\n<a href=\"chrome:\/\/net-internals\/#spdy\">chrome:\/\/net-internals\/#spdy<\/a><br \/>\n<a href=\"https:\/\/svn.apache.org\/viewvc\/httpd\/mod_spdy\/trunk\/\">https:\/\/svn.apache.org\/viewvc\/httpd\/mod_spdy\/trunk\/<\/a><\/p>\n<pre class=\"brush:bash shell\">\r\n#See https:\/\/adrhc.go.ro\/wordpress\/common-commands-when-building\/ for building environment, x.sh script and other things not defined here.\r\n#Before starting do declare the environment variables specified to the link above.\r\n\r\n#When depot_tools is already updated than run once:\r\ncd \/ffp\/home\/root\/compile\/depot_tools\r\n~\/x.sh ffpg\r\n\r\nexport PATH=$PATH:\/ffp\/home\/root\/compile\/depot_tools\/\r\nexport GIT_SSL_NO_VERIFY=true\r\n\r\ncd ~\/compile\r\nrm -r ~\/compile\/mod_spdy\r\ncd ~\/compile && mkdir mod_spdy\r\ncd ~\/compile\/mod_spdy\r\n#gclient config \"http:\/\/mod-spdy.googlecode.com\/svn\/tags\/current\/src\"\r\ngclient config \"http:\/\/mod-spdy.googlecode.com\/svn\/trunk\/src\"\r\ngclient sync --force\r\n\r\n#ERROR1:\r\n\tKeyError: 'Undefined variable deb_arch in \/usr\/local\/zy-pkgs\/ffproot\/ffp\/home\/root\/compile\/mod_spdy\/src\/build\/install.gyp while loading dependencies\r\n#SOLUTION1:\r\n\tmodify \/ffp\/home\/root\/compile\/mod_spdy\/src\/build\/install.gyp:\r\n        'conditions': [\t\t\t\t-> existing line\r\n          ['target_arch==\"ia32\"', {\t-> existing line\r\n            'deb_arch': 'i386',\t\t-> existing line\r\n            'rpm_arch': 'i386',\t\t-> existing line\r\n          }],\t\t\t\t\t\t-> existing line\r\n\t\t  ['target_arch==\"arm\"', {\r\n\t\t\t'deb_arch': 'ia32',\r\n\t\t\t'rpm_arch': 'ia32',\r\n\t\t  }],\r\n\r\n#ERROR2:\r\n\tthird_party\/chromium\/src\/base\/debug\/debugger_posix.cc:21:22: fatal error: execinfo.h: No such file or directory\r\n\t #include &lt;execinfo.h>\r\n\tcompilation terminated.\r\n\tmake: *** [out\/Release\/obj.target\/base\/third_party\/chromium\/src\/base\/debug\/debugger_posix.o] Error 1\r\n#SOLUTION2:\r\n\tComment (# character too) any include of execinfo.h (stack_trace_posix.cc, debugger_posix.cc).\r\n\tsed -i s\/\"#include &lt;execinfo.h\"\/\"\\\/\\\/#include &lt;execinfo.h\"\/ third_party\/chromium\/src\/base\/debug\/stack_trace_posix.cc\r\n\tsed -i s\/\"#include &lt;execinfo.h\"\/\"\\\/\\\/#include &lt;execinfo.h\"\/ third_party\/chromium\/src\/base\/debug\/debugger_posix.cc\r\n\tsed -i s\/\"#include &lt;execinfo.h\"\/\"\\\/\\\/#include &lt;execinfo.h\"\/ third_party\/chromium\/src\/base\/sys_info_chromeos.cc\r\n\r\n#ERROR3:\r\n\tthird_party\/chromium\/src\/base\/debug\/stack_trace_posix.cc:159:56: error: 'backtrace' was not declared in this scope\r\n\t   count_ = std::max(backtrace(trace_, arraysize(trace_)), 0);\r\n\tmake: *** [out\/Release\/obj.target\/base\/third_party\/chromium\/src\/base\/debug\/stack_trace_posix.o] Error 1\r\n#SOLUTION3:\r\n\tModify \/ffp\/home\/root\/compile\/mod_spdy\/src\/third_party\/chromium\/src\/base\/debug\/stack_trace_posix.cc \r\n\tby commenting lines using backtrace. At this moment (13 Feb 2015) the below are the parts that need commenting.\r\n\tModify \/ffp\/home\/root\/compile\/mod_spdy\/src\/third_party\/chromium\/src\/base\/debug\/stack_trace_posix.cc (comment lines):\r\n\t\/\/  count_ = std::max(backtrace(trace_, arraysize(trace_)), 0);\t\t-> commented line\r\n\tcount_ = 0;\t\t\t\t\t\t\t\t-> added line\r\n\tModify \/ffp\/home\/root\/compile\/mod_spdy\/src\/third_party\/chromium\/src\/base\/debug\/stack_trace_posix.cc (comment lines):\r\n\t\/\/  if (in_signal_handler == 0) {\r\n\t\/\/    scoped_ptr_malloc&lt;char*> trace_symbols(backtrace_symbols(trace, size));\r\n\t\/\/    if (trace_symbols.get()) {\r\n\t\/\/      for (int i = 0; i &lt; size; ++i) {\r\n\t\/\/        std::string trace_symbol = trace_symbols.get()[i];\r\n\t\/\/        DemangleSymbols(&trace_symbol);\r\n\t\/\/        handler->HandleOutput(trace_symbol.c_str());\r\n\t\/\/        handler->HandleOutput(\"\\n\");\r\n\t\/\/      }\r\n\t\/\/\r\n\t\/\/      printed = true;\r\n\t\/\/    }\r\n\t\/\/  }\r\n\r\n#ERROR4 (other similar errors occur and all have a similar solution):\r\n\tCC(target) out\/Release\/obj.target\/dynamic_annotations\/third_party\/chromium\/src\/base\/third_party\/dynamic_annotations\/dynamic_annotations.o\r\n\tthird_party\/chromium\/src\/base\/third_party\/dynamic_annotations\/dynamic_annotations.c:35:20: fatal error: stdlib.h: No such file or directory\r\n#SOLUTION4:\r\n\tgrep -r dynamic_annotations.o .\r\n\t#result of grep:\r\n\t.\/third_party\/chromium\/src\/base\/third_party\/dynamic_annotations\/dynamic_annotations.host.mk:146:\r\n\t\t$(obj).host\/$(TARGET)\/third_party\/chromium\/src\/base\/third_party\/dynamic_annotations\/dynamic_annotations.o\r\n\t.\/third_party\/chromium\/src\/base\/third_party\/dynamic_annotations\/dynamic_annotations.target.mk:160:\r\n\t\t$(obj).target\/$(TARGET)\/third_party\/chromium\/src\/base\/third_party\/dynamic_annotations\/dynamic_annotations.o\r\n\t#modify dynamic_annotations. ... .mk\r\n\tINCS_Release := \\\r\n\t\t... \\\r\n\t\t-I\/ffp\/include\r\n\r\n#ERROR5:\r\n\tSomething about not supporting sysroot.\r\n#SOLUTION5:\r\n\tfind . -type f -name *.mk -exec sed -i s\/\"\\-\\-sysroot=\\\/usr\\\/local\\\/zy-pkgs\\\/ffproot\\\/ffp\\\/home\\\/root\\\/compile\\\/mod_spdy\\\/src\\\/arm-sysroot\"\/\"\"\/g {} \\;\r\n\r\n#BULDING\r\nexport CFLAGS=\"$CFLAGS -Wno-error\"\r\nexport CPPFLAGS=\"$CPPFLAGS -Wno-error\"\r\nexport CXXFLAGS=\"$CXXFLAGS -Wno-error\"\r\ncd ~\/compile\/mod_spdy\/src\r\n#see http:\/\/adrhc.go.ro\/public\/mod_spdy-patch.sh\r\n\/i-data\/md0\/www\/pages\/public\/mod_spdy-patch.sh\r\n#.\/build_modssl_with_npn.sh --insecure -> instead of this do compile apache with npn patch applied\r\nnohup make BUILDTYPE=Release &\r\nrenice -14 `pidof cc1plus` -p `pidof make` -p `pidof as`\r\ntail -f nohup.out\r\n\r\n#INSTALL & configure apache\r\ncp -v out\/Release\/libmod_spdy.so \/ffp\/opt\/apache-2.2.29-worker\/modules\/mod_spdy.so\r\n#LoadModule\tspdy_module\t\t\/ffp\/opt\/apache-2.2.29-worker\/modules\/mod_spdy.so\r\n#SpdyEnabled on\r\n#Open another tab and navigate to chrome:\/\/net-internals\/#spdy, and verify that your hostname appears in the table.\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>https:\/\/code.google.com\/p\/mod-spdy\/wiki\/GettingStarted chrome:\/\/net-internals\/#spdy https:\/\/svn.apache.org\/viewvc\/httpd\/mod_spdy\/trunk\/ #See https:\/\/adrhc.go.ro\/wordpress\/common-commands-when-building\/ for building environment, x.sh 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 ~\/x.sh ffpg [&hellip;]<\/p>\n<div class=\"link-more\"><a href=\"https:\/\/adrhc.go.ro\/blog\/build-install-configure-mod_spdy\/#more-98\" class=\"more-link\">Continue reading &#10142; <span class=\"screen-reader-text\">Build, install &#038; configure mod_spdy<\/span><\/a><\/div>","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,6],"tags":[],"class_list":["post-98","post","type-post","status-publish","format-standard","hentry","category-compiling-from-source","category-configuration"],"_links":{"self":[{"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/posts\/98","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/comments?post=98"}],"version-history":[{"count":0,"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/posts\/98\/revisions"}],"wp:attachment":[{"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/media?parent=98"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/categories?post=98"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/tags?post=98"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}