Bug 215044 - www/node: Fails to build on ARMv6
Summary: www/node: Fails to build on ARMv6
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: arm Any
: --- Affects Some People
Assignee: Po-Chuan Hsieh
URL:
Keywords: needs-qa, patch
Depends on:
Blocks: 215775
  Show dependency treegraph
 
Reported: 2016-12-04 13:47 UTC by Peter Laursen
Modified: 2017-01-05 19:37 UTC (History)
2 users (show)

See Also:
bhughes: maintainer-feedback+
koobs: merge-quarterly?


Attachments
Unified patches compressed using XZ (2.19 KB, application/x-xz)
2016-12-04 13:47 UTC, Peter Laursen
no flags Details
Unified patches (version 2) compressed by XZ (1.95 KB, application/x-xz)
2016-12-05 20:23 UTC, Peter Laursen
no flags Details
Latest patch compressed by XZ (1.95 KB, application/x-xz)
2016-12-12 00:03 UTC, Peter Laursen
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Laursen 2016-12-04 13:47:12 UTC
Created attachment 177656 [details]
Unified patches compressed using XZ

Hi,
www/node7 fails to build on ARMv6.
It seems that, when www/node7 was created, the patches from www/node6 were not copied to the www/node7 port. This lead to the port failing to build on ARMv6.

In the attached patch, I have included the modifications I did in order to make www/node7 build on my Raspberry Pi 2 and Beaglebone Black.
(I mainly copied the patches from www/node6 and ensured that the CONFIGURE_ARGS were not inadvertently overridden in the Makefile)

I hope you can use the patch - otherwise feel free to let me know and I shall do my best to regenerate it.

All the best,

Peter.
Comment 1 Mikael Urankar freebsd_committer freebsd_triage 2016-12-05 08:49:25 UTC
Hi,

Thanks for backporting the patch from node6.
I'm not sure patch-deps_v8_src_log-utils.h and patch-node.gyp are still necessary.
Comment 2 Peter Laursen 2016-12-05 09:18:36 UTC
Hi,
Thanks for replying.
Feel free to remove the two patches if they no longer serve a purpose. :-)
I was just intent on getting www/node7 to build on ARM, so I thought it best to copy all the patches.

All the best,

Peter.
P.S.: If you want me to generate a new patch with the two files removed, just tell me and I shall add it as a new attachment.
Comment 3 Mikael Urankar freebsd_committer freebsd_triage 2016-12-05 09:26:32 UTC
Yes please, test if it builds/works fine on armv6 without the 2 patches and regenerate a new patch.
thanks
Comment 4 Peter Laursen 2016-12-05 10:01:43 UTC
Hi,
Just started the build.
Note that I only have access to my Beaglebone Black (since I didn't turn on my Rpi before heading to work), so the build may take some time.

Please note that www/node6 also overrides the CONFIGURE_ARGS if built for ARM (which leads to it not picking up the selected options).
Check line 80 in /usr/ports/www/node6/Makefile - note that a '+' sign is missing from the assignment of CONFIGURE_ARGS.
(I really am not sure whether that merits a separate bug report; if it does, I'm sorry for cluttering up this issue).

All the best,

Peter.
Comment 5 Bradley T. Hughes freebsd_committer freebsd_triage 2016-12-05 12:28:36 UTC
I will have a look at the patches and try them out. I have been working on setting up qemu-user-static to I can build for ARM on my poudriere builder, now I have a reason to actually finish setting it up :)
Comment 6 Peter Laursen 2016-12-05 20:23:29 UTC
Created attachment 177697 [details]
Unified patches (version 2) compressed by XZ
Comment 7 Peter Laursen 2016-12-05 20:26:01 UTC
Hi,
Finally my build finished on ARM.
The two patches mentioned previously has been removed from the latest attached patch.
To apply the patch, I did the following:
patch -d /usr/ports/www/node7 -p1 < node7-patches-v2

All the best,

Peter.
Comment 8 Peter Laursen 2016-12-08 09:35:08 UTC
Hi,
After www/node7 was moved to www/node, the patches still apply cleanly.
I have updated the bug summary to reflect the move of the port.

All the best,

Peter.
Comment 9 Bradley T. Hughes freebsd_committer freebsd_triage 2016-12-11 20:57:51 UTC
I think the patch needs to be regenerated, because it still uses www/node7 which doesn't exist anymore. Other than that, I think we can submit this.

Unfortunately, I have not had any luck creating an ARMv6 poudriere jail to be able to test this myself. If it's ok, Peter, I'd like to solicit some help from you offline so that I can make armv6 builds part of my normal routine when submitting patches for node.js updates.

Thanks :)
Comment 10 Peter Laursen 2016-12-12 00:03:57 UTC
Created attachment 177896 [details]
Latest patch compressed by XZ

Hi,
Here is the latest patch regenerated after the port move.

All the best,

Peter.
Comment 11 Bradley T. Hughes freebsd_committer freebsd_triage 2016-12-13 20:13:15 UTC
Comment on attachment 177896 [details]
Latest patch compressed by XZ

Looks good to me :)
Comment 12 commit-hook freebsd_committer freebsd_triage 2017-01-05 19:35:40 UTC
A commit references this bug:

Author: sunpoet
Date: Thu Jan  5 19:34:17 UTC 2017
New revision: 430663
URL: https://svnweb.freebsd.org/changeset/ports/430663

Log:
  Update to 7.4.0 [1]

  - Fix build on ARMv6 [2]
  - While I'm here, remove duplicate PLIST_SUB which is already handled by OPTIONS_SUB=yes

  Changes:	https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V7.md
  		https://nodejs.org/en/blog/release/v7.4.0/
  PR:		215775 [1], 215044 [2]
  Submitted by:	Bradley T. Hughes <bradleythughes@fastmail.fm> (maintainer) [1],
  		Peter Laursen <plaursen@kobalt.dk> [2]

Changes:
  head/www/node/Makefile
  head/www/node/distinfo
  head/www/node/files/
  head/www/node/files/patch-deps_v8_src_arm_cpu-arm.cc
  head/www/node/files/patch-deps_v8_src_base_atomicops__internals__arm__gcc.h
  head/www/node/files/patch-deps_v8_src_base_platform_platform-freebsd.cc
  head/www/node/files/patch-deps_v8_src_libsampler_sampler.cc
Comment 13 Po-Chuan Hsieh freebsd_committer freebsd_triage 2017-01-05 19:37:33 UTC
Committed. Thanks!