{"id":175,"date":"2014-10-15T13:06:18","date_gmt":"2014-10-15T13:06:18","guid":{"rendered":"http:\/\/adrhc.go.ro\/wordpress\/?p=175"},"modified":"2017-10-07T17:26:04","modified_gmt":"2017-10-07T15:26:04","slug":"compiling-nodejs","status":"publish","type":"post","link":"https:\/\/adrhc.go.ro\/blog\/compiling-nodejs\/","title":{"rendered":"Compiling nodejs"},"content":{"rendered":"<pre class=\"brush:bash shell;toolbar: false\">cd ~\/compile\r\n#wget http:\/\/nodejs.org\/dist\/v0.10.30\/node-v0.10.30.tar.gz\r\nrm -r ~\/compile\/node-v0.10.30\r\ntar xvzf node-v0.10.30.tar.gz\r\ncd ~\/compile\/node-v0.10.30\r\nfind . -type f -exec sed -i s\/\"\\\/usr\\\/bin\\\/bash\"\/\"\\\/ffp\\\/bin\\\/bash\"\/ {} \\;\r\nfind . -type f -exec sed -i s\/\"\\\/usr\\\/bin\\\/sh\"\/\"\\\/ffp\\\/bin\\\/sh\"\/ {} \\;\r\nfind . -type f -exec sed -i s\/\"\\\/usr\\\/bin\\\/env\"\/\"\\\/ffp\\\/bin\\\/env\"\/ {} \\;\r\nfind . -type f -exec sed -i s\/\"\\\/bin\\\/bash\"\/\"\\\/ffp\\\/bin\\\/bash\"\/ {} \\;\r\nfind . -type f -exec sed -i s\/\"\\\/bin\\\/sh\"\/\"\\\/ffp\\\/bin\\\/sh\"\/ {} \\;\r\nfind . -type f -exec sed -i s\/\"\\\/bin\\\/env\"\/\"\\\/ffp\\\/bin\\\/env\"\/ {} \\;\r\nfind . -type f -exec sed -i s\/\"\\\/ffp\\\/ffp\\\/\"\/\"\\\/ffp\\\/\"\/ {} \\;\r\n#cp -r ~\/compile\/node-v0.10.30 ~\/compile\/node-v0.10.30-paths\r\n<\/pre>\n<pre><span style=\"color: #800080;\">#ERROR1:<\/span>\r\n\t..\/deps\/v8\/src\/arm\/macro-assembler-arm.cc:65:3: error: #error \"For thumb inter-working we require an architecture which supports blx\"\r\n\tmake[1]: *** [\/usr\/local\/zy-pkgs\/ffproot\/ffp\/home\/root\/compile\/node-v0.10.30\/out\/Release\/obj.target\/v8_base\/deps\/v8\/src\/arm\/macro-assembler-arm.o] Error 1\r\n\tmake[1]: Leaving directory `\/usr\/local\/zy-pkgs\/ffproot\/ffp\/home\/root\/compile\/node-v0.10.30\/out'\r\n\tmake: *** [node] Error 2\r\n<span style=\"color: #800080;\">#SOLUTION1:<\/span>\r\n\t<span style=\"color: #800080;\">\/ffp\/home\/root\/compile\/node-v0.10.30\/deps\/v8\/src\/arm\/macro-assembler-arm.cc<\/span>\r\n\t#if defined(__thumb__) &amp;&amp; !defined(USE_THUMB_INTERWORK)\r\n\t#error \"flag -mthumb-interwork missing\"\r\n\t#endif\r\n\r\n\t<span style=\"color: #008000;\">\/\/ ADD THESE THREE LINES\r\n\t#if !defined(CAN_USE_THUMB_INSTRUCTIONS)\r\n\t# define CAN_USE_THUMB_INSTRUCTIONS 1\r\n\t#endif<\/span>\r\n\r\n\t\/\/ We do not support thumb inter-working with an arm architecture not supporting\r\n\t\/\/ the blx instruction (below v5t). If you know what CPU you are compiling for\r\n\t\/\/ you can use -march=armv7 or similar.\r\n\t#if defined(USE_THUMB_INTERWORK) &amp;&amp; !defined(CAN_USE_THUMB_INSTRUCTIONS)\r\n\t# error \"For thumb inter-working we require an architecture which supports blx\"\r\n\t#endif\r\n<\/pre>\n<pre class=\"brush:bash shell;gutter:false;toolbar:false\">export CFLAGS=\"-march=armv5te -mtune=xscale -mfloat-abi=soft -mfpu=vfp -mabi=aapcs-linux -mthumb -O2 -Wall\"\r\nexport LDFLAGS=\"-L\/ffp\/lib -lintl\"\r\nexport CPPFLAGS=\"-I\/ffp\/include -I\/ffp\/include\/readline\"\r\nexport CXXFLAGS=\"-I\/ffp\/include -I\/ffp\/include\/readline\"\r\nexport LD_LIBRARY_PATH=\/ffp\/lib:\/ffp\/opt\/serf-1.3.6\/lib:\/ffp\/lib\/python2.7\/lib-dynload:\/usr\/local\/zy-pkgs\/lib\r\n.\/configure --help &gt; configure.help.txt\r\n#.\/configure --prefix=\/ffp\/opt\/nodejs --shared-openssl --shared-openssl-includes=\/ffp\/include\/openssl --shared-openssl-libname=\/ffp\/lib\/libcrypto.so --shared-zlib --shared-zlib-includes=\/ffp\/include --shared-zlib-libname=\/ffp\/lib\/libz.so --without-perfctr --dest-cpu=arm --dest-os=linux --with-arm-float-abi=soft\r\n#.\/configure --prefix=\/ffp\/opt\/nodejs --shared-openssl --shared-zlib --without-perfctr --dest-cpu=arm --dest-os=linux --with-arm-float-abi=soft\r\n.\/configure --prefix=\/ffp\/opt\/nodejs --shared-openssl --shared-openssl-includes=\/ffp\/include --shared-openssl-libpath=\/ffp\/lib --shared-zlib --shared-zlib-includes=\/ffp\/include --shared-zlib-libpath=\/ffp\/lib --without-perfctr --dest-cpu=arm --dest-os=linux --with-arm-float-abi=soft\r\nnohup make &amp;\r\ntail -f nohup.out\r\nnohup make test &amp;\r\nrm -r \/ffp\/opt\/nodejs\r\nnohup make install &amp;\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>cd ~\/compile #wget http:\/\/nodejs.org\/dist\/v0.10.30\/node-v0.10.30.tar.gz rm -r ~\/compile\/node-v0.10.30 tar xvzf node-v0.10.30.tar.gz cd ~\/compile\/node-v0.10.30 find . -type f -exec sed -i s\/&#8221;\\\/usr\\\/bin\\\/bash&#8221;\/&#8221;\\\/ffp\\\/bin\\\/bash&#8221;\/ {} \\; find . -type f -exec sed -i s\/&#8221;\\\/usr\\\/bin\\\/sh&#8221;\/&#8221;\\\/ffp\\\/bin\\\/sh&#8221;\/ {} \\; find . -type f -exec sed -i s\/&#8221;\\\/usr\\\/bin\\\/env&#8221;\/&#8221;\\\/ffp\\\/bin\\\/env&#8221;\/ [&hellip;]<\/p>\n<div class=\"link-more\"><a href=\"https:\/\/adrhc.go.ro\/blog\/compiling-nodejs\/#more-175\" class=\"more-link\">Continue reading &#10142; <span class=\"screen-reader-text\">Compiling nodejs<\/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,11,163],"tags":[],"class_list":["post-175","post","type-post","status-publish","format-standard","hentry","category-compiling-from-source","category-linux","category-nsa310"],"_links":{"self":[{"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/posts\/175","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=175"}],"version-history":[{"count":0,"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/posts\/175\/revisions"}],"wp:attachment":[{"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/media?parent=175"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/categories?post=175"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/tags?post=175"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}