tessel / openwrt-tessel

OpenWrt build scripts and package feed for Tessel 2
Other
32 stars 14 forks source link

Update Node to 6.1.0 #58

Closed wyze closed 7 years ago

wyze commented 8 years ago

I tested blinky and the ambient module and they worked for me. You can grab the image here. You will need to be on the latest master of t2-cli since tessel/t2-cli#698 was landed after 0.0.19 was released and there hasn't been another release yet.

You can update your Tessel with: t2 update --openwrt-path PATH_TO_DOWNLOAD


This updates the OpenWRT submodule to include this commit: https://github.com/tessel/openwrt/commit/4647609084786c1e11808d4e22b1ca29b4913b78

There is more information on that commit, but it comes down to patching uClibc to support the nearbyintf function needed by Node 6.x.


Note: I'd like to cut the next firmware release where this is included. I'd love for someone to walk me through it on Slack. 😄

LinusU commented 8 years ago

Wow, this is awesome, can't wait to try it out :clap:

rwaldron commented 8 years ago

We need to target 6.2 or better. @thealphanerd advises re: regression in "require" w/r to real path that breaks all the things

huseyinkozan commented 8 years ago

Hello,

I tried to build 6.2.1 with your patch. But my binary is 4.3MB that differs from yours which is 19MB. Did I missed something ? Is it safe to write this bin to my Tessel ?

My changes : https://github.com/huseyinkozan/openwrt-tessel/tree/node-6.2.1

Output directory :

 $ LC_ALL=C ll
total 74M
-rw-r--r-- 1 huseyinkozan huseyinkozan  59M Jun  7 14:42 OpenWrt-SDK-ramips-mt7620_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64.tar.bz2
-rw-r--r-- 1 huseyinkozan huseyinkozan  472 Jun  7 14:41 md5sums
-rw-r--r-- 1 huseyinkozan huseyinkozan 3.0M Jun  7 14:41 openwrt-ramips-mt7620-root.squashfs
-rw-r--r-- 1 huseyinkozan huseyinkozan 4.3M Jun  7 14:41 openwrt-ramips-mt7620-tessel-squashfs-sysupgrade.bin
-rw-r--r-- 1 huseyinkozan huseyinkozan 1.1M Jun  7 14:41 openwrt-ramips-mt7620-uImage.bin
-rwxr-xr-x 1 huseyinkozan huseyinkozan 3.3M Jun  7 14:41 openwrt-ramips-mt7620-vmlinux.bin
-rwxr-xr-x 1 huseyinkozan huseyinkozan 3.3M Jun  7 14:41 openwrt-ramips-mt7620-vmlinux.elf
drwxr-xr-x 5 huseyinkozan huseyinkozan 4.0K Jun  7 14:42 packages
-rw-r--r-- 1 huseyinkozan huseyinkozan  797 Jun  7 14:41 sha256sums
huseyinkozan commented 8 years ago

After retry with make -j1 V=s it gives me this error :

  mipsel-openwrt-linux-uclibc-g++ -pthread -rdynamic  -o /home/hk/p/openwrt-tessel/openwrt/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/node-v6.2.1/out/Release/genrb -Wl,--start-group /home/hk/p/openwrt-tessel/openwrt/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/node-v6.2.1/out/Release/obj.host/genrb/deps/icu-small/source/tools/genrb/reslist.o /home/hk/p/openwrt-tessel/openwrt/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/node-v6.2.1/out/Release/obj.host/genrb/deps/icu-small/source/tools/genrb/parse.o /home/hk/p/openwrt-tessel/openwrt/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/node-v6.2.1/out/Release/obj.host/genrb/deps/icu-small/source/tools/genrb/rbutil.o /home/hk/p/openwrt-tessel/openwrt/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/node-v6.2.1/out/Release/obj.host/genrb/deps/icu-small/source/tools/genrb/wrtjava.o /home/hk/p/openwrt-tessel/openwrt/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/node-v6.2.1/out/Release/obj.host/genrb/deps/icu-small/source/tools/genrb/wrtxml.o /home/hk/p/openwrt-tessel/openwrt/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/node-v6.2.1/out/Release/obj.host/genrb/deps/icu-small/source/tools/genrb/errmsg.o /home/hk/p/openwrt-tessel/openwrt/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/node-v6.2.1/out/Release/obj.host/genrb/deps/icu-small/source/tools/genrb/prscmnts.o /home/hk/p/openwrt-tessel/openwrt/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/node-v6.2.1/out/Release/obj.host/genrb/deps/icu-small/source/tools/genrb/ustr.o /home/hk/p/openwrt-tessel/openwrt/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/node-v6.2.1/out/Release/obj.host/genrb/deps/icu-small/source/tools/genrb/rle.o /home/hk/p/openwrt-tessel/openwrt/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/node-v6.2.1/out/Release/obj.host/genrb/deps/icu-small/source/tools/genrb/genrb.o /home/hk/p/openwrt-tessel/openwrt/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/node-v6.2.1/out/Release/obj.host/genrb/deps/icu-small/source/tools/genrb/read.o /home/hk/p/openwrt-tessel/openwrt/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/node-v6.2.1/out/Release/obj.host/tools/icu/libicutools.a -Wl,--end-group -L/home/hk/p/openwrt-tessel/openwrt/staging_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/usr/lib -lz -lssl -lcrypto
/home/hk/p/openwrt-tessel/openwrt/staging_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/usr/lib/libcrypto.so: warning: gethostbyname is obsolescent, use getnameinfo() instead.
  mipsel-openwrt-linux-uclibc-g++ '-DUCONFIG_NO_TRANSLITERATION=1' '-DUCONFIG_NO_SERVICE=1' '-DUCONFIG_NO_REGULAR_EXPRESSIONS=1' '-DU_ENABLE_DYLOAD=0' '-DU_STATIC_IMPLEMENTATION=1' '-DU_HAVE_STD_STRING=0' '-DUCONFIG_NO_BREAK_ITERATION=0' '-DUCONFIG_NO_LEGACY_CONVERSION=1' '-DUCONFIG_NO_IDNA=1' -I/home/hk/p/openwrt-tessel/openwrt/staging_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/usr/include -I../deps/icu-small/source/common -I../deps/icu-small/source/i18n -I../deps/icu-small/source/io -I../deps/icu-small/source/tools/toolutil  -pthread -Wall -Wextra -Wno-unused-parameter -O3 -fno-omit-frame-pointer -fno-rtti -fno-exceptions -std=gnu++0x -MMD -MF /home/hk/p/openwrt-tessel/openwrt/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/node-v6.2.1/out/Release/.deps//home/hk/p/openwrt-tessel/openwrt/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/node-v6.2.1/out/Release/obj.host/iculslocs/tools/icu/iculslocs.o.d.raw   -c -o /home/hk/p/openwrt-tessel/openwrt/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/node-v6.2.1/out/Release/obj.host/iculslocs/tools/icu/iculslocs.o ../tools/icu/iculslocs.cc
../tools/icu/iculslocs.cc: In function 'int dumpAllButInstalledLocales(int, icu_57::LocalUResourceBundlePointer&, icu_57::LocalUFILEPointer&, UErrorCode&)':
../tools/icu/iculslocs.cc:196:15: warning: unused variable 'isTable' [-Wunused-variable]
   const UBool isTable = (UBool)(ures_getType(bund.getAlias()) == URES_TABLE);
               ^
  mipsel-openwrt-linux-uclibc-g++ '-DUCONFIG_NO_TRANSLITERATION=1' '-DUCONFIG_NO_SERVICE=1' '-DUCONFIG_NO_REGULAR_EXPRESSIONS=1' '-DU_ENABLE_DYLOAD=0' '-DU_STATIC_IMPLEMENTATION=1' '-DU_HAVE_STD_STRING=0' '-DUCONFIG_NO_BREAK_ITERATION=0' '-DUCONFIG_NO_LEGACY_CONVERSION=1' '-DUCONFIG_NO_IDNA=1' -I/home/hk/p/openwrt-tessel/openwrt/staging_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/usr/include -I../deps/icu-small/source/common -I../deps/icu-small/source/i18n -I../deps/icu-small/source/io -I../deps/icu-small/source/tools/toolutil  -pthread -Wall -Wextra -Wno-unused-parameter -O3 -fno-omit-frame-pointer -fno-rtti -fno-exceptions -std=gnu++0x -MMD -MF /home/hk/p/openwrt-tessel/openwrt/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/node-v6.2.1/out/Release/.deps//home/hk/p/openwrt-tessel/openwrt/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/node-v6.2.1/out/Release/obj.host/iculslocs/tools/icu/no-op.o.d.raw   -c -o /home/hk/p/openwrt-tessel/openwrt/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/node-v6.2.1/out/Release/obj.host/iculslocs/tools/icu/no-op.o ../tools/icu/no-op.cc
  mipsel-openwrt-linux-uclibc-g++ -pthread -rdynamic  -o /home/hk/p/openwrt-tessel/openwrt/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/node-v6.2.1/out/Release/iculslocs -Wl,--start-group /home/hk/p/openwrt-tessel/openwrt/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/node-v6.2.1/out/Release/obj.host/iculslocs/tools/icu/iculslocs.o /home/hk/p/openwrt-tessel/openwrt/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/node-v6.2.1/out/Release/obj.host/iculslocs/tools/icu/no-op.o /home/hk/p/openwrt-tessel/openwrt/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/node-v6.2.1/out/Release/obj.host/tools/icu/libicutools.a -Wl,--end-group -L/home/hk/p/openwrt-tessel/openwrt/staging_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/usr/lib -lz -lssl -lcrypto
/home/hk/p/openwrt-tessel/openwrt/staging_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/usr/lib/libcrypto.so: warning: gethostbyname is obsolescent, use getnameinfo() instead.
  LD_LIBRARY_PATH=/home/hk/p/openwrt-tessel/openwrt/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/node-v6.2.1/out/Release/lib.host:/home/hk/p/openwrt-tessel/openwrt/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/node-v6.2.1/out/Release/lib.target:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH; cd ../tools/icu; mkdir -p /home/hk/p/openwrt-tessel/openwrt/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/node-v6.2.1/out/Release/obj/gen/icutmp; python icutrim.py -P "/home/hk/p/openwrt-tessel/openwrt/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/node-v6.2.1/out/Release" -D ../../deps/icu-small/source/data/in/icudt57l.dat --delete-tmp -T "/home/hk/p/openwrt-tessel/openwrt/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/node-v6.2.1/out/Release/obj/gen/icutmp" -F icu_small.json -O icudt57l.dat -v -L en,root
Options: {'verbose': 1, 'filterfile': 'icu_small.json', 'toolpath': '/home/hk/p/openwrt-tessel/openwrt/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/node-v6.2.1/out/Release', 'deltmpdir': 1, 'outfile': 'icudt57l.dat', 'datfile': '../../deps/icu-small/source/data/in/icudt57l.dat', 'locales': 'en,root', 'endian': 'little', 'tmpdir': '/home/hk/p/openwrt-tessel/openwrt/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/node-v6.2.1/out/Release/obj/gen/icutmp'}
icu_small.json: icutrim.py config: Trim down ICU to just a certain locale set, needed for node.js use.
/home/hk/p/openwrt-tessel/openwrt/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/node-v6.2.1/out/Release/icupkg: 1: /home/hk/p/openwrt-tessel/openwrt/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/node-v6.2.1/out/Release/icupkg: Syntax error: "(" unexpected
FAILED: /home/hk/p/openwrt-tessel/openwrt/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/node-v6.2.1/out/Release/icupkg -tl ../../deps/icu-small/source/data/in/icudt57l.dat /home/hk/p/openwrt-tessel/openwrt/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/node-v6.2.1/out/Release/obj/gen/icutmp/icudt57l.dat
tools/icu/icudata.target.mk:13: recipe for target '/home/hk/p/openwrt-tessel/openwrt/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/node-v6.2.1/out/Release/obj/gen/icutmp/icudt57l.dat' failed
make[6]: *** [/home/hk/p/openwrt-tessel/openwrt/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/node-v6.2.1/out/Release/obj/gen/icutmp/icudt57l.dat] Error 1
make[6]: Leaving directory '/home/hk/p/openwrt-tessel/openwrt/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/node-v6.2.1/out'
Makefile:66: recipe for target 'node' failed
make[5]: *** [node] Error 2
make[5]: Leaving directory '/home/hk/p/openwrt-tessel/openwrt/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/node-v6.2.1'
Makefile:67: recipe for target '/home/hk/p/openwrt-tessel/openwrt/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/node-v6.2.1/.built' failed
make[4]: *** [/home/hk/p/openwrt-tessel/openwrt/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/node-v6.2.1/.built] Error 2
make[4]: Leaving directory '/home/hk/p/openwrt-tessel/package/node/node'
package/Makefile:191: recipe for target 'package/feeds/tessel/node/compile' failed
make[3]: *** [package/feeds/tessel/node/compile] Error 2
make[3]: Leaving directory '/home/hk/p/openwrt-tessel/openwrt'
package/Makefile:188: recipe for target '/home/hk/p/openwrt-tessel/openwrt/staging_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/stamp/.package_compile' failed
make[2]: *** [/home/hk/p/openwrt-tessel/openwrt/staging_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/stamp/.package_compile] Error 2
make[2]: Leaving directory '/home/hk/p/openwrt-tessel/openwrt'
/home/hk/p/openwrt-tessel/openwrt/include/toplevel.mk:181: recipe for target 'world' failed
make[1]: *** [world] Error 2
make[1]: Leaving directory '/home/hk/p/openwrt-tessel/openwrt'
Makefile:44: recipe for target 'world' failed
make: *** [world] Error 2

Edit : I found this: https://github.com/nodejs/node/issues/7173, and will try to fix.

johnnyman727 commented 7 years ago

Closing in favor of #68.