Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Node 6.5.0 #68

Closed
wants to merge 7 commits into from
Closed

Node 6.5.0 #68

wants to merge 7 commits into from

Conversation

huseyinkozan
Copy link
Contributor

@huseyinkozan huseyinkozan commented Sep 13, 2016

Node 6.5.0 patchs. Only --without-intl and some trials to enable intl.

Signed the Tessel CLA.

@huseyinkozan
Copy link
Contributor Author

Relevant issues:
tessel/t2-firmware#206 (comment)
nodejs/node#7173 (comment)

Patch coming from (patch merged after 6.5.0) :
nodejs/node#8233

@rwaldron
Copy link
Contributor

@huseyinkozan can you update this to 6.9.0—thanks!!

@huseyinkozan
Copy link
Contributor Author

@rwaldron Tried to update but no luck at first build. No time to retry.
Here the trial codes: https://github.com/huseyinkozan/openwrt-tessel/tree/node-6.9.0

@johnnyman727
Copy link
Contributor

I've updated @huseyinkozan's branch to Node 6.9.2 but I was also unable to compile properly. Here is the error that gets returned:

/home/openwrt-tessel/openwrt/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/node-v6.9.2/out/Release/obj/gen/blink/platform/inspector_protocol/InspectorProtocol.cpp: In function 'void blink::protocol::internal::intToStr(int, char*, size_t)':
/home/openwrt-tessel/openwrt/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/node-v6.9.2/out/Release/obj/gen/blink/platform/inspector_protocol/InspectorProtocol.cpp:23:5: error: 'snprintf' is not a member of 'std'
     std::snprintf(buffer, length, "%d", number);
     ^
/home/openwrt-tessel/openwrt/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/node-v6.9.2/out/Release/obj/gen/blink/platform/inspector_protocol/InspectorProtocol.cpp: In function 'void blink::protocol::internal::doubleToStr(double, char*, size_t)':
/home/openwrt-tessel/openwrt/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/node-v6.9.2/out/Release/obj/gen/blink/platform/inspector_protocol/InspectorProtocol.cpp:28:5: error: 'snprintf' is not a member of 'std'
     std::snprintf(buffer, length, "%f", number);
     ^
/home/openwrt-tessel/openwrt/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/node-v6.9.2/out/Release/obj/gen/blink/platform/inspector_protocol/InspectorProtocol.cpp: In function 'void blink::protocol::internal::doubleToStr3(double, char*, size_t)':
/home/openwrt-tessel/openwrt/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/node-v6.9.2/out/Release/obj/gen/blink/platform/inspector_protocol/InspectorProtocol.cpp:33:5: error: 'snprintf' is not a member of 'std'
     std::snprintf(buffer, length, "%.3g", number);
     ^
/home/openwrt-tessel/openwrt/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/node-v6.9.2/out/Release/obj/gen/blink/platform/inspector_protocol/InspectorProtocol.cpp: In function 'void blink::protocol::internal::doubleToStr6(double, char*, size_t)':
/home/openwrt-tessel/openwrt/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/node-v6.9.2/out/Release/obj/gen/blink/platform/inspector_protocol/InspectorProtocol.cpp:38:5: error: 'snprintf' is not a member of 'std'
     std::snprintf(buffer, length, "%.6g", number);

I haven't had time to look into this much but does anyone have an instinct as to what might be the issue? Incorrect C++ compiler?

@johnnyman727 johnnyman727 mentioned this pull request Dec 7, 2016
@johnnyman727
Copy link
Contributor

I think this commented out line might be the issue. Trying to compile again...

@johnnyman727
Copy link
Contributor

Nope, the issue still occurs 😭

@johnnyman727
Copy link
Contributor

@thealphanerd, @rwaldron mentioned that you might have some insight here. Do you have any ideas why we'd be getting C++ compilation errors when trying to compile Node (on MIPS)?

@MylesBorins
Copy link

was 6.9.1 working?

is this using the default tarball? the failing bits seem related to inspector, which there were some updates to in the release. /cc @nodejs/v8

@rwaldron
Copy link
Contributor

rwaldron commented Dec 7, 2016

was 6.9.1 working?

No, we're only just now getting a chance to work on the upgrade to Node 6.x. The patch we received for 6.5.0 compiles correctly, but @johnnyman727 was hoping to build 6.9.2.

@MylesBorins
Copy link

MylesBorins commented Dec 7, 2016 via email

@johnnyman727
Copy link
Contributor

We're running with gcc 4.8.4 on our build box currently. Do you think we need v6+?

@MylesBorins
Copy link

MylesBorins commented Dec 7, 2016 via email

@bnoordhuis
Copy link

It's probably a compatibility issue with the C++ standard library headers that you are compiling against because the compiler itself must be C++11-compatible if you can get to the point where InspectorProtocol.cpp is generated and compiled.

If you can live without V8 inspector (DevTools) support, do ./configure --without-inspector, otherwise do s/std::snprintf/snprintf/ to the files in deps/v8_inspector. We may be able to land that change upstream as well.

@huseyinkozan
Copy link
Contributor Author

Hi all,

I tried to compile but no luck. Here the results :
Adding these lines to packages/no/no/Makefile didnt solve:

TARGET_CFLAGS += -std=c++11
TARGET_CPPFLAGS += -std=c++11
TARGET_CXXFLAGS += -std=c++11

Then I found this : http://src.mouf.net/ports/view/head/www/node/Makefile?rev=422711
And tried adding this line to package/node/node/Makefile:

TARGET_CXXFLAGS += -D_GLIBCXX_USE_C99

And passed the std::snprintf error.

But we have another issue because of old uclibc (I thing). Like :

We can try this mentioned patch : https://git.busybox.net/uClibc/commit/?id=6c4538905e65ceb203f59aaa9a61728e81c6bc0a

Or, update a newer version. It will be so good if we update/upgrade all OpenWRT.

Thats all for today, see you

@rwaldron rwaldron mentioned this pull request Dec 13, 2016
4 tasks
@rwaldron
Copy link
Contributor

If you can live without V8 inspector (DevTools) support, do ./configure --without-inspector,

I wonder if this would result in an observable size reduction?

@huseyinkozan
Copy link
Contributor Author

@rwaldron Trying ...

@huseyinkozan
Copy link
Contributor Author

Still same

/home/huseyinkozan/openwrt-tessel/openwrt/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/node-v6.9.4/out/Release/obj.target/v8_base/deps/v8/src/assembler.o: In function `v8::internal::wasm::f32_nearest_int_wrapper(float*)':
assembler.cc:(.text._ZN2v88internal4wasmL23f32_nearest_int_wrapperEPf+0x18): undefined reference to `nearbyintf'
collect2: error: ld returned 1 exit status
make[5]: *** [/home/huseyinkozan/openwrt-tessel/openwrt/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/node-v6.9.4/out/Release/node] Error 1
make[5]: Leaving directory `/home/huseyinkozan/openwrt-tessel/openwrt/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/node-v6.9.4/out'
make[4]: *** [node] Error 2
make[4]: Leaving directory `/home/huseyinkozan/openwrt-tessel/openwrt/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/node-v6.9.4'
make[3]: *** [/home/huseyinkozan/openwrt-tessel/openwrt/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/node-v6.9.4/.built] Error 2
make[3]: Leaving directory `/home/huseyinkozan/openwrt-tessel/package/node/node'
make[2]: *** [package/feeds/tessel/node/compile] Error 2
make[2]: Leaving directory `/home/huseyinkozan/openwrt-tessel/openwrt'
make[1]: *** [/home/huseyinkozan/openwrt-tessel/openwrt/staging_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/stamp/.package_compile] Error 2
make[1]: Leaving directory `/home/huseyinkozan/openwrt-tessel/openwrt'
make: *** [world] Error 2
huseyinkozan@tessel-builder:~/openwrt-tessel/openwrt$ 

@bnoordhuis
Copy link

Untested, but you might be able to get away with s/nearbyintf/roundf/. Please run the test suite afterwards, though. :-)

@rwaldron
Copy link
Contributor

@huseyinkozan you're a champ for that follow up ❤️

@rwaldron
Copy link
Contributor

@bnoordhuis interesting, definitely worth a try

@huseyinkozan
Copy link
Contributor Author

https://github.com/artynet/openwrt-git/tree/openwrt-1505-setup-03/package/linino
Note : attention to the node packages!

Can we combine/use that OpenWRT tree ?

@rwaldron
Copy link
Contributor

After much consideration, I think we should upgrade to Node 6.5.0 per @huseyinkozan original patch. We can work on newer 6.x.x upgrades after that.

@HipsterBrown
Copy link
Contributor

@rwaldron Agreed. 👍

@rwaldron
Copy link
Contributor

I'm going to work on resolving the existing conflict and get this landed today.

@MylesBorins
Copy link

MylesBorins commented Apr 25, 2017 via email

@rwaldron
Copy link
Contributor

@huseyinkozan I've landed this in master

@rwaldron rwaldron closed this Apr 25, 2017
@rwaldron
Copy link
Contributor

Temporarily reverted

@huseyinkozan
Copy link
Contributor Author

Hi,

I will get my Tessel few days later. I may look at again, If I have time.

@MylesBorins
Copy link

MylesBorins commented May 3, 2017 via email

@rwaldron
Copy link
Contributor

rwaldron commented May 4, 2017

@huseyinkozan thanks, I'm in the process of getting chaos calmer upgraded as well.

@MylesBorins I appreciate the offer, but I still haven't made a successful build with any patches or headers :| (Fact: that is likely because I don't know what the hell I'm doing)

@huseyinkozan
Copy link
Contributor Author

@rwaldron I see. I tried to build with these sub modules:

  • openwrt : 2017-04-26
  • upstream-pacakges : for-15.05

I got nearbyint error agin. Then made some digg about uClibc, which was dead at 2012. I am looking to switch the toolchain to musl, now.

@rwaldron
Copy link
Contributor

rwaldron commented May 4, 2017

@huseyinkozan
Copy link
Contributor Author

@rwaldron I am not sure to use a not maintained lib. Also, there is a comparison:
http://www.etalabs.net/compare_libcs.html

I want to try to build. Nothing to loose, rather than time : - /

@huseyinkozan
Copy link
Contributor Author

@rwaldron Added the patch you noted, but same error. Cannot find how to switch to musl.

@kevinmehall
Copy link
Member

I'd recommend rebasing on LEDE 17.01 which switched to musl by default. It's possible to switch 15.05 to musl in the build configuration, but not well tested AFAIK.

@rwaldron
Copy link
Contributor

@kevinmehall just so I understand correctly, you're suggesting that we try to apply our existing openwrt patches to the lede-17.01 tag (from https://github.com/lede-project/source)? It's doable, but there's a merge conflict on the first patch: tessel/openwrt@4e1c826

$ gst
On branch lede-17.01-rebase
You are currently cherry-picking commit 4e1c826ed3.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:

	new file:   target/linux/ramips/patches-3.14/999-mt7620-spi-cs1.patch
	new file:   target/linux/ramips/patches-3.18/999-mt7620-spi-cs1.patch

Unmerged paths:
  (use "git add <file>..." to mark resolution)

	both modified:   target/linux/ramips/dts/mt7620n.dtsi

It appears minor, but I don't know how to resolve this:

<<<<<<< HEAD
    spi0: spi@b00 {
      compatible = "ralink,mt7620a-spi", "ralink,rt2880-spi";
      reg = <0xb00 0x40>;
=======
    spi@b00 {
      compatible = "ralink,mt7620a-spi", "ralink,rt5350-spi", "ralink,rt2880-spi";
      reg = <0xb00 0x100>;
>>>>>>> 4e1c826ed3... mt7620n: Add support for SPI CS1.

The other two files have no issues.

@rwaldron
Copy link
Contributor

Here's the branch I'm cherry picking from: https://github.com/tessel/openwrt/commits/2017-04-26

@kevinmehall
Copy link
Member

Correct.

The conflict is against an upstream change that appears to be intended to have the same effect as my commit. My commit can likely be dropped, but the Tessel.dtsi file introduced in a subsequent commit will need to be changed to reflect the different SPI device name.

@huseyinkozan
Copy link
Contributor Author

Hi all,

I am very sory to misguide about node versions greater than 6.5. After saw tessel/openwrt#2 I tried to build carefully and made it success with 6.10.3. I am preparing a PR.
Hope all forgive ...

@huseyinkozan
Copy link
Contributor Author

@rwaldron Where are we setting the version info ?

I am getting undefined, like:

$ t2 version
INFO Looking for your Tessel...
INFO Connected to t.
ERR! TypeError: Cannot read property 'version' of undefined

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants